@redvars/peacock 4.7.0 → 4.8.1

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 (300) hide show
  1. package/dist/accordion-item.js +4 -4
  2. package/dist/app-bar.js +1 -1
  3. package/dist/app-shell.js +2 -2
  4. package/dist/assets/styles.css +1 -1
  5. package/dist/assets/styles.css.map +1 -1
  6. package/dist/assets/theme.d.ts +2 -0
  7. package/dist/assets/theme.js +49 -29
  8. package/dist/assets/tokens.css +1 -1
  9. package/dist/assets/tokens.css.map +1 -1
  10. package/dist/bottom-sheet.js +3 -3
  11. package/dist/breadcrumb-item.js +1 -1
  12. package/dist/button-group.js +79 -0
  13. package/dist/button-group.js.map +1 -1
  14. package/dist/button.js +26 -25
  15. package/dist/button.js.map +1 -1
  16. package/dist/calendar-column-view.js +3 -3
  17. package/dist/calendar-month-view.js +3 -3
  18. package/dist/calendar-timeline.js +3 -3
  19. package/dist/card.js +2 -1
  20. package/dist/card.js.map +1 -1
  21. package/dist/carousel.js +182 -7
  22. package/dist/carousel.js.map +1 -1
  23. package/dist/{cartesian-chart-C8qKDXo8.js → cartesian-chart-UW1CYKRS.js} +2 -2
  24. package/dist/{cartesian-chart-C8qKDXo8.js.map → cartesian-chart-UW1CYKRS.js.map} +1 -1
  25. package/dist/cb-group.js +1 -1
  26. package/dist/chart-area.js +2 -2
  27. package/dist/chart-bar.js +2 -2
  28. package/dist/{chart-base-BpQMZZsw.js → chart-base-D5ujPGcl.js} +3 -3
  29. package/dist/{chart-base-BpQMZZsw.js.map → chart-base-D5ujPGcl.js.map} +1 -1
  30. package/dist/chart-doughnut.js +1 -1
  31. package/dist/chart-line.js +2 -2
  32. package/dist/chart-pie.js +2 -2
  33. package/dist/checkbox.js +7 -6
  34. package/dist/checkbox.js.map +1 -1
  35. package/dist/chip.js +34 -8
  36. package/dist/chip.js.map +1 -1
  37. package/dist/circular-progress.js +46 -15
  38. package/dist/circular-progress.js.map +1 -1
  39. package/dist/code-highlighter.js +1 -1
  40. package/dist/color-picker.js +1 -1
  41. package/dist/command-palette.js +2 -2
  42. package/dist/comment-composer.js +5 -5
  43. package/dist/condition-builder.js +1 -1
  44. package/dist/{condition-group-base-NcvOY-Zv.js → condition-group-base-DS76sprm.js} +2 -2
  45. package/dist/{condition-group-base-NcvOY-Zv.js.map → condition-group-base-DS76sprm.js.map} +1 -1
  46. package/dist/confirm-dialog.js +2 -2
  47. package/dist/custom-elements-jsdocs.json +302 -10
  48. package/dist/custom-elements.json +1209 -16
  49. package/dist/date-picker.js +51 -1
  50. package/dist/date-picker.js.map +1 -1
  51. package/dist/dependency-map.js +2 -2
  52. package/dist/{diagram-hv7hCgzx.js → diagram-DFO-X7yq.js} +2 -2
  53. package/dist/{diagram-hv7hCgzx.js.map → diagram-DFO-X7yq.js.map} +1 -1
  54. package/dist/diagram.js +1 -1
  55. package/dist/discussion.js +3 -3
  56. package/dist/{document-editor-CZBlz3ai.js → document-editor-W4pXGCEL.js} +19 -7
  57. package/dist/document-editor-W4pXGCEL.js.map +1 -0
  58. package/dist/document-editor.js +3 -3
  59. package/dist/dropdown-button.js +1 -1
  60. package/dist/erd.js +4 -4
  61. package/dist/fab-menu-item.js +189 -0
  62. package/dist/fab-menu-item.js.map +1 -0
  63. package/dist/fab-menu.js +329 -0
  64. package/dist/fab-menu.js.map +1 -0
  65. package/dist/fab.js +28 -17
  66. package/dist/fab.js.map +1 -1
  67. package/dist/field.js +1 -1
  68. package/dist/file-upload.js +1 -1
  69. package/dist/flow.js +1 -1
  70. package/dist/haptics-CAaQ2E-9.js +29 -0
  71. package/dist/haptics-CAaQ2E-9.js.map +1 -0
  72. package/dist/hover-card.js +5 -3
  73. package/dist/hover-card.js.map +1 -1
  74. package/dist/html-editor.js +4 -4
  75. package/dist/icon-button.js +26 -25
  76. package/dist/icon-button.js.map +1 -1
  77. package/dist/{index-DK3fREuj.js → index-BBxpsqx8.js} +4 -4
  78. package/dist/{index-DK3fREuj.js.map → index-BBxpsqx8.js.map} +1 -1
  79. package/dist/{index-CTEt3LtO.js → index-CDtKB0In.js} +4 -4
  80. package/dist/{index-CTEt3LtO.js.map → index-CDtKB0In.js.map} +1 -1
  81. package/dist/{index-Bag4vtx-.js → index-Tb0ky27z.js} +3 -3
  82. package/dist/{index-Bag4vtx-.js.map → index-Tb0ky27z.js.map} +1 -1
  83. package/dist/index.js +17 -13
  84. package/dist/index.js.map +1 -1
  85. package/dist/{indicator-navigation-item-BG0TrdDE.js → indicator-navigation-item-aZsm-RpR.js} +17 -5
  86. package/dist/{indicator-navigation-item-BG0TrdDE.js.map → indicator-navigation-item-aZsm-RpR.js.map} +1 -1
  87. package/dist/inline-edit.js +1 -1
  88. package/dist/json-viewer.js +1 -1
  89. package/dist/linear-progress.js +51 -4
  90. package/dist/linear-progress.js.map +1 -1
  91. package/dist/link-button.js +26 -25
  92. package/dist/link-button.js.map +1 -1
  93. package/dist/loader-full.js +10 -6
  94. package/dist/loader-full.js.map +1 -1
  95. package/dist/loader.js +19 -6
  96. package/dist/loader.js.map +1 -1
  97. package/dist/loading-indicator.js +301 -0
  98. package/dist/loading-indicator.js.map +1 -0
  99. package/dist/markdown-editor.js +4 -4
  100. package/dist/mention-input.js +1 -1
  101. package/dist/menu.js +8 -6
  102. package/dist/menu.js.map +1 -1
  103. package/dist/{modal-Dds0rXAG.js → modal-ClWCCbxD.js} +7 -5
  104. package/dist/{modal-Dds0rXAG.js.map → modal-ClWCCbxD.js.map} +1 -1
  105. package/dist/modal.js +14 -3
  106. package/dist/modal.js.map +1 -1
  107. package/dist/navigation-bar-item.js +1 -1
  108. package/dist/navigation-bar.js +1 -1
  109. package/dist/navigation-drawer-group.js +1 -1
  110. package/dist/navigation-drawer.js +1 -1
  111. package/dist/navigation-rail-item.js +1 -1
  112. package/dist/navigation-rail.js +1 -1
  113. package/dist/notification-center.js +1 -1
  114. package/dist/number-counter.js +1 -1
  115. package/dist/{overlay-controller-BOk-kfil.js → overlay-controller-iVaiUqos.js} +20 -10
  116. package/dist/{overlay-controller-BOk-kfil.js.map → overlay-controller-iVaiUqos.js.map} +1 -1
  117. package/dist/pagination.js +1 -1
  118. package/dist/popover-content.js +4 -2
  119. package/dist/popover-content.js.map +1 -1
  120. package/dist/popover.js +1 -1
  121. package/dist/{progress-base-BhJK__VP.js → progress-base-BeLu9-Tq.js} +13 -1
  122. package/dist/progress-base-BeLu9-Tq.js.map +1 -0
  123. package/dist/prompt-input.js +5 -5
  124. package/dist/radio.js +6 -4
  125. package/dist/radio.js.map +1 -1
  126. package/dist/resizable-panels.js +1 -1
  127. package/dist/{rich-text-input-base-SrsPvc-j.js → rich-text-input-base-BCmnkpuV.js} +2 -2
  128. package/dist/{rich-text-input-base-SrsPvc-j.js.map → rich-text-input-base-BCmnkpuV.js.map} +1 -1
  129. package/dist/scroll-area.js +1 -1
  130. package/dist/search.js +1 -1
  131. package/dist/segmented-button.js +7 -2
  132. package/dist/segmented-button.js.map +1 -1
  133. package/dist/select.js +1 -1
  134. package/dist/side-sheet.js +3 -3
  135. package/dist/site-header.js +3 -3
  136. package/dist/site-nav-menu.js +1 -1
  137. package/dist/{slash-controller-DwL0nkqv.js → slash-controller-BFhzSjiR.js} +2 -2
  138. package/dist/{slash-controller-DwL0nkqv.js.map → slash-controller-BFhzSjiR.js.map} +1 -1
  139. package/dist/slider.js +169 -69
  140. package/dist/slider.js.map +1 -1
  141. package/dist/snackbar.js +2 -2
  142. package/dist/sparkline.js +2 -2
  143. package/dist/split-button.js +1 -1
  144. package/dist/src/__internal/utils/haptics.d.ts +7 -0
  145. package/dist/src/button/button-group/button-group.d.ts +12 -0
  146. package/dist/src/button/fab/fab.d.ts +1 -0
  147. package/dist/src/carousel/carousel.d.ts +22 -0
  148. package/dist/src/chip/chip/chip.d.ts +4 -0
  149. package/dist/src/date-picker/date-picker.d.ts +6 -1
  150. package/dist/src/document-editor/document-editor.d.ts +2 -0
  151. package/dist/src/fab-menu/fab-menu-item.d.ts +30 -0
  152. package/dist/src/fab-menu/fab-menu.d.ts +64 -0
  153. package/dist/src/fab-menu/index.d.ts +2 -0
  154. package/dist/src/index.d.ts +3 -0
  155. package/dist/src/loading-indicator/index.d.ts +1 -0
  156. package/dist/src/loading-indicator/loading-indicator.d.ts +44 -0
  157. package/dist/src/loading-indicator/shapes.d.ts +29 -0
  158. package/dist/src/modal/modal.d.ts +4 -0
  159. package/dist/src/progress/circular-progress/circular-progress.d.ts +3 -1
  160. package/dist/src/progress/linear-progress/linear-progress.d.ts +2 -1
  161. package/dist/src/progress/progress-base.d.ts +7 -0
  162. package/dist/src/slider/slider.d.ts +23 -3
  163. package/dist/src/toolbar/toolbar.d.ts +20 -0
  164. package/dist/step.js +1 -1
  165. package/dist/switch.js +7 -3
  166. package/dist/switch.js.map +1 -1
  167. package/dist/tab-group.js +13 -2
  168. package/dist/tab-group.js.map +1 -1
  169. package/dist/tab-panel.js +26 -0
  170. package/dist/tab-panel.js.map +1 -1
  171. package/dist/tab.js +23 -5
  172. package/dist/tab.js.map +1 -1
  173. package/dist/table.js +4 -4
  174. package/dist/tag.js +2 -1
  175. package/dist/tag.js.map +1 -1
  176. package/dist/test/button-group-press.test.d.ts +1 -0
  177. package/dist/test/fab-menu.test.d.ts +1 -0
  178. package/dist/test/haptics.test.d.ts +1 -0
  179. package/dist/test/loading-indicator.test.d.ts +1 -0
  180. package/dist/{toggle-base-DP3PSXbf.js → toggle-base-CVO9YntI.js} +3 -1
  181. package/dist/toggle-base-CVO9YntI.js.map +1 -0
  182. package/dist/toolbar.js +102 -0
  183. package/dist/toolbar.js.map +1 -1
  184. package/dist/tooltip.js +5 -2
  185. package/dist/tooltip.js.map +1 -1
  186. package/dist/tour.js +3 -3
  187. package/dist/tree-chart.js +3 -3
  188. package/dist/tree-item.js +1 -1
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/dist/{video-DgtGGvrk.js → video-DSQ07o3h.js} +2 -2
  191. package/dist/{video-DgtGGvrk.js.map → video-DSQ07o3h.js.map} +1 -1
  192. package/dist/video.js +1 -1
  193. package/dist/workflow.js +5 -5
  194. package/package.json +1 -1
  195. package/scss/tokens.css +364 -0
  196. package/src/__internal/chart/chart-base.scss +4 -2
  197. package/src/__internal/controllers/overlay-controller.ts +19 -9
  198. package/src/__internal/rich-text/editor-chrome.scss +2 -1
  199. package/src/__internal/toggle-base.ts +2 -0
  200. package/src/__internal/utils/haptics.ts +32 -0
  201. package/src/accordion/accordion-item.scss +10 -6
  202. package/src/app-bar/app-bar.scss +2 -1
  203. package/src/app-shell/app-shell.scss +2 -2
  204. package/src/bottom-sheet/bottom-sheet.scss +4 -2
  205. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.scss +4 -2
  206. package/src/button/button/button-base.scss +14 -12
  207. package/src/button/button/button-layers.scss +27 -5
  208. package/src/button/button-group/button-group.scss +6 -0
  209. package/src/button/button-group/button-group.ts +105 -0
  210. package/src/button/fab/fab-sizes.scss +2 -0
  211. package/src/button/fab/fab.scss +32 -17
  212. package/src/button/fab/fab.ts +1 -0
  213. package/src/calendar/calendar-column-view.scss +3 -3
  214. package/src/calendar/calendar-month-view.scss +3 -3
  215. package/src/calendar-timeline/calendar-timeline.scss +6 -3
  216. package/src/card/card.scss +2 -1
  217. package/src/carousel/carousel.scss +71 -2
  218. package/src/carousel/carousel.ts +159 -7
  219. package/src/chart-pie/chart-pie.scss +4 -2
  220. package/src/checkbox/checkbox.scss +13 -7
  221. package/src/chip/chip/chip.scss +41 -8
  222. package/src/chip/chip/chip.ts +4 -0
  223. package/src/chip/tag/tag.scss +2 -1
  224. package/src/code-highlighter/code-highlighter.scss +2 -1
  225. package/src/color-picker/color-picker.scss +1 -1
  226. package/src/comment-composer/comment-composer.scss +2 -1
  227. package/src/components.manifest.json +21 -0
  228. package/src/condition-builder/condition-group-base.scss +1 -1
  229. package/src/date-picker/date-picker.scss +27 -0
  230. package/src/date-picker/date-picker.ts +27 -1
  231. package/src/dependency-map/dependency-map.scss +4 -2
  232. package/src/diagram/diagram.scss +2 -1
  233. package/src/document-editor/document-editor.scss +1 -1
  234. package/src/document-editor/document-editor.ts +17 -0
  235. package/src/dropdown-button/dropdown-button.scss +2 -1
  236. package/src/erd/erd.scss +8 -4
  237. package/src/fab-menu/fab-menu-item.scss +99 -0
  238. package/src/fab-menu/fab-menu-item.ts +58 -0
  239. package/src/fab-menu/fab-menu.scss +119 -0
  240. package/src/fab-menu/fab-menu.ts +195 -0
  241. package/src/fab-menu/index.ts +2 -0
  242. package/src/field/field.scss +1 -1
  243. package/src/file-upload/file-upload.scss +2 -2
  244. package/src/hover-card/hover-card.scss +9 -2
  245. package/src/index.ts +3 -0
  246. package/src/inline-edit/inline-edit.scss +2 -2
  247. package/src/json-viewer/json-viewer.scss +2 -1
  248. package/src/loader.ts +12 -0
  249. package/src/loading-indicator/index.ts +1 -0
  250. package/src/loading-indicator/loading-indicator.scss +52 -0
  251. package/src/loading-indicator/loading-indicator.ts +164 -0
  252. package/src/loading-indicator/shapes.ts +104 -0
  253. package/src/menu/menu/menu.scss +10 -6
  254. package/src/modal/modal.scss +8 -4
  255. package/src/modal/modal.ts +14 -1
  256. package/src/navigation-drawer/navigation-drawer-group.scss +2 -2
  257. package/src/navigation-drawer/navigation-drawer.scss +3 -2
  258. package/src/navigation-rail/navigation-rail-item.scss +27 -5
  259. package/src/number-counter/number-counter.scss +1 -1
  260. package/src/pagination/pagination.scss +2 -1
  261. package/src/popover/popover-content.scss +7 -2
  262. package/src/progress/circular-progress/circular-progress.scss +3 -2
  263. package/src/progress/circular-progress/circular-progress.ts +43 -12
  264. package/src/progress/linear-progress/linear-progress.scss +70 -2
  265. package/src/progress/linear-progress/linear-progress.ts +4 -1
  266. package/src/progress/progress-base.ts +11 -0
  267. package/src/prompt-input/prompt-input.scss +2 -1
  268. package/src/radio/radio.scss +8 -4
  269. package/src/radio/radio.ts +2 -0
  270. package/src/resizable-panels/resizable-panels.scss +2 -1
  271. package/src/scroll-area/scroll-area.scss +2 -1
  272. package/src/search/search.scss +2 -1
  273. package/src/segmented-button/segmented-button.scss +8 -3
  274. package/src/select/select.scss +2 -1
  275. package/src/side-sheet/side-sheet.scss +4 -2
  276. package/src/site-header/site-header.scss +4 -4
  277. package/src/site-header/site-nav-menu.scss +2 -2
  278. package/src/slider/slider.scss +127 -64
  279. package/src/slider/slider.ts +80 -10
  280. package/src/snackbar/snackbar.scss +5 -2
  281. package/src/sparkline/sparkline.scss +6 -3
  282. package/src/split-button/split-button.scss +4 -2
  283. package/src/stepper/step.scss +2 -1
  284. package/src/switch/switch.scss +21 -2
  285. package/src/table/table.scss +8 -4
  286. package/src/tabs/tab-group.ts +12 -2
  287. package/src/tabs/tab-panel.scss +31 -0
  288. package/src/tabs/tab.scss +28 -17
  289. package/src/toolbar/toolbar-colors.scss +11 -0
  290. package/src/toolbar/toolbar.scss +28 -0
  291. package/src/toolbar/toolbar.ts +74 -1
  292. package/src/tooltip/tooltip.scss +9 -3
  293. package/src/tour/tour.scss +2 -2
  294. package/src/tree/tree-item.scss +2 -1
  295. package/src/tree-chart/tree-chart.scss +3 -3
  296. package/src/video/video.scss +2 -1
  297. package/src/workflow/workflow.scss +5 -5
  298. package/dist/document-editor-CZBlz3ai.js.map +0 -1
  299. package/dist/progress-base-BhJK__VP.js.map +0 -1
  300. package/dist/toggle-base-DP3PSXbf.js.map +0 -1
@@ -1,45 +1,65 @@
1
- var Gc=Object.create;var us=Object.defineProperty;var Jc=Object.getOwnPropertyDescriptor;var Yc=Object.getOwnPropertyNames;var Kc=Object.getPrototypeOf,Zc=Object.prototype.hasOwnProperty;var Qc=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var ef=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Yc(t))!Zc.call(e,o)&&o!==r&&us(e,o,{get:()=>t[o],enumerable:!(n=Jc(t,o))||n.enumerable});return e};var tf=(e,t,r)=>(r=e!=null?Gc(Kc(e)):{},ef(t||!e||!e.__esModule?us(r,"default",{value:e,enumerable:!0}):r,e));var Ds=Qc((P4,Pn)=>{var L=String,vs=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L,blackBright:L,redBright:L,greenBright:L,yellowBright:L,blueBright:L,magentaBright:L,cyanBright:L,whiteBright:L,bgBlackBright:L,bgRedBright:L,bgGreenBright:L,bgYellowBright:L,bgBlueBright:L,bgMagentaBright:L,bgCyanBright:L,bgWhiteBright:L}};Pn.exports=vs();Pn.exports.createColors=vs});function fe(e){return e<0?-1:e===0?0:1}function wt(e,t,r){return(1-r)*e+r*t}function ls(e,t,r){return r<e?e:r>t?t:r}function Vt(e,t,r){return r<e?e:r>t?t:r}function qt(e){return e=e%360,e<0&&(e=e+360),e}function te(e){return e=e%360,e<0&&(e=e+360),e}function cs(e,t){return te(t-e)<=180?1:-1}function uo(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function yr(e,t){let r=e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],n=e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],o=e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2];return[r,n,o]}var fs=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],rf=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ds=[95.047,100,108.883];function lo(e,t,r){return(255<<24|(e&255)<<16|(t&255)<<8|r&255)>>>0}function Sn(e){let t=St(e[0]),r=St(e[1]),n=St(e[2]);return lo(t,r,n)}function Dr(e){return e>>16&255}function xr(e){return e>>8&255}function Cr(e){return e&255}function ms(e,t,r){let n=rf,o=n[0][0]*e+n[0][1]*t+n[0][2]*r,a=n[1][0]*e+n[1][1]*t+n[1][2]*r,i=n[2][0]*e+n[2][1]*t+n[2][2]*r,s=St(o),u=St(a),l=St(i);return lo(s,u,l)}function of(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e));return yr([t,r,n],fs)}function Rn(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e)),o=fs,a=o[0][0]*t+o[0][1]*r+o[0][2]*n,i=o[1][0]*t+o[1][1]*r+o[1][2]*n,s=o[2][0]*t+o[2][1]*r+o[2][2]*n,u=ds,l=a/u[0],c=i/u[1],f=s/u[2],m=vr(l),d=vr(c),g=vr(f),p=116*d-16,y=500*(m-d),b=200*(d-g);return[p,y,b]}function ps(e){let t=ze(e),r=St(t);return lo(r,r,r)}function Ar(e){let t=of(e)[1];return 116*vr(t/100)-16}function ze(e){return 100*nf((e+16)/116)}function $r(e){return vr(e/100)*116-16}function Ve(e){let t=e/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function St(e){let t=e/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,ls(0,255,Math.round(r*255))}function hs(){return ds}function vr(e){let t=.008856451679035631,r=24389/27;return e>t?Math.pow(e,1/3):(r*e+16)/116}function nf(e){let t=.008856451679035631,r=24389/27,n=e*e*e;return n>t?n:(116*e-16)/r}var $e=class e{static make(t=hs(),r=200/Math.PI*ze(50)/100,n=50,o=2,a=!1){let i=t,s=i[0]*.401288+i[1]*.650173+i[2]*-.051461,u=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,l=i[0]*-.002079+i[1]*.048952+i[2]*.953127,c=.8+o/10,f=c>=.9?wt(.59,.69,(c-.9)*10):wt(.525,.59,(c-.8)*10),m=a?1:c*(1-1/3.6*Math.exp((-r-42)/92));m=m>1?1:m<0?0:m;let d=c,g=[m*(100/s)+1-m,m*(100/u)+1-m,m*(100/l)+1-m],p=1/(5*r+1),y=p*p*p*p,b=1-y,D=y*r+.1*b*b*Math.cbrt(5*r),C=ze(n)/t[1],F=1.48+Math.sqrt(C),v=.725/Math.pow(C,.2),M=v,$=[Math.pow(D*g[0]*s/100,.42),Math.pow(D*g[1]*u/100,.42),Math.pow(D*g[2]*l/100,.42)],k=[400*$[0]/($[0]+27.13),400*$[1]/($[1]+27.13),400*$[2]/($[2]+27.13)],R=(2*k[0]+k[1]+.05*k[2])*v;return new e(C,R,v,M,f,d,g,D,Math.pow(D,.25),F)}constructor(t,r,n,o,a,i,s,u,l,c){this.n=t,this.aw=r,this.nbb=n,this.ncb=o,this.c=a,this.nc=i,this.rgbD=s,this.fl=u,this.fLRoot=l,this.z=c}};$e.DEFAULT=$e.make();var pe=class e{constructor(t,r,n,o,a,i,s,u,l){this.hue=t,this.chroma=r,this.j=n,this.q=o,this.m=a,this.s=i,this.jstar=s,this.astar=u,this.bstar=l}distance(t){let r=this.jstar-t.jstar,n=this.astar-t.astar,o=this.bstar-t.bstar,a=Math.sqrt(r*r+n*n+o*o);return 1.41*Math.pow(a,.63)}static fromInt(t){return e.fromIntInViewingConditions(t,$e.DEFAULT)}static fromIntInViewingConditions(t,r){let n=(t&16711680)>>16,o=(t&65280)>>8,a=t&255,i=Ve(n),s=Ve(o),u=Ve(a),l=.41233895*i+.35762064*s+.18051042*u,c=.2126*i+.7152*s+.0722*u,f=.01932141*i+.11916382*s+.95034478*u,m=.401288*l+.650173*c-.051461*f,d=-.250268*l+1.204414*c+.045854*f,g=-.002079*l+.048952*c+.953127*f,p=r.rgbD[0]*m,y=r.rgbD[1]*d,b=r.rgbD[2]*g,D=Math.pow(r.fl*Math.abs(p)/100,.42),C=Math.pow(r.fl*Math.abs(y)/100,.42),F=Math.pow(r.fl*Math.abs(b)/100,.42),v=fe(p)*400*D/(D+27.13),M=fe(y)*400*C/(C+27.13),$=fe(b)*400*F/(F+27.13),k=(11*v+-12*M+$)/11,R=(v+M-2*$)/9,I=(20*v+20*M+21*$)/20,X=(40*v+20*M+$)/20,le=Math.atan2(R,k)*180/Math.PI,Z=le<0?le+360:le>=360?le-360:le,ut=Z*Math.PI/180,Ne=X*r.nbb,ce=100*Math.pow(Ne/r.aw,r.c*r.z),je=4/r.c*Math.sqrt(ce/100)*(r.aw+4)*r.fLRoot,Oe=Z<20.14?Z+360:Z,Tt=.25*(Math.cos(Oe*Math.PI/180+2)+3.8),Pe=5e4/13*Tt*r.nc*r.ncb*Math.sqrt(k*k+R*R)/(I+.305),Xe=Math.pow(Pe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ue=Xe*Math.sqrt(ce/100),Ut=Ue*r.fLRoot,kt=50*Math.sqrt(Xe*r.c/(r.aw+4)),Qe=(1+100*.007)*ce/(1+.007*ce),ss=1/.0228*Math.log(1+.0228*Ut),qc=ss*Math.cos(ut),Wc=ss*Math.sin(ut);return new e(Z,Ue,ce,je,Ut,kt,Qe,qc,Wc)}static fromJch(t,r,n){return e.fromJchInViewingConditions(t,r,n,$e.DEFAULT)}static fromJchInViewingConditions(t,r,n,o){let a=4/o.c*Math.sqrt(t/100)*(o.aw+4)*o.fLRoot,i=r*o.fLRoot,s=r/Math.sqrt(t/100),u=50*Math.sqrt(s*o.c/(o.aw+4)),l=n*Math.PI/180,c=(1+100*.007)*t/(1+.007*t),f=1/.0228*Math.log(1+.0228*i),m=f*Math.cos(l),d=f*Math.sin(l);return new e(n,r,t,a,i,u,c,m,d)}static fromUcs(t,r,n){return e.fromUcsInViewingConditions(t,r,n,$e.DEFAULT)}static fromUcsInViewingConditions(t,r,n,o){let a=r,i=n,s=Math.sqrt(a*a+i*i),l=(Math.exp(s*.0228)-1)/.0228/o.fLRoot,c=Math.atan2(i,a)*(180/Math.PI);c<0&&(c+=360);let f=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(f,l,c,o)}toInt(){return this.viewed($e.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return ms(I,X,G)}static fromXyzInViewingConditions(t,r,n,o){let a=.401288*t+.650173*r-.051461*n,i=-.250268*t+1.204414*r+.045854*n,s=-.002079*t+.048952*r+.953127*n,u=o.rgbD[0]*a,l=o.rgbD[1]*i,c=o.rgbD[2]*s,f=Math.pow(o.fl*Math.abs(u)/100,.42),m=Math.pow(o.fl*Math.abs(l)/100,.42),d=Math.pow(o.fl*Math.abs(c)/100,.42),g=fe(u)*400*f/(f+27.13),p=fe(l)*400*m/(m+27.13),y=fe(c)*400*d/(d+27.13),b=(11*g+-12*p+y)/11,D=(g+p-2*y)/9,C=(20*g+20*p+21*y)/20,F=(40*g+20*p+y)/20,M=Math.atan2(D,b)*180/Math.PI,$=M<0?M+360:M>=360?M-360:M,k=$*Math.PI/180,R=F*o.nbb,I=100*Math.pow(R/o.aw,o.c*o.z),X=4/o.c*Math.sqrt(I/100)*(o.aw+4)*o.fLRoot,G=$<20.14?$+360:$,le=1/4*(Math.cos(G*Math.PI/180+2)+3.8),ut=5e4/13*le*o.nc*o.ncb*Math.sqrt(b*b+D*D)/(C+.305),Ne=Math.pow(ut,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),ce=Ne*Math.sqrt(I/100),je=ce*o.fLRoot,Oe=50*Math.sqrt(Ne*o.c/(o.aw+4)),Tt=(1+100*.007)*I/(1+.007*I),Ze=Math.log(1+.0228*je)/.0228,Pe=Ze*Math.cos(k),Xe=Ze*Math.sin(k);return new e($,ce,I,X,je,Oe,Tt,Pe,Xe)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return[I,X,G]}};var Ie=class e{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,n=0;return r<=.0031308?n=r*12.92:n=1.055*Math.pow(r,1/2.4)-.055,n*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return fe(t)*400*r/(r+27.13)}static hueOf(t){let r=yr(t,e.SCALED_DISCOUNT_FROM_LINRGB),n=e.chromaticAdaptation(r[0]),o=e.chromaticAdaptation(r[1]),a=e.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,s=(n+o-2*a)/9;return Math.atan2(s,i)}static areInCyclicOrder(t,r,n){let o=e.sanitizeRadians(r-t),a=e.sanitizeRadians(n-t);return o<a}static intercept(t,r,n){return(r-t)/(n-t)}static lerpPoint(t,r,n){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r,t[2]+(n[2]-t[2])*r]}static setCoordinate(t,r,n,o){let a=e.intercept(t[o],r,n[o]);return e.lerpPoint(t,a,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let n=e.Y_FROM_LINRGB[0],o=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],i=r%4<=1?0:100,s=r%2===0?0:100;if(r<4){let u=i,l=s,c=(t-u*o-l*a)/n;return e.isBounded(c)?[c,u,l]:[-1,-1,-1]}else if(r<8){let u=i,l=s,c=(t-l*n-u*a)/o;return e.isBounded(c)?[l,c,u]:[-1,-1,-1]}else{let u=i,l=s,c=(t-u*n-l*o)/a;return e.isBounded(c)?[u,l,c]:[-1,-1,-1]}}static bisectToSegment(t,r){let n=[-1,-1,-1],o=n,a=0,i=0,s=!1,u=!0;for(let l=0;l<12;l++){let c=e.nthVertex(t,l);if(c[0]<0)continue;let f=e.hueOf(c);if(!s){n=c,o=c,a=f,i=f,s=!0;continue}(u||e.areInCyclicOrder(a,f,i))&&(u=!1,e.areInCyclicOrder(a,r,f)?(o=c,i=f):(n=c,a=f))}return[n,o]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let n=e.bisectToSegment(t,r),o=n[0],a=e.hueOf(o),i=n[1];for(let s=0;s<3;s++)if(o[s]!==i[s]){let u=-1,l=255;o[s]<i[s]?(u=e.criticalPlaneBelow(e.trueDelinearized(o[s])),l=e.criticalPlaneAbove(e.trueDelinearized(i[s]))):(u=e.criticalPlaneAbove(e.trueDelinearized(o[s])),l=e.criticalPlaneBelow(e.trueDelinearized(i[s])));for(let c=0;c<8&&!(Math.abs(l-u)<=1);c++){let f=Math.floor((u+l)/2),m=e.CRITICAL_PLANES[f],d=e.setCoordinate(o,m,i,s),g=e.hueOf(d);e.areInCyclicOrder(a,r,g)?(i=d,l=f):(o=d,a=g,u=f)}}return e.midpoint(o,i)}static inverseChromaticAdaptation(t){let r=Math.abs(t),n=Math.max(0,27.13*r/(400-r));return fe(t)*Math.pow(n,1/.42)}static findResultByJ(t,r,n){let o=Math.sqrt(n)*11,a=$e.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),u=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),c=Math.cos(t);for(let f=0;f<5;f++){let m=o/100,d=r===0||o===0?0:r/Math.sqrt(m),g=Math.pow(d*i,1/.9),y=a.aw*Math.pow(m,1/a.c/a.z)/a.nbb,b=23*(y+.305)*g/(23*u+11*g*c+108*g*l),D=b*c,C=b*l,F=(460*y+451*D+288*C)/1403,v=(460*y-891*D-261*C)/1403,M=(460*y-220*D-6300*C)/1403,$=e.inverseChromaticAdaptation(F),k=e.inverseChromaticAdaptation(v),R=e.inverseChromaticAdaptation(M),I=yr([$,k,R],e.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;let X=e.Y_FROM_LINRGB[0],G=e.Y_FROM_LINRGB[1],le=e.Y_FROM_LINRGB[2],Z=X*I[0]+G*I[1]+le*I[2];if(Z<=0)return 0;if(f===4||Math.abs(Z-n)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Sn(I);o=o-(Z-n)*o/(2*Z)}return 0}static solveToInt(t,r,n){if(r<1e-4||n<1e-4||n>99.9999)return ps(n);t=te(t);let o=t/180*Math.PI,a=ze(n),i=e.findResultByJ(o,r,a);if(i!==0)return i;let s=e.bisectToLimit(a,o);return Sn(s)}static solveToCam(t,r,n){return pe.fromInt(e.solveToInt(t,r,n))}};Ie.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ie.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ie.Y_FROM_LINRGB=[.2126,.7152,.0722];Ie.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var N=class e{static from(t,r,n){return new e(Ie.solveToInt(t,r,n))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ie.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ie.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ie.solveToInt(this.internalHue,this.internalChroma,t))}constructor(t){this.argb=t;let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}setInternalState(t){let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}inViewingConditions(t){let n=pe.fromInt(this.toInt()).xyzInViewingConditions(t),o=pe.fromXyzInViewingConditions(n[0],n[1],n[2],$e.make());return e.from(o.hue,o.chroma,$r(n[1]))}};var co=class e{static harmonize(t,r){let n=N.fromInt(t),o=N.fromInt(r),a=uo(n.hue,o.hue),i=Math.min(a*.5,15),s=te(n.hue+i*cs(n.hue,o.hue));return N.from(s,n.chroma,n.tone).toInt()}static hctHue(t,r,n){let o=e.cam16Ucs(t,r,n),a=pe.fromInt(o),i=pe.fromInt(t);return N.from(a.hue,i.chroma,Ar(t)).toInt()}static cam16Ucs(t,r,n){let o=pe.fromInt(t),a=pe.fromInt(r),i=o.jstar,s=o.astar,u=o.bstar,l=a.jstar,c=a.astar,f=a.bstar,m=i+(l-i)*n,d=s+(c-s)*n,g=u+(f-u)*n;return pe.fromUcs(m,d,g).toInt()}};var he=class e{static ratioOfTones(t,r){return t=Vt(0,100,t),r=Vt(0,100,r),e.ratioOfYs(ze(t),ze(r))}static ratioOfYs(t,r){let n=t>r?t:r,o=n===r?t:r;return(n+5)/(o+5)}static lighter(t,r){if(t<0||t>100)return-1;let n=ze(t),o=r*(n+5)-5,a=e.ratioOfYs(o,n),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)+.4;return s<0||s>100?-1:s}static darker(t,r){if(t<0||t>100)return-1;let n=ze(t),o=(n+5)/r-5,a=e.ratioOfYs(n,o),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,r){let n=e.lighter(t,r);return n<0?100:n}static darkerUnsafe(t,r){let n=e.darker(t,r);return n<0?0:n}};var Rt=class e{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,o=Math.round(t.tone)<65;return r&&n&&o}static fixIfDisliked(t){return e.isDisliked(t)?N.from(t.hue,t.chroma,70):t}};var S=class e{static fromPalette(t){return new e(t.name??"",t.palette,t.tone,t.isBackground??!1,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}constructor(t,r,n,o,a,i,s,u){if(this.name=t,this.palette=r,this.tone=n,this.isBackground=o,this.background=a,this.secondBackground=i,this.contrastCurve=s,this.toneDeltaPair=u,this.hctCache=new Map,!a&&i)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!a&&s)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(a&&!s)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let n=this.getTone(t),o=this.palette(t).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,o),o}getTone(t){let r=t.contrastLevel<0;if(this.toneDeltaPair){let n=this.toneDeltaPair(t),o=n.roleA,a=n.roleB,i=n.delta,s=n.polarity,u=n.stayTogether,c=this.background(t).getTone(t),f=s==="nearer"||s==="lighter"&&!t.isDark||s==="darker"&&t.isDark,m=f?o:a,d=f?a:o,g=this.name===m.name,p=t.isDark?1:-1,y=m.contrastCurve.get(t.contrastLevel),b=d.contrastCurve.get(t.contrastLevel),D=m.tone(t),C=he.ratioOfTones(c,D)>=y?D:e.foregroundTone(c,y),F=d.tone(t),v=he.ratioOfTones(c,F)>=b?F:e.foregroundTone(c,b);return r&&(C=e.foregroundTone(c,y),v=e.foregroundTone(c,b)),(v-C)*p>=i||(v=Vt(0,100,C+i*p),(v-C)*p>=i||(C=Vt(0,100,v-i*p))),50<=C&&C<60?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):50<=v&&v<60&&(u?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):p>0?v=60:v=49),g?C:v}else{let n=this.tone(t);if(this.background==null)return n;let o=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(he.ratioOfTones(o,n)>=a||(n=e.foregroundTone(o,a)),r&&(n=e.foregroundTone(o,a)),this.isBackground&&50<=n&&n<60&&(he.ratioOfTones(49,o)>=a?n=49:n=60),this.secondBackground){let[i,s]=[this.background,this.secondBackground],[u,l]=[i(t).getTone(t),s(t).getTone(t)],[c,f]=[Math.max(u,l),Math.min(u,l)];if(he.ratioOfTones(c,n)>=a&&he.ratioOfTones(f,n)>=a)return n;let m=he.lighter(c,a),d=he.darker(f,a),g=[];return m!==-1&&g.push(m),d!==-1&&g.push(d),e.tonePrefersLightForeground(u)||e.tonePrefersLightForeground(l)?m<0?100:m:g.length===1?g[0]:d<0?0:d}return n}}static foregroundTone(t,r){let n=he.lighterUnsafe(t,r),o=he.darkerUnsafe(t,r),a=he.ratioOfTones(n,t),i=he.ratioOfTones(o,t);if(e.tonePrefersLightForeground(t)){let u=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||u?n:o}else return i>=r||i>=a?o:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}};var B=class e{static fromInt(t){let r=N.fromInt(t);return e.fromHct(r)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let n=new Bn(t,r).create();return new e(t,r,n)}constructor(t,r,n){this.hue=t,this.chroma=r,this.keyColor=n,this.cache=new Map}tone(t){let r=this.cache.get(t);return r===void 0&&(r=N.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return N.fromInt(this.tone(t))}},Bn=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200}create(){let o=0,a=100;for(;o<a;){let i=Math.floor((o+a)/2),s=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(o-50)<Math.abs(a-50))a=i;else{if(o===i)return N.from(this.hue,this.requestedChroma,o);o=i}else s?o=i+1:a=i}return N.from(this.hue,this.requestedChroma,o)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=N.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var O=class{constructor(t,r,n,o){this.low=t,this.normal=r,this.medium=n,this.high=o}get(t){return t<=-1?this.low:t<0?wt(this.low,this.normal,(t- -1)/1):t<.5?wt(this.normal,this.medium,(t-0)/.5):t<1?wt(this.medium,this.high,(t-.5)/.5):this.high}};var ie=class{constructor(t,r,n,o,a){this.roleA=t,this.roleB=r,this.delta=n,this.polarity=o,this.stayTogether=a}};var Q;(function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"})(Q||(Q={}));function Wt(e){return e.variant===Q.FIDELITY||e.variant===Q.CONTENT}function q(e){return e.variant===Q.MONOCHROME}function af(e,t,r,n){let o=r,a=N.from(e,t,r);if(a.chroma<t){let i=a.chroma;for(;a.chroma<t;){o+=n?-1:1;let s=N.from(e,t,o);if(i>s.chroma||Math.abs(s.chroma-t)<.4)break;let u=Math.abs(s.chroma-t),l=Math.abs(a.chroma-t);u<l&&(a=s),i=Math.max(i,s.chroma)}}return o}var h=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};h.contentAccentToneDelta=15;h.primaryPaletteKeyColor=S.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});h.secondaryPaletteKeyColor=S.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});h.tertiaryPaletteKeyColor=S.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});h.neutralPaletteKeyColor=S.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});h.neutralVariantPaletteKeyColor=S.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});h.background=S.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.onBackground=S.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.background,contrastCurve:new O(3,3,4.5,7)});h.surface=S.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.surfaceDim=S.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new O(87,87,80,75).get(e.contrastLevel),isBackground:!0});h.surfaceBright=S.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(24,24,29,34).get(e.contrastLevel):98,isBackground:!0});h.surfaceContainerLowest=S.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(4,4,2,0).get(e.contrastLevel):100,isBackground:!0});h.surfaceContainerLow=S.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(10,10,11,12).get(e.contrastLevel):new O(96,96,96,95).get(e.contrastLevel),isBackground:!0});h.surfaceContainer=S.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(12,12,16,20).get(e.contrastLevel):new O(94,94,92,90).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHigh=S.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(17,17,21,25).get(e.contrastLevel):new O(92,92,88,85).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHighest=S.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(22,22,26,30).get(e.contrastLevel):new O(90,90,84,80).get(e.contrastLevel),isBackground:!0});h.onSurface=S.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.highestSurface(e),contrastCurve:new O(4.5,7,11,21)});h.surfaceVariant=S.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});h.onSurfaceVariant=S.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,11)});h.inverseSurface=S.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});h.inverseOnSurface=S.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>h.inverseSurface,contrastCurve:new O(4.5,7,11,21)});h.outline=S.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>h.highestSurface(e),contrastCurve:new O(1.5,3,4.5,7)});h.outlineVariant=S.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5)});h.shadow=S.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});h.scrim=S.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});h.surfaceTint=S.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});h.primary=S.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimary=S.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.primary,contrastCurve:new O(4.5,7,11,21)});h.primaryContainer=S.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?e.sourceColorHct.tone:q(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimaryContainer=S.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?S.foregroundTone(h.primaryContainer.tone(e),4.5):q(e)?e.isDark?0:100:e.isDark?90:30,background:e=>h.primaryContainer,contrastCurve:new O(3,4.5,7,11)});h.inversePrimary=S.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>h.inverseSurface,contrastCurve:new O(3,4.5,7,7)});h.secondary=S.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondary=S.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?10:100:e.isDark?20:100,background:e=>h.secondary,contrastCurve:new O(4.5,7,11,21)});h.secondaryContainer=S.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return q(e)?e.isDark?30:85:Wt(e)?af(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondaryContainer=S.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?90:10:Wt(e)?S.foregroundTone(h.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.secondaryContainer,contrastCurve:new O(3,4.5,7,11)});h.tertiary=S.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiary=S.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.tertiary,contrastCurve:new O(4.5,7,11,21)});h.tertiaryContainer=S.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(q(e))return e.isDark?60:49;if(!Wt(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Rt.fixIfDisliked(t).tone},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiaryContainer=S.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?0:100:Wt(e)?S.foregroundTone(h.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.tertiaryContainer,contrastCurve:new O(3,4.5,7,11)});h.error=S.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onError=S.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>h.error,contrastCurve:new O(4.5,7,11,21)});h.errorContainer=S.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onErrorContainer=S.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>q(e)?e.isDark?90:10:e.isDark?90:30,background:e=>h.errorContainer,contrastCurve:new O(3,4.5,7,11)});h.primaryFixed=S.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.primaryFixedDim=S.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.onPrimaryFixed=S.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?100:10,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onPrimaryFixedVariant=S.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>q(e)?90:30,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(3,4.5,7,11)});h.secondaryFixed=S.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>q(e)?80:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.secondaryFixedDim=S.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>q(e)?70:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.onSecondaryFixed=S.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onSecondaryFixedVariant=S.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>q(e)?25:30,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(3,4.5,7,11)});h.tertiaryFixed=S.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.tertiaryFixedDim=S.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.onTertiaryFixed=S.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?100:10,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onTertiaryFixedVariant=S.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>q(e)?90:30,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(3,4.5,7,11)});var W=class{constructor(t){this.sourceColorArgb=t.sourceColorArgb,this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.sourceColorHct=N.fromInt(t.sourceColorArgb),this.primaryPalette=t.primaryPalette,this.secondaryPalette=t.secondaryPalette,this.tertiaryPalette=t.tertiaryPalette,this.neutralPalette=t.neutralPalette,this.neutralVariantPalette=t.neutralVariantPalette,this.errorPalette=B.fromHueAndChroma(25,84)}static getRotatedHue(t,r,n){let o=t.hue;if(r.length!==n.length)throw new Error(`mismatch between hue length ${r.length} & rotations ${n.length}`);if(n.length===1)return te(t.hue+n[0]);let a=r.length;for(let i=0;i<=a-2;i++){let s=r[i],u=r[i+1];if(s<o&&o<u)return te(o+n[i])}return o}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(h.primaryPaletteKeyColor)}get secondaryPaletteKeyColor(){return this.getArgb(h.secondaryPaletteKeyColor)}get tertiaryPaletteKeyColor(){return this.getArgb(h.tertiaryPaletteKeyColor)}get neutralPaletteKeyColor(){return this.getArgb(h.neutralPaletteKeyColor)}get neutralVariantPaletteKeyColor(){return this.getArgb(h.neutralVariantPaletteKeyColor)}get background(){return this.getArgb(h.background)}get onBackground(){return this.getArgb(h.onBackground)}get surface(){return this.getArgb(h.surface)}get surfaceDim(){return this.getArgb(h.surfaceDim)}get surfaceBright(){return this.getArgb(h.surfaceBright)}get surfaceContainerLowest(){return this.getArgb(h.surfaceContainerLowest)}get surfaceContainerLow(){return this.getArgb(h.surfaceContainerLow)}get surfaceContainer(){return this.getArgb(h.surfaceContainer)}get surfaceContainerHigh(){return this.getArgb(h.surfaceContainerHigh)}get surfaceContainerHighest(){return this.getArgb(h.surfaceContainerHighest)}get onSurface(){return this.getArgb(h.onSurface)}get surfaceVariant(){return this.getArgb(h.surfaceVariant)}get onSurfaceVariant(){return this.getArgb(h.onSurfaceVariant)}get inverseSurface(){return this.getArgb(h.inverseSurface)}get inverseOnSurface(){return this.getArgb(h.inverseOnSurface)}get outline(){return this.getArgb(h.outline)}get outlineVariant(){return this.getArgb(h.outlineVariant)}get shadow(){return this.getArgb(h.shadow)}get scrim(){return this.getArgb(h.scrim)}get surfaceTint(){return this.getArgb(h.surfaceTint)}get primary(){return this.getArgb(h.primary)}get onPrimary(){return this.getArgb(h.onPrimary)}get primaryContainer(){return this.getArgb(h.primaryContainer)}get onPrimaryContainer(){return this.getArgb(h.onPrimaryContainer)}get inversePrimary(){return this.getArgb(h.inversePrimary)}get secondary(){return this.getArgb(h.secondary)}get onSecondary(){return this.getArgb(h.onSecondary)}get secondaryContainer(){return this.getArgb(h.secondaryContainer)}get onSecondaryContainer(){return this.getArgb(h.onSecondaryContainer)}get tertiary(){return this.getArgb(h.tertiary)}get onTertiary(){return this.getArgb(h.onTertiary)}get tertiaryContainer(){return this.getArgb(h.tertiaryContainer)}get onTertiaryContainer(){return this.getArgb(h.onTertiaryContainer)}get error(){return this.getArgb(h.error)}get onError(){return this.getArgb(h.onError)}get errorContainer(){return this.getArgb(h.errorContainer)}get onErrorContainer(){return this.getArgb(h.onErrorContainer)}get primaryFixed(){return this.getArgb(h.primaryFixed)}get primaryFixedDim(){return this.getArgb(h.primaryFixedDim)}get onPrimaryFixed(){return this.getArgb(h.onPrimaryFixed)}get onPrimaryFixedVariant(){return this.getArgb(h.onPrimaryFixedVariant)}get secondaryFixed(){return this.getArgb(h.secondaryFixed)}get secondaryFixedDim(){return this.getArgb(h.secondaryFixedDim)}get onSecondaryFixed(){return this.getArgb(h.onSecondaryFixed)}get onSecondaryFixedVariant(){return this.getArgb(h.onSecondaryFixedVariant)}get tertiaryFixed(){return this.getArgb(h.tertiaryFixed)}get tertiaryFixedDim(){return this.getArgb(h.tertiaryFixedDim)}get onTertiaryFixed(){return this.getArgb(h.onTertiaryFixed)}get onTertiaryFixedVariant(){return this.getArgb(h.onTertiaryFixedVariant)}};var Ee=class e{static of(t){return new e(t,!1)}static contentOf(t){return new e(t,!0)}static fromColors(t){return e.createPaletteFromColors(!1,t)}static contentFromColors(t){return e.createPaletteFromColors(!0,t)}static createPaletteFromColors(t,r){let n=new e(r.primary,t);if(r.secondary){let o=new e(r.secondary,t);n.a2=o.a1}if(r.tertiary){let o=new e(r.tertiary,t);n.a3=o.a1}if(r.error){let o=new e(r.error,t);n.error=o.a1}if(r.neutral){let o=new e(r.neutral,t);n.n1=o.n1}if(r.neutralVariant){let o=new e(r.neutralVariant,t);n.n2=o.n2}return n}constructor(t,r){let n=N.fromInt(t),o=n.hue,a=n.chroma;r?(this.a1=B.fromHueAndChroma(o,a),this.a2=B.fromHueAndChroma(o,a/3),this.a3=B.fromHueAndChroma(o+60,a/2),this.n1=B.fromHueAndChroma(o,Math.min(a/12,4)),this.n2=B.fromHueAndChroma(o,Math.min(a/6,8))):(this.a1=B.fromHueAndChroma(o,Math.max(48,a)),this.a2=B.fromHueAndChroma(o,16),this.a3=B.fromHueAndChroma(o+60,24),this.n1=B.fromHueAndChroma(o,4),this.n2=B.fromHueAndChroma(o,8)),this.error=B.fromHueAndChroma(25,84)}};var Er=class e{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(t){return e.lightFromCorePalette(Ee.of(t))}static dark(t){return e.darkFromCorePalette(Ee.of(t))}static lightContent(t){return e.lightFromCorePalette(Ee.contentOf(t))}static darkContent(t){return e.darkFromCorePalette(Ee.contentOf(t))}static lightFromCorePalette(t){return new e({primary:t.a1.tone(40),onPrimary:t.a1.tone(100),primaryContainer:t.a1.tone(90),onPrimaryContainer:t.a1.tone(10),secondary:t.a2.tone(40),onSecondary:t.a2.tone(100),secondaryContainer:t.a2.tone(90),onSecondaryContainer:t.a2.tone(10),tertiary:t.a3.tone(40),onTertiary:t.a3.tone(100),tertiaryContainer:t.a3.tone(90),onTertiaryContainer:t.a3.tone(10),error:t.error.tone(40),onError:t.error.tone(100),errorContainer:t.error.tone(90),onErrorContainer:t.error.tone(10),background:t.n1.tone(99),onBackground:t.n1.tone(10),surface:t.n1.tone(99),onSurface:t.n1.tone(10),surfaceVariant:t.n2.tone(90),onSurfaceVariant:t.n2.tone(30),outline:t.n2.tone(50),outlineVariant:t.n2.tone(80),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(20),inverseOnSurface:t.n1.tone(95),inversePrimary:t.a1.tone(80)})}static darkFromCorePalette(t){return new e({primary:t.a1.tone(80),onPrimary:t.a1.tone(20),primaryContainer:t.a1.tone(30),onPrimaryContainer:t.a1.tone(90),secondary:t.a2.tone(80),onSecondary:t.a2.tone(20),secondaryContainer:t.a2.tone(30),onSecondaryContainer:t.a2.tone(90),tertiary:t.a3.tone(80),onTertiary:t.a3.tone(20),tertiaryContainer:t.a3.tone(30),onTertiaryContainer:t.a3.tone(90),error:t.error.tone(80),onError:t.error.tone(20),errorContainer:t.error.tone(30),onErrorContainer:t.error.tone(80),background:t.n1.tone(10),onBackground:t.n1.tone(90),surface:t.n1.tone(10),onSurface:t.n1.tone(90),surfaceVariant:t.n2.tone(30),onSurfaceVariant:t.n2.tone(80),outline:t.n2.tone(60),outlineVariant:t.n2.tone(30),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(90),inverseOnSurface:t.n1.tone(20),inversePrimary:t.a1.tone(40)})}constructor(t){this.props=t}toJSON(){return{...this.props}}};var Fr=class e{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((n,o)=>r.get(n)-r.get(o)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let n=Math.round(this.input.hue),o=this.hctsByHue[n],a=this.relativeTemperature(o),i=[o],s=0;for(let g=0;g<360;g++){let p=qt(n+g),y=this.hctsByHue[p],b=this.relativeTemperature(y),D=Math.abs(b-a);a=b,s+=D}let u=1,l=s/r,c=0;for(a=this.relativeTemperature(o);i.length<r;){let g=qt(n+u),p=this.hctsByHue[g],y=this.relativeTemperature(p),b=Math.abs(y-a);c+=b;let D=i.length*l,C=c>=D,F=1;for(;C&&i.length<r;){i.push(p);let v=(i.length+F)*l;C=c>=v,F++}if(a=y,u++,u>360){for(;i.length<r;)i.push(p);break}}let f=[this.input],m=Math.floor((t-1)/2);for(let g=1;g<m+1;g++){let p=0-g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.splice(0,0,i[p])}let d=t-m-1;for(let g=1;g<d+1;g++){let p=g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.push(i[p])}return f}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),n=this.warmest.hue,a=this.tempsByHct.get(this.warmest)-r,i=e.isBetween(this.input.hue,t,n),s=i?n:t,u=i?t:n,l=1,c=1e3,f=this.hctsByHue[Math.round(this.input.hue)],m=1-this.inputRelativeTemperature;for(let d=0;d<=360;d+=1){let g=te(s+l*d);if(!e.isBetween(g,s,u))continue;let p=this.hctsByHue[Math.round(g)],y=(this.tempsByHct.get(p)-r)/a,b=Math.abs(m-y);b<c&&(c=b,f=p)}return this.complementCache=f,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:n/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let n of t)r.set(n,e.rawTemperature(n));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let n=N.from(r,this.input.chroma,this.input.tone);t.push(n)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,n){return r<n?r<=t&&t<=n:r<=t||t<=n}static rawTemperature(t){let r=Rn(t.toInt()),n=te(Math.atan2(r[2],r[1])*180/Math.PI),o=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return-.5+.02*Math.pow(o,1.07)*Math.cos(te(n-50)*Math.PI/180)}};var Bt=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.EXPRESSIVE,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(te(t.hue+240),40),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue+15,8),neutralVariantPalette:B.fromHueAndChroma(t.hue+15,12)})}};Bt.hues=[0,21,51,121,151,191,271,321,360];Bt.secondaryRotations=[45,95,45,20,45,90,45,45,45];Bt.tertiaryRotations=[120,120,20,45,20,15,20,120,120];var fo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.FIDELITY,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,t.chroma),secondaryPalette:B.fromHueAndChroma(t.hue,Math.max(t.chroma-32,t.chroma*.5)),tertiaryPalette:B.fromInt(Rt.fixIfDisliked(new Fr(t).complement).toInt()),neutralPalette:B.fromHueAndChroma(t.hue,t.chroma/8),neutralVariantPalette:B.fromHueAndChroma(t.hue,t.chroma/8+4)})}};var mo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,36),secondaryPalette:B.fromHueAndChroma(t.hue,16),tertiaryPalette:B.fromHueAndChroma(te(t.hue+60),24),neutralPalette:B.fromHueAndChroma(t.hue,6),neutralVariantPalette:B.fromHueAndChroma(t.hue,8)})}};var Ot=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.VIBRANT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,200),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue,10),neutralVariantPalette:B.fromHueAndChroma(t.hue,12)})}};Ot.hues=[0,41,61,101,131,181,251,301,360];Ot.secondaryRotations=[18,15,10,12,15,18,15,12,12];Ot.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var sf={desired:4,fallbackColorARGB:4282549748,filter:!0};function uf(e,t){return e.score>t.score?-1:e.score<t.score?1:0}var et=class e{constructor(){}static score(t,r){let{desired:n,fallbackColorARGB:o,filter:a}={...sf,...r},i=[],s=new Array(360).fill(0),u=0;for(let[d,g]of t.entries()){let p=N.fromInt(d);i.push(p);let y=Math.floor(p.hue);s[y]+=g,u+=g}let l=new Array(360).fill(0);for(let d=0;d<360;d++){let g=s[d]/u;for(let p=d-14;p<d+16;p++){let y=qt(p);l[y]+=g}}let c=new Array;for(let d of i){let g=qt(Math.round(d.hue)),p=l[g];if(a&&(d.chroma<e.CUTOFF_CHROMA||p<=e.CUTOFF_EXCITED_PROPORTION))continue;let y=p*100*e.WEIGHT_PROPORTION,b=d.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,D=(d.chroma-e.TARGET_CHROMA)*b,C=y+D;c.push({hct:d,score:C})}c.sort(uf);let f=[];for(let d=90;d>=15;d--){f.length=0;for(let{hct:g}of c)if(f.find(y=>uo(g.hue,y.hue)<d)||f.push(g),f.length>=n)break;if(f.length>=n)break}let m=[];f.length===0&&m.push(o);for(let d of f)m.push(d.toInt());return m}};et.TARGET_CHROMA=48;et.WEIGHT_PROPORTION=.7;et.WEIGHT_CHROMA_ABOVE=.3;et.WEIGHT_CHROMA_BELOW=.1;et.CUTOFF_CHROMA=5;et.CUTOFF_EXCITED_PROPORTION=.01;function Gt(e){let t=Dr(e),r=xr(e),n=Cr(e),o=[t.toString(16),r.toString(16),n.toString(16)];for(let[a,i]of o.entries())i.length===1&&(o[a]="0"+i);return"#"+o.join("")}function Pt(e){e=e.replace("#","");let t=e.length===3,r=e.length===6,n=e.length===8;if(!t&&!r&&!n)throw new Error("unexpected hex "+e);let o=0,a=0,i=0;return t?(o=tt(e.slice(0,1).repeat(2)),a=tt(e.slice(1,2).repeat(2)),i=tt(e.slice(2,3).repeat(2))):r?(o=tt(e.slice(0,2)),a=tt(e.slice(2,4)),i=tt(e.slice(4,6))):n&&(o=tt(e.slice(2,4)),a=tt(e.slice(4,6)),i=tt(e.slice(6,8))),(255<<24|(o&255)<<16|(a&255)<<8|i&255)>>>0}function tt(e){return parseInt(e,16)}function gs(e,t=[]){let r=Ee.of(e);return{source:e,schemes:{light:Er.light(e),dark:Er.dark(e)},palettes:{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2,error:r.error},customColors:t.map(n=>lf(e,n))}}function lf(e,t){let r=t.value,n=r,o=e;t.blend&&(r=co.harmonize(n,o));let i=Ee.of(r).a1;return{color:t,value:r,light:{color:i.tone(40),onColor:i.tone(100),colorContainer:i.tone(90),onColorContainer:i.tone(10)},dark:{color:i.tone(80),onColor:i.tone(20),colorContainer:i.tone(30),onColorContainer:i.tone(90)}}}var bs={primary:"#7c5df0",variant:"classic",contrast:"standard",shape:"default",font:{brand:"Noto Sans",plain:"Noto Sans"}};function On(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function ff(e){for(var t="",r=0;r<e.length;r++)t+=On(e[r]);return t}function ys(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(ys(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=ff(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=On(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=On(p)}l+=d}}return l}function df(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function ye(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=ys(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=df.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}var nt=tf(Ds(),1);function po(e){return Object.prototype.toString.call(e).slice(8,-1)}function Mr(e){if(po(e)!=="Object")return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function mf(e){return po(e)==="Null"}function pf(e,t,r,n,o){return a=>e(a)||t(a)||!!r&&r(a)||!!n&&n(a)||!!o&&o(a)}function hf(e){return po(e)==="Undefined"}var z4=pf(mf,hf);function zn(e){return po(e)==="Symbol"}function xs(e,t,r,n){let o={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=r),o==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function Cs(e,t,r){if(!Mr(t))return t;let n={};if(Mr(e)){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertySymbols(e);n=[...s,...u].reduce((l,c)=>{let f=e[c];return(!zn(c)&&!Object.getOwnPropertyNames(t).includes(c)||zn(c)&&!Object.getOwnPropertySymbols(t).includes(c))&&xs(l,c,f,e),l},{})}let o=Object.getOwnPropertyNames(t),a=Object.getOwnPropertySymbols(t);return[...o,...a].reduce((s,u)=>{let l=t[u],c=Mr(e)?e[u]:void 0;c!==void 0&&Mr(l)&&(l=Cs(c,l,r));let f=r?r(c,l,u):l;return xs(s,u,f,t),s},n)}function _n(e,...t){return t.reduce((r,n)=>Cs(r,n),e)}var gf=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},ho=gf;var bf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},As=bf;var yf=e=>ho(As[e.toLowerCase()],6),$s=yf;var vf=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Df=e=>{let t;return(t=e.match(vf))?ho(parseInt(t[1],16),t[1].length):void 0},Es=Df;var ge="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",G4=`(?:${ge}|none)`,zt=`${ge}%`,J4=`(?:${ge}%|none)`,Tr=`(?:${ge}%|${ge})`,xf=`(?:${ge}%|${ge}|none)`,Fs=`(?:${ge}(deg|grad|rad|turn)|${ge})`,Y4=`(?:${ge}(deg|grad|rad|turn)|${ge}|none)`,lt="\\s*,\\s*";var K4=new RegExp("^"+xf+"$");var Cf=new RegExp(`^rgba?\\(\\s*${ge}${lt}${ge}${lt}${ge}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Af=new RegExp(`^rgba?\\(\\s*${zt}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),$f=e=>{let t={mode:"rgb"},r;if(r=e.match(Cf))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Af))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ms=$f;var Ef=(e,t)=>e===void 0?void 0:typeof e!="object"?kr(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Jt=Ef;var Ff=(e="rgb")=>t=>(t=Jt(t,e))!==void 0?t.mode===e?t:Le[t.mode][e]?Le[t.mode][e](t):e==="rgb"?Le[t.mode].rgb(t):Le.rgb[e](Le[t.mode].rgb(t)):void 0,ve=Ff;var Le={},Ts={},wr=[],In={},Mf=e=>e,P=e=>(Le[e.mode]={...Le[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Le[t]||(Le[t]={}),Le[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Mf)}),Ts[e.mode]=e,(e.parse||[]).forEach(t=>{Tf(t,e.mode)}),ve(e.mode)),Yt=e=>Ts[e],Tf=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");In[e]=t}else typeof e=="function"&&wr.indexOf(e)<0&&wr.push(e)};var Ln=/[^\x00-\x7F]|[a-zA-Z_]/,kf=/[^\x00-\x7F]|[-\w]/,x={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},z=0;function go(e){let t=e[z],r=e[z+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[z+2]):t==="."?/\d/.test(r):/\d/.test(t)}function Hn(e){if(z>=e.length)return!1;let t=e[z];if(Ln.test(t))return!0;if(t==="-"){if(e.length-z<2)return!1;let r=e[z+1];return!!(r==="-"||Ln.test(r))}return!1}var wf={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Sr(e){let t="";if((e[z]==="-"||e[z]==="+")&&(t+=e[z++]),t+=bo(e),e[z]==="."&&/\d/.test(e[z+1])&&(t+=e[z++]+bo(e)),(e[z]==="e"||e[z]==="E")&&((e[z+1]==="-"||e[z+1]==="+")&&/\d/.test(e[z+2])?t+=e[z++]+e[z++]+bo(e):/\d/.test(e[z+1])&&(t+=e[z++]+bo(e))),Hn(e)){let r=yo(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:x.Hue,value:t*wf[r]}:void 0}return e[z]==="%"?(z++,{type:x.Percentage,value:+t}):{type:x.Number,value:+t}}function bo(e){let t="";for(;/\d/.test(e[z]);)t+=e[z++];return t}function yo(e){let t="";for(;z<e.length&&kf.test(e[z]);)t+=e[z++];return t}function Sf(e){let t=yo(e);return e[z]==="("?(z++,{type:x.Function,value:t}):t==="none"?{type:x.None,value:void 0}:{type:x.Ident,value:t}}function Rf(e=""){let t=e.trim(),r=[],n;for(z=0;z<t.length;){if(n=t[z++],n===`
2
- `||n===" "||n===" "){for(;z<t.length&&(t[z]===`
3
- `||t[z]===" "||t[z]===" ");)z++;continue}if(n===",")return;if(n===")"){r.push({type:x.ParenClose});continue}if(n==="+"){if(z--,go(t)){r.push(Sr(t));continue}return}if(n==="-"){if(z--,go(t)){r.push(Sr(t));continue}if(Hn(t)){r.push({type:x.Ident,value:yo(t)});continue}return}if(n==="."){if(z--,go(t)){r.push(Sr(t));continue}return}if(n==="/"){for(;z<t.length&&(t[z]===`
4
- `||t[z]===" "||t[z]===" ");)z++;let o;if(go(t)&&(o=Sr(t),o.type!==x.Hue)){r.push({type:x.Alpha,value:o});continue}if(Hn(t)&&yo(t)==="none"){r.push({type:x.Alpha,value:{type:x.None,value:void 0}});continue}return}if(/\d/.test(n)){z--,r.push(Sr(t));continue}if(Ln.test(n)){z--,r.push(Sf(t));continue}return}return r}function Bf(e){e._i=0;let t=e[e._i++];if(!t||t.type!==x.Function||t.value!=="color"||(t=e[e._i++],t.type!==x.Ident))return;let r=In[t.value];if(!r)return;let n={mode:r},o=ks(e,!1);if(!o)return;let a=Yt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==x.None&&(n[u]=s.type===x.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function ks(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===x.None||n.type===x.Number||n.type===x.Alpha||n.type===x.Percentage||t&&n.type===x.Hue){r.push(n);continue}if(n.type===x.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==x.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:x.None,value:void 0}),r.every(o=>o.type!==x.Alpha)?r:void 0}}function Of(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==x.Function)return;let n=ks(e,t);if(n)return n.unshift(r.value),n}var Pf=e=>{if(typeof e!="string")return;let t=Rf(e),r=t?Of(t,!0):void 0,n,o=0,a=wr.length;for(;o<a;)if((n=wr[o++](e,r))!==void 0)return n;return t?Bf(t):void 0},kr=Pf;function zf(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.r=n.type===x.Number?n.value/255:n.value/100),o.type!==x.None&&(r.g=o.type===x.Number?o.value/255:o.value/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value/255:a.value/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var ws=zf;var _f=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ss=_f;var Rs=(e,t,r)=>e+r*(t-e);var If=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},Bs=e=>t=>{let r=If(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var A=Bs(Rs);var H=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var Lf={mode:"rgb",channels:["r","g","b","alpha"],parse:[ws,Es,Ms,$s,Ss,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:H}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},De=Lf;var Nn=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Hf=e=>{let t=Nn(e.r),r=Nn(e.g),n=Nn(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},jn=Hf;var Xn=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Nf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:Xn(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Xn(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Xn(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},Un=Nf;var Vn=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},jf=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Vn(e),g:Vn(t),b:Vn(r)};return n!==void 0&&(o.alpha=n),o},Se=jf;var Xf=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},xe=Xf;var qn=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Uf=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:qn(e),g:qn(t),b:qn(r)};return n!==void 0&&(a.alpha=n),a},Re=Uf;var Vf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Ce=Vf;var qf={...De,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Un(xe(e)),xyz65:Un},toMode:{rgb:e=>Ce(jn(e)),xyz65:jn}},vo=qf;var Wf=e=>(e=e%360)<0?e+360:e,U=Wf;function Wn({h:e,s:t,l:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Gn({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Gf=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Os=Gf;var Jf=new RegExp(`^hsla?\\(\\s*${Fs}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Yf=e=>{let t=e.match(Jf);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=Os(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Ps=Yf;function Kf(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.s=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.l=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var zs=Kf;var Zf=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=U(r);return n===0||e[n-1]===void 0?a:t(a-U(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),re=e=>Zf(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ct=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},_s=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=U(e.h),n=U(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},ft=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var oe=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Qf={mode:"hsl",toMode:{rgb:Wn},fromMode:{rgb:Gn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[zs,Ps],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Kt=Qf;function Rr({h:e,s:t,v:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Br({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var ed={mode:"hsv",toMode:{rgb:Rr},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Br},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,v:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Zt=ed;function Jn({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return Rr({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function Yn(e){let t=Br(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function td(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.w=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.b=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Is=td;var rd={mode:"hwb",toMode:{rgb:Jn},fromMode:{rgb:Yn},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},w:A,b:A,alpha:{use:A,fixup:H}},difference:{h:_s},average:{h:oe}},Do=rd;var dt=Math.pow(29,3)/Math.pow(3,3),Qt=Math.pow(6,3)/Math.pow(29,3);var V={X:.9642956764295677,Y:1,Z:.8251046025104602},mt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},L8=Math.pow(29,3)/Math.pow(3,3),H8=Math.pow(6,3)/Math.pow(29,3);var Kn=e=>Math.pow(e,3)>Qt?Math.pow(e,3):(116*e-16)/dt,od=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:Kn(a)*V.X,y:Kn(o)*V.Y,z:Kn(i)*V.Z};return n!==void 0&&(s.alpha=n),s},er=od;var nd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},qe=nd;var ad=e=>qe(er(e)),xo=ad;var id=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},We=id;var Zn=e=>e>Qt?Math.cbrt(e):(dt*e+16)/116,sd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Zn(e/V.X),a=Zn(t/V.Y),i=Zn(r/V.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},tr=sd;var ud=e=>{let t=tr(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Co=ud;function ld(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*125/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*125/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ls=ld;var cd={mode:"lab",toMode:{xyz50:er,rgb:xo},fromMode:{xyz50:tr,rgb:Co},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Ls],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},pt=cd;var Ao=Math.pow(29,3)/Math.pow(3,3),$o=Math.pow(6,3)/Math.pow(29,3);var Qn=e=>Math.pow(e,3)>$o?Math.pow(e,3):(116*e-16)/Ao,fd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:Qn(a)*mt.X,y:Qn(o)*mt.Y,z:Qn(i)*mt.Z};return n!==void 0&&(s.alpha=n),s},Eo=fd;var dd=e=>Ce(Eo(e)),ht=dd;var ea=e=>e>$o?Math.cbrt(e):(Ao*e+16)/116,md=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ea(e/mt.X),a=ea(t/mt.Y),i=ea(r/mt.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Fo=md;var pd=e=>{let t=Fo(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},gt=pd;var hd={...pt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Eo,rgb:ht},fromMode:{xyz65:Fo,rgb:gt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Mo=hd;var gd=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Fe=gd;var bd=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Me=bd;function yd(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*150/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Hs=yd;var vd={mode:"lch",toMode:{lab:Me,rgb:e=>xo(Me(e))},fromMode:{rgb:e=>Fe(Co(e)),lab:Fe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Hs],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},bt=vd;var Dd={...bt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Me(e,"lab65"),rgb:e=>ht(Me(e,"lab65"))},fromMode:{rgb:e=>Fe(gt(e),"lch65"),lab65:e=>Fe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},To=Dd;var xd={...De,mode:"lrgb",toMode:{rgb:Re},fromMode:{rgb:Se},parse:["srgb-linear"],serialize:"srgb-linear"},ko=xd;var Cd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},Ge=Cd;var Ad=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},wo=Ad;var $d=e=>{let t=wo(Se(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},yt=$d;var Ed=e=>Re(Ge(e)),vt=Ed;function Fd(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*.4/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*.4/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ns=Fd;var Md={...pt,mode:"oklab",toMode:{lrgb:Ge,rgb:vt},fromMode:{lrgb:wo,rgb:yt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Ns],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},So=Md;function Td(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*.4/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var js=Td;var kd={...bt,mode:"oklch",toMode:{oklab:e=>Me(e,"oklab"),rgb:e=>vt(Me(e,"oklab"))},fromMode:{rgb:e=>Fe(yt(e),"oklch"),oklab:e=>Fe(e,"oklch")},parse:[js],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Ro=kd;var wd=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},ta=wd;var Sd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},ra=Sd;var Rd={...De,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ra(xe(e)),xyz65:ra},toMode:{rgb:e=>Ce(ta(e)),xyz65:ta}},Bo=Rd;var oa=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Bd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:oa(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:oa(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:oa(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},na=Bd;var aa=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Od=e=>{let t=aa(e.r),r=aa(e.g),n=aa(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ia=Od;var Pd={...De,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:na,rgb:e=>na(We(e))},toMode:{xyz50:ia,rgb:e=>qe(ia(e))}},Oo=Pd;var Xs=1.09929682680944,zd=.018053968510807,sa=e=>{let t=Math.abs(e);return t>zd?(Math.sign(e)||1)*(Xs*Math.pow(t,.45)-(Xs-1)):4.5*e},_d=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:sa(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:sa(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:sa(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},ua=_d;var Us=1.09929682680944,Id=.018053968510807,la=(e=0)=>{let t=Math.abs(e);return t<Id*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Us-1)/Us,1/.45)},Ld=e=>{let t=la(e.r),r=la(e.g),n=la(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ca=Ld;var Hd={...De,mode:"rec2020",fromMode:{xyz65:ua,rgb:e=>ua(xe(e))},toMode:{xyz65:ca,rgb:e=>Ce(ca(e))},parse:["rec2020"],serialize:"rec2020"},Po=Hd;var Nd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:qe,lab:tr},fromMode:{rgb:We,lab:er},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},zo=Nd;var jd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Vs=jd;var Xd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},qs=Xd;var Ud={mode:"xyz65",toMode:{rgb:Ce,xyz50:Vs},fromMode:{rgb:xe,xyz50:qs},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},_o=Ud;var _7=P(vo),I7=P(Kt),L7=P(Zt),H7=P(Do),N7=P(pt),j7=P(Mo),X7=P(bt),U7=P(To),V7=P(ko),q7=P(So),W7=P(Ro),G7=P(Bo),J7=P(Oo),Y7=P(Po),K7=P(De),Z7=P(zo),Q7=P(_o);var J=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ws=Math.PI/180,Gs=180/Math.PI;var Js=J[3]*J[4],Ys=J[1]*J[4],Ks=J[1]*J[2]-J[0]*J[3],Vd=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Ks*r+e*Js-t*Ys)/(Ks+Js-Ys),a=r-o,i=(J[4]*(t-o)-J[2]*a)/J[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(J[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*Gs-120),n!==void 0&&(s.alpha=n),s},Zs=Vd;var qd=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Ws,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(J[0]*i+J[1]*s),o.g=r+a*(J[2]*i+J[3]*s),o.b=r+a*(J[4]*i+J[5]*s),n!==void 0&&(o.alpha=n),o},Qs=qd;var Wd={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Zs},toMode:{rgb:Qs},interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},eu=Wd;var _t=.14444444444444443*Math.PI,rr=Math.cos(_t),or=Math.sin(_t),Io=100/Math.log(139/100);var Gd=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Io)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-_t),s=a*Math.sin(r/180*Math.PI-_t);return o.a=i*rr-s/.83*or,o.b=i*or+s/.83*rr,n!==void 0&&(o.alpha=n),o},Pr=Gd;var Jd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*rr+r*or,a=.83*(r*rr-t*or),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Io/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return s.c&&(s.h=U((Math.atan2(a,o)+_t)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},zr=Jd;var tu=e=>Pr(Fe(e,"dlch")),ru=e=>Me(zr(e),"dlab"),Yd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:tu,rgb:e=>ht(tu(e))},fromMode:{lab65:ru,rgb:e=>ru(gt(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},ou=Yd;var Kd={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Pr,dlab:e=>Me(e,"dlab"),rgb:e=>ht(Pr(e))},fromMode:{lab65:zr,dlab:e=>Fe(e,"dlch"),rgb:e=>zr(gt(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:re},alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},nu=Kd;function da({h:e,s:t,i:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function ma({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Zd={mode:"hsi",toMode:{rgb:da},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:ma},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,i:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},au=Zd;var nr=.1593017578125,iu=78.84375,ar=.8359375,ir=18.8515625,sr=18.6875;function Lo(e){if(e<0)return 0;let t=Math.pow(e,1/iu);return 1e4*Math.pow(Math.max(0,t-ar)/(ir-sr*t),1/nr)}function Ho(e){if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),iu)}var pa=e=>Math.max(e/203,0),em=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Lo(e+.008609037037932761*t+.11102962500302593*r),a=Lo(e-.00860903703793275*t-.11102962500302599*r),i=Lo(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:pa(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:pa(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:pa(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},ha=em;var ga=(e=0)=>Math.max(e*203,0),tm=({x:e,y:t,z:r,alpha:n})=>{let o=ga(e),a=ga(t),i=ga(r),s=Ho(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=Ho(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=Ho(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},ba=tm;var rm={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ha,rgb:e=>Ce(ha(e))},fromMode:{xyz65:ba,rgb:e=>ba(xe(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:A,t:A,p:A,alpha:{use:A,fixup:H}}},su=rm;var om=134.03437499999998,nm=16295499532821565e-27,ya=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),om)},va=(e=0)=>Math.max(e*203,0),am=({x:e,y:t,z:r,alpha:n})=>{e=va(e),t=va(t),r=va(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=ya(.41478972*o+.579999*a+.014648*r),s=ya(-.20151*o+1.120649*a+.0531008*r),u=ya(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-nm,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},No=am;var im=134.03437499999998,uu=16295499532821565e-27,Da=e=>{if(e<0)return 0;let t=Math.pow(e,1/im);return 1e4*Math.pow((ar-t)/(sr*t-ir),1/nr)},xa=e=>e/203,sm=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+uu)/(.44+.56*(e+uu)),a=Da(o+.13860504*t+.058047316*r),i=Da(o-.13860504*t-.058047316*r),s=Da(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:xa(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:xa(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:xa(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},jo=sm;var um=e=>{let t=No(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Xo=um;var lm=e=>Ce(jo(e)),Uo=lm;var cm={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xo,xyz65:No},toMode:{rgb:Uo,xyz65:jo},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:H}}},lu=cm;var fm=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Ca=fm;var dm=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Aa=dm;var mm={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Aa,rgb:e=>Uo(Aa(e))},fromMode:{rgb:e=>Ca(Xo(e)),jab:Ca},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,j:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},cu=mm;var pm=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},$a=pm;var hm=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Ea=hm;var fu=(e,t,r)=>4*e/(e+15*t+3*r),du=(e,t,r)=>9*t/(e+15*t+3*r),gm=fu(V.X,V.Y,V.Z),bm=du(V.X,V.Y,V.Z),ym=e=>e<=Qt?dt*e:116*Math.cbrt(e)-16,vm=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ym(t/V.Y),a=fu(e,t,r),i=du(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-gm),i=13*o*(i-bm));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},_r=vm;var Dm=(e,t,r)=>4*e/(e+15*t+3*r),xm=(e,t,r)=>9*t/(e+15*t+3*r),Cm=Dm(V.X,V.Y,V.Z),Am=xm(V.X,V.Y,V.Z),$m=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+Cm,a=r/(13*e)+Am,i=V.Y*(e<=8?e/dt:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Ir=$m;var Em=e=>$a(_r(We(e))),Fm=e=>qe(Ir(Ea(e))),Mm={mode:"lchuv",toMode:{luv:Ea,rgb:Fm},fromMode:{rgb:Em,luv:$a},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},mu=Mm;var Tm={mode:"luv",toMode:{xyz50:Ir,rgb:e=>qe(Ir(e))},fromMode:{xyz50:_r,rgb:e=>_r(We(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:H}}},pu=Tm;function Lr(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function It(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function km(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function Fa(e,t){let r=km(e,t),n=Ge({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function wm(e,t,r,n,o,a=null){a||(a=Fa(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function Hr(e,t,r=null){r||(r=Fa(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function Vo(e,t,r){let n=Fa(t,r),o=wm(t,r,e,1,e,n),a=Hr(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function qo(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Lr(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=Vo(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=U(Math.atan2(n,r)*180/Math.PI)),o}function Wo(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:It(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=Vo(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var Sm={...Kt,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:qo,rgb:e=>qo(yt(e))},toMode:{oklab:Wo,rgb:e=>vt(Wo(e))}},hu=Sm;function Go(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=Hr(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=It(m),p=d*g/m,y=Ge({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Lr(t)/t,t=Lr(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=U(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function Jo(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=Hr(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=It(f),g=m*d/f,p=Ge({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=It(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var Rm={...Zt,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Go,rgb:e=>Go(yt(e))},toMode:{oklab:Jo,rgb:e=>vt(Jo(e))}},gu=Rm;var rt=.0037930732552754493,Yo=Math.cbrt(rt);var Ma=e=>Math.cbrt(e)-Yo,Bm=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a=Ma(.3*t+.622*r+.078*n+rt),i=Ma(.23*t+.692*r+.078*n+rt),s=Ma(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+rt),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},bu=Bm;var Ta=e=>Math.pow(e+Yo,3),Om=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ta(e+t)-rt,a=Ta(t-e)-rt,i=Ta(r+t)-rt,s=Re({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},yu=Om;var Pm={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:yu},fromMode:{rgb:bu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:H}}},vu=Pm;var zm=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},Du=zm;var _m=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},xu=_m;var Im={mode:"yiq",toMode:{rgb:xu},fromMode:{rgb:Du},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:H}}},Cu=Im;var Lm=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Hm=(e=4)=>t=>typeof t=="number"?Lm(t,e):t,Au=Hm;var uA=Au(2),Nm=e=>Math.max(0,Math.min(1,e||0)),ka=e=>Math.round(Nm(e)*255),jm=ve("rgb"),lA=ve("hsl"),$u=e=>{if(e===void 0)return;let t=ka(e.r),r=ka(e.g),n=ka(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)};var wa=e=>$u(jm(e));var Eu=ve("rgb"),Fu=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Xm=e=>Fu(Eu(e)),Mu=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Tu(e){return Mu(Eu(e))}function Sa(e="rgb"){let{gamut:t}=Yt(e);if(!t)return n=>!0;let r=ve(typeof t=="string"?t:e);return n=>Mu(r(n))}function ku(e="rgb"){let{gamut:t}=Yt(e);if(!t)return a=>Jt(a);let r=typeof t=="string"?t:e,n=ve(r),o=Sa(r);return a=>{let i=Jt(a);if(!i)return;let s=n(i);if(o(s))return i;let u=Fu(s);return i.mode===u.mode?u:ve(i.mode)(u)}}function Ra(e,t="lch",r="rgb"){e=Jt(e);let n=r==="rgb"?Tu:Sa(r),o=r==="rgb"?Xm:ku(r);if(e===void 0||n(e))return e;let a=ve(e.mode);e=ve(t)(e);let i={...e,c:0};if(!n(i))return a(o(i));let s=0,u=e.c!==void 0?e.c:0,l=Yt(t).ranges.c,c=(l[1]-l[0])/Math.pow(2,13),f=i.c;for(;u-s>c;)i.c=s+(u-s)*.5,n(i)?(f=i.c,s=i.c):u=i.c;return a(n(i)?i:{...i,c:f})}function Ba(e){let t=ve("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Oa(e,t){let r=Ba(e),n=Ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Um=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Pa={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},Ko={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function za(e){let t=kr(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in Pa))throw new Error(`Unsupported color space: ${t.mode}`);let r=Pa[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return Um.test(e)&&(o.hex=wa(t)),o}function Nr(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(Ko).join(", ")}`)}}var ot={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function jr(e,t,r){return e===1?t:r}var wu=/^\{([^}]+)\}$/;function Te(e){return wu.test(e)}function ke(e){if(e.includes("#"))throw new Error("Mode aliases (# character) are no longer supported as of v0.6.0. Alias the root token instead, and apply modes in plugins.");let t=e.match(wu);return t?t[1]??t[0]:e}function Zo(e){let t=e.lastIndexOf(".");return t===-1?{local:e}:{local:e.substring(t+1),group:e.substring(0,t)}}var p$=P(vo),h$=P(eu),g$=P(ou),b$=P(nu),y$=P(au),v$=P(Kt),D$=P(Zt),x$=P(Do),C$=P(su),A$=P(lu),$$=P(cu),E$=P(pt),F$=P(Mo),M$=P(bt),T$=P(To),k$=P(mu),w$=P(ko),S$=P(pu),R$=P(hu),B$=P(gu),O$=P(So),P$=P(Ro),z$=P(Bo),_$=P(Oo),I$=P(Po),L$=P(De),H$=P(vu),N$=P(zo),j$=P(_o),X$=P(Cu);function Vm(e,t,r={}){let n={column:0,line:-1,...e.start},o={...n,...e.end},{linesAbove:a=2,linesBelow:i=3}=r||{},s=n.line,u=n.column,l=o.line,c=o.column,f=Math.max(s-(a+1),0),m=Math.min(t.length,l+i);s===-1&&(f=0),l===-1&&(m=t.length);let d=l-s,g={};if(d)for(let p=0;p<=d;p++){let y=p+s;u?p===0?g[y]=[u,t[y-1].length-u+1]:p===d?g[y]=[0,c]:g[y]=[0,t[y-p].length]:g[y]=!0}else u===c?u?g[s]=[u,0]:g[s]=!0:g[s]=[u,c-u];return{start:f,end:m,markerLines:g}}var Su=/\r\n|[\n\r\u2028\u2029]/;function qm(e,t,r={}){let{start:n,end:o,markerLines:a}=Vm(t,e.split(Su),r),i=t.start&&typeof t.start.column=="number",s=String(o).length,u=e.split(Su,o).slice(n,o).map((l,c)=>{let f=n+1+c,m=` ${` ${f}`.slice(-s)} |`,d=a[f],g=!a[f+1];if(d){let p="";if(Array.isArray(d)){let y=l.slice(0,Math.max(d[0]-1,0)).replace(/[^\t]/g," "),b=d[1]||1;p=[`
1
+ var af=Object.create;var cs=Object.defineProperty;var sf=Object.getOwnPropertyDescriptor;var uf=Object.getOwnPropertyNames;var lf=Object.getPrototypeOf,cf=Object.prototype.hasOwnProperty;var ff=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var df=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of uf(t))!cf.call(e,n)&&n!==r&&cs(e,n,{get:()=>t[n],enumerable:!(o=sf(t,n))||o.enumerable});return e};var mf=(e,t,r)=>(r=e!=null?af(lf(e)):{},df(t||!e||!e.__esModule?cs(r,"default",{value:e,enumerable:!0}):r,e));var Cs=ff((Y4,zn)=>{var L=String,xs=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L,blackBright:L,redBright:L,greenBright:L,yellowBright:L,blueBright:L,magentaBright:L,cyanBright:L,whiteBright:L,bgBlackBright:L,bgRedBright:L,bgGreenBright:L,bgYellowBright:L,bgBlueBright:L,bgMagentaBright:L,bgCyanBright:L,bgWhiteBright:L}};zn.exports=xs();zn.exports.createColors=xs});function fe(e){return e<0?-1:e===0?0:1}function wt(e,t,r){return(1-r)*e+r*t}function fs(e,t,r){return r<e?e:r>t?t:r}function Vt(e,t,r){return r<e?e:r>t?t:r}function qt(e){return e=e%360,e<0&&(e=e+360),e}function te(e){return e=e%360,e<0&&(e=e+360),e}function ds(e,t){return te(t-e)<=180?1:-1}function uo(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function yr(e,t){let r=e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],o=e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],n=e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2];return[r,o,n]}var ms=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],pf=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ps=[95.047,100,108.883];function lo(e,t,r){return(255<<24|(e&255)<<16|(t&255)<<8|r&255)>>>0}function Bn(e){let t=St(e[0]),r=St(e[1]),o=St(e[2]);return lo(t,r,o)}function Dr(e){return e>>16&255}function xr(e){return e>>8&255}function Cr(e){return e&255}function hs(e,t,r){let o=pf,n=o[0][0]*e+o[0][1]*t+o[0][2]*r,a=o[1][0]*e+o[1][1]*t+o[1][2]*r,i=o[2][0]*e+o[2][1]*t+o[2][2]*r,s=St(n),u=St(a),l=St(i);return lo(s,u,l)}function hf(e){let t=Ve(Dr(e)),r=Ve(xr(e)),o=Ve(Cr(e));return yr([t,r,o],ms)}function On(e){let t=Ve(Dr(e)),r=Ve(xr(e)),o=Ve(Cr(e)),n=ms,a=n[0][0]*t+n[0][1]*r+n[0][2]*o,i=n[1][0]*t+n[1][1]*r+n[1][2]*o,s=n[2][0]*t+n[2][1]*r+n[2][2]*o,u=ps,l=a/u[0],c=i/u[1],f=s/u[2],m=vr(l),d=vr(c),g=vr(f),p=116*d-16,y=500*(m-d),b=200*(d-g);return[p,y,b]}function gs(e){let t=_e(e),r=St(t);return lo(r,r,r)}function Ar(e){let t=hf(e)[1];return 116*vr(t/100)-16}function _e(e){return 100*gf((e+16)/116)}function $r(e){return vr(e/100)*116-16}function Ve(e){let t=e/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function St(e){let t=e/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,fs(0,255,Math.round(r*255))}function bs(){return ps}function vr(e){let t=.008856451679035631,r=24389/27;return e>t?Math.pow(e,1/3):(r*e+16)/116}function gf(e){let t=.008856451679035631,r=24389/27,o=e*e*e;return o>t?o:(116*e-16)/r}var $e=class e{static make(t=bs(),r=200/Math.PI*_e(50)/100,o=50,n=2,a=!1){let i=t,s=i[0]*.401288+i[1]*.650173+i[2]*-.051461,u=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,l=i[0]*-.002079+i[1]*.048952+i[2]*.953127,c=.8+n/10,f=c>=.9?wt(.59,.69,(c-.9)*10):wt(.525,.59,(c-.8)*10),m=a?1:c*(1-1/3.6*Math.exp((-r-42)/92));m=m>1?1:m<0?0:m;let d=c,g=[m*(100/s)+1-m,m*(100/u)+1-m,m*(100/l)+1-m],p=1/(5*r+1),y=p*p*p*p,b=1-y,D=y*r+.1*b*b*Math.cbrt(5*r),C=_e(o)/t[1],F=1.48+Math.sqrt(C),v=.725/Math.pow(C,.2),M=v,$=[Math.pow(D*g[0]*s/100,.42),Math.pow(D*g[1]*u/100,.42),Math.pow(D*g[2]*l/100,.42)],k=[400*$[0]/($[0]+27.13),400*$[1]/($[1]+27.13),400*$[2]/($[2]+27.13)],R=(2*k[0]+k[1]+.05*k[2])*v;return new e(C,R,v,M,f,d,g,D,Math.pow(D,.25),F)}constructor(t,r,o,n,a,i,s,u,l,c){this.n=t,this.aw=r,this.nbb=o,this.ncb=n,this.c=a,this.nc=i,this.rgbD=s,this.fl=u,this.fLRoot=l,this.z=c}};$e.DEFAULT=$e.make();var pe=class e{constructor(t,r,o,n,a,i,s,u,l){this.hue=t,this.chroma=r,this.j=o,this.q=n,this.m=a,this.s=i,this.jstar=s,this.astar=u,this.bstar=l}distance(t){let r=this.jstar-t.jstar,o=this.astar-t.astar,n=this.bstar-t.bstar,a=Math.sqrt(r*r+o*o+n*n);return 1.41*Math.pow(a,.63)}static fromInt(t){return e.fromIntInViewingConditions(t,$e.DEFAULT)}static fromIntInViewingConditions(t,r){let o=(t&16711680)>>16,n=(t&65280)>>8,a=t&255,i=Ve(o),s=Ve(n),u=Ve(a),l=.41233895*i+.35762064*s+.18051042*u,c=.2126*i+.7152*s+.0722*u,f=.01932141*i+.11916382*s+.95034478*u,m=.401288*l+.650173*c-.051461*f,d=-.250268*l+1.204414*c+.045854*f,g=-.002079*l+.048952*c+.953127*f,p=r.rgbD[0]*m,y=r.rgbD[1]*d,b=r.rgbD[2]*g,D=Math.pow(r.fl*Math.abs(p)/100,.42),C=Math.pow(r.fl*Math.abs(y)/100,.42),F=Math.pow(r.fl*Math.abs(b)/100,.42),v=fe(p)*400*D/(D+27.13),M=fe(y)*400*C/(C+27.13),$=fe(b)*400*F/(F+27.13),k=(11*v+-12*M+$)/11,R=(v+M-2*$)/9,I=(20*v+20*M+21*$)/20,X=(40*v+20*M+$)/20,le=Math.atan2(R,k)*180/Math.PI,K=le<0?le+360:le>=360?le-360:le,ut=K*Math.PI/180,Ne=X*r.nbb,ce=100*Math.pow(Ne/r.aw,r.c*r.z),je=4/r.c*Math.sqrt(ce/100)*(r.aw+4)*r.fLRoot,Oe=K<20.14?K+360:K,Tt=.25*(Math.cos(Oe*Math.PI/180+2)+3.8),Pe=5e4/13*Tt*r.nc*r.ncb*Math.sqrt(k*k+R*R)/(I+.305),Xe=Math.pow(Pe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ue=Xe*Math.sqrt(ce/100),Ut=Ue*r.fLRoot,kt=50*Math.sqrt(Xe*r.c/(r.aw+4)),Qe=(1+100*.007)*ce/(1+.007*ce),ls=1/.0228*Math.log(1+.0228*Ut),of=ls*Math.cos(ut),nf=ls*Math.sin(ut);return new e(K,Ue,ce,je,Ut,kt,Qe,of,nf)}static fromJch(t,r,o){return e.fromJchInViewingConditions(t,r,o,$e.DEFAULT)}static fromJchInViewingConditions(t,r,o,n){let a=4/n.c*Math.sqrt(t/100)*(n.aw+4)*n.fLRoot,i=r*n.fLRoot,s=r/Math.sqrt(t/100),u=50*Math.sqrt(s*n.c/(n.aw+4)),l=o*Math.PI/180,c=(1+100*.007)*t/(1+.007*t),f=1/.0228*Math.log(1+.0228*i),m=f*Math.cos(l),d=f*Math.sin(l);return new e(o,r,t,a,i,u,c,m,d)}static fromUcs(t,r,o){return e.fromUcsInViewingConditions(t,r,o,$e.DEFAULT)}static fromUcsInViewingConditions(t,r,o,n){let a=r,i=o,s=Math.sqrt(a*a+i*i),l=(Math.exp(s*.0228)-1)/.0228/n.fLRoot,c=Math.atan2(i,a)*(180/Math.PI);c<0&&(c+=360);let f=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(f,l,c,n)}toInt(){return this.viewed($e.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),o=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),n=this.hue*Math.PI/180,a=.25*(Math.cos(n+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(n),c=Math.cos(n),f=23*(u+.305)*o/(23*s+11*o*c+108*o*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return hs(I,X,G)}static fromXyzInViewingConditions(t,r,o,n){let a=.401288*t+.650173*r-.051461*o,i=-.250268*t+1.204414*r+.045854*o,s=-.002079*t+.048952*r+.953127*o,u=n.rgbD[0]*a,l=n.rgbD[1]*i,c=n.rgbD[2]*s,f=Math.pow(n.fl*Math.abs(u)/100,.42),m=Math.pow(n.fl*Math.abs(l)/100,.42),d=Math.pow(n.fl*Math.abs(c)/100,.42),g=fe(u)*400*f/(f+27.13),p=fe(l)*400*m/(m+27.13),y=fe(c)*400*d/(d+27.13),b=(11*g+-12*p+y)/11,D=(g+p-2*y)/9,C=(20*g+20*p+21*y)/20,F=(40*g+20*p+y)/20,M=Math.atan2(D,b)*180/Math.PI,$=M<0?M+360:M>=360?M-360:M,k=$*Math.PI/180,R=F*n.nbb,I=100*Math.pow(R/n.aw,n.c*n.z),X=4/n.c*Math.sqrt(I/100)*(n.aw+4)*n.fLRoot,G=$<20.14?$+360:$,le=1/4*(Math.cos(G*Math.PI/180+2)+3.8),ut=5e4/13*le*n.nc*n.ncb*Math.sqrt(b*b+D*D)/(C+.305),Ne=Math.pow(ut,.9)*Math.pow(1.64-Math.pow(.29,n.n),.73),ce=Ne*Math.sqrt(I/100),je=ce*n.fLRoot,Oe=50*Math.sqrt(Ne*n.c/(n.aw+4)),Tt=(1+100*.007)*I/(1+.007*I),Ke=Math.log(1+.0228*je)/.0228,Pe=Ke*Math.cos(k),Xe=Ke*Math.sin(k);return new e($,ce,I,X,je,Oe,Tt,Pe,Xe)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),o=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),n=this.hue*Math.PI/180,a=.25*(Math.cos(n+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(n),c=Math.cos(n),f=23*(u+.305)*o/(23*s+11*o*c+108*o*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return[I,X,G]}};var Ie=class e{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,o=0;return r<=.0031308?o=r*12.92:o=1.055*Math.pow(r,1/2.4)-.055,o*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return fe(t)*400*r/(r+27.13)}static hueOf(t){let r=yr(t,e.SCALED_DISCOUNT_FROM_LINRGB),o=e.chromaticAdaptation(r[0]),n=e.chromaticAdaptation(r[1]),a=e.chromaticAdaptation(r[2]),i=(11*o+-12*n+a)/11,s=(o+n-2*a)/9;return Math.atan2(s,i)}static areInCyclicOrder(t,r,o){let n=e.sanitizeRadians(r-t),a=e.sanitizeRadians(o-t);return n<a}static intercept(t,r,o){return(r-t)/(o-t)}static lerpPoint(t,r,o){return[t[0]+(o[0]-t[0])*r,t[1]+(o[1]-t[1])*r,t[2]+(o[2]-t[2])*r]}static setCoordinate(t,r,o,n){let a=e.intercept(t[n],r,o[n]);return e.lerpPoint(t,a,o)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let o=e.Y_FROM_LINRGB[0],n=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],i=r%4<=1?0:100,s=r%2===0?0:100;if(r<4){let u=i,l=s,c=(t-u*n-l*a)/o;return e.isBounded(c)?[c,u,l]:[-1,-1,-1]}else if(r<8){let u=i,l=s,c=(t-l*o-u*a)/n;return e.isBounded(c)?[l,c,u]:[-1,-1,-1]}else{let u=i,l=s,c=(t-u*o-l*n)/a;return e.isBounded(c)?[u,l,c]:[-1,-1,-1]}}static bisectToSegment(t,r){let o=[-1,-1,-1],n=o,a=0,i=0,s=!1,u=!0;for(let l=0;l<12;l++){let c=e.nthVertex(t,l);if(c[0]<0)continue;let f=e.hueOf(c);if(!s){o=c,n=c,a=f,i=f,s=!0;continue}(u||e.areInCyclicOrder(a,f,i))&&(u=!1,e.areInCyclicOrder(a,r,f)?(n=c,i=f):(o=c,a=f))}return[o,n]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let o=e.bisectToSegment(t,r),n=o[0],a=e.hueOf(n),i=o[1];for(let s=0;s<3;s++)if(n[s]!==i[s]){let u=-1,l=255;n[s]<i[s]?(u=e.criticalPlaneBelow(e.trueDelinearized(n[s])),l=e.criticalPlaneAbove(e.trueDelinearized(i[s]))):(u=e.criticalPlaneAbove(e.trueDelinearized(n[s])),l=e.criticalPlaneBelow(e.trueDelinearized(i[s])));for(let c=0;c<8&&!(Math.abs(l-u)<=1);c++){let f=Math.floor((u+l)/2),m=e.CRITICAL_PLANES[f],d=e.setCoordinate(n,m,i,s),g=e.hueOf(d);e.areInCyclicOrder(a,r,g)?(i=d,l=f):(n=d,a=g,u=f)}}return e.midpoint(n,i)}static inverseChromaticAdaptation(t){let r=Math.abs(t),o=Math.max(0,27.13*r/(400-r));return fe(t)*Math.pow(o,1/.42)}static findResultByJ(t,r,o){let n=Math.sqrt(o)*11,a=$e.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),u=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),c=Math.cos(t);for(let f=0;f<5;f++){let m=n/100,d=r===0||n===0?0:r/Math.sqrt(m),g=Math.pow(d*i,1/.9),y=a.aw*Math.pow(m,1/a.c/a.z)/a.nbb,b=23*(y+.305)*g/(23*u+11*g*c+108*g*l),D=b*c,C=b*l,F=(460*y+451*D+288*C)/1403,v=(460*y-891*D-261*C)/1403,M=(460*y-220*D-6300*C)/1403,$=e.inverseChromaticAdaptation(F),k=e.inverseChromaticAdaptation(v),R=e.inverseChromaticAdaptation(M),I=yr([$,k,R],e.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;let X=e.Y_FROM_LINRGB[0],G=e.Y_FROM_LINRGB[1],le=e.Y_FROM_LINRGB[2],K=X*I[0]+G*I[1]+le*I[2];if(K<=0)return 0;if(f===4||Math.abs(K-o)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Bn(I);n=n-(K-o)*n/(2*K)}return 0}static solveToInt(t,r,o){if(r<1e-4||o<1e-4||o>99.9999)return gs(o);t=te(t);let n=t/180*Math.PI,a=_e(o),i=e.findResultByJ(n,r,a);if(i!==0)return i;let s=e.bisectToLimit(a,n);return Bn(s)}static solveToCam(t,r,o){return pe.fromInt(e.solveToInt(t,r,o))}};Ie.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ie.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ie.Y_FROM_LINRGB=[.2126,.7152,.0722];Ie.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var N=class e{static from(t,r,o){return new e(Ie.solveToInt(t,r,o))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ie.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ie.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ie.solveToInt(this.internalHue,this.internalChroma,t))}constructor(t){this.argb=t;let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}setInternalState(t){let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}inViewingConditions(t){let o=pe.fromInt(this.toInt()).xyzInViewingConditions(t),n=pe.fromXyzInViewingConditions(o[0],o[1],o[2],$e.make());return e.from(n.hue,n.chroma,$r(o[1]))}};var co=class e{static harmonize(t,r){let o=N.fromInt(t),n=N.fromInt(r),a=uo(o.hue,n.hue),i=Math.min(a*.5,15),s=te(o.hue+i*ds(o.hue,n.hue));return N.from(s,o.chroma,o.tone).toInt()}static hctHue(t,r,o){let n=e.cam16Ucs(t,r,o),a=pe.fromInt(n),i=pe.fromInt(t);return N.from(a.hue,i.chroma,Ar(t)).toInt()}static cam16Ucs(t,r,o){let n=pe.fromInt(t),a=pe.fromInt(r),i=n.jstar,s=n.astar,u=n.bstar,l=a.jstar,c=a.astar,f=a.bstar,m=i+(l-i)*o,d=s+(c-s)*o,g=u+(f-u)*o;return pe.fromUcs(m,d,g).toInt()}};var he=class e{static ratioOfTones(t,r){return t=Vt(0,100,t),r=Vt(0,100,r),e.ratioOfYs(_e(t),_e(r))}static ratioOfYs(t,r){let o=t>r?t:r,n=o===r?t:r;return(o+5)/(n+5)}static lighter(t,r){if(t<0||t>100)return-1;let o=_e(t),n=r*(o+5)-5,a=e.ratioOfYs(n,o),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(n)+.4;return s<0||s>100?-1:s}static darker(t,r){if(t<0||t>100)return-1;let o=_e(t),n=(o+5)/r-5,a=e.ratioOfYs(o,n),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(n)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,r){let o=e.lighter(t,r);return o<0?100:o}static darkerUnsafe(t,r){let o=e.darker(t,r);return o<0?0:o}};var Rt=class e{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,o=Math.round(t.chroma)>16,n=Math.round(t.tone)<65;return r&&o&&n}static fixIfDisliked(t){return e.isDisliked(t)?N.from(t.hue,t.chroma,70):t}};var S=class e{static fromPalette(t){return new e(t.name??"",t.palette,t.tone,t.isBackground??!1,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}constructor(t,r,o,n,a,i,s,u){if(this.name=t,this.palette=r,this.tone=o,this.isBackground=n,this.background=a,this.secondBackground=i,this.contrastCurve=s,this.toneDeltaPair=u,this.hctCache=new Map,!a&&i)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!a&&s)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(a&&!s)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let o=this.getTone(t),n=this.palette(t).getHct(o);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n}getTone(t){let r=t.contrastLevel<0;if(this.toneDeltaPair){let o=this.toneDeltaPair(t),n=o.roleA,a=o.roleB,i=o.delta,s=o.polarity,u=o.stayTogether,c=this.background(t).getTone(t),f=s==="nearer"||s==="lighter"&&!t.isDark||s==="darker"&&t.isDark,m=f?n:a,d=f?a:n,g=this.name===m.name,p=t.isDark?1:-1,y=m.contrastCurve.get(t.contrastLevel),b=d.contrastCurve.get(t.contrastLevel),D=m.tone(t),C=he.ratioOfTones(c,D)>=y?D:e.foregroundTone(c,y),F=d.tone(t),v=he.ratioOfTones(c,F)>=b?F:e.foregroundTone(c,b);return r&&(C=e.foregroundTone(c,y),v=e.foregroundTone(c,b)),(v-C)*p>=i||(v=Vt(0,100,C+i*p),(v-C)*p>=i||(C=Vt(0,100,v-i*p))),50<=C&&C<60?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):50<=v&&v<60&&(u?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):p>0?v=60:v=49),g?C:v}else{let o=this.tone(t);if(this.background==null)return o;let n=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(he.ratioOfTones(n,o)>=a||(o=e.foregroundTone(n,a)),r&&(o=e.foregroundTone(n,a)),this.isBackground&&50<=o&&o<60&&(he.ratioOfTones(49,n)>=a?o=49:o=60),this.secondBackground){let[i,s]=[this.background,this.secondBackground],[u,l]=[i(t).getTone(t),s(t).getTone(t)],[c,f]=[Math.max(u,l),Math.min(u,l)];if(he.ratioOfTones(c,o)>=a&&he.ratioOfTones(f,o)>=a)return o;let m=he.lighter(c,a),d=he.darker(f,a),g=[];return m!==-1&&g.push(m),d!==-1&&g.push(d),e.tonePrefersLightForeground(u)||e.tonePrefersLightForeground(l)?m<0?100:m:g.length===1?g[0]:d<0?0:d}return o}}static foregroundTone(t,r){let o=he.lighterUnsafe(t,r),n=he.darkerUnsafe(t,r),a=he.ratioOfTones(o,t),i=he.ratioOfTones(n,t);if(e.tonePrefersLightForeground(t)){let u=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||u?o:n}else return i>=r||i>=a?n:o}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}};var B=class e{static fromInt(t){let r=N.fromInt(t);return e.fromHct(r)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let o=new Pn(t,r).create();return new e(t,r,o)}constructor(t,r,o){this.hue=t,this.chroma=r,this.keyColor=o,this.cache=new Map}tone(t){let r=this.cache.get(t);return r===void 0&&(r=N.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return N.fromInt(this.tone(t))}},Pn=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200}create(){let n=0,a=100;for(;n<a;){let i=Math.floor((n+a)/2),s=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(n-50)<Math.abs(a-50))a=i;else{if(n===i)return N.from(this.hue,this.requestedChroma,n);n=i}else s?n=i+1:a=i}return N.from(this.hue,this.requestedChroma,n)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=N.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var O=class{constructor(t,r,o,n){this.low=t,this.normal=r,this.medium=o,this.high=n}get(t){return t<=-1?this.low:t<0?wt(this.low,this.normal,(t- -1)/1):t<.5?wt(this.normal,this.medium,(t-0)/.5):t<1?wt(this.medium,this.high,(t-.5)/.5):this.high}};var ie=class{constructor(t,r,o,n,a){this.roleA=t,this.roleB=r,this.delta=o,this.polarity=n,this.stayTogether=a}};var Q;(function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"})(Q||(Q={}));function Wt(e){return e.variant===Q.FIDELITY||e.variant===Q.CONTENT}function q(e){return e.variant===Q.MONOCHROME}function bf(e,t,r,o){let n=r,a=N.from(e,t,r);if(a.chroma<t){let i=a.chroma;for(;a.chroma<t;){n+=o?-1:1;let s=N.from(e,t,n);if(i>s.chroma||Math.abs(s.chroma-t)<.4)break;let u=Math.abs(s.chroma-t),l=Math.abs(a.chroma-t);u<l&&(a=s),i=Math.max(i,s.chroma)}}return n}var h=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};h.contentAccentToneDelta=15;h.primaryPaletteKeyColor=S.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});h.secondaryPaletteKeyColor=S.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});h.tertiaryPaletteKeyColor=S.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});h.neutralPaletteKeyColor=S.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});h.neutralVariantPaletteKeyColor=S.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});h.background=S.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.onBackground=S.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.background,contrastCurve:new O(3,3,4.5,7)});h.surface=S.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.surfaceDim=S.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new O(87,87,80,75).get(e.contrastLevel),isBackground:!0});h.surfaceBright=S.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(24,24,29,34).get(e.contrastLevel):98,isBackground:!0});h.surfaceContainerLowest=S.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(4,4,2,0).get(e.contrastLevel):100,isBackground:!0});h.surfaceContainerLow=S.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(10,10,11,12).get(e.contrastLevel):new O(96,96,96,95).get(e.contrastLevel),isBackground:!0});h.surfaceContainer=S.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(12,12,16,20).get(e.contrastLevel):new O(94,94,92,90).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHigh=S.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(17,17,21,25).get(e.contrastLevel):new O(92,92,88,85).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHighest=S.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(22,22,26,30).get(e.contrastLevel):new O(90,90,84,80).get(e.contrastLevel),isBackground:!0});h.onSurface=S.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.highestSurface(e),contrastCurve:new O(4.5,7,11,21)});h.surfaceVariant=S.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});h.onSurfaceVariant=S.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,11)});h.inverseSurface=S.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});h.inverseOnSurface=S.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>h.inverseSurface,contrastCurve:new O(4.5,7,11,21)});h.outline=S.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>h.highestSurface(e),contrastCurve:new O(1.5,3,4.5,7)});h.outlineVariant=S.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5)});h.shadow=S.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});h.scrim=S.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});h.surfaceTint=S.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});h.primary=S.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimary=S.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.primary,contrastCurve:new O(4.5,7,11,21)});h.primaryContainer=S.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?e.sourceColorHct.tone:q(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimaryContainer=S.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?S.foregroundTone(h.primaryContainer.tone(e),4.5):q(e)?e.isDark?0:100:e.isDark?90:30,background:e=>h.primaryContainer,contrastCurve:new O(3,4.5,7,11)});h.inversePrimary=S.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>h.inverseSurface,contrastCurve:new O(3,4.5,7,7)});h.secondary=S.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondary=S.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?10:100:e.isDark?20:100,background:e=>h.secondary,contrastCurve:new O(4.5,7,11,21)});h.secondaryContainer=S.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return q(e)?e.isDark?30:85:Wt(e)?bf(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondaryContainer=S.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?90:10:Wt(e)?S.foregroundTone(h.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.secondaryContainer,contrastCurve:new O(3,4.5,7,11)});h.tertiary=S.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiary=S.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.tertiary,contrastCurve:new O(4.5,7,11,21)});h.tertiaryContainer=S.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(q(e))return e.isDark?60:49;if(!Wt(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Rt.fixIfDisliked(t).tone},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiaryContainer=S.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?0:100:Wt(e)?S.foregroundTone(h.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.tertiaryContainer,contrastCurve:new O(3,4.5,7,11)});h.error=S.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onError=S.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>h.error,contrastCurve:new O(4.5,7,11,21)});h.errorContainer=S.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onErrorContainer=S.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>q(e)?e.isDark?90:10:e.isDark?90:30,background:e=>h.errorContainer,contrastCurve:new O(3,4.5,7,11)});h.primaryFixed=S.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.primaryFixedDim=S.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.onPrimaryFixed=S.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?100:10,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onPrimaryFixedVariant=S.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>q(e)?90:30,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(3,4.5,7,11)});h.secondaryFixed=S.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>q(e)?80:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.secondaryFixedDim=S.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>q(e)?70:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.onSecondaryFixed=S.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onSecondaryFixedVariant=S.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>q(e)?25:30,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(3,4.5,7,11)});h.tertiaryFixed=S.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.tertiaryFixedDim=S.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.onTertiaryFixed=S.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?100:10,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onTertiaryFixedVariant=S.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>q(e)?90:30,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(3,4.5,7,11)});var W=class{constructor(t){this.sourceColorArgb=t.sourceColorArgb,this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.sourceColorHct=N.fromInt(t.sourceColorArgb),this.primaryPalette=t.primaryPalette,this.secondaryPalette=t.secondaryPalette,this.tertiaryPalette=t.tertiaryPalette,this.neutralPalette=t.neutralPalette,this.neutralVariantPalette=t.neutralVariantPalette,this.errorPalette=B.fromHueAndChroma(25,84)}static getRotatedHue(t,r,o){let n=t.hue;if(r.length!==o.length)throw new Error(`mismatch between hue length ${r.length} & rotations ${o.length}`);if(o.length===1)return te(t.hue+o[0]);let a=r.length;for(let i=0;i<=a-2;i++){let s=r[i],u=r[i+1];if(s<n&&n<u)return te(n+o[i])}return n}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(h.primaryPaletteKeyColor)}get secondaryPaletteKeyColor(){return this.getArgb(h.secondaryPaletteKeyColor)}get tertiaryPaletteKeyColor(){return this.getArgb(h.tertiaryPaletteKeyColor)}get neutralPaletteKeyColor(){return this.getArgb(h.neutralPaletteKeyColor)}get neutralVariantPaletteKeyColor(){return this.getArgb(h.neutralVariantPaletteKeyColor)}get background(){return this.getArgb(h.background)}get onBackground(){return this.getArgb(h.onBackground)}get surface(){return this.getArgb(h.surface)}get surfaceDim(){return this.getArgb(h.surfaceDim)}get surfaceBright(){return this.getArgb(h.surfaceBright)}get surfaceContainerLowest(){return this.getArgb(h.surfaceContainerLowest)}get surfaceContainerLow(){return this.getArgb(h.surfaceContainerLow)}get surfaceContainer(){return this.getArgb(h.surfaceContainer)}get surfaceContainerHigh(){return this.getArgb(h.surfaceContainerHigh)}get surfaceContainerHighest(){return this.getArgb(h.surfaceContainerHighest)}get onSurface(){return this.getArgb(h.onSurface)}get surfaceVariant(){return this.getArgb(h.surfaceVariant)}get onSurfaceVariant(){return this.getArgb(h.onSurfaceVariant)}get inverseSurface(){return this.getArgb(h.inverseSurface)}get inverseOnSurface(){return this.getArgb(h.inverseOnSurface)}get outline(){return this.getArgb(h.outline)}get outlineVariant(){return this.getArgb(h.outlineVariant)}get shadow(){return this.getArgb(h.shadow)}get scrim(){return this.getArgb(h.scrim)}get surfaceTint(){return this.getArgb(h.surfaceTint)}get primary(){return this.getArgb(h.primary)}get onPrimary(){return this.getArgb(h.onPrimary)}get primaryContainer(){return this.getArgb(h.primaryContainer)}get onPrimaryContainer(){return this.getArgb(h.onPrimaryContainer)}get inversePrimary(){return this.getArgb(h.inversePrimary)}get secondary(){return this.getArgb(h.secondary)}get onSecondary(){return this.getArgb(h.onSecondary)}get secondaryContainer(){return this.getArgb(h.secondaryContainer)}get onSecondaryContainer(){return this.getArgb(h.onSecondaryContainer)}get tertiary(){return this.getArgb(h.tertiary)}get onTertiary(){return this.getArgb(h.onTertiary)}get tertiaryContainer(){return this.getArgb(h.tertiaryContainer)}get onTertiaryContainer(){return this.getArgb(h.onTertiaryContainer)}get error(){return this.getArgb(h.error)}get onError(){return this.getArgb(h.onError)}get errorContainer(){return this.getArgb(h.errorContainer)}get onErrorContainer(){return this.getArgb(h.onErrorContainer)}get primaryFixed(){return this.getArgb(h.primaryFixed)}get primaryFixedDim(){return this.getArgb(h.primaryFixedDim)}get onPrimaryFixed(){return this.getArgb(h.onPrimaryFixed)}get onPrimaryFixedVariant(){return this.getArgb(h.onPrimaryFixedVariant)}get secondaryFixed(){return this.getArgb(h.secondaryFixed)}get secondaryFixedDim(){return this.getArgb(h.secondaryFixedDim)}get onSecondaryFixed(){return this.getArgb(h.onSecondaryFixed)}get onSecondaryFixedVariant(){return this.getArgb(h.onSecondaryFixedVariant)}get tertiaryFixed(){return this.getArgb(h.tertiaryFixed)}get tertiaryFixedDim(){return this.getArgb(h.tertiaryFixedDim)}get onTertiaryFixed(){return this.getArgb(h.onTertiaryFixed)}get onTertiaryFixedVariant(){return this.getArgb(h.onTertiaryFixedVariant)}};var Ee=class e{static of(t){return new e(t,!1)}static contentOf(t){return new e(t,!0)}static fromColors(t){return e.createPaletteFromColors(!1,t)}static contentFromColors(t){return e.createPaletteFromColors(!0,t)}static createPaletteFromColors(t,r){let o=new e(r.primary,t);if(r.secondary){let n=new e(r.secondary,t);o.a2=n.a1}if(r.tertiary){let n=new e(r.tertiary,t);o.a3=n.a1}if(r.error){let n=new e(r.error,t);o.error=n.a1}if(r.neutral){let n=new e(r.neutral,t);o.n1=n.n1}if(r.neutralVariant){let n=new e(r.neutralVariant,t);o.n2=n.n2}return o}constructor(t,r){let o=N.fromInt(t),n=o.hue,a=o.chroma;r?(this.a1=B.fromHueAndChroma(n,a),this.a2=B.fromHueAndChroma(n,a/3),this.a3=B.fromHueAndChroma(n+60,a/2),this.n1=B.fromHueAndChroma(n,Math.min(a/12,4)),this.n2=B.fromHueAndChroma(n,Math.min(a/6,8))):(this.a1=B.fromHueAndChroma(n,Math.max(48,a)),this.a2=B.fromHueAndChroma(n,16),this.a3=B.fromHueAndChroma(n+60,24),this.n1=B.fromHueAndChroma(n,4),this.n2=B.fromHueAndChroma(n,8)),this.error=B.fromHueAndChroma(25,84)}};var Er=class e{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(t){return e.lightFromCorePalette(Ee.of(t))}static dark(t){return e.darkFromCorePalette(Ee.of(t))}static lightContent(t){return e.lightFromCorePalette(Ee.contentOf(t))}static darkContent(t){return e.darkFromCorePalette(Ee.contentOf(t))}static lightFromCorePalette(t){return new e({primary:t.a1.tone(40),onPrimary:t.a1.tone(100),primaryContainer:t.a1.tone(90),onPrimaryContainer:t.a1.tone(10),secondary:t.a2.tone(40),onSecondary:t.a2.tone(100),secondaryContainer:t.a2.tone(90),onSecondaryContainer:t.a2.tone(10),tertiary:t.a3.tone(40),onTertiary:t.a3.tone(100),tertiaryContainer:t.a3.tone(90),onTertiaryContainer:t.a3.tone(10),error:t.error.tone(40),onError:t.error.tone(100),errorContainer:t.error.tone(90),onErrorContainer:t.error.tone(10),background:t.n1.tone(99),onBackground:t.n1.tone(10),surface:t.n1.tone(99),onSurface:t.n1.tone(10),surfaceVariant:t.n2.tone(90),onSurfaceVariant:t.n2.tone(30),outline:t.n2.tone(50),outlineVariant:t.n2.tone(80),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(20),inverseOnSurface:t.n1.tone(95),inversePrimary:t.a1.tone(80)})}static darkFromCorePalette(t){return new e({primary:t.a1.tone(80),onPrimary:t.a1.tone(20),primaryContainer:t.a1.tone(30),onPrimaryContainer:t.a1.tone(90),secondary:t.a2.tone(80),onSecondary:t.a2.tone(20),secondaryContainer:t.a2.tone(30),onSecondaryContainer:t.a2.tone(90),tertiary:t.a3.tone(80),onTertiary:t.a3.tone(20),tertiaryContainer:t.a3.tone(30),onTertiaryContainer:t.a3.tone(90),error:t.error.tone(80),onError:t.error.tone(20),errorContainer:t.error.tone(30),onErrorContainer:t.error.tone(80),background:t.n1.tone(10),onBackground:t.n1.tone(90),surface:t.n1.tone(10),onSurface:t.n1.tone(90),surfaceVariant:t.n2.tone(30),onSurfaceVariant:t.n2.tone(80),outline:t.n2.tone(60),outlineVariant:t.n2.tone(30),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(90),inverseOnSurface:t.n1.tone(20),inversePrimary:t.a1.tone(40)})}constructor(t){this.props=t}toJSON(){return{...this.props}}};var Fr=class e{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((o,n)=>r.get(o)-r.get(n)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let o=Math.round(this.input.hue),n=this.hctsByHue[o],a=this.relativeTemperature(n),i=[n],s=0;for(let g=0;g<360;g++){let p=qt(o+g),y=this.hctsByHue[p],b=this.relativeTemperature(y),D=Math.abs(b-a);a=b,s+=D}let u=1,l=s/r,c=0;for(a=this.relativeTemperature(n);i.length<r;){let g=qt(o+u),p=this.hctsByHue[g],y=this.relativeTemperature(p),b=Math.abs(y-a);c+=b;let D=i.length*l,C=c>=D,F=1;for(;C&&i.length<r;){i.push(p);let v=(i.length+F)*l;C=c>=v,F++}if(a=y,u++,u>360){for(;i.length<r;)i.push(p);break}}let f=[this.input],m=Math.floor((t-1)/2);for(let g=1;g<m+1;g++){let p=0-g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.splice(0,0,i[p])}let d=t-m-1;for(let g=1;g<d+1;g++){let p=g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.push(i[p])}return f}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),o=this.warmest.hue,a=this.tempsByHct.get(this.warmest)-r,i=e.isBetween(this.input.hue,t,o),s=i?o:t,u=i?t:o,l=1,c=1e3,f=this.hctsByHue[Math.round(this.input.hue)],m=1-this.inputRelativeTemperature;for(let d=0;d<=360;d+=1){let g=te(s+l*d);if(!e.isBetween(g,s,u))continue;let p=this.hctsByHue[Math.round(g)],y=(this.tempsByHct.get(p)-r)/a,b=Math.abs(m-y);b<c&&(c=b,f=p)}return this.complementCache=f,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),o=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:o/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let o of t)r.set(o,e.rawTemperature(o));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let o=N.from(r,this.input.chroma,this.input.tone);t.push(o)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,o){return r<o?r<=t&&t<=o:r<=t||t<=o}static rawTemperature(t){let r=On(t.toInt()),o=te(Math.atan2(r[2],r[1])*180/Math.PI),n=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return-.5+.02*Math.pow(n,1.07)*Math.cos(te(o-50)*Math.PI/180)}};var Bt=class e extends W{constructor(t,r,o){super({sourceColorArgb:t.toInt(),variant:Q.EXPRESSIVE,contrastLevel:o,isDark:r,primaryPalette:B.fromHueAndChroma(te(t.hue+240),40),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue+15,8),neutralVariantPalette:B.fromHueAndChroma(t.hue+15,12)})}};Bt.hues=[0,21,51,121,151,191,271,321,360];Bt.secondaryRotations=[45,95,45,20,45,90,45,45,45];Bt.tertiaryRotations=[120,120,20,45,20,15,20,120,120];var fo=class extends W{constructor(t,r,o){super({sourceColorArgb:t.toInt(),variant:Q.FIDELITY,contrastLevel:o,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,t.chroma),secondaryPalette:B.fromHueAndChroma(t.hue,Math.max(t.chroma-32,t.chroma*.5)),tertiaryPalette:B.fromInt(Rt.fixIfDisliked(new Fr(t).complement).toInt()),neutralPalette:B.fromHueAndChroma(t.hue,t.chroma/8),neutralVariantPalette:B.fromHueAndChroma(t.hue,t.chroma/8+4)})}};var mo=class extends W{constructor(t,r,o){super({sourceColorArgb:t.toInt(),variant:Q.TONAL_SPOT,contrastLevel:o,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,36),secondaryPalette:B.fromHueAndChroma(t.hue,16),tertiaryPalette:B.fromHueAndChroma(te(t.hue+60),24),neutralPalette:B.fromHueAndChroma(t.hue,6),neutralVariantPalette:B.fromHueAndChroma(t.hue,8)})}};var Ot=class e extends W{constructor(t,r,o){super({sourceColorArgb:t.toInt(),variant:Q.VIBRANT,contrastLevel:o,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,200),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue,10),neutralVariantPalette:B.fromHueAndChroma(t.hue,12)})}};Ot.hues=[0,41,61,101,131,181,251,301,360];Ot.secondaryRotations=[18,15,10,12,15,18,15,12,12];Ot.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var yf={desired:4,fallbackColorARGB:4282549748,filter:!0};function vf(e,t){return e.score>t.score?-1:e.score<t.score?1:0}var et=class e{constructor(){}static score(t,r){let{desired:o,fallbackColorARGB:n,filter:a}={...yf,...r},i=[],s=new Array(360).fill(0),u=0;for(let[d,g]of t.entries()){let p=N.fromInt(d);i.push(p);let y=Math.floor(p.hue);s[y]+=g,u+=g}let l=new Array(360).fill(0);for(let d=0;d<360;d++){let g=s[d]/u;for(let p=d-14;p<d+16;p++){let y=qt(p);l[y]+=g}}let c=new Array;for(let d of i){let g=qt(Math.round(d.hue)),p=l[g];if(a&&(d.chroma<e.CUTOFF_CHROMA||p<=e.CUTOFF_EXCITED_PROPORTION))continue;let y=p*100*e.WEIGHT_PROPORTION,b=d.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,D=(d.chroma-e.TARGET_CHROMA)*b,C=y+D;c.push({hct:d,score:C})}c.sort(vf);let f=[];for(let d=90;d>=15;d--){f.length=0;for(let{hct:g}of c)if(f.find(y=>uo(g.hue,y.hue)<d)||f.push(g),f.length>=o)break;if(f.length>=o)break}let m=[];f.length===0&&m.push(n);for(let d of f)m.push(d.toInt());return m}};et.TARGET_CHROMA=48;et.WEIGHT_PROPORTION=.7;et.WEIGHT_CHROMA_ABOVE=.3;et.WEIGHT_CHROMA_BELOW=.1;et.CUTOFF_CHROMA=5;et.CUTOFF_EXCITED_PROPORTION=.01;function Gt(e){let t=Dr(e),r=xr(e),o=Cr(e),n=[t.toString(16),r.toString(16),o.toString(16)];for(let[a,i]of n.entries())i.length===1&&(n[a]="0"+i);return"#"+n.join("")}function Pt(e){e=e.replace("#","");let t=e.length===3,r=e.length===6,o=e.length===8;if(!t&&!r&&!o)throw new Error("unexpected hex "+e);let n=0,a=0,i=0;return t?(n=tt(e.slice(0,1).repeat(2)),a=tt(e.slice(1,2).repeat(2)),i=tt(e.slice(2,3).repeat(2))):r?(n=tt(e.slice(0,2)),a=tt(e.slice(2,4)),i=tt(e.slice(4,6))):o&&(n=tt(e.slice(2,4)),a=tt(e.slice(4,6)),i=tt(e.slice(6,8))),(255<<24|(n&255)<<16|(a&255)<<8|i&255)>>>0}function tt(e){return parseInt(e,16)}function ys(e,t=[]){let r=Ee.of(e);return{source:e,schemes:{light:Er.light(e),dark:Er.dark(e)},palettes:{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2,error:r.error},customColors:t.map(o=>Df(e,o))}}function Df(e,t){let r=t.value,o=r,n=e;t.blend&&(r=co.harmonize(o,n));let i=Ee.of(r).a1;return{color:t,value:r,light:{color:i.tone(40),onColor:i.tone(100),colorContainer:i.tone(90),onColorContainer:i.tone(10)},dark:{color:i.tone(80),onColor:i.tone(20),colorContainer:i.tone(30),onColorContainer:i.tone(90)}}}var vs={primary:"#7c5df0",variant:"classic",contrast:"standard",shape:"default",font:{brand:"Noto Sans",plain:"Noto Sans"}};function _n(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function Cf(e){for(var t="",r=0;r<e.length;r++)t+=_n(e[r]);return t}function Ds(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(Ds(y,t),"$")});return"(?:".concat(r.join("|"),")")}var o="",n="",a=".";t===!0?(o="/",n="[/\\\\]",a="[^/\\\\]"):t&&(o=t,n=Cf(o),n.length>1?(n="(?:".concat(n,")"),a="((?!".concat(n,").)")):a="[^".concat(n,"]"));for(var i=t?"".concat(n,"+?"):"",s=t?"".concat(n,"*?"):"",u=t?e.split(o):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=_n(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=_n(p)}l+=d}}return l}function Af(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function ye(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=Ds(e,t.separator),o=new RegExp("^".concat(r,"$"),t.flags),n=Af.bind(null,o);return n.options=t,n.pattern=e,n.regexp=o,n}var nt=mf(Cs(),1);function po(e){return Object.prototype.toString.call(e).slice(8,-1)}function Mr(e){if(po(e)!=="Object")return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function $f(e){return po(e)==="Null"}function Ef(e,t,r,o,n){return a=>e(a)||t(a)||!!r&&r(a)||!!o&&o(a)||!!n&&n(a)}function Ff(e){return po(e)==="Undefined"}var J4=Ef($f,Ff);function In(e){return po(e)==="Symbol"}function As(e,t,r,o){let n={}.propertyIsEnumerable.call(o,t)?"enumerable":"nonenumerable";n==="enumerable"&&(e[t]=r),n==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function $s(e,t,r){if(!Mr(t))return t;let o={};if(Mr(e)){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertySymbols(e);o=[...s,...u].reduce((l,c)=>{let f=e[c];return(!In(c)&&!Object.getOwnPropertyNames(t).includes(c)||In(c)&&!Object.getOwnPropertySymbols(t).includes(c))&&As(l,c,f,e),l},{})}let n=Object.getOwnPropertyNames(t),a=Object.getOwnPropertySymbols(t);return[...n,...a].reduce((s,u)=>{let l=t[u],c=Mr(e)?e[u]:void 0;c!==void 0&&Mr(l)&&(l=$s(c,l,r));let f=r?r(c,l,u):l;return As(s,u,f,t),s},o)}function Ln(e,...t){return t.reduce((r,o)=>$s(r,o),e)}var Mf=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},ho=Mf;var Tf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Es=Tf;var kf=e=>ho(Es[e.toLowerCase()],6),Fs=kf;var wf=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Sf=e=>{let t;return(t=e.match(wf))?ho(parseInt(t[1],16),t[1].length):void 0},Ms=Sf;var ge="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",uy=`(?:${ge}|none)`,_t=`${ge}%`,ly=`(?:${ge}%|none)`,Tr=`(?:${ge}%|${ge})`,Rf=`(?:${ge}%|${ge}|none)`,Ts=`(?:${ge}(deg|grad|rad|turn)|${ge})`,cy=`(?:${ge}(deg|grad|rad|turn)|${ge}|none)`,lt="\\s*,\\s*";var fy=new RegExp("^"+Rf+"$");var Bf=new RegExp(`^rgba?\\(\\s*${ge}${lt}${ge}${lt}${ge}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Of=new RegExp(`^rgba?\\(\\s*${_t}${lt}${_t}${lt}${_t}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Pf=e=>{let t={mode:"rgb"},r;if(r=e.match(Bf))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Of))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},ks=Pf;var _f=(e,t)=>e===void 0?void 0:typeof e!="object"?kr(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Yt=_f;var zf=(e="rgb")=>t=>(t=Yt(t,e))!==void 0?t.mode===e?t:Le[t.mode][e]?Le[t.mode][e](t):e==="rgb"?Le[t.mode].rgb(t):Le.rgb[e](Le[t.mode].rgb(t)):void 0,ve=zf;var Le={},ws={},wr=[],Hn={},If=e=>e,P=e=>(Le[e.mode]={...Le[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Le[t]||(Le[t]={}),Le[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=If)}),ws[e.mode]=e,(e.parse||[]).forEach(t=>{Lf(t,e.mode)}),ve(e.mode)),Jt=e=>ws[e],Lf=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Hn[e]=t}else typeof e=="function"&&wr.indexOf(e)<0&&wr.push(e)};var Nn=/[^\x00-\x7F]|[a-zA-Z_]/,Hf=/[^\x00-\x7F]|[-\w]/,x={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},_=0;function go(e){let t=e[_],r=e[_+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[_+2]):t==="."?/\d/.test(r):/\d/.test(t)}function jn(e){if(_>=e.length)return!1;let t=e[_];if(Nn.test(t))return!0;if(t==="-"){if(e.length-_<2)return!1;let r=e[_+1];return!!(r==="-"||Nn.test(r))}return!1}var Nf={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Sr(e){let t="";if((e[_]==="-"||e[_]==="+")&&(t+=e[_++]),t+=bo(e),e[_]==="."&&/\d/.test(e[_+1])&&(t+=e[_++]+bo(e)),(e[_]==="e"||e[_]==="E")&&((e[_+1]==="-"||e[_+1]==="+")&&/\d/.test(e[_+2])?t+=e[_++]+e[_++]+bo(e):/\d/.test(e[_+1])&&(t+=e[_++]+bo(e))),jn(e)){let r=yo(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:x.Hue,value:t*Nf[r]}:void 0}return e[_]==="%"?(_++,{type:x.Percentage,value:+t}):{type:x.Number,value:+t}}function bo(e){let t="";for(;/\d/.test(e[_]);)t+=e[_++];return t}function yo(e){let t="";for(;_<e.length&&Hf.test(e[_]);)t+=e[_++];return t}function jf(e){let t=yo(e);return e[_]==="("?(_++,{type:x.Function,value:t}):t==="none"?{type:x.None,value:void 0}:{type:x.Ident,value:t}}function Xf(e=""){let t=e.trim(),r=[],o;for(_=0;_<t.length;){if(o=t[_++],o===`
2
+ `||o===" "||o===" "){for(;_<t.length&&(t[_]===`
3
+ `||t[_]===" "||t[_]===" ");)_++;continue}if(o===",")return;if(o===")"){r.push({type:x.ParenClose});continue}if(o==="+"){if(_--,go(t)){r.push(Sr(t));continue}return}if(o==="-"){if(_--,go(t)){r.push(Sr(t));continue}if(jn(t)){r.push({type:x.Ident,value:yo(t)});continue}return}if(o==="."){if(_--,go(t)){r.push(Sr(t));continue}return}if(o==="/"){for(;_<t.length&&(t[_]===`
4
+ `||t[_]===" "||t[_]===" ");)_++;let n;if(go(t)&&(n=Sr(t),n.type!==x.Hue)){r.push({type:x.Alpha,value:n});continue}if(jn(t)&&yo(t)==="none"){r.push({type:x.Alpha,value:{type:x.None,value:void 0}});continue}return}if(/\d/.test(o)){_--,r.push(Sr(t));continue}if(Nn.test(o)){_--,r.push(jf(t));continue}return}return r}function Uf(e){e._i=0;let t=e[e._i++];if(!t||t.type!==x.Function||t.value!=="color"||(t=e[e._i++],t.type!==x.Ident))return;let r=Hn[t.value];if(!r)return;let o={mode:r},n=Ss(e,!1);if(!n)return;let a=Jt(r).channels;for(let i=0,s,u;i<a.length;i++)s=n[i],u=a[i],s.type!==x.None&&(o[u]=s.type===x.Number?s.value:s.value/100,u==="alpha"&&(o[u]=Math.max(0,Math.min(1,o[u]))));return o}function Ss(e,t){let r=[],o;for(;e._i<e.length;){if(o=e[e._i++],o.type===x.None||o.type===x.Number||o.type===x.Alpha||o.type===x.Percentage||t&&o.type===x.Hue){r.push(o);continue}if(o.type===x.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==x.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:x.None,value:void 0}),r.every(n=>n.type!==x.Alpha)?r:void 0}}function Vf(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==x.Function)return;let o=Ss(e,t);if(o)return o.unshift(r.value),o}var qf=e=>{if(typeof e!="string")return;let t=Xf(e),r=t?Vf(t,!0):void 0,o,n=0,a=wr.length;for(;n<a;)if((o=wr[n++](e,r))!==void 0)return o;return t?Uf(t):void 0},kr=qf;function Wf(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,o,n,a,i]=t;if(!(o.type===x.Hue||n.type===x.Hue||a.type===x.Hue))return o.type!==x.None&&(r.r=o.type===x.Number?o.value/255:o.value/100),n.type!==x.None&&(r.g=n.type===x.Number?n.value/255:n.value/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value/255:a.value/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Rs=Wf;var Gf=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Bs=Gf;var Os=(e,t,r)=>e+r*(t-e);var Yf=e=>{let t=[];for(let r=0;r<e.length-1;r++){let o=e[r],n=e[r+1];o===void 0&&n===void 0?t.push(void 0):o!==void 0&&n!==void 0?t.push([o,n]):t.push(o!==void 0?[o,o]:[n,n])}return t},Ps=e=>t=>{let r=Yf(t);return o=>{let n=o*r.length,a=o>=1?r.length-1:Math.max(Math.floor(n),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],n-a)}};var A=Ps(Os);var H=e=>{let t=!1,r=e.map(o=>o!==void 0?(t=!0,o):1);return t?r:e};var Jf={mode:"rgb",channels:["r","g","b","alpha"],parse:[Rs,Ms,ks,Fs,Bs,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:H}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},De=Jf;var Xn=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Zf=e=>{let t=Xn(e.r),r=Xn(e.g),o=Xn(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*o,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*o,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},Un=Zf;var Vn=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Kf=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"a98",r:Vn(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Vn(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Vn(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return o!==void 0&&(n.alpha=o),n},qn=Kf;var Wn=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Qf=({r:e,g:t,b:r,alpha:o})=>{let n={mode:"lrgb",r:Wn(e),g:Wn(t),b:Wn(r)};return o!==void 0&&(n.alpha=o),n},Se=Qf;var ed=e=>{let{r:t,g:r,b:o,alpha:n}=Se(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*o,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*o,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*o};return n!==void 0&&(a.alpha=n),a},xe=ed;var Gn=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},td=({r:e,g:t,b:r,alpha:o},n="rgb")=>{let a={mode:n,r:Gn(e),g:Gn(t),b:Gn(r)};return o!==void 0&&(a.alpha=o),a},Re=td;var rd=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Re({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return o!==void 0&&(n.alpha=o),n},Ce=rd;var od={...De,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>qn(xe(e)),xyz65:qn},toMode:{rgb:e=>Ce(Un(e)),xyz65:Un}},vo=od;var nd=e=>(e=e%360)<0?e+360:e,U=nd;function Yn({h:e,s:t,l:r,alpha:o}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=r+t*(r<.5?r:1-r),a=n-(n-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:a,b:2*r-n};break;case 1:i={r:a,g:n,b:2*r-n};break;case 2:i={r:2*r-n,g:n,b:a};break;case 3:i={r:2*r-n,g:a,b:n};break;case 4:i={r:a,g:2*r-n,b:n};break;case 5:i={r:n,g:2*r-n,b:a};break;default:i={r:2*r-n,g:2*r-n,b:2*r-n}}return i.mode="rgb",o!==void 0&&(i.alpha=o),i}function Jn({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:n===a?0:(n-a)/(1-Math.abs(n+a-1)),l:.5*(n+a)};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var ad=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},_s=ad;var id=new RegExp(`^hsla?\\(\\s*${Ts}${lt}${_t}${lt}${_t}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),sd=e=>{let t=e.match(id);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=_s(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},zs=sd;function ud(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,o,n,a,i]=t;if(o.type!==x.None){if(o.type===x.Percentage)return;r.h=o.value}if(n.type!==x.None){if(n.type===x.Hue)return;r.s=n.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.l=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Is=ud;var ld=(e,t)=>e.map((r,o,n)=>{if(r===void 0)return r;let a=U(r);return o===0||e[o-1]===void 0?a:t(a-U(n[o-1]))}).reduce((r,o)=>!r.length||o===void 0||r[r.length-1]===void 0?(r.push(o),r):(r.push(o+r[r.length-1]),r),[]),re=e=>ld(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ct=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=U(e.h),o=U(t.h),n=Math.sin((o-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},Ls=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=U(e.h),o=U(t.h);return Math.abs(o-r)>180?r-(o-360*Math.sign(o-r)):o-r},ft=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=U(e.h),o=U(t.h),n=Math.sin((o-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n};var oe=e=>{let t=e.reduce((o,n)=>{if(n!==void 0){let a=n*Math.PI/180;o.sin+=Math.sin(a),o.cos+=Math.cos(a)}return o},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var cd={mode:"hsl",toMode:{rgb:Yn},fromMode:{rgb:Jn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is,zs],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Zt=cd;function Rr({h:e,s:t,v:r,alpha:o}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",o!==void 0&&(a.alpha=o),a}function Br({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:n===0?0:1-a/n,v:n};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var fd={mode:"hsv",toMode:{rgb:Rr},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Br},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,v:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Kt=fd;function Zn({h:e,w:t,b:r,alpha:o}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let n=t+r;t/=n,r/=n}return Rr({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:o})}function Kn(e){let t=Br(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,o=t.v!==void 0?t.v:0,n={mode:"hwb",w:(1-r)*o,b:1-o};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function dd(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,o,n,a,i]=t;if(o.type!==x.None){if(o.type===x.Percentage)return;r.h=o.value}if(n.type!==x.None){if(n.type===x.Hue)return;r.w=n.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.b=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Hs=dd;var md={mode:"hwb",toMode:{rgb:Zn},fromMode:{rgb:Kn},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Hs],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},w:A,b:A,alpha:{use:A,fixup:H}},difference:{h:Ls},average:{h:oe}},Do=md;var dt=Math.pow(29,3)/Math.pow(3,3),Qt=Math.pow(6,3)/Math.pow(29,3);var V={X:.9642956764295677,Y:1,Z:.8251046025104602},mt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Q8=Math.pow(29,3)/Math.pow(3,3),ev=Math.pow(6,3)/Math.pow(29,3);var Qn=e=>Math.pow(e,3)>Qt?Math.pow(e,3):(116*e-16)/dt,pd=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,i=n-r/200,s={mode:"xyz50",x:Qn(a)*V.X,y:Qn(n)*V.Y,z:Qn(i)*V.Z};return o!==void 0&&(s.alpha=o),s},er=pd;var hd=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Re({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return o!==void 0&&(n.alpha=o),n},qe=hd;var gd=e=>qe(er(e)),xo=gd;var bd=e=>{let{r:t,g:r,b:o,alpha:n}=Se(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*o,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*o,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*o};return n!==void 0&&(a.alpha=n),a},We=bd;var ea=e=>e>Qt?Math.cbrt(e):(dt*e+16)/116,yd=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=ea(e/V.X),a=ea(t/V.Y),i=ea(r/V.Z),s={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-i)};return o!==void 0&&(s.alpha=o),s},tr=yd;var vd=e=>{let t=tr(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Co=vd;function Dd(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,o,n,a,i]=t;if(!(o.type===x.Hue||n.type===x.Hue||a.type===x.Hue))return o.type!==x.None&&(r.l=Math.min(Math.max(0,o.value),100)),n.type!==x.None&&(r.a=n.type===x.Number?n.value:n.value*125/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*125/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ns=Dd;var xd={mode:"lab",toMode:{xyz50:er,rgb:xo},fromMode:{xyz50:tr,rgb:Co},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Ns],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},pt=xd;var Ao=Math.pow(29,3)/Math.pow(3,3),$o=Math.pow(6,3)/Math.pow(29,3);var ta=e=>Math.pow(e,3)>$o?Math.pow(e,3):(116*e-16)/Ao,Cd=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,i=n-r/200,s={mode:"xyz65",x:ta(a)*mt.X,y:ta(n)*mt.Y,z:ta(i)*mt.Z};return o!==void 0&&(s.alpha=o),s},Eo=Cd;var Ad=e=>Ce(Eo(e)),ht=Ad;var ra=e=>e>$o?Math.cbrt(e):(Ao*e+16)/116,$d=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=ra(e/mt.X),a=ra(t/mt.Y),i=ra(r/mt.Z),s={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-i)};return o!==void 0&&(s.alpha=o),s},Fo=$d;var Ed=e=>{let t=Fo(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},gt=Ed;var Fd={...pt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Eo,rgb:ht},fromMode:{xyz65:Fo,rgb:gt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Mo=Fd;var Md=({l:e,a:t,b:r,alpha:o},n="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:n,l:e,c:a};return a&&(i.h=U(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(i.alpha=o),i},Fe=Md;var Td=({l:e,c:t,h:r,alpha:o},n="lab")=>{r===void 0&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(a.alpha=o),a},Me=Td;function kd(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,o,n,a,i]=t;if(o.type!==x.None){if(o.type===x.Hue)return;r.l=Math.min(Math.max(0,o.value),100)}if(n.type!==x.None&&(r.c=Math.max(0,n.type===x.Number?n.value:n.value*150/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var js=kd;var wd={mode:"lch",toMode:{lab:Me,rgb:e=>xo(Me(e))},fromMode:{rgb:e=>Fe(Co(e)),lab:Fe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[js],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},bt=wd;var Sd={...bt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Me(e,"lab65"),rgb:e=>ht(Me(e,"lab65"))},fromMode:{rgb:e=>Fe(gt(e),"lch65"),lab65:e=>Fe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},To=Sd;var Rd={...De,mode:"lrgb",toMode:{rgb:Re},fromMode:{rgb:Se},parse:["srgb-linear"],serialize:"srgb-linear"},ko=Rd;var Bd=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*i};return o!==void 0&&(s.alpha=o),s},Ge=Bd;var Od=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*i};return o!==void 0&&(s.alpha=o),s},wo=Od;var Pd=e=>{let t=wo(Se(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},yt=Pd;var _d=e=>Re(Ge(e)),vt=_d;function zd(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,o,n,a,i]=t;if(!(o.type===x.Hue||n.type===x.Hue||a.type===x.Hue))return o.type!==x.None&&(r.l=Math.min(Math.max(0,o.type===x.Number?o.value:o.value/100),1)),n.type!==x.None&&(r.a=n.type===x.Number?n.value:n.value*.4/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*.4/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Xs=zd;var Id={...pt,mode:"oklab",toMode:{lrgb:Ge,rgb:vt},fromMode:{lrgb:wo,rgb:yt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Xs],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},So=Id;function Ld(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,o,n,a,i]=t;if(o.type!==x.None){if(o.type===x.Hue)return;r.l=Math.min(Math.max(0,o.type===x.Number?o.value:o.value/100),1)}if(n.type!==x.None&&(r.c=Math.max(0,n.type===x.Number?n.value:n.value*.4/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Us=Ld;var Hd={...bt,mode:"oklch",toMode:{oklab:e=>Me(e,"oklab"),rgb:e=>vt(Me(e,"oklab"))},fromMode:{rgb:e=>Fe(yt(e),"oklch"),oklab:e=>Fe(e,"oklch")},parse:[Us],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Ro=Hd;var Nd=e=>{let{r:t,g:r,b:o,alpha:n}=Se(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*o,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*o,z:0*t+.0451133818589026*r+1.043944368900976*o};return n!==void 0&&(a.alpha=n),a},oa=Nd;var jd=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Re({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return o!==void 0&&(n.alpha=o),n},na=jd;var Xd={...De,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>na(xe(e)),xyz65:na},toMode:{rgb:e=>Ce(oa(e)),xyz65:oa}},Bo=Xd;var aa=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Ud=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"prophoto",r:aa(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:aa(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:aa(e*0+t*0+1.2119675456389452*r)};return o!==void 0&&(n.alpha=o),n},ia=Ud;var sa=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Vd=e=>{let t=sa(e.r),r=sa(e.g),o=sa(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*o,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*o,z:0*t+0*r+.8251046025104602*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},ua=Vd;var qd={...De,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ia,rgb:e=>ia(We(e))},toMode:{xyz50:ua,rgb:e=>qe(ua(e))}},Oo=qd;var Vs=1.09929682680944,Wd=.018053968510807,la=e=>{let t=Math.abs(e);return t>Wd?(Math.sign(e)||1)*(Vs*Math.pow(t,.45)-(Vs-1)):4.5*e},Gd=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rec2020",r:la(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:la(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:la(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return o!==void 0&&(n.alpha=o),n},ca=Gd;var qs=1.09929682680944,Yd=.018053968510807,fa=(e=0)=>{let t=Math.abs(e);return t<Yd*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+qs-1)/qs,1/.45)},Jd=e=>{let t=fa(e.r),r=fa(e.g),o=fa(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*o,y:.262700212011267*t+.6779980715188708*r+.059301716469862*o,z:0*t+.0280726930490874*r+1.0609850577107909*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},da=Jd;var Zd={...De,mode:"rec2020",fromMode:{xyz65:ca,rgb:e=>ca(xe(e))},toMode:{xyz65:da,rgb:e=>Ce(da(e))},parse:["rec2020"],serialize:"rec2020"},Po=Zd;var Kd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:qe,lab:tr},fromMode:{rgb:We,lab:er},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},_o=Kd;var Qd=e=>{let{x:t,y:r,z:o,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),o===void 0&&(o=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*o,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*o,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*o};return n!==void 0&&(a.alpha=n),a},Ws=Qd;var em=e=>{let{x:t,y:r,z:o,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),o===void 0&&(o=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*o,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*o,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*o};return n!==void 0&&(a.alpha=n),a},Gs=em;var tm={mode:"xyz65",toMode:{rgb:Ce,xyz50:Ws},fromMode:{rgb:xe,xyz50:Gs},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},zo=tm;var Z7=P(vo),K7=P(Zt),Q7=P(Kt),eD=P(Do),tD=P(pt),rD=P(Mo),oD=P(bt),nD=P(To),aD=P(ko),iD=P(So),sD=P(Ro),uD=P(Bo),lD=P(Oo),cD=P(Po),fD=P(De),dD=P(_o),mD=P(zo);var Y=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ys=Math.PI/180,Js=180/Math.PI;var Zs=Y[3]*Y[4],Ks=Y[1]*Y[4],Qs=Y[1]*Y[2]-Y[0]*Y[3],rm=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(Qs*r+e*Zs-t*Ks)/(Qs+Zs-Ks),a=r-n,i=(Y[4]*(t-n)-Y[2]*a)/Y[3],s={mode:"cubehelix",l:n,s:n===0||n===1?void 0:Math.sqrt(a*a+i*i)/(Y[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(i,a)*Js-120),o!==void 0&&(s.alpha=o),s},eu=rm;var om=({h:e,s:t,l:r,alpha:o})=>{let n={mode:"rgb"};e=(e===void 0?0:e+120)*Ys,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return n.r=r+a*(Y[0]*i+Y[1]*s),n.g=r+a*(Y[2]*i+Y[3]*s),n.b=r+a*(Y[4]*i+Y[5]*s),o!==void 0&&(n.alpha=o),n},tu=om;var nm={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:eu},toMode:{rgb:tu},interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},ru=nm;var zt=.14444444444444443*Math.PI,rr=Math.cos(zt),or=Math.sin(zt),Io=100/Math.log(139/100);var am=({l:e,c:t,h:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"lab65",l:(Math.exp(e*1/Io)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-zt),s=a*Math.sin(r/180*Math.PI-zt);return n.a=i*rr-s/.83*or,n.b=i*or+s/.83*rr,o!==void 0&&(n.alpha=o),n},Pr=am;var im=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=t*rr+r*or,a=.83*(r*rr-t*or),i=Math.sqrt(n*n+a*a),s={mode:"dlch",l:Io/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return s.c&&(s.h=U((Math.atan2(a,n)+zt)/Math.PI*180)),o!==void 0&&(s.alpha=o),s},_r=im;var ou=e=>Pr(Fe(e,"dlch")),nu=e=>Me(_r(e),"dlab"),sm={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ou,rgb:e=>ht(ou(e))},fromMode:{lab65:nu,rgb:e=>nu(gt(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},au=sm;var um={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Pr,dlab:e=>Me(e,"dlab"),rgb:e=>ht(Pr(e))},fromMode:{lab65:_r,dlab:e=>Fe(e,"dlch"),rgb:e=>_r(gt(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:re},alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},iu=um;function pa({h:e,s:t,i:r,alpha:o}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",o!==void 0&&(a.alpha=o),a}function ha({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var lm={mode:"hsi",toMode:{rgb:pa},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:ha},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,i:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},su=lm;var nr=.1593017578125,uu=78.84375,ar=.8359375,ir=18.8515625,sr=18.6875;function Lo(e){if(e<0)return 0;let t=Math.pow(e,1/uu);return 1e4*Math.pow(Math.max(0,t-ar)/(ir-sr*t),1/nr)}function Ho(e){if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),uu)}var ga=e=>Math.max(e/203,0),fm=({i:e,t,p:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Lo(e+.008609037037932761*t+.11102962500302593*r),a=Lo(e-.00860903703793275*t-.11102962500302599*r),i=Lo(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:ga(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*i),y:ga(.3647385209748074*n+.680566024947227*a-.0453045459220346*i),z:ga(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*i)};return o!==void 0&&(s.alpha=o),s},ba=fm;var ya=(e=0)=>Math.max(e*203,0),dm=({x:e,y:t,z:r,alpha:o})=>{let n=ya(e),a=ya(t),i=ya(r),s=Ho(.3592832590121217*n+.6976051147779502*a-.0358915932320289*i),u=Ho(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*i),l=Ho(.0070797844607477*n+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return o!==void 0&&(d.alpha=o),d},va=dm;var mm={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ba,rgb:e=>Ce(ba(e))},fromMode:{xyz65:va,rgb:e=>va(xe(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:A,t:A,p:A,alpha:{use:A,fixup:H}}},lu=mm;var pm=134.03437499999998,hm=16295499532821565e-27,Da=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),pm)},xa=(e=0)=>Math.max(e*203,0),gm=({x:e,y:t,z:r,alpha:o})=>{e=xa(e),t=xa(t),r=xa(r);let n=1.15*e-.15*r,a=.66*t+.34*e,i=Da(.41478972*n+.579999*a+.014648*r),s=Da(-.20151*n+1.120649*a+.0531008*r),u=Da(-.0166008*n+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-hm,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return o!==void 0&&(c.alpha=o),c},No=gm;var bm=134.03437499999998,cu=16295499532821565e-27,Ca=e=>{if(e<0)return 0;let t=Math.pow(e,1/bm);return 1e4*Math.pow((ar-t)/(sr*t-ir),1/nr)},Aa=e=>e/203,ym=({j:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+cu)/(.44+.56*(e+cu)),a=Ca(n+.13860504*t+.058047316*r),i=Ca(n-.13860504*t-.058047316*r),s=Ca(n-.096019242*t-.8118919*r),u={mode:"xyz65",x:Aa(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:Aa(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:Aa(-.090982811*a-.31272829*i+1.5227666*s)};return o!==void 0&&(u.alpha=o),u},jo=ym;var vm=e=>{let t=No(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Xo=vm;var Dm=e=>Ce(jo(e)),Uo=Dm;var xm={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xo,xyz65:No},toMode:{rgb:Uo,xyz65:jo},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:H}}},fu=xm;var Cm=({j:e,a:t,b:r,alpha:o})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(a.alpha=o),a},$a=Cm;var Am=({j:e,c:t,h:r,alpha:o})=>{r===void 0&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(n.alpha=o),n},Ea=Am;var $m={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Ea,rgb:e=>Uo(Ea(e))},fromMode:{rgb:e=>$a(Xo(e)),jab:$a},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,j:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},du=$m;var Em=({l:e,u:t,v:r,alpha:o})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(a.alpha=o),a},Fa=Em;var Fm=({l:e,c:t,h:r,alpha:o})=>{r===void 0&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(n.alpha=o),n},Ma=Fm;var mu=(e,t,r)=>4*e/(e+15*t+3*r),pu=(e,t,r)=>9*t/(e+15*t+3*r),Mm=mu(V.X,V.Y,V.Z),Tm=pu(V.X,V.Y,V.Z),km=e=>e<=Qt?dt*e:116*Math.cbrt(e)-16,wm=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=km(t/V.Y),a=mu(e,t,r),i=pu(e,t,r);!isFinite(a)||!isFinite(i)?n=a=i=0:(a=13*n*(a-Mm),i=13*n*(i-Tm));let s={mode:"luv",l:n,u:a,v:i};return o!==void 0&&(s.alpha=o),s},zr=wm;var Sm=(e,t,r)=>4*e/(e+15*t+3*r),Rm=(e,t,r)=>9*t/(e+15*t+3*r),Bm=Sm(V.X,V.Y,V.Z),Om=Rm(V.X,V.Y,V.Z),Pm=({l:e,u:t,v:r,alpha:o})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let n=t/(13*e)+Bm,a=r/(13*e)+Om,i=V.Y*(e<=8?e/dt:Math.pow((e+16)/116,3)),s=i*(9*n)/(4*a),u=i*(12-3*n-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return o!==void 0&&(l.alpha=o),l},Ir=Pm;var _m=e=>Fa(zr(We(e))),zm=e=>qe(Ir(Ma(e))),Im={mode:"lchuv",toMode:{luv:Ma,rgb:zm},fromMode:{rgb:_m,luv:Fa},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},hu=Im;var Lm={mode:"luv",toMode:{xyz50:Ir,rgb:e=>qe(Ir(e))},fromMode:{xyz50:zr,rgb:e=>zr(We(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:H}}},gu=Lm;function Lr(e){let o=1.170873786407767;return .5*(o*e-.206+Math.sqrt((o*e-.206)*(o*e-.206)+4*.03*o*e))}function It(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Hm(e,t){let r,o,n,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,o=1.76576728,n=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,o=-.45954404,n=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,o=-.00915799,n=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+o*e+n*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function Ta(e,t){let r=Hm(e,t),o=Ge({l:1,a:r*e,b:r*t}),n=Math.cbrt(1/Math.max(o.r,o.g,o.b)),a=n*r;return[n,a]}function Nm(e,t,r,o,n,a=null){a||(a=Ta(e,t));let i;if((r-n)*a[1]-(a[0]-n)*o<=0)i=a[1]*n/(o*a[0]+a[1]*(n-r));else{i=a[1]*(n-1)/(o*(a[0]-1)+a[1]*(n-r));{let s=r-n,u=o,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=n*(1-i)+i*r,y=i*o,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,K=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=K/(K*K-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ke=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ke,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ke>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function Hr(e,t,r=null){r||(r=Ta(e,t));let o=r[0],n=r[1];return[n/o,n/(1-o)]}function Vo(e,t,r){let o=Ta(t,r),n=Nm(t,r,e,1,e,o),a=Hr(t,r,o),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=n/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,n]}function qo(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,o=e.b!==void 0?e.b:0,n={mode:"okhsl",l:Lr(t)};e.alpha!==void 0&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+o*o);if(!a)return n.s=0,n;let[i,s,u]=Vo(t,r/a,o/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(n.s=l,n.h=U(Math.atan2(o,r)*180/Math.PI)),n}function Wo(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.l!==void 0?e.l:0,n={mode:"oklab",l:It(o)};if(e.alpha!==void 0&&(n.alpha=e.alpha),!r||o===1)return n.a=n.b=0,n;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=Vo(n.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return n.a=g*a,n.b=g*i,n}var jm={...Zt,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:qo,rgb:e=>qo(yt(e))},toMode:{oklab:Wo,rgb:e=>vt(Wo(e))}},bu=jm;function Go(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,o=e.b!==void 0?e.b:0,n=Math.sqrt(r*r+o*o),a=n?r/n:1,i=n?o/n:1,[s,u]=Hr(a,i),l=.5,c=1-l/s,f=u/(n+t*u),m=f*t,d=f*n,g=It(m),p=d*g/m,y=Ge({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,n=n/b*Lr(t)/t,t=Lr(t);let D={mode:"okhsv",s:n?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=U(Math.atan2(o,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function Yo(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,n=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=Hr(a,i),l=.5,c=1-l/s,f=1-o*l/(l+u-u*c*o),m=o*u*l/(l+u-u*c*o),d=It(f),g=m*d/f,p=Ge({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=It(n*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var Xm={...Kt,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Go,rgb:e=>Go(yt(e))},toMode:{oklab:Yo,rgb:e=>vt(Yo(e))}},yu=Xm;var rt=.0037930732552754493,Jo=Math.cbrt(rt);var ka=e=>Math.cbrt(e)-Jo,Um=e=>{let{r:t,g:r,b:o,alpha:n}=Se(e),a=ka(.3*t+.622*r+.078*o+rt),i=ka(.23*t+.692*r+.078*o+rt),s=ka(.2434226892454782*t+.2047674442449682*r+.5518098665095535*o+rt),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return n!==void 0&&(u.alpha=n),u},vu=Um;var wa=e=>Math.pow(e+Jo,3),Vm=({x:e,y:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=wa(e+t)-rt,a=wa(t-e)-rt,i=wa(r+t)-rt,s=Re({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*i});return o!==void 0&&(s.alpha=o),s},Du=Vm;var qm={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Du},fromMode:{rgb:vu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:H}}},xu=qm;var Wm=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return o!==void 0&&(n.alpha=o),n},Cu=Wm;var Gm=({y:e,i:t,q:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return o!==void 0&&(n.alpha=o),n},Au=Gm;var Ym={mode:"yiq",toMode:{rgb:Au},fromMode:{rgb:Cu},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:H}}},$u=Ym;var Jm=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Zm=(e=4)=>t=>typeof t=="number"?Jm(t,e):t,Eu=Zm;var CA=Eu(2),Km=e=>Math.max(0,Math.min(1,e||0)),Sa=e=>Math.round(Km(e)*255),Qm=ve("rgb"),AA=ve("hsl"),Fu=e=>{if(e===void 0)return;let t=Sa(e.r),r=Sa(e.g),o=Sa(e.b);return"#"+(1<<24|t<<16|r<<8|o).toString(16).slice(1)};var Ra=e=>Fu(Qm(e));var Mu=ve("rgb"),Tu=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},ep=e=>Tu(Mu(e)),ku=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function wu(e){return ku(Mu(e))}function Ba(e="rgb"){let{gamut:t}=Jt(e);if(!t)return o=>!0;let r=ve(typeof t=="string"?t:e);return o=>ku(r(o))}function Su(e="rgb"){let{gamut:t}=Jt(e);if(!t)return a=>Yt(a);let r=typeof t=="string"?t:e,o=ve(r),n=Ba(r);return a=>{let i=Yt(a);if(!i)return;let s=o(i);if(n(s))return i;let u=Tu(s);return i.mode===u.mode?u:ve(i.mode)(u)}}function Oa(e,t="lch",r="rgb"){e=Yt(e);let o=r==="rgb"?wu:Ba(r),n=r==="rgb"?ep:Su(r);if(e===void 0||o(e))return e;let a=ve(e.mode);e=ve(t)(e);let i={...e,c:0};if(!o(i))return a(n(i));let s=0,u=e.c!==void 0?e.c:0,l=Jt(t).ranges.c,c=(l[1]-l[0])/Math.pow(2,13),f=i.c;for(;u-s>c;)i.c=s+(u-s)*.5,o(i)?(f=i.c,s=i.c):u=i.c;return a(o(i)?i:{...i,c:f})}function Pa(e){let t=ve("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function _a(e,t){let r=Pa(e),o=Pa(t);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}var tp=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,za={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},Zo={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function Ia(e){let t=kr(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in za))throw new Error(`Unsupported color space: ${t.mode}`);let r=za[t.mode],o=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":o=[t.r,t.g,t.b];break;case"hsl":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;o=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;o=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":o=[t.l,t.a,t.b];break;case"lch":case"oklch":o=[t.l,t.c,t.h??0];break;case"okhsv":o=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":o=[t.x,t.y,t.z];break}let n={colorSpace:r,components:o,alpha:t.alpha??1};return tp.test(e)&&(n.hex=Ra(t)),n}function Nr(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,o]=e.components;return{mode:Zo[e.colorSpace]||e.colorSpace,r:t,g:r,b:o,alpha:e.alpha}}case"hsl":{let[t,r,o]=e.components,n=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/n,l:o/a,alpha:e.alpha}}case"hwb":{let[t,r,o]=e.components,n=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/n,b:o/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,o]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:o,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,o]=e.components;return{mode:e.colorSpace,l:t,c:r,h:o,alpha:e.alpha}}case"okhsv":{let[t,r,o]=e.components;return{mode:e.colorSpace,h:t,s:r,v:o,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,o]=e.components;return{mode:Zo[e.colorSpace],x:t,y:r,z:o,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(Zo).join(", ")}`)}}var ot={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function jr(e,t,r){return e===1?t:r}var Ru=/^\{([^}]+)\}$/;function Te(e){return Ru.test(e)}function ke(e){if(e.includes("#"))throw new Error("Mode aliases (# character) are no longer supported as of v0.6.0. Alias the root token instead, and apply modes in plugins.");let t=e.match(Ru);return t?t[1]??t[0]:e}function Ko(e){let t=e.lastIndexOf(".");return t===-1?{local:e}:{local:e.substring(t+1),group:e.substring(0,t)}}var T$=P(vo),k$=P(ru),w$=P(au),S$=P(iu),R$=P(su),B$=P(Zt),O$=P(Kt),P$=P(Do),_$=P(lu),z$=P(fu),I$=P(du),L$=P(pt),H$=P(Mo),N$=P(bt),j$=P(To),X$=P(hu),U$=P(ko),V$=P(gu),q$=P(bu),W$=P(yu),G$=P(So),Y$=P(Ro),J$=P(Bo),Z$=P(Oo),K$=P(Po),Q$=P(De),eE=P(xu),tE=P(_o),rE=P(zo),oE=P($u);function rp(e,t,r={}){let o={column:0,line:-1,...e.start},n={...o,...e.end},{linesAbove:a=2,linesBelow:i=3}=r||{},s=o.line,u=o.column,l=n.line,c=n.column,f=Math.max(s-(a+1),0),m=Math.min(t.length,l+i);s===-1&&(f=0),l===-1&&(m=t.length);let d=l-s,g={};if(d)for(let p=0;p<=d;p++){let y=p+s;u?p===0?g[y]=[u,t[y-1].length-u+1]:p===d?g[y]=[0,c]:g[y]=[0,t[y-p].length]:g[y]=!0}else u===c?u?g[s]=[u,0]:g[s]=!0:g[s]=[u,c-u];return{start:f,end:m,markerLines:g}}var Bu=/\r\n|[\n\r\u2028\u2029]/;function op(e,t,r={}){let{start:o,end:n,markerLines:a}=rp(t,e.split(Bu),r),i=t.start&&typeof t.start.column=="number",s=String(n).length,u=e.split(Bu,n).slice(o,n).map((l,c)=>{let f=o+1+c,m=` ${` ${f}`.slice(-s)} |`,d=a[f],g=!a[f+1];if(d){let p="";if(Array.isArray(d)){let y=l.slice(0,Math.max(d[0]-1,0)).replace(/[^\t]/g," "),b=d[1]||1;p=[`
5
5
  `,m.replace(/\d/g," ")," ",y,"^".repeat(b)].join(""),g&&r.message&&(p+=` ${r.message}`)}return[">",m,l.length>0?` ${l}`:"",p].join("")}else return` ${m}${l.length>0?` ${l}`:""}`}).join(`
6
6
  `);return r.message&&!i&&(u=`${" ".repeat(s+1)}${r.message}
7
- ${u}`),u}var ur=["error","warn","info","debug"],Ru={error:nt.default.red,warn:nt.default.yellow},Wm=new Intl.DateTimeFormat("en-us",{hour:"numeric",hour12:!1,minute:"numeric",second:"numeric",fractionalSecondDigits:3});function Qo(e,t){let r=e.message;if(r=`[${e.group}${e.label?`:${e.label}`:""}] ${r}`,t in Ru&&(r=Ru[t](r)),e.src){let n=e.node?.loc?.start??{line:0,column:0},o=e.filename?`${e.filename?.href.replace(/^file:\/\//,"")}:${n?.line??0}:${n?.column??0}
7
+ ${u}`),u}var ur=["error","warn","info","debug"],Ou={error:nt.default.red,warn:nt.default.yellow},np=new Intl.DateTimeFormat("en-us",{hour:"numeric",hour12:!1,minute:"numeric",second:"numeric",fractionalSecondDigits:3});function Qo(e,t){let r=e.message;if(r=`[${e.group}${e.label?`:${e.label}`:""}] ${r}`,t in Ou&&(r=Ou[t](r)),e.src){let o=e.node?.loc?.start??{line:0,column:0},n=e.filename?`${e.filename?.href.replace(/^file:\/\//,"")}:${o?.line??0}:${o?.column??0}
8
8
 
9
- `:"",a=qm(e.src,{start:n},{highlightCode:!1});r=`${r}
9
+ `:"",a=op(e.src,{start:o},{highlightCode:!1});r=`${r}
10
10
 
11
- ${o}${a}`}return r}var Wr=class{level="info";debugScope="*";errorCount=0;warnCount=0;infoCount=0;debugCount=0;constructor(e){e?.level&&(this.level=e.level),e?.debugScope&&(this.debugScope=e.debugScope)}setLevel(e){this.level=e}error(e){this.errorCount++;let t=Qo(e,"error");if(e.continueOnError){console.error(t);return}throw e.node?new Gm(t):new Error(t)}info(e){if(this.infoCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("info"))return;let t=Qo(e,"info");console.log(t)}warn(e){if(this.warnCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("warn"))return;let t=Qo(e,"warn");console.warn(t)}debug(e){if(this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("debug"))return;this.debugCount++;let t=Qo(e,"debug"),r=e.label?`${e.group}:${e.label}`:e.group;if(!(this.debugScope!=="*"&&!ye(this.debugScope)(r))){if(t.replace(/\[config[^\]]+\]/,n=>nt.default.green(n)).replace(/\[parser[^\]]+\]/,n=>nt.default.magenta(n)).replace(/\[lint[^\]]+\]/,n=>nt.default.yellow(n)).replace(/\[plugin[^\]]+\]/,n=>nt.default.cyan(n)),t=`${nt.default.dim(Wm.format(performance.now()))} ${t}`,typeof e.timing=="number"){let n="";e.timing<1e3?n=`${Math.round(e.timing*100)/100}ms`:e.timing<6e4&&(n=`${Math.round(e.timing*100)/1e5}s`),t=`${t} ${nt.default.dim(`[${n}]`)}`}console.log(t)}}stats(){return{errorCount:this.errorCount,warnCount:this.warnCount,infoCount:this.infoCount,debugCount:this.debugCount}}},Gm=class extends Error{constructor(e){super(e),this.name="TokensJSONError"}},Bu="SINGLE_VALUE",Ou="MULTI_VALUE";function Jm({params:e,logger:t,pluginName:r}){let n={group:"plugin",label:r,message:""};(!e.value||typeof e.value!="string"&&typeof e.value!="object"||Array.isArray(e.value))&&t.error({...n,message:`setTransform() value expected string or object of strings, received ${Array.isArray(e.value)?"Array":typeof e.value}`}),typeof e.value=="object"&&Object.values(e.value).some(o=>typeof o!="string")&&t.error({...n,message:"setTransform() value expected object of strings, received some non-string values"})}async function p0(e,{sources:t,logger:r=new Wr,config:n}){let o={},a={outputFiles:[]};function i(f){if(!f?.format)return r.warn({group:"plugin",message:'"format" missing from getTransforms(), no tokens returned.'}),[];let m=f.id?ye(Array.isArray(f.id)?f.id:[f.id]):null,d=f.mode?ye(f.mode):null;return(o[f.format]??[]).filter(g=>{if(f.$type){if(typeof f.$type=="string"&&g.token.$type!==f.$type)return!1;if(Array.isArray(f.$type)&&!f.$type.some(p=>g.token.$type===p))return!1}return!(f.id&&f.id!=="*"&&m&&!m(g.token.id)||d&&!d(g.mode))})}let s=!1,u=performance.now();for(let f of n.plugins)typeof f.transform=="function"&&await f.transform({tokens:e,sources:t,getTransforms:i,setTransform(m,d){if(s){r.warn({message:"Attempted to call setTransform() after transform step has completed.",group:"plugin",label:f.name});return}let g=e[m],p=typeof d.value=="string"?d.value:{...d.value};if(typeof p=="object")for(let b of Object.keys(p))p[b]===void 0&&delete p[b];Jm({logger:r,params:{...d,value:p},pluginName:f.name}),o[d.format]||(o[d.format]=[]);let y=o[d.format].findIndex(b=>m===b.id&&(!d.localID||d.localID===b.localID)&&(!d.mode||d.mode===b.mode));y===-1?o[d.format].push({...d,id:m,value:p,type:typeof p=="string"?Bu:Ou,mode:d.mode||".",token:structuredClone(g)}):(o[d.format][y].value=p,o[d.format][y].type=typeof p=="string"?Bu:Ou)}});s=!0,r.debug({group:"parser",label:"transform",message:"transform() step",timing:performance.now()-u});let l=performance.now();for(let f of n.plugins)if(typeof f.build=="function"){let m=performance.now();await f.build({tokens:e,sources:t,getTransforms:i,outputFile(d,g){let p=new URL(d,n.outDir);a.outputFiles.some(y=>new URL(y.filename,n.outDir).href===p.href)&&r.error({group:"plugin",message:`Can\u2019t overwrite file "${d}"`,label:f.name}),a.outputFiles.push({filename:d,contents:g,plugin:f.name,time:performance.now()-m})}})}r.debug({group:"parser",label:"build",message:"build() step",timing:performance.now()-l});let c=performance.now();for(let f of n.plugins)typeof f.buildEnd=="function"&&await f.buildEnd({outputFiles:structuredClone(a.outputFiles)});return r.debug({group:"parser",label:"build",message:"buildEnd() step",timing:performance.now()-c}),a}function Je(e){return`https://terrazzo.app/docs/cli/lint#${e.replaceAll("/","")}`}var h0="a11y/min-contrast",Ym={AA:{default:4.5,large:3},AAA:{default:7,large:4.5}},Pu="INSUFFICIENT_CONTRAST",Km={meta:{messages:{[Pu]:"Pair {{ index }} failed; expected {{ expected }}, got {{ actual }} ({{ level }})"},docs:{description:"Enforce colors meet minimum contrast checks for WCAG 2.",url:Je(h0)}},defaultOptions:{level:"AA",pairs:[]},create({tokens:e,options:t,report:r}){for(let n=0;n<t.pairs.length;n++){let{foreground:o,background:a,largeText:i}=t.pairs[n];if(!e[o])throw new Error(`Token ${o} does not exist`);if(e[o].$type!=="color")throw new Error(`Token ${o} isn\u2019t a color`);if(!e[a])throw new Error(`Token ${a} does not exist`);if(e[a].$type!=="color")throw new Error(`Token ${a} isn\u2019t a color`);let s=Oa(Nr(e[o].$value),Nr(e[a].$value)),u=Ym[t.level??"AA"][i?"large":"default"];s<u&&r({messageId:Pu,data:{index:n+1,expected:u,actual:Math.round(s*100)/100,level:t.level}})}}},Zm=Km,g0="a11y/min-font-size",zu="TOO_SMALL",Qm={meta:{messages:{[zu]:"{{ id }} font size too small. Expected minimum of {{ min }}"},docs:{description:"Enforce font sizes are no smaller than the given value.",url:Je(g0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){if(!t.minSizePx&&!t.minSizeRem)throw new Error("Must specify at least one of minSizePx or minSizeRem");let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf&&o.$type==="typography"&&"fontSize"in o.$value){let a=o.$value.fontSize;(a.unit==="px"&&t.minSizePx&&a.value<t.minSizePx||a.unit==="rem"&&t.minSizeRem&&a.value<t.minSizeRem)&&r({messageId:zu,data:{id:o.id,min:t.minSizePx?`${t.minSizePx}px`:`${t.minSizeRem}rem`}})}}},ep=Qm,b0="core/colorspace",_u="COLOR",Iu="BORDER",Lu="GRADIENT",Hu="SHADOW",tp={meta:{messages:{[_u]:"Color {{ id }} not in colorspace {{ colorSpace }}",[Iu]:"Border {{ id }} not in colorspace {{ colorSpace }}",[Lu]:"Gradient {{ id }} not in colorspace {{ colorSpace }}",[Hu]:"Shadow {{ id }} not in colorspace {{ colorSpace }}"},docs:{description:"Enforce that all colors are in a specific colorspace.",url:Je(b0)}},defaultOptions:{colorSpace:"srgb"},create({tokens:e,options:t,report:r}){if(!t.colorSpace)return;let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":o.$value.colorSpace!==t.colorSpace&&r({messageId:_u,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&o.$value.color.colorSpace!==t.colorSpace&&r({messageId:Iu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Lu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Hu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break}}},rp=tp,op=/\d/,np=["-","_","/","."];function ap(e=""){if(!op.test(e))return e!==e.toLowerCase()}function y0(e,t){let r=t??np,n=[];if(!e||typeof e!="string")return n;let o="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){n.push(o),o="",a=void 0;continue}let l=ap(s);if(i===!1){if(a===!1&&l===!0){n.push(o),o=s,a=l;continue}if(a===!0&&l===!1&&o.length>1){let c=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=c+s,a=l;continue}}o+=s,a=l,i=u}return n.push(o),n}function ip(e){return e?e[0].toUpperCase()+e.slice(1):""}function sp(e){return e?e[0].toLowerCase()+e.slice(1):""}function v0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>ip(t?.normalize?r.toLowerCase():r)).join(""):""}function up(e,t){return sp(v0(e||"",t))}function D0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function Nu(e){return D0(e||"","_")}var x0="core/consistent-naming",_a="ERROR_WRONG_FORMAT",lp={meta:{messages:{[_a]:"{{ id }} doesn\u2019t match format {{ format }}"},docs:{description:"Enforce consistent naming for tokens.",url:Je(x0)}},defaultOptions:{format:"kebab-case"},create({tokens:e,options:t,report:r}){let n={"kebab-case":D0,camelCase:up,PascalCase:v0,snake_case:Nu,SCREAMING_SNAKE_CASE:o=>Nu(o).toLocaleUpperCase()}[String(t.format)];for(let o of Object.values(e))n?o.id.split(".").every(a=>n(a)===a)||r({messageId:_a,data:{id:o.id,format:t.format},node:o.source.node}):typeof t.format=="function"&&t.format(o.id)&&r({messageId:_a,data:{id:o.id,format:"(custom)"},node:o.source.node})}},cp=lp,C0="core/descriptions",ju="MISSING_DESCRIPTION",fp={meta:{messages:{[ju]:"{{ id }} missing description"},docs:{description:"Enforce tokens have descriptions.",url:Je(C0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))n?.(o.id)||o.$description||r({messageId:ju,data:{id:o.id},node:o.source.node})}},dp=fp,A0="core/duplicate-values",Ia="ERROR_DUPLICATE_VALUE",mp={meta:{messages:{[Ia]:"{{ id }} declared a duplicate value"},docs:{description:"Enforce tokens can\u2019t redeclare the same value (excludes aliases).",url:Je(A0)}},defaultOptions:{},create({report:e,tokens:t,options:r}){let n={},o=r.ignore?ye(r.ignore):null;for(let a of Object.values(t))if(!o?.(a.id))if(n[a.$type]||(n[a.$type]=new Set),a.$type==="boolean"||a.$type==="duration"||a.$type==="fontWeight"||a.$type==="link"||a.$type==="number"||a.$type==="string"){if(typeof a.aliasOf=="string"&&Te(a.aliasOf))continue;n[a.$type]?.has(a.$value)&&e({messageId:Ia,data:{id:a.id},node:a.source.node}),n[a.$type]?.add(a.$value)}else{for(let i of n[a.$type].values()??[])if(JSON.stringify(a.$value)===JSON.stringify(i)){e({messageId:Ia,data:{id:a.id},node:a.source.node});break}n[a.$type].add(a.$value)}}},pp=mp,$0="core/max-gamut",hp=1e-6;function en(e,t){let r=Nr(e);return r?["rgb","hsl","hwb"].includes(r.mode)?!0:gp(r,Ra(r,r.mode,t==="srgb"?"rgb":t)):!1}function gp(e,t,r=hp){for(let n in e)if(!(n==="mode"||n==="alpha")){if(!(n in t))throw new Error(`Can\u2019t compare ${e.mode} to ${t.mode}`);if(Math.abs(e[n]-t[n])>r)return!1}return!0}var Xu="COLOR",Uu="BORDER",Vu="GRADIENT",qu="SHADOW",bp={meta:{messages:{[Xu]:"Color {{ id }} is outside {{ gamut }} gamut",[Uu]:"Border {{ id }} is outside {{ gamut }} gamut",[Vu]:"Gradient {{ id }} is outside {{ gamut }} gamut",[qu]:"Shadow {{ id }} is outside {{ gamut }} gamut"},docs:{description:"Enforce colors are within the specified gamut.",url:Je($0)}},defaultOptions:{gamut:"rec2020"},create({tokens:e,options:t,report:r}){if(!t?.gamut)return;if(t.gamut!=="srgb"&&t.gamut!=="p3"&&t.gamut!=="rec2020")throw new Error(`Unknown gamut "${t.gamut}". Options are "srgb", "p3", or "rec2020"`);let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":en(o.$value,t.gamut)||r({messageId:Xu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&!en(o.$value.color,t.gamut)&&r({messageId:Uu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:Vu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:qu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break}}},yp=bp,E0="core/required-children",Wu="EMPTY_MATCH",Gu="MISSING_REQUIRED_TOKENS",Ju="MISSING_REQUIRED_GROUP",vp={meta:{messages:{[Wu]:"No tokens matched {{ matcher }}",[Gu]:'Match {{ index }}: some groups missing required token "{{ token }}"',[Ju]:'Match {{ index }}: some tokens missing required group "{{ group }}"'},docs:{description:"Enforce token groups have specific children, whether tokens and/or groups.",url:Je(E0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,requiredTokens:a,requiredGroups:i}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length&&!i?.length)throw new Error(`Match ${n}: must declare either \`requiredTokens: [\u2026]\` or \`requiredGroups: [\u2026]\``);let s=ye(o),u=[],l=[],c=!1;for(let f of Object.values(e)){if(!s(f.id))continue;c=!0;let m=f.id.split(".");l.push(m.pop()),u.push(...m)}if(!c){r({messageId:Wu,data:{matcher:JSON.stringify(o)}});continue}if(a)for(let f of a)l.includes(f)||r({messageId:Gu,data:{index:n,token:f}});if(i)for(let f of i)u.includes(f)||r({messageId:Ju,data:{index:n,group:f}})}}},Dp=vp,F0="core/required-modes",xp={meta:{docs:{description:"Enforce certain tokens have specific modes.",url:Je(F0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t?.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,modes:a}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length)throw new Error(`Match ${n}: must declare \`modes: [\u2026]\``);let i=ye(o),s=!1;for(let u of Object.values(e))if(i(u.id)){s=!0;for(let l of a)u.mode?.[l]||r({message:`Token ${u.id}: missing required mode "${l}"`,node:u.source.node});s||r({message:`Match "${n}": no tokens matched ${JSON.stringify(o)}`,node:u.source.node})}}}},Cp=xp,M0="core/required-typography-properties",Ap={meta:{docs:{description:"Enforce typography tokens have required properties.",url:Je(M0)}},defaultOptions:{properties:[]},create({tokens:e,options:t,report:r}){if(!t)return;if(!t.properties.length)throw new Error('"properties" can\u2019t be empty');let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&o.$type==="typography"&&!o.aliasOf)for(let a of t.properties)!o.partialAliasOf?.[a]&&!(a in o.$value)&&r({message:`${o.id} missing required typographic property "${a}"`,node:o.source.node})}},$p=Ap;function Ep(){return{name:"@terrazzo/plugin-lint-core",lint(){return{[b0]:rp,[x0]:cp,[C0]:dp,[A0]:pp,[$0]:yp,[E0]:Dp,[F0]:Cp,[M0]:$p,[h0]:Zm,[g0]:ep}}}}var Fp=/\/*$/;function T0(e,{logger:t=new Wr,cwd:r}={}){let n=performance.now();r||t.error({group:"config",label:"core",message:"defineConfig() missing `cwd` for JS API"});let o=_n({},e);Mp({rawConfig:e,config:o,logger:t,cwd:r}),Tp({config:o,cwd:r,logger:t}),kp({config:o,logger:t}),wp({config:o,logger:t}),Sp({config:o,logger:t});for(let a of o.plugins)a.config?.({...o});return t.debug({group:"parser",label:"config",message:"Finish config validation",timing:performance.now()-n}),o}function Mp({rawConfig:e,config:t,logger:r,cwd:n}){if(e.tokens===void 0)t.tokens=["./tokens.json"];else if(typeof e.tokens=="string")t.tokens=[e.tokens];else if(Array.isArray(e.tokens)){t.tokens=[];for(let o of e.tokens)typeof o=="string"||o instanceof URL?t.tokens.push(o):r.error({group:"config",label:"tokens",message:`Expected array of strings, encountered ${JSON.stringify(o)}`})}else r.error({group:"config",label:"tokens",message:`Expected string or array of strings, received ${typeof e.tokens}`});for(let o=0;o<t.tokens.length;o++){let a=t.tokens[o];if(!(a instanceof URL))try{t.tokens[o]=new URL(a,n)}catch{r.error({group:"config",label:"tokens",message:`Invalid URL ${a}`})}}}function Tp({config:e,cwd:t,logger:r}){e.outDir instanceof URL||(typeof e.outDir>"u"?e.outDir=new URL("./tokens/",t):typeof e.outDir!="string"?r.error({group:"config",label:"outDir",message:`Expected string, received ${JSON.stringify(e.outDir)}`}):(e.outDir=new URL(e.outDir,t),e.outDir=new URL(e.outDir.href.replace(Fp,"/"))))}function kp({config:e,logger:t}){typeof e.plugins>"u"&&(e.plugins=[]),Array.isArray(e.plugins)||t.error({group:"config",label:"plugins",message:`Expected array of plugins, received ${JSON.stringify(e.plugins)}`}),e.plugins.push(Ep());for(let r=0;r<e.plugins.length;r++){let n=e.plugins[r];typeof n!="object"?t.error({group:"config",label:`plugin[${r}]`,message:`Expected output plugin, received ${JSON.stringify(n)}`}):n.name||t.error({group:"config",label:`plugin[${r}]`,message:'Missing "name"'})}e.plugins.sort((r,n)=>r.enforce==="pre"&&n.enforce!=="pre"?-1:r.enforce==="post"&&n.enforce!=="post"?1:0)}function wp({config:e,logger:t}){if(e.lint!==void 0)if((e.lint===null||typeof e.lint!="object"||Array.isArray(e.lint))&&t.error({group:"config",label:"lint",message:"Must be an object"}),e.lint.build||(e.lint.build={enabled:!0}),e.lint.build.enabled!==void 0?typeof e.lint.build.enabled!="boolean"&&t.error({group:"config",label:"lint \u203A build \u203A enabled",message:`Expected boolean, received ${JSON.stringify(e.lint.build)}`}):e.lint.build.enabled=!0,e.lint.rules===void 0)e.lint.rules={};else{if(e.lint.rules===null||typeof e.lint.rules!="object"||Array.isArray(e.lint.rules)){t.error({group:"config",label:"lint \u203A rules",message:`Expected object, received ${JSON.stringify(e.lint.rules)}`});return}let r=new Map;for(let n of e.plugins){if(typeof n.lint!="function")continue;let o=n.lint();if(!o||Array.isArray(o)||typeof o!="object"){t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Expected object for lint() received ${JSON.stringify(o)}`});continue}for(let a of Object.keys(o))r.get(a)&&r.get(a)!==n.name&&t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Duplicate rule ${a} already registered by plugin ${r.get(a)}`}),r.set(a,n.name)}for(let n of Object.keys(e.lint.rules)){r.has(n)||t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:"Unknown rule. Is the plugin installed?"});let o=e.lint.rules[n],a="off",i;typeof o=="number"||typeof o=="string"?a=o:Array.isArray(o)?(a=o[0],i=o[1]):o!==void 0&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid eyntax. Expected \`string | number | Array\`, received ${JSON.stringify(o)}}`}),e.lint.rules[n]=[a,i],typeof a=="number"?(a!==0&&a!==1&&a!==2&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid number ${a}. Specify 0 (off), 1 (warn), or 2 (error).`}),e.lint.rules[n][0]=["off","warn","error"][a]):typeof a=="string"?a!=="off"&&a!=="warn"&&a!=="error"&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid string ${JSON.stringify(a)}. Specify "off", "warn", or "error".`}):o!==null&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Expected string or number, received ${JSON.stringify(o)}`})}}else e.lint={build:{enabled:!0},rules:{}}}function Sp({config:e,logger:t}){e.ignore||(e.ignore={}),e.ignore.tokens??=[],e.ignore.deprecated??=!1,(!Array.isArray(e.ignore.tokens)||e.ignore.tokens.some(r=>typeof r!="string"))&&t.error({group:"config",label:"ignore \u203A tokens",message:`Expected array of strings, received ${JSON.stringify(e.ignore.tokens)}`}),typeof e.ignore.deprecated!="boolean"&&t.error({group:"config",label:"ignore \u203A deprecated",message:`Expected boolean, received ${JSON.stringify(e.ignore.deprecated)}`})}var Rp=new Intl.ListFormat("en-us");async function Bp({tokens:e,filename:t,config:r={},src:n,logger:o}){let{plugins:a=[],lint:i}=r,s=Object.keys(i?.rules??{});for(let u of a)if(typeof u.lint=="function"){let l=performance.now(),c=u.lint(),f=[],m=[];await Promise.all(Object.entries(c).map(async([d,g])=>{if(!(d in i.rules)||i.rules[d]===null)return;let[p,y]=i.rules[d];if(p==="off")return;await g.create({id:d,report(D){let C="";if(!D.message&&!D.messageId&&o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:"Unable to report error: missing message or messageId"}),D.message?C=D.message:(D.messageId in(g.meta?.messages??{})||o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:`messageId "${D.messageId}" does not exist`}),C=g.meta?.messages?.[D.messageId]??""),D.data&&typeof D.data=="object")for(let[F,v]of Object.entries(D.data)){let M=["string","number","boolean"].includes(typeof v)?String(v):JSON.stringify(v);C=C.replace(/{{[^}]+}}/g,$=>$.substring(2,$.length-2).trim()===F?M:$)}(p==="error"?f:m).push({group:"lint",label:d,message:C,filename:t,node:D.node,src:D.source?.src})},tokens:e,filename:t,src:n,options:_n(g.meta?.defaultOptions??[],g.defaultOptions??[],y)});let b=s.indexOf(d);b!==-1&&s.splice(b,1)}));for(let d of f)o.error({...d,continueOnError:!0});for(let d of m)o.warn(d);if(o.debug({group:"lint",label:u.name,message:"Finished",timing:performance.now()-l}),f.length){let d=[jr(f.length,"error","errors")];m.length&&d.push(jr(m.length,"warning","warnings")),o.error({group:"lint",message:`Lint failed with ${Rp.format(d)}`,label:u.name,continueOnError:!1})}}for(let u of s)o.warn({group:"lint",label:"lint",message:`Unknown lint rule "${u}"`})}var Ya=48,Op=49,k0=57,Ur=92,Pp=36,Ha=46,w0=34,S0=97,zp=101,Ka=102,R0=110,B0=116,Yu=117,Ku=120,_p=122,Na=45,Za=10,ja=43,Qa=13,Ip=39,Xr=47,Lp=32,Hp=9,Np=95,O0=65,jp=69,Xp=70,Up=78,Vp=88,qp=90,Wp=98,Gp=114,Jp=118,P0=8232,z0=8233,Yp=73,Zu=42,Kp=11,Zp=12,Qp=160,e1=65279,t1=160,r1=8192,o1=8193,n1=8194,a1=8195,i1=8196,s1=8197,u1=8198,l1=8199,c1=8200,f1=8201,d1=8202,m1=8239,p1=8287,h1=12288,g1="[",b1="]",y1="{",v1="}",D1=":",x1=",",C1="true",A1="false",$1="null",E1="NaN",F1="Infinity",Xa='"',Vr=new Map([[w0,Xa],[Ur,"\\"],[Xr,"/"],[Wp,"\b"],[R0,`
12
- `],[Ka,"\f"],[Gp,"\r"],[B0," "]]),on=new Map([...Vr,[Jp,"\v"],[Ya,"\0"]]),M1=new Map([[Xa,Xa],["\\","\\"],["/","/"],["\b","b"],[`
13
- `,"n"],["\f","f"],["\r","r"],[" ","t"]]),T1=new Map([...M1,["\v","v"],["\0","0"],["\u2028","u2028"],["\u2029","u2029"]]),rn=new Map([[g1,"LBracket"],[b1,"RBracket"],[y1,"LBrace"],[v1,"RBrace"],[D1,"Colon"],[x1,"Comma"],[C1,"Boolean"],[A1,"Boolean"],[$1,"Null"]]),tn=new Map([...rn,[E1,"Number"],[F1,"Number"]]),Ua=new Set([Za,Qa,P0,z0]),Lt=class extends Error{constructor(e,{line:t,column:r,offset:n}){super(`${e} (${t}:${r})`),this.line=t,this.column=r,this.offset=n}},k1=class extends Lt{constructor(e,t){super(`Unexpected character '${String.fromCharCode(e)}' found.`,t)}},w1=class extends Lt{constructor(e,t){super(`Unexpected identifier '${e}' found.`,t)}},lr=class extends Lt{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}},_0=class extends Lt{constructor(e){super("Unexpected end of input found.",e)}},S1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,R1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,B1=13,Qu=10,O1=class{#n="";#u=1;#e=0;#t=-1;#i=!1;#s=-1;#r=!1;constructor(e){this.#n=e}#l(){this.#r||(this.#e++,this.#t++,this.#s=-1,this.#r=!0)}locate(){return{line:this.#u,column:this.#e,offset:this.#t}}next(){if(this.#t>=this.#n.length-1)return this.#l(),-1;this.#t++;let e=this.#n.charCodeAt(this.#t);return this.#i?(this.#u++,this.#e=1,this.#i=!1):this.#e++,e===B1?(this.#i=!0,this.peek()===Qu&&this.#t++):e===Qu&&(this.#i=!0),this.#s=e,e}peek(){return this.#t===this.#n.length-1?-1:this.#n.charCodeAt(this.#t+1)}match(e){return e(this.peek())?(this.next(),!0):!1}current(){return this.#s}},P1="Infinity",z1="NaN",_1=new Set([B0,Ka,R0]),Va=new Set([Lp,Hp,Za,Qa]),e0=new Set([...Va,Kp,Zp,Qp,P0,z0,e1,t1,r1,o1,n1,a1,i1,s1,u1,l1,c1,f1,d1,m1,p1,h1]),I1={mode:"json",ranges:!1},L1=new Set(["true","false","null"]),j={EOF:0,Number:1,String:2,Boolean:3,Null:4,NaN:5,Infinity:6,Identifier:7,Colon:20,LBrace:21,RBrace:22,LBracket:23,RBracket:24,Comma:25,LineComment:40,BlockComment:41};function at(e){return e>=Ya&&e<=k0}function La(e){return at(e)||e>=O0&&e<=Xp||e>=S0&&e<=Ka}function H1(e){return e>=Op&&e<=k0}function N1(e){return _1.has(e)}function I0(e){return at(e)||e===Ha||e===Na}function j1(e){return I0(e)||e===ja}function t0(e,t){return e===w0||t&&e===Ip}function qa(e){if(e===Pp||e===Np||e===Ur||e>=S0&&e<=_p||e>=O0&&e<=qp||e===8204||e===8205)return!0;let t=String.fromCharCode(e);return S1.test(t)}function r0(e){if(qa(e)||at(e))return!0;let t=String.fromCharCode(e);return R1.test(t)}var X1=class{#n;#u;#e;#t;#i;#s;#r;#l;#m;#p;#h;constructor(e,t){this.#u=e,this.#n={...I1,...t},this.#e=new O1(e),this.#t=this.#n.mode==="json5",this.#i=this.#n.mode!=="json",this.#s=this.#n.ranges,this.#l=this.#t?on.has.bind(on):Vr.has.bind(Vr),this.#m=this.#t?Ua.has.bind(Ua):()=>!1,this.#p=this.#t?r=>r===Ku:()=>!1,this.#h=this.#t?e0.has.bind(e0):Va.has.bind(Va)}#o(e,t=this.#e.locate()){throw new k1(e,t)}#v(e,t=this.#e.locate()){throw new w1(e,t)}#c(){throw new _0(this.#e.locate())}#a(e,t,r,n){let o=r.offset+t,a=this.#n.ranges?{range:[r.offset,o]}:void 0;return{type:e,loc:{start:r,end:n||{line:r.line,column:r.column+t,offset:o}},...a}}#f(e){let t="",r;for(let n=0;n<e;n++){if(r=this.#e.peek(),La(r)){this.#e.next(),t+=String.fromCharCode(r);continue}this.#o(r)}return t}#d(e){let t="";do{if(t+=String.fromCharCode(e),e===Ur){e=this.#e.next(),e!==Yu&&this.#o(e),t+=String.fromCharCode(e);let r=this.#f(4),n=parseInt(r,16);if(t.length===2&&!qa(n)){let o=this.#e.locate();this.#o(Ur,{line:o.line,column:o.column-5,offset:o.offset-5})}else if(!r0(n)){let o=this.#e.locate();this.#o(n,{line:o.line,column:o.column-5,offset:o.offset-5})}t+=r}if(e=this.#e.peek(),!r0(e))break;this.#e.next()}while(!0);return t}#g(e){let t=e,r=1;for(e=this.#e.peek();e!==-1&&e!==t;){if(this.#e.next(),r++,e===Ur)if(e=this.#e.peek(),this.#l(e)||this.#m(e))this.#e.next(),r++;else if(e===Yu){this.#e.next(),r++;let n=this.#f(4);r+=n.length}else if(this.#p(e)){this.#e.next(),r++;let n=this.#f(2);r+=n.length}else this.#t?(this.#e.next(),r++):this.#o(e);e=this.#e.peek()}return e===-1&&(this.#e.next(),this.#c()),this.#e.next(),r++,r}#b(e){let t=1;if(e===Na||this.#t&&e===ja){if(e=this.#e.peek(),this.#t&&(e===Yp||e===Up)){this.#e.next();let r=this.#d(e);return r!==P1&&r!==z1&&this.#o(e),t+r.length}at(e)||this.#o(e),this.#e.next(),t++}if(e===Ya)if(e=this.#e.peek(),this.#t&&(e===Ku||e===Vp)){this.#e.next(),t++,e=this.#e.peek(),La(e)||(this.#e.next(),this.#o(e));do this.#e.next(),t++,e=this.#e.peek();while(La(e))}else at(e)&&this.#o(e);else if(!this.#t||e!==Ha)for(H1(e)||this.#o(e),e=this.#e.peek();at(e);)this.#e.next(),t++,e=this.#e.peek();if(e===Ha){let r=-1;for(this.#e.next(),t++,r++,e=this.#e.peek();at(e);)this.#e.next(),t++,r++,e=this.#e.peek();!this.#t&&r===0&&(this.#e.next(),e?this.#o(e):this.#c())}if(e===zp||e===jp)for(this.#e.next(),t++,e=this.#e.peek(),(e===ja||e===Na)&&(this.#e.next(),t++,e=this.#e.peek()),e===-1&&(this.#e.next(),this.#c()),at(e)||(this.#e.next(),this.#o(e));at(e);)this.#e.next(),t++,e=this.#e.peek();return t}#y(e){let t=1;if(e=this.#e.peek(),e===Xr){do this.#e.next(),t+=1,e=this.#e.peek();while(e>-1&&e!==Qa&&e!==Za);return{length:t,multiline:!1}}if(e===Zu){for(this.#e.next(),t+=1;e>-1;)if(e=this.#e.peek(),e===Zu){if(this.#e.next(),t+=1,e=this.#e.peek(),e===Xr)return this.#e.next(),t+=1,{length:t,multiline:!0}}else this.#e.next(),t+=1;this.#e.next(),this.#c()}this.#e.next(),this.#o(e)}next(){let e=this.#e.next();for(;this.#h(e);)e=this.#e.next();if(e===-1)return j.EOF;let t=this.#e.locate(),r=String.fromCharCode(e);if(this.#t)if(tn.has(r))this.#r=this.#a(tn.get(r),1,t);else if(qa(e)){let n=this.#d(e);tn.has(n)?this.#r=this.#a(tn.get(n),n.length,t):this.#r=this.#a("Identifier",n.length,t)}else if(j1(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e),o=this.#e.locate();this.#r=this.#a("String",n,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);else if(rn.has(r))this.#r=this.#a(rn.get(r),1,t);else if(N1(e)){let n=this.#d(e);L1.has(n)||this.#v(n,t),this.#r=this.#a(rn.get(n),n.length,t)}else if(I0(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e);this.#r=this.#a("String",n,t)}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);return j[this.#r.type]}get token(){return this.#r}},Be={document(e,t={}){return{type:"Document",body:e,loc:t.loc,...t}},string(e,t={}){return{type:"String",value:e,loc:t.loc,...t}},number(e,t={}){return{type:"Number",value:e,loc:t.loc,...t}},boolean(e,t={}){return{type:"Boolean",value:e,loc:t.loc,...t}},null(e={}){return{type:"Null",loc:e.loc,...e}},array(e,t={}){return{type:"Array",elements:e,loc:t.loc,...t}},element(e,t={}){return{type:"Element",value:e,loc:t.loc,...t}},object(e,t={}){return{type:"Object",members:e,loc:t.loc,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,loc:r.loc,...r}},identifier(e,t={}){return{type:"Identifier",name:e,loc:t.loc,...t}},nan(e="",t={}){return{type:"NaN",sign:e,loc:t.loc,...t}},infinity(e="",t={}){return{type:"Infinity",sign:e,loc:t.loc,...t}}},U1={mode:"json",ranges:!1,tokens:!1,allowTrailingCommas:!1},V1=/\\u[\da-fA-F]{4}/gu;function q1(e){return e.replace(V1,t=>String.fromCharCode(parseInt(t.slice(2),16)))}function W1(e){let t=1,r=1;for(let n=0;n<e.length;n++){let o=e[n];o===`
14
- `?(t++,r=1):o==="\r"?(e[n+1]===`
15
- `&&n++,t++,r=1):r++}return{line:t,column:r,offset:e.length}}function G1(e,t,r=!1){let n="",o=e.indexOf("\\"),a=0;for(;o>=0;){n+=e.slice(a,o);let i=e.charAt(o+1),s=i.charCodeAt(0);if(r&&on.has(s))n+=on.get(s),a=o+2;else if(Vr.has(s))n+=Vr.get(s),a=o+2;else if(i==="u"){let u=e.slice(o+2,o+6);if(u.length<4||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid unicode escape \\u${u}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});n+=String.fromCharCode(parseInt(u,16)),a=o+6}else if(r&&i==="x"){let u=e.slice(o+2,o+4);if(u.length<2||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid hex escape \\x${u}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});n+=String.fromCharCode(parseInt(u,16)),a=o+4}else if(r&&Ua.has(s))a=o+2,i==="\r"&&e.charAt(a)===`
16
- `&&a++;else if(r)n+=i,a=o+2;else throw new Lt(`Invalid escape \\${i}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});o=e.indexOf("\\",a)}return n+=e.slice(a),n}function J1(e,t,r=!1){switch(t.type){case"Boolean":return e==="true";case"Number":if(r){if(e.charCodeAt(0)===45)return-Number(e.slice(1));if(e.charCodeAt(0)===43)return Number(e.slice(1))}return Number(e);case"String":return G1(e.slice(1,-1),t,r);default:throw new TypeError(`Unknown token type "${t.type}.`)}}function Y1(e,t){t=Object.freeze({...U1,...t});let r=[],n=new X1(e,{mode:t.mode,ranges:t.ranges}),o=t.mode==="json5",a=t.allowTrailingCommas||o;function i(){let v=n.next();return v&&t.tokens&&r.push(n.token),v}function s(){let v=n.next();return v&&t.tokens&&r.push(n.token),v>=j.LineComment?s():v}let u=t.mode==="json"?i:s;function l(v,M){if(v!==M)throw new lr(n.token)}function c(v,M){if(!M.includes(v))throw new lr(n.token)}function f(v,M){return t.ranges?{range:[v.offset,M.offset]}:void 0}function m(v){let M=n.token,$=f(M.loc.start,M.loc.end),k=J1(e.slice(M.loc.start.offset,M.loc.end.offset),M,o),R={loc:{start:{...M.loc.start},end:{...M.loc.end}},...$};switch(v){case j.String:return Be.string(k,R);case j.Number:return Be.number(k,R);case j.Boolean:return Be.boolean(k,R);default:throw new TypeError(`Unknown token type ${M.type}.`)}}function d(v){let M=f(v.loc.start,v.loc.end),$=e.slice(v.loc.start.offset,v.loc.end.offset),k={loc:{start:{...v.loc.start},end:{...v.loc.end}},...M};if(v.type!=="Identifier"){let R="";return($[0]==="+"||$[0]==="-")&&(R=$[0]),Be[$.includes("NaN")?"nan":"infinity"](R,k)}return Be.identifier(q1($),k)}function g(v){let M=f(v.loc.start,v.loc.end);return Be.null({loc:{start:{...v.loc.start},end:{...v.loc.end}},...M})}function p(v){o?c(v,[j.String,j.Identifier,j.Number]):l(v,j.String);let M=n.token;if(o&&v===j.Number&&/[+\-0-9]/.test(e[M.loc.start.offset]))throw new lr(M);let $=v===j.String?m(v):d(M);if(o&&($.type==="NaN"||$.type==="Infinity")){if($.sign!=="")throw new lr(n.token);$=Be.identifier($.type,{loc:$.loc,...f($.loc.start,$.loc.end)})}v=u(),l(v,j.Colon);let k=D(),R=f($.loc.start,k.loc.end);return Be.member($,k,{loc:{start:{...$.loc.start},end:{...k.loc.end}},...R})}function y(v){l(v,j.LBrace);let M=n.token,$=[],k=u();if(k!==j.RBrace)do{if($.push(p(k)),k=u(),!k)throw new _0($[$.length-1].loc.end);if(k===j.Comma){if(k=u(),a&&k===j.RBrace)break}else break}while(k);l(k,j.RBrace);let R=n.token,I=f(M.loc.start,R.loc.end);return Be.object($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function b(v){l(v,j.LBracket);let M=n.token,$=[],k=u();if(k!==j.RBracket)do{let X=D(k);if($.push(Be.element(X,{loc:X.loc})),k=u(),k===j.Comma){if(k=u(),a&&k===j.RBracket)break}else break}while(k);l(k,j.RBracket);let R=n.token,I=f(M.loc.start,R.loc.end);return Be.array($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function D(v){v=v??u();let M=n.token;switch(v){case j.String:case j.Boolean:return m(v);case j.Number:if(o){let $=e.slice(M.loc.start.offset,M.loc.end.offset);if(($[0]==="+"||$[0]==="-")&&($=$.slice(1)),$==="NaN"||$==="Infinity")return d(M)}return m(v);case j.Null:return g(M);case j.LBrace:return y(v);case j.LBracket:return b(v);default:throw new lr(M)}}let C=D();if(u())throw new lr(n.token);let F={loc:{start:{line:1,column:1,offset:0},end:{...W1(e)}}};return t.tokens&&(F.tokens=r),t.ranges&&(F.range=[F.loc.start.offset,F.loc.end.offset]),Be.document(C,F)}function He(e){switch(e.type){case"String":return e.value;case"Number":return e.value;case"Boolean":return e.value;case"Null":return null;case"NaN":return NaN;case"Infinity":return e.sign==="-"?-1/0:1/0;case"Identifier":return e.name;case"Array":return e.elements.map(t=>He(t.value));case"Object":{let t={};return e.members.forEach(r=>{t[He(r.name)]=He(r.value)}),t}case"Document":return He(e.body);case"Element":throw new Error("Cannot evaluate array element outside of an array.");case"Member":throw new Error("Cannot evaluate object member outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}function K1(e){return e.value?"true":"false"}function Z1(){return"null"}function Q1(e){return e.value.toString()}function eh(){return"NaN"}function th(e){return e.sign+"Infinity"}function rh(e){let t='"';for(let r of e.value){let n=T1.get(r);if(n){t+="\\"+n;continue}if(r==='"'){t+='\\"';continue}if(r<" "||r==="\x7F"){let o=r.codePointAt(0).toString(16).toUpperCase();t+=`\\u${"0000".substring(o.length)}${o}`;continue}t+=r}return t+'"'}function oh(e){return e.name}function nh(e,t,r){let n=t?`
17
- `:"",o=t.repeat(r),a=t.repeat(r+1);return`[${n}${e.elements.map(i=>`${a}${qr(i.value,t,r+1)}`).join(`,${n}`)}${n}${o}]`}function ah(e,t,r){let n=t?" ":"";return`${qr(e.name,t,r)}:${n}${qr(e.value,t,r+1)}`}function ih(e,t,r){let n=t?`
18
- `:"",o=t.repeat(r),a=t.repeat(r+1);return`{${n}${e.members.map(i=>`${a}${ah(i,t,r)}`).join(`,${n}`)}${n}${o}}`}function qr(e,t,r){switch(e.type){case"String":return rh(e);case"Number":return Q1(e);case"Boolean":return K1(e);case"Null":return Z1();case"NaN":return eh();case"Infinity":return th(e);case"Identifier":return oh(e);case"Array":return nh(e,t,r);case"Object":return ih(e,t,r);case"Document":return qr(e.body,t,r);default:throw new TypeError(`Unknown node type: ${e.type}`)}}function de(e,{indent:t=0}={}){return qr(e," ".repeat(t),0)}var sh={Document:["body"],Object:["members"],Member:["name","value"],Element:["value"],Array:["elements"],String:[],Number:[],Boolean:[],Null:[],Identifier:[],NaN:[],Infinity:[]};function uh(e){return!!e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}function Y(e){let t={};if(e.type!=="Object")return t;for(let r=0;r<e.members.length;r++){let n=e.members[r];n.name.type==="String"&&(t[n.name.value]={...n.value,index:r})}return t}function o0(e,t=[]){e.type==="Object"&&e.members.push(...t)}function lh(e,t){e.members=t.type==="Document"&&t.body?.members||t.members}function ch(e,t){function r(n,o,a=[]){let i=[...a];if(n.type==="Member"){let{name:u}=n;i.push("value"in u?u.value:String(u))}t.enter?.(n,o,i);let s=sh[n.type];for(let u of s??[]){let l=n[u];if(l)if(Array.isArray(l))for(let c=0;c<l.length;c++)r(l[c],n,u==="elements"?[...i,String(c)]:i);else uh(l)&&r(l,n,i)}t.exit?.(n,o,i)}r(e,void 0,[])}function fh(e){return typeof e=="string"&&e.trim().startsWith("{")}function n0(e,{continueOnError:t,filename:r,logger:n,yamlToMomoa:o}){let a="";typeof e=="string"&&(a=e);let i={};if(typeof e=="string"&&!fh(e))if(o)try{i=o(e)}catch(s){n.error({group:"parser",label:"json",message:String(s),filename:r,src:e,continueOnError:t})}else n.error({group:"parser",label:"yaml",message:`Install \`yaml-to-momoa\` package to parse YAML, and pass in as option, e.g.:
11
+ ${n}${a}`}return r}var Wr=class{level="info";debugScope="*";errorCount=0;warnCount=0;infoCount=0;debugCount=0;constructor(e){e?.level&&(this.level=e.level),e?.debugScope&&(this.debugScope=e.debugScope)}setLevel(e){this.level=e}error(e){this.errorCount++;let t=Qo(e,"error");if(e.continueOnError){console.error(t);return}throw e.node?new ap(t):new Error(t)}info(e){if(this.infoCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("info"))return;let t=Qo(e,"info");console.log(t)}warn(e){if(this.warnCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("warn"))return;let t=Qo(e,"warn");console.warn(t)}debug(e){if(this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("debug"))return;this.debugCount++;let t=Qo(e,"debug"),r=e.label?`${e.group}:${e.label}`:e.group;if(!(this.debugScope!=="*"&&!ye(this.debugScope)(r))){if(t.replace(/\[config[^\]]+\]/,o=>nt.default.green(o)).replace(/\[parser[^\]]+\]/,o=>nt.default.magenta(o)).replace(/\[lint[^\]]+\]/,o=>nt.default.yellow(o)).replace(/\[plugin[^\]]+\]/,o=>nt.default.cyan(o)),t=`${nt.default.dim(np.format(performance.now()))} ${t}`,typeof e.timing=="number"){let o="";e.timing<1e3?o=`${Math.round(e.timing*100)/100}ms`:e.timing<6e4&&(o=`${Math.round(e.timing*100)/1e5}s`),t=`${t} ${nt.default.dim(`[${o}]`)}`}console.log(t)}}stats(){return{errorCount:this.errorCount,warnCount:this.warnCount,infoCount:this.infoCount,debugCount:this.debugCount}}},ap=class extends Error{constructor(e){super(e),this.name="TokensJSONError"}},Pu="SINGLE_VALUE",_u="MULTI_VALUE";function ip({params:e,logger:t,pluginName:r}){let o={group:"plugin",label:r,message:""};(!e.value||typeof e.value!="string"&&typeof e.value!="object"||Array.isArray(e.value))&&t.error({...o,message:`setTransform() value expected string or object of strings, received ${Array.isArray(e.value)?"Array":typeof e.value}`}),typeof e.value=="object"&&Object.values(e.value).some(n=>typeof n!="string")&&t.error({...o,message:"setTransform() value expected object of strings, received some non-string values"})}async function g0(e,{sources:t,logger:r=new Wr,config:o}){let n={},a={outputFiles:[]};function i(f){if(!f?.format)return r.warn({group:"plugin",message:'"format" missing from getTransforms(), no tokens returned.'}),[];let m=f.id?ye(Array.isArray(f.id)?f.id:[f.id]):null,d=f.mode?ye(f.mode):null;return(n[f.format]??[]).filter(g=>{if(f.$type){if(typeof f.$type=="string"&&g.token.$type!==f.$type)return!1;if(Array.isArray(f.$type)&&!f.$type.some(p=>g.token.$type===p))return!1}return!(f.id&&f.id!=="*"&&m&&!m(g.token.id)||d&&!d(g.mode))})}let s=!1,u=performance.now();for(let f of o.plugins)typeof f.transform=="function"&&await f.transform({tokens:e,sources:t,getTransforms:i,setTransform(m,d){if(s){r.warn({message:"Attempted to call setTransform() after transform step has completed.",group:"plugin",label:f.name});return}let g=e[m],p=typeof d.value=="string"?d.value:{...d.value};if(typeof p=="object")for(let b of Object.keys(p))p[b]===void 0&&delete p[b];ip({logger:r,params:{...d,value:p},pluginName:f.name}),n[d.format]||(n[d.format]=[]);let y=n[d.format].findIndex(b=>m===b.id&&(!d.localID||d.localID===b.localID)&&(!d.mode||d.mode===b.mode));y===-1?n[d.format].push({...d,id:m,value:p,type:typeof p=="string"?Pu:_u,mode:d.mode||".",token:structuredClone(g)}):(n[d.format][y].value=p,n[d.format][y].type=typeof p=="string"?Pu:_u)}});s=!0,r.debug({group:"parser",label:"transform",message:"transform() step",timing:performance.now()-u});let l=performance.now();for(let f of o.plugins)if(typeof f.build=="function"){let m=performance.now();await f.build({tokens:e,sources:t,getTransforms:i,outputFile(d,g){let p=new URL(d,o.outDir);a.outputFiles.some(y=>new URL(y.filename,o.outDir).href===p.href)&&r.error({group:"plugin",message:`Can\u2019t overwrite file "${d}"`,label:f.name}),a.outputFiles.push({filename:d,contents:g,plugin:f.name,time:performance.now()-m})}})}r.debug({group:"parser",label:"build",message:"build() step",timing:performance.now()-l});let c=performance.now();for(let f of o.plugins)typeof f.buildEnd=="function"&&await f.buildEnd({outputFiles:structuredClone(a.outputFiles)});return r.debug({group:"parser",label:"build",message:"buildEnd() step",timing:performance.now()-c}),a}function Ye(e){return`https://terrazzo.app/docs/cli/lint#${e.replaceAll("/","")}`}var b0="a11y/min-contrast",sp={AA:{default:4.5,large:3},AAA:{default:7,large:4.5}},zu="INSUFFICIENT_CONTRAST",up={meta:{messages:{[zu]:"Pair {{ index }} failed; expected {{ expected }}, got {{ actual }} ({{ level }})"},docs:{description:"Enforce colors meet minimum contrast checks for WCAG 2.",url:Ye(b0)}},defaultOptions:{level:"AA",pairs:[]},create({tokens:e,options:t,report:r}){for(let o=0;o<t.pairs.length;o++){let{foreground:n,background:a,largeText:i}=t.pairs[o];if(!e[n])throw new Error(`Token ${n} does not exist`);if(e[n].$type!=="color")throw new Error(`Token ${n} isn\u2019t a color`);if(!e[a])throw new Error(`Token ${a} does not exist`);if(e[a].$type!=="color")throw new Error(`Token ${a} isn\u2019t a color`);let s=_a(Nr(e[n].$value),Nr(e[a].$value)),u=sp[t.level??"AA"][i?"large":"default"];s<u&&r({messageId:zu,data:{index:o+1,expected:u,actual:Math.round(s*100)/100,level:t.level}})}}},lp=up,y0="a11y/min-font-size",Iu="TOO_SMALL",cp={meta:{messages:{[Iu]:"{{ id }} font size too small. Expected minimum of {{ min }}"},docs:{description:"Enforce font sizes are no smaller than the given value.",url:Ye(y0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){if(!t.minSizePx&&!t.minSizeRem)throw new Error("Must specify at least one of minSizePx or minSizeRem");let o=t.ignore?ye(t.ignore):null;for(let n of Object.values(e))if(!o?.(n.id)&&!n.aliasOf&&n.$type==="typography"&&"fontSize"in n.$value){let a=n.$value.fontSize;(a.unit==="px"&&t.minSizePx&&a.value<t.minSizePx||a.unit==="rem"&&t.minSizeRem&&a.value<t.minSizeRem)&&r({messageId:Iu,data:{id:n.id,min:t.minSizePx?`${t.minSizePx}px`:`${t.minSizeRem}rem`}})}}},fp=cp,v0="core/colorspace",Lu="COLOR",Hu="BORDER",Nu="GRADIENT",ju="SHADOW",dp={meta:{messages:{[Lu]:"Color {{ id }} not in colorspace {{ colorSpace }}",[Hu]:"Border {{ id }} not in colorspace {{ colorSpace }}",[Nu]:"Gradient {{ id }} not in colorspace {{ colorSpace }}",[ju]:"Shadow {{ id }} not in colorspace {{ colorSpace }}"},docs:{description:"Enforce that all colors are in a specific colorspace.",url:Ye(v0)}},defaultOptions:{colorSpace:"srgb"},create({tokens:e,options:t,report:r}){if(!t.colorSpace)return;let o=t.ignore?ye(t.ignore):null;for(let n of Object.values(e))if(!o?.(n.id)&&!n.aliasOf)switch(n.$type){case"color":n.$value.colorSpace!==t.colorSpace&&r({messageId:Lu,data:{id:n.id,colorSpace:t.colorSpace},node:n.source.node});break;case"border":!n.partialAliasOf?.color&&n.$value.color.colorSpace!==t.colorSpace&&r({messageId:Hu,data:{id:n.id,colorSpace:t.colorSpace},node:n.source.node});break;case"gradient":for(let a=0;a<n.$value.length;a++)!n.partialAliasOf?.[a]?.color&&n.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Nu,data:{id:n.id,colorSpace:t.colorSpace},node:n.source.node});break;case"shadow":for(let a=0;a<n.$value.length;a++)!n.partialAliasOf?.[a]?.color&&n.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:ju,data:{id:n.id,colorSpace:t.colorSpace},node:n.source.node});break}}},mp=dp,pp=/\d/,hp=["-","_","/","."];function gp(e=""){if(!pp.test(e))return e!==e.toLowerCase()}function D0(e,t){let r=t??hp,o=[];if(!e||typeof e!="string")return o;let n="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){o.push(n),n="",a=void 0;continue}let l=gp(s);if(i===!1){if(a===!1&&l===!0){o.push(n),n=s,a=l;continue}if(a===!0&&l===!1&&n.length>1){let c=n.at(-1);o.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,a=l;continue}}n+=s,a=l,i=u}return o.push(n),o}function bp(e){return e?e[0].toUpperCase()+e.slice(1):""}function yp(e){return e?e[0].toLowerCase()+e.slice(1):""}function x0(e,t){return e?(Array.isArray(e)?e:D0(e)).map(r=>bp(t?.normalize?r.toLowerCase():r)).join(""):""}function vp(e,t){return yp(x0(e||"",t))}function C0(e,t){return e?(Array.isArray(e)?e:D0(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function Xu(e){return C0(e||"","_")}var A0="core/consistent-naming",La="ERROR_WRONG_FORMAT",Dp={meta:{messages:{[La]:"{{ id }} doesn\u2019t match format {{ format }}"},docs:{description:"Enforce consistent naming for tokens.",url:Ye(A0)}},defaultOptions:{format:"kebab-case"},create({tokens:e,options:t,report:r}){let o={"kebab-case":C0,camelCase:vp,PascalCase:x0,snake_case:Xu,SCREAMING_SNAKE_CASE:n=>Xu(n).toLocaleUpperCase()}[String(t.format)];for(let n of Object.values(e))o?n.id.split(".").every(a=>o(a)===a)||r({messageId:La,data:{id:n.id,format:t.format},node:n.source.node}):typeof t.format=="function"&&t.format(n.id)&&r({messageId:La,data:{id:n.id,format:"(custom)"},node:n.source.node})}},xp=Dp,$0="core/descriptions",Uu="MISSING_DESCRIPTION",Cp={meta:{messages:{[Uu]:"{{ id }} missing description"},docs:{description:"Enforce tokens have descriptions.",url:Ye($0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){let o=t.ignore?ye(t.ignore):null;for(let n of Object.values(e))o?.(n.id)||n.$description||r({messageId:Uu,data:{id:n.id},node:n.source.node})}},Ap=Cp,E0="core/duplicate-values",Ha="ERROR_DUPLICATE_VALUE",$p={meta:{messages:{[Ha]:"{{ id }} declared a duplicate value"},docs:{description:"Enforce tokens can\u2019t redeclare the same value (excludes aliases).",url:Ye(E0)}},defaultOptions:{},create({report:e,tokens:t,options:r}){let o={},n=r.ignore?ye(r.ignore):null;for(let a of Object.values(t))if(!n?.(a.id))if(o[a.$type]||(o[a.$type]=new Set),a.$type==="boolean"||a.$type==="duration"||a.$type==="fontWeight"||a.$type==="link"||a.$type==="number"||a.$type==="string"){if(typeof a.aliasOf=="string"&&Te(a.aliasOf))continue;o[a.$type]?.has(a.$value)&&e({messageId:Ha,data:{id:a.id},node:a.source.node}),o[a.$type]?.add(a.$value)}else{for(let i of o[a.$type].values()??[])if(JSON.stringify(a.$value)===JSON.stringify(i)){e({messageId:Ha,data:{id:a.id},node:a.source.node});break}o[a.$type].add(a.$value)}}},Ep=$p,F0="core/max-gamut",Fp=1e-6;function en(e,t){let r=Nr(e);return r?["rgb","hsl","hwb"].includes(r.mode)?!0:Mp(r,Oa(r,r.mode,t==="srgb"?"rgb":t)):!1}function Mp(e,t,r=Fp){for(let o in e)if(!(o==="mode"||o==="alpha")){if(!(o in t))throw new Error(`Can\u2019t compare ${e.mode} to ${t.mode}`);if(Math.abs(e[o]-t[o])>r)return!1}return!0}var Vu="COLOR",qu="BORDER",Wu="GRADIENT",Gu="SHADOW",Tp={meta:{messages:{[Vu]:"Color {{ id }} is outside {{ gamut }} gamut",[qu]:"Border {{ id }} is outside {{ gamut }} gamut",[Wu]:"Gradient {{ id }} is outside {{ gamut }} gamut",[Gu]:"Shadow {{ id }} is outside {{ gamut }} gamut"},docs:{description:"Enforce colors are within the specified gamut.",url:Ye(F0)}},defaultOptions:{gamut:"rec2020"},create({tokens:e,options:t,report:r}){if(!t?.gamut)return;if(t.gamut!=="srgb"&&t.gamut!=="p3"&&t.gamut!=="rec2020")throw new Error(`Unknown gamut "${t.gamut}". Options are "srgb", "p3", or "rec2020"`);let o=t.ignore?ye(t.ignore):null;for(let n of Object.values(e))if(!o?.(n.id)&&!n.aliasOf)switch(n.$type){case"color":en(n.$value,t.gamut)||r({messageId:Vu,data:{id:n.id,gamut:t.gamut},node:n.source.node});break;case"border":!n.partialAliasOf?.color&&!en(n.$value.color,t.gamut)&&r({messageId:qu,data:{id:n.id,gamut:t.gamut},node:n.source.node});break;case"gradient":for(let a=0;a<n.$value.length;a++)!n.partialAliasOf?.[a]?.color&&!en(n.$value[a].color,t.gamut)&&r({messageId:Wu,data:{id:n.id,gamut:t.gamut},node:n.source.node});break;case"shadow":for(let a=0;a<n.$value.length;a++)!n.partialAliasOf?.[a]?.color&&!en(n.$value[a].color,t.gamut)&&r({messageId:Gu,data:{id:n.id,gamut:t.gamut},node:n.source.node});break}}},kp=Tp,M0="core/required-children",Yu="EMPTY_MATCH",Ju="MISSING_REQUIRED_TOKENS",Zu="MISSING_REQUIRED_GROUP",wp={meta:{messages:{[Yu]:"No tokens matched {{ matcher }}",[Ju]:'Match {{ index }}: some groups missing required token "{{ token }}"',[Zu]:'Match {{ index }}: some tokens missing required group "{{ group }}"'},docs:{description:"Enforce token groups have specific children, whether tokens and/or groups.",url:Ye(M0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let o=0;o<t.matches.length;o++){let{match:n,requiredTokens:a,requiredGroups:i}=t.matches[o];if(!n.length)throw new Error(`Match ${o}: must declare \`match: [\u2026]\``);if(!a?.length&&!i?.length)throw new Error(`Match ${o}: must declare either \`requiredTokens: [\u2026]\` or \`requiredGroups: [\u2026]\``);let s=ye(n),u=[],l=[],c=!1;for(let f of Object.values(e)){if(!s(f.id))continue;c=!0;let m=f.id.split(".");l.push(m.pop()),u.push(...m)}if(!c){r({messageId:Yu,data:{matcher:JSON.stringify(n)}});continue}if(a)for(let f of a)l.includes(f)||r({messageId:Ju,data:{index:o,token:f}});if(i)for(let f of i)u.includes(f)||r({messageId:Zu,data:{index:o,group:f}})}}},Sp=wp,T0="core/required-modes",Rp={meta:{docs:{description:"Enforce certain tokens have specific modes.",url:Ye(T0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t?.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let o=0;o<t.matches.length;o++){let{match:n,modes:a}=t.matches[o];if(!n.length)throw new Error(`Match ${o}: must declare \`match: [\u2026]\``);if(!a?.length)throw new Error(`Match ${o}: must declare \`modes: [\u2026]\``);let i=ye(n),s=!1;for(let u of Object.values(e))if(i(u.id)){s=!0;for(let l of a)u.mode?.[l]||r({message:`Token ${u.id}: missing required mode "${l}"`,node:u.source.node});s||r({message:`Match "${o}": no tokens matched ${JSON.stringify(n)}`,node:u.source.node})}}}},Bp=Rp,k0="core/required-typography-properties",Op={meta:{docs:{description:"Enforce typography tokens have required properties.",url:Ye(k0)}},defaultOptions:{properties:[]},create({tokens:e,options:t,report:r}){if(!t)return;if(!t.properties.length)throw new Error('"properties" can\u2019t be empty');let o=t.ignore?ye(t.ignore):null;for(let n of Object.values(e))if(!o?.(n.id)&&n.$type==="typography"&&!n.aliasOf)for(let a of t.properties)!n.partialAliasOf?.[a]&&!(a in n.$value)&&r({message:`${n.id} missing required typographic property "${a}"`,node:n.source.node})}},Pp=Op;function _p(){return{name:"@terrazzo/plugin-lint-core",lint(){return{[v0]:mp,[A0]:xp,[$0]:Ap,[E0]:Ep,[F0]:kp,[M0]:Sp,[T0]:Bp,[k0]:Pp,[b0]:lp,[y0]:fp}}}}var zp=/\/*$/;function w0(e,{logger:t=new Wr,cwd:r}={}){let o=performance.now();r||t.error({group:"config",label:"core",message:"defineConfig() missing `cwd` for JS API"});let n=Ln({},e);Ip({rawConfig:e,config:n,logger:t,cwd:r}),Lp({config:n,cwd:r,logger:t}),Hp({config:n,logger:t}),Np({config:n,logger:t}),jp({config:n,logger:t});for(let a of n.plugins)a.config?.({...n});return t.debug({group:"parser",label:"config",message:"Finish config validation",timing:performance.now()-o}),n}function Ip({rawConfig:e,config:t,logger:r,cwd:o}){if(e.tokens===void 0)t.tokens=["./tokens.json"];else if(typeof e.tokens=="string")t.tokens=[e.tokens];else if(Array.isArray(e.tokens)){t.tokens=[];for(let n of e.tokens)typeof n=="string"||n instanceof URL?t.tokens.push(n):r.error({group:"config",label:"tokens",message:`Expected array of strings, encountered ${JSON.stringify(n)}`})}else r.error({group:"config",label:"tokens",message:`Expected string or array of strings, received ${typeof e.tokens}`});for(let n=0;n<t.tokens.length;n++){let a=t.tokens[n];if(!(a instanceof URL))try{t.tokens[n]=new URL(a,o)}catch{r.error({group:"config",label:"tokens",message:`Invalid URL ${a}`})}}}function Lp({config:e,cwd:t,logger:r}){e.outDir instanceof URL||(typeof e.outDir>"u"?e.outDir=new URL("./tokens/",t):typeof e.outDir!="string"?r.error({group:"config",label:"outDir",message:`Expected string, received ${JSON.stringify(e.outDir)}`}):(e.outDir=new URL(e.outDir,t),e.outDir=new URL(e.outDir.href.replace(zp,"/"))))}function Hp({config:e,logger:t}){typeof e.plugins>"u"&&(e.plugins=[]),Array.isArray(e.plugins)||t.error({group:"config",label:"plugins",message:`Expected array of plugins, received ${JSON.stringify(e.plugins)}`}),e.plugins.push(_p());for(let r=0;r<e.plugins.length;r++){let o=e.plugins[r];typeof o!="object"?t.error({group:"config",label:`plugin[${r}]`,message:`Expected output plugin, received ${JSON.stringify(o)}`}):o.name||t.error({group:"config",label:`plugin[${r}]`,message:'Missing "name"'})}e.plugins.sort((r,o)=>r.enforce==="pre"&&o.enforce!=="pre"?-1:r.enforce==="post"&&o.enforce!=="post"?1:0)}function Np({config:e,logger:t}){if(e.lint!==void 0)if((e.lint===null||typeof e.lint!="object"||Array.isArray(e.lint))&&t.error({group:"config",label:"lint",message:"Must be an object"}),e.lint.build||(e.lint.build={enabled:!0}),e.lint.build.enabled!==void 0?typeof e.lint.build.enabled!="boolean"&&t.error({group:"config",label:"lint \u203A build \u203A enabled",message:`Expected boolean, received ${JSON.stringify(e.lint.build)}`}):e.lint.build.enabled=!0,e.lint.rules===void 0)e.lint.rules={};else{if(e.lint.rules===null||typeof e.lint.rules!="object"||Array.isArray(e.lint.rules)){t.error({group:"config",label:"lint \u203A rules",message:`Expected object, received ${JSON.stringify(e.lint.rules)}`});return}let r=new Map;for(let o of e.plugins){if(typeof o.lint!="function")continue;let n=o.lint();if(!n||Array.isArray(n)||typeof n!="object"){t.error({group:"config",label:`plugin \u203A ${o.name}`,message:`Expected object for lint() received ${JSON.stringify(n)}`});continue}for(let a of Object.keys(n))r.get(a)&&r.get(a)!==o.name&&t.error({group:"config",label:`plugin \u203A ${o.name}`,message:`Duplicate rule ${a} already registered by plugin ${r.get(a)}`}),r.set(a,o.name)}for(let o of Object.keys(e.lint.rules)){r.has(o)||t.error({group:"config",label:`lint \u203A rule \u203A ${o}`,message:"Unknown rule. Is the plugin installed?"});let n=e.lint.rules[o],a="off",i;typeof n=="number"||typeof n=="string"?a=n:Array.isArray(n)?(a=n[0],i=n[1]):n!==void 0&&t.error({group:"config",label:`lint \u203A rule \u203A ${o}`,message:`Invalid eyntax. Expected \`string | number | Array\`, received ${JSON.stringify(n)}}`}),e.lint.rules[o]=[a,i],typeof a=="number"?(a!==0&&a!==1&&a!==2&&t.error({group:"config",label:`lint \u203A rule \u203A ${o}`,message:`Invalid number ${a}. Specify 0 (off), 1 (warn), or 2 (error).`}),e.lint.rules[o][0]=["off","warn","error"][a]):typeof a=="string"?a!=="off"&&a!=="warn"&&a!=="error"&&t.error({group:"config",label:`lint \u203A rule \u203A ${o}`,message:`Invalid string ${JSON.stringify(a)}. Specify "off", "warn", or "error".`}):n!==null&&t.error({group:"config",label:`lint \u203A rule \u203A ${o}`,message:`Expected string or number, received ${JSON.stringify(n)}`})}}else e.lint={build:{enabled:!0},rules:{}}}function jp({config:e,logger:t}){e.ignore||(e.ignore={}),e.ignore.tokens??=[],e.ignore.deprecated??=!1,(!Array.isArray(e.ignore.tokens)||e.ignore.tokens.some(r=>typeof r!="string"))&&t.error({group:"config",label:"ignore \u203A tokens",message:`Expected array of strings, received ${JSON.stringify(e.ignore.tokens)}`}),typeof e.ignore.deprecated!="boolean"&&t.error({group:"config",label:"ignore \u203A deprecated",message:`Expected boolean, received ${JSON.stringify(e.ignore.deprecated)}`})}var Xp=new Intl.ListFormat("en-us");async function Up({tokens:e,filename:t,config:r={},src:o,logger:n}){let{plugins:a=[],lint:i}=r,s=Object.keys(i?.rules??{});for(let u of a)if(typeof u.lint=="function"){let l=performance.now(),c=u.lint(),f=[],m=[];await Promise.all(Object.entries(c).map(async([d,g])=>{if(!(d in i.rules)||i.rules[d]===null)return;let[p,y]=i.rules[d];if(p==="off")return;await g.create({id:d,report(D){let C="";if(!D.message&&!D.messageId&&n.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:"Unable to report error: missing message or messageId"}),D.message?C=D.message:(D.messageId in(g.meta?.messages??{})||n.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:`messageId "${D.messageId}" does not exist`}),C=g.meta?.messages?.[D.messageId]??""),D.data&&typeof D.data=="object")for(let[F,v]of Object.entries(D.data)){let M=["string","number","boolean"].includes(typeof v)?String(v):JSON.stringify(v);C=C.replace(/{{[^}]+}}/g,$=>$.substring(2,$.length-2).trim()===F?M:$)}(p==="error"?f:m).push({group:"lint",label:d,message:C,filename:t,node:D.node,src:D.source?.src})},tokens:e,filename:t,src:o,options:Ln(g.meta?.defaultOptions??[],g.defaultOptions??[],y)});let b=s.indexOf(d);b!==-1&&s.splice(b,1)}));for(let d of f)n.error({...d,continueOnError:!0});for(let d of m)n.warn(d);if(n.debug({group:"lint",label:u.name,message:"Finished",timing:performance.now()-l}),f.length){let d=[jr(f.length,"error","errors")];m.length&&d.push(jr(m.length,"warning","warnings")),n.error({group:"lint",message:`Lint failed with ${Xp.format(d)}`,label:u.name,continueOnError:!1})}}for(let u of s)n.warn({group:"lint",label:"lint",message:`Unknown lint rule "${u}"`})}var Ka=48,Vp=49,S0=57,Ur=92,qp=36,ja=46,R0=34,B0=97,Wp=101,Qa=102,O0=110,P0=116,Ku=117,Qu=120,Gp=122,Xa=45,ei=10,Ua=43,ti=13,Yp=39,Xr=47,Jp=32,Zp=9,Kp=95,_0=65,Qp=69,e1=70,t1=78,r1=88,o1=90,n1=98,a1=114,i1=118,z0=8232,I0=8233,s1=73,e0=42,u1=11,l1=12,c1=160,f1=65279,d1=160,m1=8192,p1=8193,h1=8194,g1=8195,b1=8196,y1=8197,v1=8198,D1=8199,x1=8200,C1=8201,A1=8202,$1=8239,E1=8287,F1=12288,M1="[",T1="]",k1="{",w1="}",S1=":",R1=",",B1="true",O1="false",P1="null",_1="NaN",z1="Infinity",Va='"',Vr=new Map([[R0,Va],[Ur,"\\"],[Xr,"/"],[n1,"\b"],[O0,`
12
+ `],[Qa,"\f"],[a1,"\r"],[P0," "]]),on=new Map([...Vr,[i1,"\v"],[Ka,"\0"]]),I1=new Map([[Va,Va],["\\","\\"],["/","/"],["\b","b"],[`
13
+ `,"n"],["\f","f"],["\r","r"],[" ","t"]]),L1=new Map([...I1,["\v","v"],["\0","0"],["\u2028","u2028"],["\u2029","u2029"]]),rn=new Map([[M1,"LBracket"],[T1,"RBracket"],[k1,"LBrace"],[w1,"RBrace"],[S1,"Colon"],[R1,"Comma"],[B1,"Boolean"],[O1,"Boolean"],[P1,"Null"]]),tn=new Map([...rn,[_1,"Number"],[z1,"Number"]]),qa=new Set([ei,ti,z0,I0]),Lt=class extends Error{constructor(e,{line:t,column:r,offset:o}){super(`${e} (${t}:${r})`),this.line=t,this.column=r,this.offset=o}},H1=class extends Lt{constructor(e,t){super(`Unexpected character '${String.fromCharCode(e)}' found.`,t)}},N1=class extends Lt{constructor(e,t){super(`Unexpected identifier '${e}' found.`,t)}},lr=class extends Lt{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}},L0=class extends Lt{constructor(e){super("Unexpected end of input found.",e)}},j1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,X1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,U1=13,t0=10,V1=class{#n="";#u=1;#e=0;#t=-1;#i=!1;#s=-1;#r=!1;constructor(e){this.#n=e}#l(){this.#r||(this.#e++,this.#t++,this.#s=-1,this.#r=!0)}locate(){return{line:this.#u,column:this.#e,offset:this.#t}}next(){if(this.#t>=this.#n.length-1)return this.#l(),-1;this.#t++;let e=this.#n.charCodeAt(this.#t);return this.#i?(this.#u++,this.#e=1,this.#i=!1):this.#e++,e===U1?(this.#i=!0,this.peek()===t0&&this.#t++):e===t0&&(this.#i=!0),this.#s=e,e}peek(){return this.#t===this.#n.length-1?-1:this.#n.charCodeAt(this.#t+1)}match(e){return e(this.peek())?(this.next(),!0):!1}current(){return this.#s}},q1="Infinity",W1="NaN",G1=new Set([P0,Qa,O0]),Wa=new Set([Jp,Zp,ei,ti]),r0=new Set([...Wa,u1,l1,c1,z0,I0,f1,d1,m1,p1,h1,g1,b1,y1,v1,D1,x1,C1,A1,$1,E1,F1]),Y1={mode:"json",ranges:!1},J1=new Set(["true","false","null"]),j={EOF:0,Number:1,String:2,Boolean:3,Null:4,NaN:5,Infinity:6,Identifier:7,Colon:20,LBrace:21,RBrace:22,LBracket:23,RBracket:24,Comma:25,LineComment:40,BlockComment:41};function at(e){return e>=Ka&&e<=S0}function Na(e){return at(e)||e>=_0&&e<=e1||e>=B0&&e<=Qa}function Z1(e){return e>=Vp&&e<=S0}function K1(e){return G1.has(e)}function H0(e){return at(e)||e===ja||e===Xa}function Q1(e){return H0(e)||e===Ua}function o0(e,t){return e===R0||t&&e===Yp}function Ga(e){if(e===qp||e===Kp||e===Ur||e>=B0&&e<=Gp||e>=_0&&e<=o1||e===8204||e===8205)return!0;let t=String.fromCharCode(e);return j1.test(t)}function n0(e){if(Ga(e)||at(e))return!0;let t=String.fromCharCode(e);return X1.test(t)}var eh=class{#n;#u;#e;#t;#i;#s;#r;#l;#m;#p;#h;constructor(e,t){this.#u=e,this.#n={...Y1,...t},this.#e=new V1(e),this.#t=this.#n.mode==="json5",this.#i=this.#n.mode!=="json",this.#s=this.#n.ranges,this.#l=this.#t?on.has.bind(on):Vr.has.bind(Vr),this.#m=this.#t?qa.has.bind(qa):()=>!1,this.#p=this.#t?r=>r===Qu:()=>!1,this.#h=this.#t?r0.has.bind(r0):Wa.has.bind(Wa)}#o(e,t=this.#e.locate()){throw new H1(e,t)}#v(e,t=this.#e.locate()){throw new N1(e,t)}#c(){throw new L0(this.#e.locate())}#a(e,t,r,o){let n=r.offset+t,a=this.#n.ranges?{range:[r.offset,n]}:void 0;return{type:e,loc:{start:r,end:o||{line:r.line,column:r.column+t,offset:n}},...a}}#f(e){let t="",r;for(let o=0;o<e;o++){if(r=this.#e.peek(),Na(r)){this.#e.next(),t+=String.fromCharCode(r);continue}this.#o(r)}return t}#d(e){let t="";do{if(t+=String.fromCharCode(e),e===Ur){e=this.#e.next(),e!==Ku&&this.#o(e),t+=String.fromCharCode(e);let r=this.#f(4),o=parseInt(r,16);if(t.length===2&&!Ga(o)){let n=this.#e.locate();this.#o(Ur,{line:n.line,column:n.column-5,offset:n.offset-5})}else if(!n0(o)){let n=this.#e.locate();this.#o(o,{line:n.line,column:n.column-5,offset:n.offset-5})}t+=r}if(e=this.#e.peek(),!n0(e))break;this.#e.next()}while(!0);return t}#g(e){let t=e,r=1;for(e=this.#e.peek();e!==-1&&e!==t;){if(this.#e.next(),r++,e===Ur)if(e=this.#e.peek(),this.#l(e)||this.#m(e))this.#e.next(),r++;else if(e===Ku){this.#e.next(),r++;let o=this.#f(4);r+=o.length}else if(this.#p(e)){this.#e.next(),r++;let o=this.#f(2);r+=o.length}else this.#t?(this.#e.next(),r++):this.#o(e);e=this.#e.peek()}return e===-1&&(this.#e.next(),this.#c()),this.#e.next(),r++,r}#b(e){let t=1;if(e===Xa||this.#t&&e===Ua){if(e=this.#e.peek(),this.#t&&(e===s1||e===t1)){this.#e.next();let r=this.#d(e);return r!==q1&&r!==W1&&this.#o(e),t+r.length}at(e)||this.#o(e),this.#e.next(),t++}if(e===Ka)if(e=this.#e.peek(),this.#t&&(e===Qu||e===r1)){this.#e.next(),t++,e=this.#e.peek(),Na(e)||(this.#e.next(),this.#o(e));do this.#e.next(),t++,e=this.#e.peek();while(Na(e))}else at(e)&&this.#o(e);else if(!this.#t||e!==ja)for(Z1(e)||this.#o(e),e=this.#e.peek();at(e);)this.#e.next(),t++,e=this.#e.peek();if(e===ja){let r=-1;for(this.#e.next(),t++,r++,e=this.#e.peek();at(e);)this.#e.next(),t++,r++,e=this.#e.peek();!this.#t&&r===0&&(this.#e.next(),e?this.#o(e):this.#c())}if(e===Wp||e===Qp)for(this.#e.next(),t++,e=this.#e.peek(),(e===Ua||e===Xa)&&(this.#e.next(),t++,e=this.#e.peek()),e===-1&&(this.#e.next(),this.#c()),at(e)||(this.#e.next(),this.#o(e));at(e);)this.#e.next(),t++,e=this.#e.peek();return t}#y(e){let t=1;if(e=this.#e.peek(),e===Xr){do this.#e.next(),t+=1,e=this.#e.peek();while(e>-1&&e!==ti&&e!==ei);return{length:t,multiline:!1}}if(e===e0){for(this.#e.next(),t+=1;e>-1;)if(e=this.#e.peek(),e===e0){if(this.#e.next(),t+=1,e=this.#e.peek(),e===Xr)return this.#e.next(),t+=1,{length:t,multiline:!0}}else this.#e.next(),t+=1;this.#e.next(),this.#c()}this.#e.next(),this.#o(e)}next(){let e=this.#e.next();for(;this.#h(e);)e=this.#e.next();if(e===-1)return j.EOF;let t=this.#e.locate(),r=String.fromCharCode(e);if(this.#t)if(tn.has(r))this.#r=this.#a(tn.get(r),1,t);else if(Ga(e)){let o=this.#d(e);tn.has(o)?this.#r=this.#a(tn.get(o),o.length,t):this.#r=this.#a("Identifier",o.length,t)}else if(Q1(e)){let o=this.#b(e);this.#r=this.#a("Number",o,t)}else if(o0(e,this.#t)){let o=this.#g(e),n=this.#e.locate();this.#r=this.#a("String",o,t,{line:n.line,column:n.column+1,offset:n.offset+1})}else if(e===Xr&&this.#i){let o=this.#y(e),n=this.#e.locate();this.#r=this.#a(o.multiline?"BlockComment":"LineComment",o.length,t,{line:n.line,column:n.column+1,offset:n.offset+1})}else this.#o(e);else if(rn.has(r))this.#r=this.#a(rn.get(r),1,t);else if(K1(e)){let o=this.#d(e);J1.has(o)||this.#v(o,t),this.#r=this.#a(rn.get(o),o.length,t)}else if(H0(e)){let o=this.#b(e);this.#r=this.#a("Number",o,t)}else if(o0(e,this.#t)){let o=this.#g(e);this.#r=this.#a("String",o,t)}else if(e===Xr&&this.#i){let o=this.#y(e),n=this.#e.locate();this.#r=this.#a(o.multiline?"BlockComment":"LineComment",o.length,t,{line:n.line,column:n.column+1,offset:n.offset+1})}else this.#o(e);return j[this.#r.type]}get token(){return this.#r}},Be={document(e,t={}){return{type:"Document",body:e,loc:t.loc,...t}},string(e,t={}){return{type:"String",value:e,loc:t.loc,...t}},number(e,t={}){return{type:"Number",value:e,loc:t.loc,...t}},boolean(e,t={}){return{type:"Boolean",value:e,loc:t.loc,...t}},null(e={}){return{type:"Null",loc:e.loc,...e}},array(e,t={}){return{type:"Array",elements:e,loc:t.loc,...t}},element(e,t={}){return{type:"Element",value:e,loc:t.loc,...t}},object(e,t={}){return{type:"Object",members:e,loc:t.loc,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,loc:r.loc,...r}},identifier(e,t={}){return{type:"Identifier",name:e,loc:t.loc,...t}},nan(e="",t={}){return{type:"NaN",sign:e,loc:t.loc,...t}},infinity(e="",t={}){return{type:"Infinity",sign:e,loc:t.loc,...t}}},th={mode:"json",ranges:!1,tokens:!1,allowTrailingCommas:!1},rh=/\\u[\da-fA-F]{4}/gu;function oh(e){return e.replace(rh,t=>String.fromCharCode(parseInt(t.slice(2),16)))}function nh(e){let t=1,r=1;for(let o=0;o<e.length;o++){let n=e[o];n===`
14
+ `?(t++,r=1):n==="\r"?(e[o+1]===`
15
+ `&&o++,t++,r=1):r++}return{line:t,column:r,offset:e.length}}function ah(e,t,r=!1){let o="",n=e.indexOf("\\"),a=0;for(;n>=0;){o+=e.slice(a,n);let i=e.charAt(n+1),s=i.charCodeAt(0);if(r&&on.has(s))o+=on.get(s),a=n+2;else if(Vr.has(s))o+=Vr.get(s),a=n+2;else if(i==="u"){let u=e.slice(n+2,n+6);if(u.length<4||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid unicode escape \\u${u}.`,{line:t.loc.start.line,column:t.loc.start.column+n,offset:t.loc.start.offset+n});o+=String.fromCharCode(parseInt(u,16)),a=n+6}else if(r&&i==="x"){let u=e.slice(n+2,n+4);if(u.length<2||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid hex escape \\x${u}.`,{line:t.loc.start.line,column:t.loc.start.column+n,offset:t.loc.start.offset+n});o+=String.fromCharCode(parseInt(u,16)),a=n+4}else if(r&&qa.has(s))a=n+2,i==="\r"&&e.charAt(a)===`
16
+ `&&a++;else if(r)o+=i,a=n+2;else throw new Lt(`Invalid escape \\${i}.`,{line:t.loc.start.line,column:t.loc.start.column+n,offset:t.loc.start.offset+n});n=e.indexOf("\\",a)}return o+=e.slice(a),o}function ih(e,t,r=!1){switch(t.type){case"Boolean":return e==="true";case"Number":if(r){if(e.charCodeAt(0)===45)return-Number(e.slice(1));if(e.charCodeAt(0)===43)return Number(e.slice(1))}return Number(e);case"String":return ah(e.slice(1,-1),t,r);default:throw new TypeError(`Unknown token type "${t.type}.`)}}function sh(e,t){t=Object.freeze({...th,...t});let r=[],o=new eh(e,{mode:t.mode,ranges:t.ranges}),n=t.mode==="json5",a=t.allowTrailingCommas||n;function i(){let v=o.next();return v&&t.tokens&&r.push(o.token),v}function s(){let v=o.next();return v&&t.tokens&&r.push(o.token),v>=j.LineComment?s():v}let u=t.mode==="json"?i:s;function l(v,M){if(v!==M)throw new lr(o.token)}function c(v,M){if(!M.includes(v))throw new lr(o.token)}function f(v,M){return t.ranges?{range:[v.offset,M.offset]}:void 0}function m(v){let M=o.token,$=f(M.loc.start,M.loc.end),k=ih(e.slice(M.loc.start.offset,M.loc.end.offset),M,n),R={loc:{start:{...M.loc.start},end:{...M.loc.end}},...$};switch(v){case j.String:return Be.string(k,R);case j.Number:return Be.number(k,R);case j.Boolean:return Be.boolean(k,R);default:throw new TypeError(`Unknown token type ${M.type}.`)}}function d(v){let M=f(v.loc.start,v.loc.end),$=e.slice(v.loc.start.offset,v.loc.end.offset),k={loc:{start:{...v.loc.start},end:{...v.loc.end}},...M};if(v.type!=="Identifier"){let R="";return($[0]==="+"||$[0]==="-")&&(R=$[0]),Be[$.includes("NaN")?"nan":"infinity"](R,k)}return Be.identifier(oh($),k)}function g(v){let M=f(v.loc.start,v.loc.end);return Be.null({loc:{start:{...v.loc.start},end:{...v.loc.end}},...M})}function p(v){n?c(v,[j.String,j.Identifier,j.Number]):l(v,j.String);let M=o.token;if(n&&v===j.Number&&/[+\-0-9]/.test(e[M.loc.start.offset]))throw new lr(M);let $=v===j.String?m(v):d(M);if(n&&($.type==="NaN"||$.type==="Infinity")){if($.sign!=="")throw new lr(o.token);$=Be.identifier($.type,{loc:$.loc,...f($.loc.start,$.loc.end)})}v=u(),l(v,j.Colon);let k=D(),R=f($.loc.start,k.loc.end);return Be.member($,k,{loc:{start:{...$.loc.start},end:{...k.loc.end}},...R})}function y(v){l(v,j.LBrace);let M=o.token,$=[],k=u();if(k!==j.RBrace)do{if($.push(p(k)),k=u(),!k)throw new L0($[$.length-1].loc.end);if(k===j.Comma){if(k=u(),a&&k===j.RBrace)break}else break}while(k);l(k,j.RBrace);let R=o.token,I=f(M.loc.start,R.loc.end);return Be.object($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function b(v){l(v,j.LBracket);let M=o.token,$=[],k=u();if(k!==j.RBracket)do{let X=D(k);if($.push(Be.element(X,{loc:X.loc})),k=u(),k===j.Comma){if(k=u(),a&&k===j.RBracket)break}else break}while(k);l(k,j.RBracket);let R=o.token,I=f(M.loc.start,R.loc.end);return Be.array($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function D(v){v=v??u();let M=o.token;switch(v){case j.String:case j.Boolean:return m(v);case j.Number:if(n){let $=e.slice(M.loc.start.offset,M.loc.end.offset);if(($[0]==="+"||$[0]==="-")&&($=$.slice(1)),$==="NaN"||$==="Infinity")return d(M)}return m(v);case j.Null:return g(M);case j.LBrace:return y(v);case j.LBracket:return b(v);default:throw new lr(M)}}let C=D();if(u())throw new lr(o.token);let F={loc:{start:{line:1,column:1,offset:0},end:{...nh(e)}}};return t.tokens&&(F.tokens=r),t.ranges&&(F.range=[F.loc.start.offset,F.loc.end.offset]),Be.document(C,F)}function He(e){switch(e.type){case"String":return e.value;case"Number":return e.value;case"Boolean":return e.value;case"Null":return null;case"NaN":return NaN;case"Infinity":return e.sign==="-"?-1/0:1/0;case"Identifier":return e.name;case"Array":return e.elements.map(t=>He(t.value));case"Object":{let t={};return e.members.forEach(r=>{t[He(r.name)]=He(r.value)}),t}case"Document":return He(e.body);case"Element":throw new Error("Cannot evaluate array element outside of an array.");case"Member":throw new Error("Cannot evaluate object member outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}function uh(e){return e.value?"true":"false"}function lh(){return"null"}function ch(e){return e.value.toString()}function fh(){return"NaN"}function dh(e){return e.sign+"Infinity"}function mh(e){let t='"';for(let r of e.value){let o=L1.get(r);if(o){t+="\\"+o;continue}if(r==='"'){t+='\\"';continue}if(r<" "||r==="\x7F"){let n=r.codePointAt(0).toString(16).toUpperCase();t+=`\\u${"0000".substring(n.length)}${n}`;continue}t+=r}return t+'"'}function ph(e){return e.name}function hh(e,t,r){let o=t?`
17
+ `:"",n=t.repeat(r),a=t.repeat(r+1);return`[${o}${e.elements.map(i=>`${a}${qr(i.value,t,r+1)}`).join(`,${o}`)}${o}${n}]`}function gh(e,t,r){let o=t?" ":"";return`${qr(e.name,t,r)}:${o}${qr(e.value,t,r+1)}`}function bh(e,t,r){let o=t?`
18
+ `:"",n=t.repeat(r),a=t.repeat(r+1);return`{${o}${e.members.map(i=>`${a}${gh(i,t,r)}`).join(`,${o}`)}${o}${n}}`}function qr(e,t,r){switch(e.type){case"String":return mh(e);case"Number":return ch(e);case"Boolean":return uh(e);case"Null":return lh();case"NaN":return fh();case"Infinity":return dh(e);case"Identifier":return ph(e);case"Array":return hh(e,t,r);case"Object":return bh(e,t,r);case"Document":return qr(e.body,t,r);default:throw new TypeError(`Unknown node type: ${e.type}`)}}function de(e,{indent:t=0}={}){return qr(e," ".repeat(t),0)}var yh={Document:["body"],Object:["members"],Member:["name","value"],Element:["value"],Array:["elements"],String:[],Number:[],Boolean:[],Null:[],Identifier:[],NaN:[],Infinity:[]};function vh(e){return!!e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}function J(e){let t={};if(e.type!=="Object")return t;for(let r=0;r<e.members.length;r++){let o=e.members[r];o.name.type==="String"&&(t[o.name.value]={...o.value,index:r})}return t}function a0(e,t=[]){e.type==="Object"&&e.members.push(...t)}function Dh(e,t){e.members=t.type==="Document"&&t.body?.members||t.members}function xh(e,t){function r(o,n,a=[]){let i=[...a];if(o.type==="Member"){let{name:u}=o;i.push("value"in u?u.value:String(u))}t.enter?.(o,n,i);let s=yh[o.type];for(let u of s??[]){let l=o[u];if(l)if(Array.isArray(l))for(let c=0;c<l.length;c++)r(l[c],o,u==="elements"?[...i,String(c)]:i);else vh(l)&&r(l,o,i)}t.exit?.(o,n,i)}r(e,void 0,[])}function Ch(e){return typeof e=="string"&&e.trim().startsWith("{")}function i0(e,{continueOnError:t,filename:r,logger:o,yamlToMomoa:n}){let a="";typeof e=="string"&&(a=e);let i={};if(typeof e=="string"&&!Ch(e))if(n)try{i=n(e)}catch(s){o.error({group:"parser",label:"json",message:String(s),filename:r,src:e,continueOnError:t})}else o.error({group:"parser",label:"yaml",message:`Install \`yaml-to-momoa\` package to parse YAML, and pass in as option, e.g.:
19
19
 
20
20
  import { parse } from '@terrazzo/parser';
21
21
  import yamlToMomoa from 'yaml-to-momoa';
22
22
 
23
- parse(yamlString, { yamlToMomoa });`,continueOnError:!1});else i=Wa(e);return a||(a=de(i,{indent:2})),{src:a,document:i}}function Wa(e,t){return Y1(typeof e=="string"?e:JSON.stringify(e,void 0,2),{mode:"jsonc",ranges:!0,tokens:!0,...t})}function dh(e,t){if(e.mode["."]??={},e.mode["."].$value=e.$value,e.mode["."].originalValue??=e.originalValue.$value,e.mode["."].source??=e.source,typeof e.$value=="string"&&Te(e.$value)){let{aliasChain:r,resolvedToken:n}=xt(e.$value,{...t,token:e});e.aliasOf=n.id,e.aliasChain=r,e.$value=n.$value}for(let r of Object.keys(e.mode)){let n=e.mode[r].$value;if(typeof n=="string"&&Te(n)){let a=[e.$type],{aliasChain:i,resolvedToken:s}=xt(n,{...t,token:e,expectedType:a,node:e.mode[r].source?.node||t.node});e.mode[r].aliasOf=s.id,e.mode[r].aliasChain=i,e.mode[r].$value=s.$value;continue}if(typeof e.$value=="object"&&typeof e.mode[r].$value=="object"&&!Array.isArray(e.$value))for(let[a,i]of Object.entries(e.$value))a in e.mode[r].$value||(e.mode[r].$value[a]=i);let o=Y(t.node).$value||t.node;switch(e.$type){case"border":ph(e,r,{...t,node:o});break;case"gradient":hh(e,r,{...t,node:o});break;case"shadow":gh(e,r,{...t,node:o});break;case"strokeStyle":bh(e,r,{...t,node:o});break;case"transition":yh(e,r,{...t,node:o});break;case"typography":vh(e,r,{...t,node:o});break}}}var mh=new Intl.ListFormat("en-us",{type:"disjunction"});function xt(e,t){let r={group:"parser",label:"alias",node:t?.node,filename:t.filename,src:t.src},{logger:n,token:o,tokensSet:a}=t,{token:i,chain:s}=L0(ke(e),t);a[o.id].$type||(a[o.id].$type=i.$type);let u=[...t.expectedType??[]];if(o.$type&&!u?.length&&u.push(o.$type),u?.length&&!u.includes(i.$type)&&n.error({...r,message:`Invalid alias: expected $type: ${mh.format(u)}, received $type: ${i.$type}.`,node:t.node?.type==="Object"&&Y(t.node).$value||r.node}),s?.length&&i){let l=!1;for(let c of s)c!==i.id&&!i.aliasedBy?.includes(c)&&(i.aliasedBy??=[],i.aliasedBy.push(c),l=!0),o&&!i.aliasedBy?.includes(o.id)&&(i.aliasedBy??=[],i.aliasedBy.push(o.id),l=!0);l&&i.aliasedBy.sort((c,f)=>c.localeCompare(f,"en-us",{numeric:!0}))}return{resolvedToken:i,aliasChain:s}}function L0(e,{scanned:t=[],...r}){let{logger:n,filename:o,src:a,node:i,tokensSet:s}=r,u={group:"parser",label:"alias",filename:o,src:a,node:i},l=ke(e);s[l]||n.error({...u,message:`Alias {${e}} not found.`}),t.includes(l)&&n.error({...u,message:`Circular alias detected from ${e}.`});let c=s[l];return t.push(l),typeof c.originalValue.$value!="string"||!Te(c.originalValue.$value)?{token:c,chain:t}:L0(c.originalValue.$value,{...r,scanned:t})}function ph(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a=Y(r.node)[n]||r.node,{resolvedToken:i}=xt(o,{...r,token:e,expectedType:{color:["color"],width:["dimension"],style:["strokeStyle"]}[n],node:a});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=i.$value}}function hh(e,t,r){for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={color:["color"],position:["number"]}[a],u=r.node?.elements?.[n]?.value||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=ke(i)),o[a]=l.$value}}}function gh(e,t,r){Array.isArray(e.mode[t].$value)||(e.mode[t].$value=[e.mode[t].$value]);for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={offsetX:["dimension"],offsetY:["dimension"],blur:["dimension"],spread:["dimension"],color:["color"],inset:["boolean"]}[a],u=r.node?.elements?.[n]||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=ke(i)),o[a]=l.$value}}}function bh(e,t,r){if(!(typeof e.mode[t].$value!="object"||!("dashArray"in e.mode[t].$value)))for(let n=0;n<e.mode[t].$value.dashArray.length;n++){let o=e.mode[t].$value.dashArray[n];if(typeof o=="string"&&Te(o)){let a=Y(r.node).dashArray||r.node;a.type==="Array"&&(a=a?.elements?.[n]?.value||a);let{resolvedToken:i}=xt(o,{...r,token:e,expectedType:["dimension"],node:a});e.mode[t].$value.dashArray[n]=i.$value}}}function yh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a={duration:["duration"],delay:["duration"],timingFunction:["cubicBezier"]}[n],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=s.$value}}function vh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.partialAliasOf??={},e.mode[t].partialAliasOf??={};let a={fontFamily:["fontFamily"],fontSize:["dimension"],fontWeight:["fontWeight"],letterSpacing:["dimension"],lineHeight:["dimension","number"]}[n]||["string"],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=s.$value}}var a0={thin:100,hairline:100,"extra-light":200,"ultra-light":200,light:300,normal:400,regular:400,book:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,black:900,heavy:900,"extra-black":950,"ultra-black":950},i0=/(-?\d*\.?\d+)(.*)/;function ne(e){if(typeof e.$value=="string"&&Te(e.$value))return e.$value;switch(e.$type){case"boolean":return!!e.$value;case"border":return typeof e.$value=="string"?e.$value:{color:ne({$type:"color",$value:e.$value.color??"#000000"}),style:ne({$type:"strokeStyle",$value:e.$value.style??"solid"}),width:ne({$type:"dimension",$value:e.$value.width})};case"color":{if(typeof e.$value=="string")return za(e.$value);let t={colorSpace:e.$value.colorSpace,components:e.$value.components??e.$value.channels,alpha:e.$value.alpha??1};return"hex"in e.$value&&(t.hex=e.$value.hex),t}case"cubicBezier":return typeof e.$value=="string"?e.$value:e.$value.map(t=>typeof t=="number"?ne({$type:"number",$value:t}):t);case"dimension":if(e.$value===0)return{value:0,unit:"px"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"px"}}return e.$value;case"duration":if(e.$value===0)return{value:0,unit:"ms"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"ms"}}return e.$value;case"fontFamily":return Array.isArray(e.$value)?e.$value:[e.$value];case"fontWeight":return typeof e.$value=="string"&&a0[e.$value]?a0[e.$value]:Math.min(999,Math.max(1,typeof e.$value=="string"?Number.parseInt(e.$value):e.$value));case"gradient":{if(typeof e.$value=="string")return e.$value;let t=[];for(let r=0;r<e.$value.length;r++){let n=structuredClone(e.$value[r]);n.color=ne({$type:"color",$value:n.color}),n.position===void 0&&(n.position=r/(e.$value.length-1)),t.push(n)}return t}case"number":return typeof e.$value=="number"?e.$value:Number.parseFloat(e.$value);case"shadow":return typeof e.$value=="string"?e.$value:(Array.isArray(e.$value)?e.$value:[e.$value]).map(t=>({color:ne({$type:"color",$value:t.color}),offsetX:ne({$type:"dimension",$value:t.offsetX??{value:0,unit:"px"}}),offsetY:ne({$type:"dimension",$value:t.offsetY??{value:0,unit:"px"}}),blur:ne({$type:"dimension",$value:t.blur??{value:0,unit:"px"}}),spread:ne({$type:"dimension",$value:t.spread??{value:0,unit:"px"}}),inset:t.inset===!0}));case"strokeStyle":return e.$value;case"string":return String(e.$value);case"transition":return typeof e.$value=="string"?e.$value:{duration:ne({$type:"duration",$value:e.$value.duration??0}),delay:ne({$type:"duration",$value:e.$value.delay??0}),timingFunction:ne({$type:"cubicBezier",$value:e.$value.timingFunction})};case"typography":{if(typeof e.$value=="string")return e.$value;let t={};for(let[r,n]of Object.entries(e.$value))switch(r){case"fontFamily":t[r]=ne({$type:"fontFamily",$value:n});break;case"fontSize":case"letterSpacing":t[r]=ne({$type:"dimension",$value:n});break;case"lineHeight":t[r]=ne({$type:typeof e.$value=="number"?"number":"dimension",$value:n});break;default:t[r]=n;break}return t}default:return e.$value}}var Ga=new Intl.ListFormat("en-us",{type:"disjunction"}),Dh=new Set(["adobe-rgb","display-p3","hsl","hwb","lab","lch","oklab","oklch","prophoto","rec2020","srgb","srgb-linear","xyz","xyz-d50","xyz-d65"]),s0=new Set(["thin","hairline","extra-light","ultra-light","light","normal","regular","book","medium","semi-bold","demi-bold","bold","extra-bold","ultra-bold","black","heavy","extra-black","ultra-black"]),u0=new Set(["solid","dashed","dotted","double","groove","ridge","outset","inset"]),l0=new Set(["round","butt","square"]);function ei(e){return e?.type==="String"?e.value.startsWith("{"):!1}function cr(e,t,r,{filename:n,src:o,logger:a}){let i=Y(e);for(let[s,u]of Object.entries(t)){let{validator:l,required:c}=u;if(!i[s]){c&&a.error({group:"parser",label:"validate",message:`Missing required property "${s}"`,filename:n,node:e,src:o});continue}let f=i[s];ei(f)?ti(f,r,{filename:n,src:o,logger:a}):l(f,r,{filename:n,src:o,logger:a})}}function ti(e,t,{filename:r,src:n,logger:o}){(e.type!=="String"||!Te(e.value))&&o.error({group:"parser",label:"validate",message:`Invalid alias: ${de(e)}`,filename:r,node:e,src:n})}function xh(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},style:{validator:N0,required:!0},width:{validator:Dt,required:!0}},t,{filename:r,src:n,logger:o})}function nn(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")e.value===""&&o.error({...a,message:"Expected color, received empty string"});else if(e.type==="Object"){let i=e.members.findIndex(s=>s.name.type==="String"&&s.name.value==="channels");i!==-1&&(o.warn({...a,message:'"channels" is deprecated; rename "channels" to "components"'}),e.members[i].name.value="components"),cr(e,{colorSpace:{validator:s=>{s.type!=="String"&&o.error({...a,message:`Expected string, received ${de(s)}`,node:s}),Dh.has(s.value)||o.error({...a,message:`Unsupported colorspace ${de(s)}`,node:s})},required:!0},components:{validator:s=>{if(s.type!=="Array")o.error({...a,message:`Expected array, received ${de(s)}`,node:s});else{s.elements?.length!==3&&o.error({...a,message:`Expected 3 components, received ${s.elements?.length??0}`,node:s});for(let u of s.elements)u.value.type!=="Number"&&o.error({...a,message:`Expected number, received ${de(u.value)}`,node:u})}},required:!0},hex:{validator:s=>{(s.type!=="String"||s.value.length===6||s.value.length===8||!/^#[a-f0-9]{3,8}$/i.test(s.value))&&o.error({...a,message:`Invalid hex color ${de(s)}`,node:s})}},alpha:{validator:ri}},t,{filename:r,src:n,logger:o})}else o.error({...a,message:`Expected object, received ${e.type}`,node:e})}function H0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="Array"?o.error({...a,message:`Expected array of numbers, received ${de(e)}`}):e.elements.every(i=>i.value.type==="Number")?e.elements.length!==4&&o.error({...a,message:`Expected an array of 4 numbers, received ${e.elements.length}`}):o.error({...a,message:"Expected an array of 4 numbers, received some non-numbers"})}function Dt(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u.type!=="Number"&&o.error({...a,message:`Expected number, received ${u.type}`,node:u}),["px","em","rem"].includes(l.value)||o.error({...a,message:`Expected unit "px", "em", or "rem", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected dimension, received empty string"}):["px","em","rem"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected dimension with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "px", "em", or "rem", received ${JSON.stringify(s||e.value)}`})}function Ja(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u?.type!=="Number"&&o.error({...a,message:`Expected number, received ${u?.type}`,node:u}),["ms","s"].includes(l.value)||o.error({...a,message:`Expected unit "ms" or "s", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected duration, received empty string"}):["ms","s"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected duration with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "ms" or "s", received ${JSON.stringify(s||e.value)}`})}function c0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Array"&&o.error({...a,message:`Expected string or array of strings, received ${e.type}`}),e.type==="String"&&e.value===""&&o.error({...a,message:"Expected font family name, received empty string"}),e.type==="Array"&&!e.elements.every(i=>i.value.type==="String"&&i.value.value!=="")&&o.error({...a,message:"Expected an array of strings, received some non-strings or empty strings"})}function f0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Number"&&o.error({...a,message:`Expected a font weight name or number 0\u20131000, received ${e.type}`}),e.type==="String"&&!s0.has(e.value)&&o.error({...a,message:`Unknown font weight ${de(e)}. Expected one of: ${Ga.format([...s0])}.`}),e.type==="Number"&&(e.value<0||e.value>1e3)&&o.error({...a,message:`Expected number 0\u20131000, received ${de(e)}`})}function Ch(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type!=="Array")o.error({...a,message:`Expected array of gradient stops, received ${e.type}`});else for(let i=0;i<e.elements.length;i++){let s=e.elements[i];if(s.value.type!=="Object"){o.error({...a,message:`Stop #${i+1}: Expected gradient stop, received ${s.value.type}`,node:s});break}cr(s.value,{color:{validator:nn,required:!0},position:{validator:ri,required:!0}},s,{filename:r,src:n,logger:o})}}function ri(e,t,{filename:r,src:n,logger:o}){e.type!=="Number"&&o.error({group:"parser",label:"validate",message:`Expected number, received ${e.type}`,filename:r,node:e,src:n})}function Ah(e,t,{filename:r,src:n,logger:o}){e.type!=="Boolean"&&o.error({group:"parser",label:"validate",message:`Expected boolean, received ${e.type}`,filename:r,node:e,src:n})}function d0(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected Object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},offsetX:{validator:Dt,required:!0},offsetY:{validator:Dt,required:!0},blur:{validator:Dt},spread:{validator:Dt},inset:{validator:Ah}},t,{filename:r,src:n,logger:o})}function N0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")u0.has(e.value)||o.error({...a,message:`Unknown stroke style ${de(e)}. Expected one of: ${Ga.format([...u0])}.`});else if(e.type==="Object"){let i=Y(e);for(let l of["dashArray","lineCap"])i[l]||o.error({...a,message:`Missing required property "${l}"`});let{lineCap:s,dashArray:u}=i;if((s?.type!=="String"||!l0.has(s.value))&&o.error({...a,message:`Unknown lineCap value ${de(s)}. Expected one of: ${Ga.format([...l0])}.`,node:t}),u?.type==="Array")for(let l of u.elements)l.value.type==="String"&&l.value.value!==""?ei(l.value)?ti(l.value,t,{logger:o,src:n}):Dt(l.value,t,{logger:o,src:n}):l.value.type==="Object"?Dt(l.value,t,{logger:o,src:n}):o.error({...a,message:`Expected array of dimensions, received ${l.value.type}.`,node:l});else o.error({...a,message:`Expected array of strings, received ${u.type}`})}else o.error({...a,message:`Expected string or object, received ${e.type}`})}function $h(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{duration:{validator:Ja,required:!0},delay:{validator:Ja,required:!1},timingFunction:{validator:H0,required:!0}},t,{filename:r,src:n,logger:o})}function Eh(e,{filename:t,src:r,logger:n}){let o={group:"parser",label:"validate",filename:t,node:e,src:r};e.type!=="Member"&&e.type!=="Object"&&n.error({...o,message:`Expected Object, received ${JSON.stringify(e.type)}`});let a=e.value.type==="Object"?Y(e.value):{},i=a.$value,s=a.$type;if(i||n.error({...o,message:"Token missing $value"}),ei(i)){ti(i,e,{logger:n,src:r});return}switch(s||n.error({...o,message:"Token missing $type"}),s.value){case"color":nn(i,e,{logger:n,src:r});break;case"cubicBezier":H0(i,e,{logger:n,src:r});break;case"dimension":Dt(i,e,{logger:n,src:r});break;case"duration":Ja(i,e,{logger:n,src:r});break;case"fontFamily":c0(i,e,{logger:n,src:r});break;case"fontWeight":f0(i,e,{logger:n,src:r});break;case"number":ri(i,e,{logger:n,src:r});break;case"shadow":if(i.type==="Object")d0(i,e,{logger:n,src:r});else if(i.type==="Array")for(let u of i.elements)d0(u.value,i,{logger:n,src:r});else n.error({...o,message:`Expected shadow object or array of shadow objects, received ${i.type}`,node:i});break;case"boolean":i.type!=="Boolean"&&n.error({...o,message:`Expected boolean, received ${i.type}`,node:i});break;case"link":i.type!=="String"?n.error({...o,message:`Expected string, received ${i.type}`,node:i}):i.value===""&&n.error({...o,message:"Expected URL, received empty string",node:i});break;case"string":i.type!=="String"&&n.error({...o,message:`Expected string, received ${i.type}`,node:i});break;case"border":xh(i,e,{filename:t,src:r,logger:n});break;case"gradient":Ch(i,e,{filename:t,src:r,logger:n});break;case"strokeStyle":N0(i,e,{filename:t,src:r,logger:n});break;case"transition":$h(i,e,{filename:t,src:r,logger:n});break;case"typography":if(i.type!=="Object"){n.error({...o,message:`Expected object, received ${i.type}`,node:i});break}i.members.length===0&&n.error({...o,message:"Empty typography token. Must contain at least 1 property.",node:i}),cr(i,{fontFamily:{validator:c0},fontWeight:{validator:f0}},e,{filename:t,src:r,logger:n});break;default:break}}function j0(e){return e.type!=="Object"?!1:!e.members.some(t=>t.name.type==="String"&&t.name.value==="$value")}function m0(e,t,{subpath:r,inherited:n}){if(e.value.type!=="Object")return;let o=e.value.members.find(u=>u.name.type==="String"&&u.name.value===t);if(n&&o&&j0(e.value))return n[r.join(".")||"."]=o,o;let a=r.join("."),i,s="";for(let[u,l]of Object.entries(n??{}))(u==="."||a.startsWith(u))&&u.length>s.length&&(i=l,s=u);return i}function Fh(e,{config:t,filename:r,logger:n,parent:o,inheritedDeprecatedNode:a,inheritedTypeNode:i,src:s,subpath:u}){if(u.includes("$value")||e.value.type!=="Object")return;let l=Y(e.value);if(!l.$value||u.includes("$extensions")||u.includes("$deps"))return;let c=u.join(".");!u.includes(".$value")&&l.value&&n.warn({group:"parser",label:"validate",message:`Group ${c} has "value". Did you mean "$value"?`,filename:r,node:e,src:s});let f=structuredClone(e),m=l.$type?.type==="String"&&l.$type.value||void 0;i&&!l.$type&&(o0(f.value,[i]),m=i.value.value);let d=l.$deprecated?(l.$deprecated?.type==="String",l.$deprecated.value):void 0;if(a&&!l.$deprecated&&(o0(f.value,[a]),d=(a.value.type==="String",a.value.value)),Eh(f,{filename:r,src:s,logger:n}),t.ignore.deprecated&&d||t.ignore.tokens&&ye(t.ignore.tokens)(c))return;let g={id:Zo(c).group,tokens:[]};i&&i.value.type==="String"&&(g.$type=i.value.value);let p=Y(o);p.$description&&(g.$description=He(p.$description)),p.$extensions&&(g.$extensions=He(p.$extensions));let y=He(l.$value),b={$type:m,$value:y,$deprecated:d,id:c,mode:{},originalValue:He(e.value),group:g,source:{loc:r?.href,node:f.value}};l.$description?.type==="String"&&l.$description.value&&(b.$description=l.$description.value);let D=l.$extensions?Y(l.$extensions):void 0,C=D?.mode?Y(D.mode):{};for(let F of[".",...Object.keys(C)]){let v=F==="."?b.$value:He(C[F]);b.mode[F]={$value:v,originalValue:v,source:{loc:r?.href,node:C[F]}}}return b}async function X0(e,{logger:t=new Wr,skipLint:r=!1,config:n={},continueOnError:o=!1,yamlToMomoa:a,transform:i,_sources:s={}}={}){let u=Array.isArray(e)?e:[e],l={};Array.isArray(u)||t.error({group:"parser",label:"init",message:"Input must be an array of input objects."}),await Promise.all(u.map(async(d,g)=>{if((!d||typeof d!="object")&&t.error({group:"parser",label:"init",message:`Input (${g}) must be an object.`}),(!d.src||typeof d.src!="string"&&typeof d.src!="object")&&t.error({message:`Input (${g}) missing "src" with a JSON/YAML string, or JSON object.`,group:"parser",label:"init"}),d.filename&&(d.filename instanceof URL||t.error({message:`Input (${g}) "filename" must be a URL (remote or file URL).`,group:"parser",label:"init"}),s[d.filename.href]))return;let p=await Mh(d.src,{filename:d.filename,logger:t,config:n,skipLint:r,continueOnError:o,yamlToMomoa:a,transform:i});l=Object.assign(l,p.tokens),d.filename&&(s[d.filename.href]={filename:d.filename,src:p.src,document:p.document})}));let c=performance.now(),f=performance.now(),m=0;for(let[d,g]of Object.entries(l)){dh(g,{tokensSet:l,filename:s[g.source.loc]?.filename,src:s[g.source.loc]?.src,node:Y(g.source.node).$value||g.source.node,logger:t}),m++;let{group:p}=Zo(d);if(p)for(let y of Object.keys(l)){let{group:b}=Zo(y);b?.startsWith(p)&&g.group.tokens.push(y)}}if(t.debug({message:`Resolved ${m} aliases`,group:"parser",label:"alias",timing:performance.now()-f}),t.debug({message:"Finish all parser tasks",group:"parser",label:"core",timing:performance.now()-c}),o){let{errorCount:d}=t.stats();d>0&&t.error({group:"parser",message:`Parser encountered ${d} ${jr(d,"error","errors")}. Exiting.`})}return{tokens:l,sources:Object.values(s)}}async function Mh(e,{filename:t,logger:r,config:n,skipLint:o,continueOnError:a=!1,transform:i,yamlToMomoa:s}){let u=performance.now(),{src:l,document:c}=n0(e,{filename:t,logger:r,continueOnError:a,yamlToMomoa:s});r.debug({group:"parser",label:"json",message:"Finish JSON parsing",timing:performance.now()-u});let f={};if(i?.root){let b=typeof e=="string"?JSON.parse(e):e,D=i?.root(b,".",c);if(D){let C=n0(D,{filename:t,logger:r,continueOnError:a});l=C.src,c=C.document}}let m=0,d=performance.now(),g={},p={};ch(c,{enter(b,D,C){if(b.type==="Document"&&b.body.type==="Object"&&b.body.members){let{members:F}=b.body;if(j0(b.body)){let v=F.find($=>$.name.type==="String"&&$.name.value==="$type");v&&(g["."]=v);let M=F.find($=>$.name.type==="String"&&$.name.value==="$deprecated");M&&(p["."]=M)}}if(b.type==="Object"&&C.length&&!b.members.some(F=>F.name.type==="String"&&F.name.value==="$value")&&!C.includes("$value")&&!C.includes("$extensions")&&i?.group){let F=i?.group(He(b),C.join("."),b);F&&lh(b,Wa(F))}if(b.type==="Member"){let F=m0(b,"$deprecated",{subpath:C,inherited:p}),v=m0(b,"$type",{subpath:C,inherited:g});if(b.value.type==="Object"){let M=b.value.members.find(R=>R.name.type==="String"&&R.name.value==="$value"),$=v;if(!$){let R=b.value.members.find(I=>I.name.type==="String"&&I.name.value==="$type");R&&($=R)}if(M&&$?.value.type==="String"&&i?.[$.value.value]){let R=i[$.value.value]?.(He(b.value),C.join("."),b);R&&(b.value=Wa(R).body)}let k=Fh(b,{filename:t,src:l,config:n,logger:r,parent:D,subpath:C,transform:i,inheritedDeprecatedNode:F,inheritedTypeNode:v});k&&(f[k.id]=k,m++)}}}}),r.debug({message:`Validated ${m} tokens`,group:"parser",label:"validate",timing:performance.now()-d});let y=performance.now();for(let[b,D]of Object.entries(f)){try{f[b].$value=ne(D)}catch(C){let{node:F}=D.source,v=Y(F);v.$value&&(F=v.$value),r.error({group:"parser",label:"normalize",message:C.message,filename:t,src:l,node:F,continueOnError:a})}for(let[C,F]of Object.entries(D.mode))if(C!==".")try{f[b].mode[C].$value=ne({$type:D.$type,...F})}catch(v){let{node:M}=D.source,$=Y(M);$.$value&&(M=$.$value),r.error({group:"parser",label:"normalize",message:v.message,filename:t,src:l,node:F.source.node,continueOnError:a})}}if(r.debug({message:`Normalized ${m} tokens`,group:"parser",label:"normalize",timing:performance.now()-y}),!o&&n?.plugins?.length){let b=performance.now();await Bp({tokens:f,src:l,config:n,logger:r}),r.debug({message:`Linted ${m} tokens`,group:"parser",label:"lint",timing:performance.now()-b})}else r.debug({message:"Linting skipped",group:"parser",label:"lint"});return{tokens:f,document:c,src:l}}var Th=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},vl=Th,kh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},wh=kh,Sh=e=>vl(wh[e.toLowerCase()],6),Rh=Sh,Bh=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Oh=e=>{let t;return(t=e.match(Bh))?vl(parseInt(t[1],16),t[1].length):void 0},Ph=Oh,Ae="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",sE=`(?:${Ae}|none)`,Kr=`${Ae}%`,uE=`(?:${Ae}%|none)`,Ii=`(?:${Ae}%|${Ae})`,zh=`(?:${Ae}%|${Ae}|none)`,_h=`(?:${Ae}(deg|grad|rad|turn)|${Ae})`,lE=`(?:${Ae}(deg|grad|rad|turn)|${Ae}|none)`,mr="\\s*,\\s*",cE=new RegExp("^"+zh+"$"),Ih=new RegExp(`^rgba?\\(\\s*${Ae}${mr}${Ae}${mr}${Ae}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Lh=new RegExp(`^rgba?\\(\\s*${Kr}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Hh=e=>{let t={mode:"rgb"},r;if(r=e.match(Ih))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Lh))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Nh=Hh,jh=(e,t)=>e===void 0?void 0:typeof e!="object"?Al(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Zr=jh,Xh=(e="rgb")=>t=>(t=Zr(t,e))!==void 0?t.mode===e?t:Ye[t.mode][e]?Ye[t.mode][e](t):e==="rgb"?Ye[t.mode].rgb(t):Ye.rgb[e](Ye[t.mode].rgb(t)):void 0,Ke=Xh,Ye={},Dl={},ln=[],xl={},Uh=e=>e,w=e=>(Ye[e.mode]={...Ye[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ye[t]||(Ye[t]={}),Ye[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Uh)}),Dl[e.mode]=e,(e.parse||[]).forEach(t=>{Vh(t,e.mode)}),Ke(e.mode)),Nt=e=>Dl[e],Vh=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");xl[e]=t}else typeof e=="function"&&ln.indexOf(e)<0&&ln.push(e)},Ti=/[^\x00-\x7F]|[a-zA-Z_]/,qh=/[^\x00-\x7F]|[-\w]/,E={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},_=0;function an(e){let t=e[_],r=e[_+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[_+2]):t==="."?/\d/.test(r):/\d/.test(t)}function ki(e){if(_>=e.length)return!1;let t=e[_];if(Ti.test(t))return!0;if(t==="-"){if(e.length-_<2)return!1;let r=e[_+1];return!!(r==="-"||Ti.test(r))}return!1}var Wh={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Gr(e){let t="";if((e[_]==="-"||e[_]==="+")&&(t+=e[_++]),t+=sn(e),e[_]==="."&&/\d/.test(e[_+1])&&(t+=e[_++]+sn(e)),(e[_]==="e"||e[_]==="E")&&((e[_+1]==="-"||e[_+1]==="+")&&/\d/.test(e[_+2])?t+=e[_++]+e[_++]+sn(e):/\d/.test(e[_+1])&&(t+=e[_++]+sn(e))),ki(e)){let r=cn(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:E.Hue,value:t*Wh[r]}:void 0}return e[_]==="%"?(_++,{type:E.Percentage,value:+t}):{type:E.Number,value:+t}}function sn(e){let t="";for(;/\d/.test(e[_]);)t+=e[_++];return t}function cn(e){let t="";for(;_<e.length&&qh.test(e[_]);)t+=e[_++];return t}function Gh(e){let t=cn(e);return e[_]==="("?(_++,{type:E.Function,value:t}):t==="none"?{type:E.None,value:void 0}:{type:E.Ident,value:t}}function Jh(e=""){let t=e.trim(),r=[],n;for(_=0;_<t.length;){if(n=t[_++],n===`
24
- `||n===" "||n===" "){for(;_<t.length&&(t[_]===`
25
- `||t[_]===" "||t[_]===" ");)_++;continue}if(n===",")return;if(n===")"){r.push({type:E.ParenClose});continue}if(n==="+"){if(_--,an(t)){r.push(Gr(t));continue}return}if(n==="-"){if(_--,an(t)){r.push(Gr(t));continue}if(ki(t)){r.push({type:E.Ident,value:cn(t)});continue}return}if(n==="."){if(_--,an(t)){r.push(Gr(t));continue}return}if(n==="/"){for(;_<t.length&&(t[_]===`
26
- `||t[_]===" "||t[_]===" ");)_++;let o;if(an(t)&&(o=Gr(t),o.type!==E.Hue)){r.push({type:E.Alpha,value:o});continue}if(ki(t)&&cn(t)==="none"){r.push({type:E.Alpha,value:{type:E.None,value:void 0}});continue}return}if(/\d/.test(n)){_--,r.push(Gr(t));continue}if(Ti.test(n)){_--,r.push(Gh(t));continue}return}return r}function Yh(e){e._i=0;let t=e[e._i++];if(!t||t.type!==E.Function||t.value!=="color"||(t=e[e._i++],t.type!==E.Ident))return;let r=xl[t.value];if(!r)return;let n={mode:r},o=Cl(e,!1);if(!o)return;let a=Nt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==E.None&&(n[u]=s.type===E.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function Cl(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===E.None||n.type===E.Number||n.type===E.Alpha||n.type===E.Percentage||t&&n.type===E.Hue){r.push(n);continue}if(n.type===E.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==E.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:E.None,value:void 0}),r.every(o=>o.type!==E.Alpha)?r:void 0}}function Kh(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==E.Function)return;let n=Cl(e,t);if(n)return n.unshift(r.value),n}var Zh=e=>{if(typeof e!="string")return;let t=Jh(e),r=t?Kh(t,!0):void 0,n,o=0,a=ln.length;for(;o<a;)if((n=ln[o++](e,r))!==void 0)return n;return t?Yh(t):void 0},Al=Zh;function Qh(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.r=n.type===E.Number?n.value/255:n.value/100),o.type!==E.None&&(r.g=o.type===E.Number?o.value/255:o.value/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value/255:a.value/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var e2=Qh,t2=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,r2=t2,o2=(e,t,r)=>e+r*(t-e),n2=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},a2=e=>t=>{let r=n2(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}},T=a2(o2),ee=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},i2={mode:"rgb",channels:["r","g","b","alpha"],parse:[e2,Ph,Nh,Rh,r2,"srgb"],serialize:"srgb",interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:ee}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Mt=i2,oi=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),s2=e=>{let t=oi(e.r),r=oi(e.g),n=oi(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},U0=s2,ni=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),u2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:ni(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:ni(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:ni(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},V0=u2,ai=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},l2=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:ai(e),g:ai(t),b:ai(r)};return n!==void 0&&(o.alpha=n),o},hr=l2,c2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},jt=c2,ii=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},f2=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:ii(e),g:ii(t),b:ii(r)};return n!==void 0&&(a.alpha=n),a},gr=f2,d2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Xt=d2,m2={...Mt,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>V0(jt(e)),xyz65:V0},toMode:{rgb:e=>Xt(U0(e)),xyz65:U0}},Li=m2,p2=e=>(e=e%360)<0?e+360:e,se=p2;function h2({h:e,s:t,l:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function g2({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var b2=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},y2=b2,v2=new RegExp(`^hsla?\\(\\s*${_h}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),D2=e=>{let t=e.match(v2);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=y2(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},x2=D2;function C2(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.s=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.l=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var A2=C2,$2=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=se(r);return n===0||e[n-1]===void 0?a:t(a-se(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),it=e=>$2(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),hn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},E2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=se(e.h),n=se(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},gn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},F2=(e="rgb",t=[1,1,1,0])=>{let r=Nt(e),n=r.channels,o=r.difference,a=Ke(e);return(i,s)=>{let u=a(i),l=a(s);return Math.sqrt(n.reduce((c,f,m)=>{let d=o[f]?o[f](u,l):u[f]-l[f];return c+(t[m]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},st=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},M2={mode:"hsl",toMode:{rgb:h2},fromMode:{rgb:g2},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[A2,x2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},bn=M2;function $l({h:e,s:t,v:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function El({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var T2={mode:"hsv",toMode:{rgb:$l},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:El},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,v:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Hi=T2;function k2({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return $l({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function w2(e){let t=El(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function S2(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.w=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.b=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var R2=S2,B2={mode:"hwb",toMode:{rgb:k2},fromMode:{rgb:w2},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[R2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},w:T,b:T,alpha:{use:T,fixup:ee}},difference:{h:E2},average:{h:st}},Ni=B2,yn=Math.pow(29,3)/Math.pow(3,3),ji=Math.pow(6,3)/Math.pow(29,3),K={X:.3457/.3585,Y:1,Z:.2958/.3585},fr={X:.3127/.329,Y:1,Z:.3583/.329},fE=Math.pow(29,3)/Math.pow(3,3),dE=Math.pow(6,3)/Math.pow(29,3),si=e=>Math.pow(e,3)>ji?Math.pow(e,3):(116*e-16)/yn,O2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:si(a)*K.X,y:si(o)*K.Y,z:si(i)*K.Z};return n!==void 0&&(s.alpha=n),s},Xi=O2,P2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},eo=P2,z2=e=>eo(Xi(e)),Fl=z2,_2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},to=_2,ui=e=>e>ji?Math.cbrt(e):(yn*e+16)/116,I2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ui(e/K.X),a=ui(t/K.Y),i=ui(r/K.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Ui=I2,L2=e=>{let t=Ui(to(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Ml=L2;function H2(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*125/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*125/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var N2=H2,j2={mode:"lab",toMode:{xyz50:Xi,rgb:Fl},fromMode:{xyz50:Ui,rgb:Ml},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[N2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},ro=j2,Tl=Math.pow(29,3)/Math.pow(3,3),kl=Math.pow(6,3)/Math.pow(29,3),li=e=>Math.pow(e,3)>kl?Math.pow(e,3):(116*e-16)/Tl,X2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:li(a)*fr.X,y:li(o)*fr.Y,z:li(i)*fr.Z};return n!==void 0&&(s.alpha=n),s},wl=X2,U2=e=>Xt(wl(e)),vn=U2,ci=e=>e>kl?Math.cbrt(e):(Tl*e+16)/116,V2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ci(e/fr.X),a=ci(t/fr.Y),i=ci(r/fr.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Sl=V2,q2=e=>{let t=Sl(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Dn=q2,W2={...ro,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:wl,rgb:vn},fromMode:{xyz65:Sl,rgb:Dn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Vi=W2,G2=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Et=G2,J2=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Ft=J2;function Y2(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*150/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var K2=Y2,Z2={mode:"lch",toMode:{lab:Ft,rgb:e=>Fl(Ft(e))},fromMode:{rgb:e=>Et(Ml(e)),lab:Et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[K2],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},oo=Z2,Q2={...oo,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Ft(e,"lab65"),rgb:e=>vn(Ft(e,"lab65"))},fromMode:{rgb:e=>Et(Dn(e),"lch65"),lab65:e=>Et(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Rl=Q2,eg={...Mt,mode:"lrgb",toMode:{rgb:gr},fromMode:{rgb:hr},parse:["srgb-linear"],serialize:"srgb-linear"},qi=eg,tg=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},no=tg,rg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},Bl=rg,og=e=>{let t=Bl(hr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},xn=og,ng=e=>gr(no(e)),Cn=ng;function ag(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*.4/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*.4/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var ig=ag,sg={...ro,mode:"oklab",toMode:{lrgb:no,rgb:Cn},fromMode:{lrgb:Bl,rgb:xn},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[ig],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},Wi=sg;function ug(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*.4/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var lg=ug,cg={...oo,mode:"oklch",toMode:{oklab:e=>Ft(e,"oklab"),rgb:e=>Cn(Ft(e,"oklab"))},fromMode:{rgb:e=>Et(xn(e),"oklch"),oklab:e=>Et(e,"oklch")},parse:[lg],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Gi=cg,fg=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},q0=fg,dg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},W0=dg,mg={...Mt,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>W0(jt(e)),xyz65:W0},toMode:{rgb:e=>Xt(q0(e)),xyz65:q0}},Ji=mg,fi=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:fi(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:fi(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:fi(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},G0=pg,di=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},hg=e=>{let t=di(e.r),r=di(e.g),n=di(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},J0=hg,gg={...Mt,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:G0,rgb:e=>G0(to(e))},toMode:{xyz50:J0,rgb:e=>eo(J0(e))}},Yi=gg,Y0=1.09929682680944,bg=.018053968510807,mi=e=>{let t=Math.abs(e);return t>bg?(Math.sign(e)||1)*(Y0*Math.pow(t,.45)-(Y0-1)):4.5*e},yg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:mi(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mi(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mi(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},K0=yg,Z0=1.09929682680944,vg=.018053968510807,pi=(e=0)=>{let t=Math.abs(e);return t<vg*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Z0-1)/Z0,1/.45)},Dg=e=>{let t=pi(e.r),r=pi(e.g),n=pi(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Q0=Dg,xg={...Mt,mode:"rec2020",fromMode:{xyz65:K0,rgb:e=>K0(jt(e))},toMode:{xyz65:Q0,rgb:e=>Xt(Q0(e))},parse:["rec2020"],serialize:"rec2020"},Ki=xg,Cg={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:eo,lab:Ui},fromMode:{rgb:to,lab:Xi},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Zi=Cg,Ag=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},$g=Ag,Eg=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},Fg=Eg,Mg={mode:"xyz65",toMode:{rgb:Xt,xyz50:$g},fromMode:{rgb:jt,xyz50:Fg},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Qi=Mg,mE=w(Li),pE=w(bn),hE=w(Hi),gE=w(Ni),bE=w(ro),yE=w(Vi),vE=w(oo),DE=w(Rl),xE=w(qi),CE=w(Wi),AE=w(Gi),$E=w(Ji),EE=w(Yi),FE=w(Ki),ME=w(Mt),TE=w(Zi),kE=w(Qi),ae=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Tg=Math.PI/180,kg=180/Math.PI,el=ae[3]*ae[4],tl=ae[1]*ae[4],rl=ae[1]*ae[2]-ae[0]*ae[3],wg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(rl*r+e*el-t*tl)/(rl+el-tl),a=r-o,i=(ae[4]*(t-o)-ae[2]*a)/ae[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(ae[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*kg-120),n!==void 0&&(s.alpha=n),s},Sg=wg,Rg=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Tg,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(ae[0]*i+ae[1]*s),o.g=r+a*(ae[2]*i+ae[3]*s),o.b=r+a*(ae[4]*i+ae[5]*s),n!==void 0&&(o.alpha=n),o},Bg=Rg,Og={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Sg},toMode:{rgb:Bg},interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Pg=Og,fn=1,Ol=1,Qr=26/180*Math.PI,dn=Math.cos(Qr),mn=Math.sin(Qr),Pl=100/Math.log(139/100),zg=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*fn/Pl)-1)/.0039},a=(Math.exp(.0435*t*Ol*fn)-1)/.075,i=a*Math.cos(r/180*Math.PI-Qr),s=a*Math.sin(r/180*Math.PI-Qr);return o.a=i*dn-s/.83*mn,o.b=i*mn+s/.83*dn,n!==void 0&&(o.alpha=n),o},wi=zg,_g=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*dn+r*mn,a=.83*(r*dn-t*mn),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Pl/fn*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*Ol*fn)};return s.c&&(s.h=se((Math.atan2(a,o)+Qr)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},Si=_g,ol=e=>wi(Et(e,"dlch")),nl=e=>Ft(Si(e),"dlab"),Ig={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ol,rgb:e=>vn(ol(e))},fromMode:{lab65:nl,rgb:e=>nl(Dn(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},Lg=Ig,Hg={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:wi,dlab:e=>Ft(e,"dlab"),rgb:e=>vn(wi(e))},fromMode:{lab65:Si,dlab:e=>Et(e,"dlch"),rgb:e=>Si(Dn(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:T,c:T,h:{use:T,fixup:it},alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},Ng=Hg;function jg({h:e,s:t,i:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Xg({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Ug={mode:"hsi",toMode:{rgb:jg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Xg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,i:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Vg=Ug,zl=203,An=.1593017578125,_l=78.84375,$n=.8359375,En=18.8515625,Fn=18.6875;function hi(e){if(e<0)return 0;let t=Math.pow(e,1/_l);return 1e4*Math.pow(Math.max(0,t-$n)/(En-Fn*t),1/An)}function gi(e){if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),_l)}var bi=e=>Math.max(e/zl,0),qg=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=hi(e+.008609037037932761*t+.11102962500302593*r),a=hi(e-.00860903703793275*t-.11102962500302599*r),i=hi(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:bi(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:bi(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:bi(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},al=qg,yi=(e=0)=>Math.max(e*zl,0),Wg=({x:e,y:t,z:r,alpha:n})=>{let o=yi(e),a=yi(t),i=yi(r),s=gi(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=gi(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=gi(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},il=Wg,Gg={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:al,rgb:e=>Xt(al(e))},fromMode:{xyz65:il,rgb:e=>il(jt(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:T,t:T,p:T,alpha:{use:T,fixup:ee}}},Jg=Gg,Yg=134.03437499999998,Kg=16295499532821565e-27,vi=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),Yg)},Di=(e=0)=>Math.max(e*203,0),Zg=({x:e,y:t,z:r,alpha:n})=>{e=Di(e),t=Di(t),r=Di(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=vi(.41478972*o+.579999*a+.014648*r),s=vi(-.20151*o+1.120649*a+.0531008*r),u=vi(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-Kg,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},Il=Zg,Qg=134.03437499999998,sl=16295499532821565e-27,xi=e=>{if(e<0)return 0;let t=Math.pow(e,1/Qg);return 1e4*Math.pow(($n-t)/(Fn*t-En),1/An)},Ci=e=>e/203,e5=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+sl)/(.44+.56*(e+sl)),a=xi(o+.13860504*t+.058047316*r),i=xi(o-.13860504*t-.058047316*r),s=xi(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:Ci(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:Ci(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:Ci(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},Ll=e5,t5=e=>{let t=Il(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Hl=t5,r5=e=>Xt(Ll(e)),Nl=r5,o5={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Hl,xyz65:Il},toMode:{rgb:Nl,xyz65:Ll},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:T,a:T,b:T,alpha:{use:T,fixup:ee}}},n5=o5,a5=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},ul=a5,i5=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},ll=i5,s5={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:ll,rgb:e=>Nl(ll(e))},fromMode:{rgb:e=>ul(Hl(e)),jab:ul},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,j:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},u5=s5,l5=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},jl=l5,c5=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Xl=c5,Ul=(e,t,r)=>4*e/(e+15*t+3*r),Vl=(e,t,r)=>9*t/(e+15*t+3*r),f5=Ul(K.X,K.Y,K.Z),d5=Vl(K.X,K.Y,K.Z),m5=e=>e<=ji?yn*e:116*Math.cbrt(e)-16,p5=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=m5(t/K.Y),a=Ul(e,t,r),i=Vl(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-f5),i=13*o*(i-d5));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},Ri=p5,h5=(e,t,r)=>4*e/(e+15*t+3*r),g5=(e,t,r)=>9*t/(e+15*t+3*r),b5=h5(K.X,K.Y,K.Z),y5=g5(K.X,K.Y,K.Z),v5=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+b5,a=r/(13*e)+y5,i=K.Y*(e<=8?e/yn:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Bi=v5,D5=e=>jl(Ri(to(e))),x5=e=>eo(Bi(Xl(e))),C5={mode:"lchuv",toMode:{luv:Xl,rgb:x5},fromMode:{rgb:D5,luv:jl},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},A5=C5,$5={mode:"luv",toMode:{xyz50:Bi,rgb:e=>eo(Bi(e))},fromMode:{xyz50:Ri,rgb:e=>Ri(to(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:T,u:T,v:T,alpha:{use:T,fixup:ee}}},E5=$5;function Oi(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pn(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function F5(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function es(e,t){let r=F5(e,t),n=no({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function M5(e,t,r,n,o,a=null){a||(a=es(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function ts(e,t,r=null){r||(r=es(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function ql(e,t,r){let n=es(t,r),o=M5(t,r,e,1,e,n),a=ts(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function cl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Oi(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=ql(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=se(Math.atan2(n,r)*180/Math.PI)),o}function fl(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:pn(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=ql(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var T5={...bn,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cl,rgb:e=>cl(xn(e))},toMode:{oklab:fl,rgb:e=>Cn(fl(e))}},k5=T5;function dl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=ts(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=pn(m),p=d*g/m,y=no({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Oi(t)/t,t=Oi(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=se(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function ml(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=ts(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=pn(f),g=m*d/f,p=no({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=pn(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var w5={...Hi,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:dl,rgb:e=>dl(xn(e))},toMode:{oklab:ml,rgb:e=>Cn(ml(e))}},Wl=w5,Ht=.0037930732552754493,Gl=Math.cbrt(Ht),Ai=e=>Math.cbrt(e)-Gl,S5=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a=Ai(.3*t+.622*r+.078*n+Ht),i=Ai(.23*t+.692*r+.078*n+Ht),s=Ai(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+Ht),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},R5=S5,$i=e=>Math.pow(e+Gl,3),B5=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$i(e+t)-Ht,a=$i(t-e)-Ht,i=$i(r+t)-Ht,s=gr({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},O5=B5,P5={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:O5},fromMode:{rgb:R5},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:T,y:T,b:T,alpha:{use:T,fixup:ee}}},z5=P5,_5=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},I5=_5,L5=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},H5=L5,N5={mode:"yiq",toMode:{rgb:H5},fromMode:{rgb:I5},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:T,i:T,q:T,alpha:{use:T,fixup:ee}}},j5=N5,X5=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,U5=(e=4)=>t=>typeof t=="number"?X5(t,e):t,Jr=U5,wE=Jr(2),V5=e=>Math.max(0,Math.min(1,e||0)),un=e=>Math.round(V5(e)*255),Jl=Ke("rgb"),SE=Ke("hsl"),Yl=e=>{if(e===void 0)return;let t=un(e.r),r=un(e.g),n=un(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},q5=e=>{if(e===void 0)return;let t=un(e.alpha!==void 0?e.alpha:1);return Yl(e)+(256|t).toString(16).slice(1)},Yr=e=>{let t=Zr(e);if(!t)return;let r=Nt(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((o,a)=>{o!=="alpha"&&(n+=(a?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},Kl=e=>Yl(Jl(e)),W5=e=>q5(Jl(e)),G5=Ke("rgb"),J5=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Zl=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Ql(e){return Zl(G5(e))}function ec(e="rgb"){let{gamut:t}=Nt(e);if(!t)return n=>!0;let r=Ke(typeof t=="string"?t:e);return n=>Zl(r(n))}function Y5(e="rgb"){let{gamut:t}=Nt(e);if(!t)return a=>Zr(a);let r=typeof t=="string"?t:e,n=Ke(r),o=ec(r);return a=>{let i=Zr(a);if(!i)return;let s=n(i);if(o(s))return i;let u=J5(s);return i.mode===u.mode?u:Ke(i.mode)(u)}}function Ei(e="rgb",t="oklch",r=F2("oklch"),n=.02){let o=Ke(e),a=Nt(e);if(!a.gamut)return c=>o(c);let i=ec(e),s=Y5(e),u=Ke(t),{ranges:l}=Nt(t);if(!l.l||!l.c)throw new Error("LCH-like space expected");return c=>{if(c=Zr(c),c===void 0)return;let f={...u(c)};if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=l.l[1]){let y={...a.white,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(f.l<=l.l[0]){let y={...a.black,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(i(f))return o(f);let m=0,d=f.c,g=(l.c[1]-l.c[0])/4e3,p=s(f);for(;d-m>g;)f.c=(m+d)*.5,p=s(f),i(f)||r&&n>0&&r(f,p)<=n?m=f.c:d=f.c;return o(i(f)?f:p)}}var K5=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,pl={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},dr={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function Z5(e){let t=Al(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in pl))throw new Error(`Unsupported color space: ${t.mode}`);let r=pl[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return K5.test(e)&&(o.hex=Kl(t)),o}function Q5(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(dr).join(", ")}`)}}var At={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function tc(e){let t="";for(let r of e.split("")){if(r==="."){t+="-";continue}let n=!0;if(n&&/\p{Uppercase_Letter}/u.test(r)){t+=`-${r.toLocaleLowerCase()}`,n=!1;continue}else n=!0;t+=r}return t}function Pi(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function eb(e){for(var t="",r=0;r<e.length;r++)t+=Pi(e[r]);return t}function rc(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(rc(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=eb(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=Pi(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=Pi(p)}l+=d}}return l}function tb(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function oc(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=rc(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=tb.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}function rb(e,{$type:t}){if(e){if(typeof e!="string"&&typeof e!="object"||Array.isArray(e))throw new Error(`transform(): expected string or Object of strings, received ${Array.isArray(e)?"Array":typeof e}`);switch(t){case"typography":if(typeof e!="object")throw new Error("transform(): typography tokens must be an object of keys");break}}}var RE=w(Li),BE=w(Pg),OE=w(Lg),PE=w(Ng),zE=w(Vg),_E=w(bn),IE=w(Hi),LE=w(Ni),HE=w(Jg),NE=w(n5),jE=w(u5),XE=w(ro),UE=w(Vi),VE=w(oo),qE=w(Rl),WE=w(A5),GE=w(qi),JE=w(E5),YE=w(k5),KE=w(Wl),ZE=w(Wi),QE=w(Gi),eF=w(Ji),tF=w(Yi),rF=w(Ki),oF=w(Mt),nF=w(z5),aF=w(Zi),iF=w(Qi),sF=w(j5);function ue(e){if(!e)throw new Error("Undefined token");return`var(${pr(e.id)})`}function hl({$type:e,localID:t}){if(e==="transition")return["duration","delay","timing-function"].map(r=>pr(`${t}-${r}`,{wrapVar:!0})).join(" ")}var ob=/(?:(\p{Uppercase_Letter}?[\p{Lowercase_Letter}\p{Number}]+|[\p{Uppercase_Letter}\p{Number}]+|[\u{80}-\u{10FFFF}\p{Number}]+)|.)/u;function pr(e,{prefix:t,wrapVar:r=!1}={}){if(typeof e!="string")throw new Error(`makeCSSVar() Expected string, received ${e}`);let n=e.split(ob).filter(Boolean).join("-");t&&!n.startsWith(`${t}-`)&&(n=`${t}-${n}`);let o=`--${n}`.toLocaleLowerCase();return r?`var(${o})`:o}function nb(e,{tokensSet:t,transformAlias:r=ue}){return e.aliasChain?.[0]?r(t[e.aliasChain[0]]):e.$value===!0?"1":"0"}function Mn(e,t){let{transformAlias:r=ue,tokensSet:n}=t;if(e.aliasChain?.[0])return r(n[e.aliasChain[0]]);let{colorSpace:o,components:a,alpha:i=1}=typeof e.$value=="string"?Z5(e.$value):e.$value,s=Q5({colorSpace:o,components:a,alpha:i});if(!s)throw new Error(`Can\u2019t convert color ${JSON.stringify(e.$value)} to Culori color`);let u=Yr;return t.color?.legacyHex&&(u=s.alpha!==1?W5:Kl),Ql(s)?u(s):ab({colorSpace:o,components:a,alpha:i},s,t.color?.depth)}var Fi={a98:w(Li),hsl:w(bn),hwb:w(Ni),lab:w(ro),lab65:w(Vi),lch:w(oo),lrgb:w(qi),oklab:w(Wi),oklch:w(Gi),okhsv:w(Wl),p3:w(Ji),prophoto:w(Yi),rec2020:w(Ki),rgb:w(Mt),xyz50:w(Zi),xyz65:w(Qi)},zi={24:Jr(4),30:Jr(4),36:Jr(5),48:Jr(6)};function ab(e,t,r=30){if(!(e.colorSpace in dr))throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of: ${Object.keys(dr).join(", ")}`);let n=dr[e.colorSpace]||"oklab",o=n;o==="lab"||o==="lab65"?o="lch":o==="oklab"&&(o="oklch");let a=Fi[n](Ei("rgb",o)(t)),i=Fi[n](Ei("p3",o)(t)),s=Fi[n](Ei("rec2020",o)(t));if(typeof r=="number"){if(!zi[r])throw new Error(`Invalid bit depth: ${r}. Supported values: ${Object.keys(zi).join(", ")}`);a=Mi(a,r),i=Mi(i,r),s=Mi(s,r)}return{".":Yr(t),srgb:Yr(a),p3:Yr(i),rec2020:Yr(s)}}function Mi(e,t=30){if(t==="unlimited")return e;let r={...e};for(let[n,o]of Object.entries(e))typeof o!="number"||n==="mode"||(r[n]=zi[t](o));return r}function $t(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.value===0?"0":`${e.$value.value}${e.$value.unit}`}function nc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):typeof e.$value=="string"?e.$value:"dashed"}function ib(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.width?n(r[e.partialAliasOf.width]):$t({$value:e.$value.width},t),a=e.partialAliasOf?.color?n(r[e.partialAliasOf.color]):Mn({$value:e.$value.color},t),i=e.partialAliasOf?.style?n(r[e.partialAliasOf.style]):nc({$value:e.$value.style},t),s=u=>[o,i,typeof a=="string"?a:a[u]].join(" ");return typeof a=="string"||Ql(a.p3)?s("."):{".":s("."),srgb:s("srgb"),p3:s("p3"),rec2020:s("rec2020")}}function ac(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`cubic-bezier(${e.$value.map((o,a)=>e.partialAliasOf?.[a]?n(r[e.partialAliasOf[a]]):o).join(", ")})`}function _i(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`${e.$value.value}${e.$value.unit}`}var sb=/^[a-z-]+$/;function ic(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.map(o=>sb.test(o)?o:`"${o}"`).join(", ")}function sc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function ub(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=!1,a=[],i=[];for(let u=0;u<e.$value.length;u++){let{color:l,position:c}=e.$value[u],f=e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:l},t);typeof f!="string"&&(o=!0),a.push(f),i.push(e.partialAliasOf?.[u]?.position?n(r[e.partialAliasOf[u].position]):`${100*c}%`)}function s(u,l="."){return`${typeof a[u]=="string"?a[u]:a[u][l]} ${i[u]}`}return o?{".":e.$value.map((u,l)=>s(l,".")).join(", "),srgb:e.$value.map((u,l)=>s(l,"srgb")).join(", "),p3:e.$value.map((u,l)=>s(l,"p3")).join(", "),rec2020:e.$value.map((u,l)=>s(l,"rec2020")).join(", ")}:e.$value.map((u,l)=>s(l,i[l])).join(", ")}function lb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`url("${e.$value}")`}function uc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function cb(e,t){let{tokensSet:r,colorValue:n,partialAliasOf:o,transformAlias:a=ue}=t,i=o?.offsetX?a(r[o.offsetX]):$t({$value:e.offsetX},t),s=o?.offsetY?a(r[o.offsetY]):$t({$value:e.offsetY},t),u=o?.blur?a(r[o.blur]):$t({$value:e.blur},t),l=o?.spread?a(r[o.spread]):$t({$value:e.spread},t);return[e?.inset===!0?"inset":void 0,i,s,u,l,n].filter(Boolean).join(" ")}function fb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.$value.map((s,u)=>e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:s.color},t)),a=o.some(s=>typeof s=="object"),i=s=>e.$value.map((u,l)=>cb(u,{tokensSet:r,colorValue:typeof o[l]=="string"?o[l]:o[l][s],partialAliasOf:e.partialAliasOf?.[l],transformAlias:n})).join(", ");return a?{".":i("."),srgb:i("srgb"),p3:i("p3"),rec2020:i("rec2020")}:i(".")}function lc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function db(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.duration?n(r[e.partialAliasOf.duration]):_i({$value:e.$value.duration},t),a=e.partialAliasOf?.delay?n(r[e.partialAliasOf.delay]):_i({$value:e.$value.delay},t),i=e.partialAliasOf?.timingFunction?n(r[e.partialAliasOf.timingFunction]):ac({$value:e.$value.timingFunction},t);return`${o} ${a} ${i}`}function mb(e,t){let{tokensSet:r,transformAlias:n=ue}=t,o={};for(let[a,i]of Object.entries(e.$value)){let s,u=e.aliasChain?.[0]??e.partialAliasOf?.[a];if(u){let l=r[u];s=n(l.$type==="typography"?{id:`${u}-${a}`}:l)}else switch(a){case"fontFamily":s=ic({$value:i},t);break;case"fontSize":case"letterSpacing":s=$t({$value:i},t);break;case"fontWeight":s=sc({$value:i},t);break;case"lineHeight":typeof i=="number"?s=uc({$value:i},t):s=$t({$value:i},t);break;default:s=lc({$value:i},t);break}o[tc(a)]=s}return o}function pb(e,{mode:t,...r}){let n=e.mode[t];if(!n)return;let o={id:e.id,$type:e.$type,...n};switch(o.$type){case"boolean":return nb(o,r);case"border":return ib(o,r);case"color":return Mn(o,r);case"cubicBezier":return ac(o,r);case"dimension":return $t(o,r);case"duration":return _i(o,r);case"fontFamily":return ic(o,r);case"fontWeight":return sc(o,r);case"gradient":return ub(o,r);case"link":return lb(o,r);case"number":return uc(o,r);case"shadow":return fb(o,r);case"string":return lc(o,r);case"strokeStyle":return nc(o,r);case"transition":return db(o,r);case"typography":return mb(o,r)}}var Ct="css",hb=`/* -------------------------------------------
23
+ parse(yamlString, { yamlToMomoa });`,continueOnError:!1});else i=Ya(e);return a||(a=de(i,{indent:2})),{src:a,document:i}}function Ya(e,t){return sh(typeof e=="string"?e:JSON.stringify(e,void 0,2),{mode:"jsonc",ranges:!0,tokens:!0,...t})}function Ah(e,t){if(e.mode["."]??={},e.mode["."].$value=e.$value,e.mode["."].originalValue??=e.originalValue.$value,e.mode["."].source??=e.source,typeof e.$value=="string"&&Te(e.$value)){let{aliasChain:r,resolvedToken:o}=xt(e.$value,{...t,token:e});e.aliasOf=o.id,e.aliasChain=r,e.$value=o.$value}for(let r of Object.keys(e.mode)){let o=e.mode[r].$value;if(typeof o=="string"&&Te(o)){let a=[e.$type],{aliasChain:i,resolvedToken:s}=xt(o,{...t,token:e,expectedType:a,node:e.mode[r].source?.node||t.node});e.mode[r].aliasOf=s.id,e.mode[r].aliasChain=i,e.mode[r].$value=s.$value;continue}if(typeof e.$value=="object"&&typeof e.mode[r].$value=="object"&&!Array.isArray(e.$value))for(let[a,i]of Object.entries(e.$value))a in e.mode[r].$value||(e.mode[r].$value[a]=i);let n=J(t.node).$value||t.node;switch(e.$type){case"border":Eh(e,r,{...t,node:n});break;case"gradient":Fh(e,r,{...t,node:n});break;case"shadow":Mh(e,r,{...t,node:n});break;case"strokeStyle":Th(e,r,{...t,node:n});break;case"transition":kh(e,r,{...t,node:n});break;case"typography":wh(e,r,{...t,node:n});break}}}var $h=new Intl.ListFormat("en-us",{type:"disjunction"});function xt(e,t){let r={group:"parser",label:"alias",node:t?.node,filename:t.filename,src:t.src},{logger:o,token:n,tokensSet:a}=t,{token:i,chain:s}=N0(ke(e),t);a[n.id].$type||(a[n.id].$type=i.$type);let u=[...t.expectedType??[]];if(n.$type&&!u?.length&&u.push(n.$type),u?.length&&!u.includes(i.$type)&&o.error({...r,message:`Invalid alias: expected $type: ${$h.format(u)}, received $type: ${i.$type}.`,node:t.node?.type==="Object"&&J(t.node).$value||r.node}),s?.length&&i){let l=!1;for(let c of s)c!==i.id&&!i.aliasedBy?.includes(c)&&(i.aliasedBy??=[],i.aliasedBy.push(c),l=!0),n&&!i.aliasedBy?.includes(n.id)&&(i.aliasedBy??=[],i.aliasedBy.push(n.id),l=!0);l&&i.aliasedBy.sort((c,f)=>c.localeCompare(f,"en-us",{numeric:!0}))}return{resolvedToken:i,aliasChain:s}}function N0(e,{scanned:t=[],...r}){let{logger:o,filename:n,src:a,node:i,tokensSet:s}=r,u={group:"parser",label:"alias",filename:n,src:a,node:i},l=ke(e);s[l]||o.error({...u,message:`Alias {${e}} not found.`}),t.includes(l)&&o.error({...u,message:`Circular alias detected from ${e}.`});let c=s[l];return t.push(l),typeof c.originalValue.$value!="string"||!Te(c.originalValue.$value)?{token:c,chain:t}:N0(c.originalValue.$value,{...r,scanned:t})}function Eh(e,t,r){for(let[o,n]of Object.entries(e.mode[t].$value))if(typeof n=="string"&&Te(n)){e.mode[t].partialAliasOf??={};let a=J(r.node)[o]||r.node,{resolvedToken:i}=xt(n,{...r,token:e,expectedType:{color:["color"],width:["dimension"],style:["strokeStyle"]}[o],node:a});e.mode[t].partialAliasOf[o]=ke(n),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[o]=ke(n)),e.mode[t].$value[o]=i.$value}}function Fh(e,t,r){for(let o=0;o<e.mode[t].$value.length;o++){let n=e.mode[t].$value[o];for(let[a,i]of Object.entries(n))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[o]??={};let s={color:["color"],position:["number"]}[a],u=r.node?.elements?.[o]?.value||r.node;u.type==="Object"&&(u=J(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[o][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[o]??={},e.partialAliasOf[o][a]=ke(i)),n[a]=l.$value}}}function Mh(e,t,r){Array.isArray(e.mode[t].$value)||(e.mode[t].$value=[e.mode[t].$value]);for(let o=0;o<e.mode[t].$value.length;o++){let n=e.mode[t].$value[o];for(let[a,i]of Object.entries(n))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[o]??={};let s={offsetX:["dimension"],offsetY:["dimension"],blur:["dimension"],spread:["dimension"],color:["color"],inset:["boolean"]}[a],u=r.node?.elements?.[o]||r.node;u.type==="Object"&&(u=J(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[o][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[o]??={},e.partialAliasOf[o][a]=ke(i)),n[a]=l.$value}}}function Th(e,t,r){if(!(typeof e.mode[t].$value!="object"||!("dashArray"in e.mode[t].$value)))for(let o=0;o<e.mode[t].$value.dashArray.length;o++){let n=e.mode[t].$value.dashArray[o];if(typeof n=="string"&&Te(n)){let a=J(r.node).dashArray||r.node;a.type==="Array"&&(a=a?.elements?.[o]?.value||a);let{resolvedToken:i}=xt(n,{...r,token:e,expectedType:["dimension"],node:a});e.mode[t].$value.dashArray[o]=i.$value}}}function kh(e,t,r){for(let[o,n]of Object.entries(e.mode[t].$value))if(typeof n=="string"&&Te(n)){e.mode[t].partialAliasOf??={};let a={duration:["duration"],delay:["duration"],timingFunction:["cubicBezier"]}[o],i=J(r.node)[o]||r.node,{resolvedToken:s}=xt(n,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[o]=ke(n),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[o]=ke(n)),e.mode[t].$value[o]=s.$value}}function wh(e,t,r){for(let[o,n]of Object.entries(e.mode[t].$value))if(typeof n=="string"&&Te(n)){e.partialAliasOf??={},e.mode[t].partialAliasOf??={};let a={fontFamily:["fontFamily"],fontSize:["dimension"],fontWeight:["fontWeight"],letterSpacing:["dimension"],lineHeight:["dimension","number"]}[o]||["string"],i=J(r.node)[o]||r.node,{resolvedToken:s}=xt(n,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[o]=ke(n),t==="."&&(e.partialAliasOf[o]=ke(n)),e.mode[t].$value[o]=s.$value}}var s0={thin:100,hairline:100,"extra-light":200,"ultra-light":200,light:300,normal:400,regular:400,book:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,black:900,heavy:900,"extra-black":950,"ultra-black":950},u0=/(-?\d*\.?\d+)(.*)/;function ne(e){if(typeof e.$value=="string"&&Te(e.$value))return e.$value;switch(e.$type){case"boolean":return!!e.$value;case"border":return typeof e.$value=="string"?e.$value:{color:ne({$type:"color",$value:e.$value.color??"#000000"}),style:ne({$type:"strokeStyle",$value:e.$value.style??"solid"}),width:ne({$type:"dimension",$value:e.$value.width})};case"color":{if(typeof e.$value=="string")return Ia(e.$value);let t={colorSpace:e.$value.colorSpace,components:e.$value.components??e.$value.channels,alpha:e.$value.alpha??1};return"hex"in e.$value&&(t.hex=e.$value.hex),t}case"cubicBezier":return typeof e.$value=="string"?e.$value:e.$value.map(t=>typeof t=="number"?ne({$type:"number",$value:t}):t);case"dimension":if(e.$value===0)return{value:0,unit:"px"};if(typeof e.$value=="string"){let t=e.$value.match(u0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"px"}}return e.$value;case"duration":if(e.$value===0)return{value:0,unit:"ms"};if(typeof e.$value=="string"){let t=e.$value.match(u0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"ms"}}return e.$value;case"fontFamily":return Array.isArray(e.$value)?e.$value:[e.$value];case"fontWeight":return typeof e.$value=="string"&&s0[e.$value]?s0[e.$value]:Math.min(999,Math.max(1,typeof e.$value=="string"?Number.parseInt(e.$value):e.$value));case"gradient":{if(typeof e.$value=="string")return e.$value;let t=[];for(let r=0;r<e.$value.length;r++){let o=structuredClone(e.$value[r]);o.color=ne({$type:"color",$value:o.color}),o.position===void 0&&(o.position=r/(e.$value.length-1)),t.push(o)}return t}case"number":return typeof e.$value=="number"?e.$value:Number.parseFloat(e.$value);case"shadow":return typeof e.$value=="string"?e.$value:(Array.isArray(e.$value)?e.$value:[e.$value]).map(t=>({color:ne({$type:"color",$value:t.color}),offsetX:ne({$type:"dimension",$value:t.offsetX??{value:0,unit:"px"}}),offsetY:ne({$type:"dimension",$value:t.offsetY??{value:0,unit:"px"}}),blur:ne({$type:"dimension",$value:t.blur??{value:0,unit:"px"}}),spread:ne({$type:"dimension",$value:t.spread??{value:0,unit:"px"}}),inset:t.inset===!0}));case"strokeStyle":return e.$value;case"string":return String(e.$value);case"transition":return typeof e.$value=="string"?e.$value:{duration:ne({$type:"duration",$value:e.$value.duration??0}),delay:ne({$type:"duration",$value:e.$value.delay??0}),timingFunction:ne({$type:"cubicBezier",$value:e.$value.timingFunction})};case"typography":{if(typeof e.$value=="string")return e.$value;let t={};for(let[r,o]of Object.entries(e.$value))switch(r){case"fontFamily":t[r]=ne({$type:"fontFamily",$value:o});break;case"fontSize":case"letterSpacing":t[r]=ne({$type:"dimension",$value:o});break;case"lineHeight":t[r]=ne({$type:typeof e.$value=="number"?"number":"dimension",$value:o});break;default:t[r]=o;break}return t}default:return e.$value}}var Ja=new Intl.ListFormat("en-us",{type:"disjunction"}),Sh=new Set(["adobe-rgb","display-p3","hsl","hwb","lab","lch","oklab","oklch","prophoto","rec2020","srgb","srgb-linear","xyz","xyz-d50","xyz-d65"]),l0=new Set(["thin","hairline","extra-light","ultra-light","light","normal","regular","book","medium","semi-bold","demi-bold","bold","extra-bold","ultra-bold","black","heavy","extra-black","ultra-black"]),c0=new Set(["solid","dashed","dotted","double","groove","ridge","outset","inset"]),f0=new Set(["round","butt","square"]);function ri(e){return e?.type==="String"?e.value.startsWith("{"):!1}function cr(e,t,r,{filename:o,src:n,logger:a}){let i=J(e);for(let[s,u]of Object.entries(t)){let{validator:l,required:c}=u;if(!i[s]){c&&a.error({group:"parser",label:"validate",message:`Missing required property "${s}"`,filename:o,node:e,src:n});continue}let f=i[s];ri(f)?oi(f,r,{filename:o,src:n,logger:a}):l(f,r,{filename:o,src:n,logger:a})}}function oi(e,t,{filename:r,src:o,logger:n}){(e.type!=="String"||!Te(e.value))&&n.error({group:"parser",label:"validate",message:`Invalid alias: ${de(e)}`,filename:r,node:e,src:o})}function Rh(e,t,{filename:r,src:o,logger:n}){e.type!=="Object"?n.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:o}):cr(e,{color:{validator:nn,required:!0},style:{validator:X0,required:!0},width:{validator:Dt,required:!0}},t,{filename:r,src:o,logger:n})}function nn(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};if(e.type==="String")e.value===""&&n.error({...a,message:"Expected color, received empty string"});else if(e.type==="Object"){let i=e.members.findIndex(s=>s.name.type==="String"&&s.name.value==="channels");i!==-1&&(n.warn({...a,message:'"channels" is deprecated; rename "channels" to "components"'}),e.members[i].name.value="components"),cr(e,{colorSpace:{validator:s=>{s.type!=="String"&&n.error({...a,message:`Expected string, received ${de(s)}`,node:s}),Sh.has(s.value)||n.error({...a,message:`Unsupported colorspace ${de(s)}`,node:s})},required:!0},components:{validator:s=>{if(s.type!=="Array")n.error({...a,message:`Expected array, received ${de(s)}`,node:s});else{s.elements?.length!==3&&n.error({...a,message:`Expected 3 components, received ${s.elements?.length??0}`,node:s});for(let u of s.elements)u.value.type!=="Number"&&n.error({...a,message:`Expected number, received ${de(u.value)}`,node:u})}},required:!0},hex:{validator:s=>{(s.type!=="String"||s.value.length===6||s.value.length===8||!/^#[a-f0-9]{3,8}$/i.test(s.value))&&n.error({...a,message:`Invalid hex color ${de(s)}`,node:s})}},alpha:{validator:ni}},t,{filename:r,src:o,logger:n})}else n.error({...a,message:`Expected object, received ${e.type}`,node:e})}function j0(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};e.type!=="Array"?n.error({...a,message:`Expected array of numbers, received ${de(e)}`}):e.elements.every(i=>i.value.type==="Number")?e.elements.length!==4&&n.error({...a,message:`Expected an array of 4 numbers, received ${e.elements.length}`}):n.error({...a,message:"Expected an array of 4 numbers, received some non-numbers"})}function Dt(e,t,{filename:r,src:o,logger:n}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:o};if(e.type==="Object"){let{value:u,unit:l}=J(e);u||n.error({...a,message:'Missing required property "value".'}),l||n.error({...a,message:'Missing required property "unit".'}),u.type!=="Number"&&n.error({...a,message:`Expected number, received ${u.type}`,node:u}),["px","em","rem"].includes(l.value)||n.error({...a,message:`Expected unit "px", "em", or "rem", received ${de(l)}`,node:l});return}e.type!=="String"&&n.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?n.error({...a,message:"Expected dimension, received empty string"}):["px","em","rem"].includes(s)?Number.isFinite(Number.parseFloat(i))||n.error({...a,message:`Expected dimension with units, received ${de(e)}`}):n.error({...a,message:`Expected unit "px", "em", or "rem", received ${JSON.stringify(s||e.value)}`})}function Za(e,t,{filename:r,src:o,logger:n}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:o};if(e.type==="Object"){let{value:u,unit:l}=J(e);u||n.error({...a,message:'Missing required property "value".'}),l||n.error({...a,message:'Missing required property "unit".'}),u?.type!=="Number"&&n.error({...a,message:`Expected number, received ${u?.type}`,node:u}),["ms","s"].includes(l.value)||n.error({...a,message:`Expected unit "ms" or "s", received ${de(l)}`,node:l});return}e.type!=="String"&&n.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?n.error({...a,message:"Expected duration, received empty string"}):["ms","s"].includes(s)?Number.isFinite(Number.parseFloat(i))||n.error({...a,message:`Expected duration with units, received ${de(e)}`}):n.error({...a,message:`Expected unit "ms" or "s", received ${JSON.stringify(s||e.value)}`})}function d0(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};e.type!=="String"&&e.type!=="Array"&&n.error({...a,message:`Expected string or array of strings, received ${e.type}`}),e.type==="String"&&e.value===""&&n.error({...a,message:"Expected font family name, received empty string"}),e.type==="Array"&&!e.elements.every(i=>i.value.type==="String"&&i.value.value!=="")&&n.error({...a,message:"Expected an array of strings, received some non-strings or empty strings"})}function m0(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};e.type!=="String"&&e.type!=="Number"&&n.error({...a,message:`Expected a font weight name or number 0\u20131000, received ${e.type}`}),e.type==="String"&&!l0.has(e.value)&&n.error({...a,message:`Unknown font weight ${de(e)}. Expected one of: ${Ja.format([...l0])}.`}),e.type==="Number"&&(e.value<0||e.value>1e3)&&n.error({...a,message:`Expected number 0\u20131000, received ${de(e)}`})}function Bh(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};if(e.type!=="Array")n.error({...a,message:`Expected array of gradient stops, received ${e.type}`});else for(let i=0;i<e.elements.length;i++){let s=e.elements[i];if(s.value.type!=="Object"){n.error({...a,message:`Stop #${i+1}: Expected gradient stop, received ${s.value.type}`,node:s});break}cr(s.value,{color:{validator:nn,required:!0},position:{validator:ni,required:!0}},s,{filename:r,src:o,logger:n})}}function ni(e,t,{filename:r,src:o,logger:n}){e.type!=="Number"&&n.error({group:"parser",label:"validate",message:`Expected number, received ${e.type}`,filename:r,node:e,src:o})}function Oh(e,t,{filename:r,src:o,logger:n}){e.type!=="Boolean"&&n.error({group:"parser",label:"validate",message:`Expected boolean, received ${e.type}`,filename:r,node:e,src:o})}function p0(e,t,{filename:r,src:o,logger:n}){e.type!=="Object"?n.error({group:"parser",label:"validate",message:`Expected Object, received ${e.type}`,filename:r,node:e,src:o}):cr(e,{color:{validator:nn,required:!0},offsetX:{validator:Dt,required:!0},offsetY:{validator:Dt,required:!0},blur:{validator:Dt},spread:{validator:Dt},inset:{validator:Oh}},t,{filename:r,src:o,logger:n})}function X0(e,t,{filename:r,src:o,logger:n}){let a={group:"parser",label:"validate",filename:r,node:e,src:o};if(e.type==="String")c0.has(e.value)||n.error({...a,message:`Unknown stroke style ${de(e)}. Expected one of: ${Ja.format([...c0])}.`});else if(e.type==="Object"){let i=J(e);for(let l of["dashArray","lineCap"])i[l]||n.error({...a,message:`Missing required property "${l}"`});let{lineCap:s,dashArray:u}=i;if((s?.type!=="String"||!f0.has(s.value))&&n.error({...a,message:`Unknown lineCap value ${de(s)}. Expected one of: ${Ja.format([...f0])}.`,node:t}),u?.type==="Array")for(let l of u.elements)l.value.type==="String"&&l.value.value!==""?ri(l.value)?oi(l.value,t,{logger:n,src:o}):Dt(l.value,t,{logger:n,src:o}):l.value.type==="Object"?Dt(l.value,t,{logger:n,src:o}):n.error({...a,message:`Expected array of dimensions, received ${l.value.type}.`,node:l});else n.error({...a,message:`Expected array of strings, received ${u.type}`})}else n.error({...a,message:`Expected string or object, received ${e.type}`})}function Ph(e,t,{filename:r,src:o,logger:n}){e.type!=="Object"?n.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:o}):cr(e,{duration:{validator:Za,required:!0},delay:{validator:Za,required:!1},timingFunction:{validator:j0,required:!0}},t,{filename:r,src:o,logger:n})}function _h(e,{filename:t,src:r,logger:o}){let n={group:"parser",label:"validate",filename:t,node:e,src:r};e.type!=="Member"&&e.type!=="Object"&&o.error({...n,message:`Expected Object, received ${JSON.stringify(e.type)}`});let a=e.value.type==="Object"?J(e.value):{},i=a.$value,s=a.$type;if(i||o.error({...n,message:"Token missing $value"}),ri(i)){oi(i,e,{logger:o,src:r});return}switch(s||o.error({...n,message:"Token missing $type"}),s.value){case"color":nn(i,e,{logger:o,src:r});break;case"cubicBezier":j0(i,e,{logger:o,src:r});break;case"dimension":Dt(i,e,{logger:o,src:r});break;case"duration":Za(i,e,{logger:o,src:r});break;case"fontFamily":d0(i,e,{logger:o,src:r});break;case"fontWeight":m0(i,e,{logger:o,src:r});break;case"number":ni(i,e,{logger:o,src:r});break;case"shadow":if(i.type==="Object")p0(i,e,{logger:o,src:r});else if(i.type==="Array")for(let u of i.elements)p0(u.value,i,{logger:o,src:r});else o.error({...n,message:`Expected shadow object or array of shadow objects, received ${i.type}`,node:i});break;case"boolean":i.type!=="Boolean"&&o.error({...n,message:`Expected boolean, received ${i.type}`,node:i});break;case"link":i.type!=="String"?o.error({...n,message:`Expected string, received ${i.type}`,node:i}):i.value===""&&o.error({...n,message:"Expected URL, received empty string",node:i});break;case"string":i.type!=="String"&&o.error({...n,message:`Expected string, received ${i.type}`,node:i});break;case"border":Rh(i,e,{filename:t,src:r,logger:o});break;case"gradient":Bh(i,e,{filename:t,src:r,logger:o});break;case"strokeStyle":X0(i,e,{filename:t,src:r,logger:o});break;case"transition":Ph(i,e,{filename:t,src:r,logger:o});break;case"typography":if(i.type!=="Object"){o.error({...n,message:`Expected object, received ${i.type}`,node:i});break}i.members.length===0&&o.error({...n,message:"Empty typography token. Must contain at least 1 property.",node:i}),cr(i,{fontFamily:{validator:d0},fontWeight:{validator:m0}},e,{filename:t,src:r,logger:o});break;default:break}}function U0(e){return e.type!=="Object"?!1:!e.members.some(t=>t.name.type==="String"&&t.name.value==="$value")}function h0(e,t,{subpath:r,inherited:o}){if(e.value.type!=="Object")return;let n=e.value.members.find(u=>u.name.type==="String"&&u.name.value===t);if(o&&n&&U0(e.value))return o[r.join(".")||"."]=n,n;let a=r.join("."),i,s="";for(let[u,l]of Object.entries(o??{}))(u==="."||a.startsWith(u))&&u.length>s.length&&(i=l,s=u);return i}function zh(e,{config:t,filename:r,logger:o,parent:n,inheritedDeprecatedNode:a,inheritedTypeNode:i,src:s,subpath:u}){if(u.includes("$value")||e.value.type!=="Object")return;let l=J(e.value);if(!l.$value||u.includes("$extensions")||u.includes("$deps"))return;let c=u.join(".");!u.includes(".$value")&&l.value&&o.warn({group:"parser",label:"validate",message:`Group ${c} has "value". Did you mean "$value"?`,filename:r,node:e,src:s});let f=structuredClone(e),m=l.$type?.type==="String"&&l.$type.value||void 0;i&&!l.$type&&(a0(f.value,[i]),m=i.value.value);let d=l.$deprecated?(l.$deprecated?.type==="String",l.$deprecated.value):void 0;if(a&&!l.$deprecated&&(a0(f.value,[a]),d=(a.value.type==="String",a.value.value)),_h(f,{filename:r,src:s,logger:o}),t.ignore.deprecated&&d||t.ignore.tokens&&ye(t.ignore.tokens)(c))return;let g={id:Ko(c).group,tokens:[]};i&&i.value.type==="String"&&(g.$type=i.value.value);let p=J(n);p.$description&&(g.$description=He(p.$description)),p.$extensions&&(g.$extensions=He(p.$extensions));let y=He(l.$value),b={$type:m,$value:y,$deprecated:d,id:c,mode:{},originalValue:He(e.value),group:g,source:{loc:r?.href,node:f.value}};l.$description?.type==="String"&&l.$description.value&&(b.$description=l.$description.value);let D=l.$extensions?J(l.$extensions):void 0,C=D?.mode?J(D.mode):{};for(let F of[".",...Object.keys(C)]){let v=F==="."?b.$value:He(C[F]);b.mode[F]={$value:v,originalValue:v,source:{loc:r?.href,node:C[F]}}}return b}async function V0(e,{logger:t=new Wr,skipLint:r=!1,config:o={},continueOnError:n=!1,yamlToMomoa:a,transform:i,_sources:s={}}={}){let u=Array.isArray(e)?e:[e],l={};Array.isArray(u)||t.error({group:"parser",label:"init",message:"Input must be an array of input objects."}),await Promise.all(u.map(async(d,g)=>{if((!d||typeof d!="object")&&t.error({group:"parser",label:"init",message:`Input (${g}) must be an object.`}),(!d.src||typeof d.src!="string"&&typeof d.src!="object")&&t.error({message:`Input (${g}) missing "src" with a JSON/YAML string, or JSON object.`,group:"parser",label:"init"}),d.filename&&(d.filename instanceof URL||t.error({message:`Input (${g}) "filename" must be a URL (remote or file URL).`,group:"parser",label:"init"}),s[d.filename.href]))return;let p=await Ih(d.src,{filename:d.filename,logger:t,config:o,skipLint:r,continueOnError:n,yamlToMomoa:a,transform:i});l=Object.assign(l,p.tokens),d.filename&&(s[d.filename.href]={filename:d.filename,src:p.src,document:p.document})}));let c=performance.now(),f=performance.now(),m=0;for(let[d,g]of Object.entries(l)){Ah(g,{tokensSet:l,filename:s[g.source.loc]?.filename,src:s[g.source.loc]?.src,node:J(g.source.node).$value||g.source.node,logger:t}),m++;let{group:p}=Ko(d);if(p)for(let y of Object.keys(l)){let{group:b}=Ko(y);b?.startsWith(p)&&g.group.tokens.push(y)}}if(t.debug({message:`Resolved ${m} aliases`,group:"parser",label:"alias",timing:performance.now()-f}),t.debug({message:"Finish all parser tasks",group:"parser",label:"core",timing:performance.now()-c}),n){let{errorCount:d}=t.stats();d>0&&t.error({group:"parser",message:`Parser encountered ${d} ${jr(d,"error","errors")}. Exiting.`})}return{tokens:l,sources:Object.values(s)}}async function Ih(e,{filename:t,logger:r,config:o,skipLint:n,continueOnError:a=!1,transform:i,yamlToMomoa:s}){let u=performance.now(),{src:l,document:c}=i0(e,{filename:t,logger:r,continueOnError:a,yamlToMomoa:s});r.debug({group:"parser",label:"json",message:"Finish JSON parsing",timing:performance.now()-u});let f={};if(i?.root){let b=typeof e=="string"?JSON.parse(e):e,D=i?.root(b,".",c);if(D){let C=i0(D,{filename:t,logger:r,continueOnError:a});l=C.src,c=C.document}}let m=0,d=performance.now(),g={},p={};xh(c,{enter(b,D,C){if(b.type==="Document"&&b.body.type==="Object"&&b.body.members){let{members:F}=b.body;if(U0(b.body)){let v=F.find($=>$.name.type==="String"&&$.name.value==="$type");v&&(g["."]=v);let M=F.find($=>$.name.type==="String"&&$.name.value==="$deprecated");M&&(p["."]=M)}}if(b.type==="Object"&&C.length&&!b.members.some(F=>F.name.type==="String"&&F.name.value==="$value")&&!C.includes("$value")&&!C.includes("$extensions")&&i?.group){let F=i?.group(He(b),C.join("."),b);F&&Dh(b,Ya(F))}if(b.type==="Member"){let F=h0(b,"$deprecated",{subpath:C,inherited:p}),v=h0(b,"$type",{subpath:C,inherited:g});if(b.value.type==="Object"){let M=b.value.members.find(R=>R.name.type==="String"&&R.name.value==="$value"),$=v;if(!$){let R=b.value.members.find(I=>I.name.type==="String"&&I.name.value==="$type");R&&($=R)}if(M&&$?.value.type==="String"&&i?.[$.value.value]){let R=i[$.value.value]?.(He(b.value),C.join("."),b);R&&(b.value=Ya(R).body)}let k=zh(b,{filename:t,src:l,config:o,logger:r,parent:D,subpath:C,transform:i,inheritedDeprecatedNode:F,inheritedTypeNode:v});k&&(f[k.id]=k,m++)}}}}),r.debug({message:`Validated ${m} tokens`,group:"parser",label:"validate",timing:performance.now()-d});let y=performance.now();for(let[b,D]of Object.entries(f)){try{f[b].$value=ne(D)}catch(C){let{node:F}=D.source,v=J(F);v.$value&&(F=v.$value),r.error({group:"parser",label:"normalize",message:C.message,filename:t,src:l,node:F,continueOnError:a})}for(let[C,F]of Object.entries(D.mode))if(C!==".")try{f[b].mode[C].$value=ne({$type:D.$type,...F})}catch(v){let{node:M}=D.source,$=J(M);$.$value&&(M=$.$value),r.error({group:"parser",label:"normalize",message:v.message,filename:t,src:l,node:F.source.node,continueOnError:a})}}if(r.debug({message:`Normalized ${m} tokens`,group:"parser",label:"normalize",timing:performance.now()-y}),!n&&o?.plugins?.length){let b=performance.now();await Up({tokens:f,src:l,config:o,logger:r}),r.debug({message:`Linted ${m} tokens`,group:"parser",label:"lint",timing:performance.now()-b})}else r.debug({message:"Linting skipped",group:"parser",label:"lint"});return{tokens:f,document:c,src:l}}var Lh=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},xl=Lh,Hh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Nh=Hh,jh=e=>xl(Nh[e.toLowerCase()],6),Xh=jh,Uh=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Vh=e=>{let t;return(t=e.match(Uh))?xl(parseInt(t[1],16),t[1].length):void 0},qh=Vh,Ae="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",xE=`(?:${Ae}|none)`,Zr=`${Ae}%`,CE=`(?:${Ae}%|none)`,Hi=`(?:${Ae}%|${Ae})`,Wh=`(?:${Ae}%|${Ae}|none)`,Gh=`(?:${Ae}(deg|grad|rad|turn)|${Ae})`,AE=`(?:${Ae}(deg|grad|rad|turn)|${Ae}|none)`,mr="\\s*,\\s*",$E=new RegExp("^"+Wh+"$"),Yh=new RegExp(`^rgba?\\(\\s*${Ae}${mr}${Ae}${mr}${Ae}\\s*(?:,\\s*${Hi}\\s*)?\\)$`),Jh=new RegExp(`^rgba?\\(\\s*${Zr}${mr}${Zr}${mr}${Zr}\\s*(?:,\\s*${Hi}\\s*)?\\)$`),Zh=e=>{let t={mode:"rgb"},r;if(r=e.match(Yh))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Jh))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Kh=Zh,Qh=(e,t)=>e===void 0?void 0:typeof e!="object"?El(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Kr=Qh,e2=(e="rgb")=>t=>(t=Kr(t,e))!==void 0?t.mode===e?t:Je[t.mode][e]?Je[t.mode][e](t):e==="rgb"?Je[t.mode].rgb(t):Je.rgb[e](Je[t.mode].rgb(t)):void 0,Ze=e2,Je={},Cl={},ln=[],Al={},t2=e=>e,w=e=>(Je[e.mode]={...Je[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Je[t]||(Je[t]={}),Je[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=t2)}),Cl[e.mode]=e,(e.parse||[]).forEach(t=>{r2(t,e.mode)}),Ze(e.mode)),Nt=e=>Cl[e],r2=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Al[e]=t}else typeof e=="function"&&ln.indexOf(e)<0&&ln.push(e)},wi=/[^\x00-\x7F]|[a-zA-Z_]/,o2=/[^\x00-\x7F]|[-\w]/,E={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},z=0;function an(e){let t=e[z],r=e[z+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[z+2]):t==="."?/\d/.test(r):/\d/.test(t)}function Si(e){if(z>=e.length)return!1;let t=e[z];if(wi.test(t))return!0;if(t==="-"){if(e.length-z<2)return!1;let r=e[z+1];return!!(r==="-"||wi.test(r))}return!1}var n2={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Gr(e){let t="";if((e[z]==="-"||e[z]==="+")&&(t+=e[z++]),t+=sn(e),e[z]==="."&&/\d/.test(e[z+1])&&(t+=e[z++]+sn(e)),(e[z]==="e"||e[z]==="E")&&((e[z+1]==="-"||e[z+1]==="+")&&/\d/.test(e[z+2])?t+=e[z++]+e[z++]+sn(e):/\d/.test(e[z+1])&&(t+=e[z++]+sn(e))),Si(e)){let r=cn(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:E.Hue,value:t*n2[r]}:void 0}return e[z]==="%"?(z++,{type:E.Percentage,value:+t}):{type:E.Number,value:+t}}function sn(e){let t="";for(;/\d/.test(e[z]);)t+=e[z++];return t}function cn(e){let t="";for(;z<e.length&&o2.test(e[z]);)t+=e[z++];return t}function a2(e){let t=cn(e);return e[z]==="("?(z++,{type:E.Function,value:t}):t==="none"?{type:E.None,value:void 0}:{type:E.Ident,value:t}}function i2(e=""){let t=e.trim(),r=[],o;for(z=0;z<t.length;){if(o=t[z++],o===`
24
+ `||o===" "||o===" "){for(;z<t.length&&(t[z]===`
25
+ `||t[z]===" "||t[z]===" ");)z++;continue}if(o===",")return;if(o===")"){r.push({type:E.ParenClose});continue}if(o==="+"){if(z--,an(t)){r.push(Gr(t));continue}return}if(o==="-"){if(z--,an(t)){r.push(Gr(t));continue}if(Si(t)){r.push({type:E.Ident,value:cn(t)});continue}return}if(o==="."){if(z--,an(t)){r.push(Gr(t));continue}return}if(o==="/"){for(;z<t.length&&(t[z]===`
26
+ `||t[z]===" "||t[z]===" ");)z++;let n;if(an(t)&&(n=Gr(t),n.type!==E.Hue)){r.push({type:E.Alpha,value:n});continue}if(Si(t)&&cn(t)==="none"){r.push({type:E.Alpha,value:{type:E.None,value:void 0}});continue}return}if(/\d/.test(o)){z--,r.push(Gr(t));continue}if(wi.test(o)){z--,r.push(a2(t));continue}return}return r}function s2(e){e._i=0;let t=e[e._i++];if(!t||t.type!==E.Function||t.value!=="color"||(t=e[e._i++],t.type!==E.Ident))return;let r=Al[t.value];if(!r)return;let o={mode:r},n=$l(e,!1);if(!n)return;let a=Nt(r).channels;for(let i=0,s,u;i<a.length;i++)s=n[i],u=a[i],s.type!==E.None&&(o[u]=s.type===E.Number?s.value:s.value/100,u==="alpha"&&(o[u]=Math.max(0,Math.min(1,o[u]))));return o}function $l(e,t){let r=[],o;for(;e._i<e.length;){if(o=e[e._i++],o.type===E.None||o.type===E.Number||o.type===E.Alpha||o.type===E.Percentage||t&&o.type===E.Hue){r.push(o);continue}if(o.type===E.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==E.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:E.None,value:void 0}),r.every(n=>n.type!==E.Alpha)?r:void 0}}function u2(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==E.Function)return;let o=$l(e,t);if(o)return o.unshift(r.value),o}var l2=e=>{if(typeof e!="string")return;let t=i2(e),r=t?u2(t,!0):void 0,o,n=0,a=ln.length;for(;n<a;)if((o=ln[n++](e,r))!==void 0)return o;return t?s2(t):void 0},El=l2;function c2(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,o,n,a,i]=t;if(!(o.type===E.Hue||n.type===E.Hue||a.type===E.Hue))return o.type!==E.None&&(r.r=o.type===E.Number?o.value/255:o.value/100),n.type!==E.None&&(r.g=n.type===E.Number?n.value/255:n.value/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value/255:a.value/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var f2=c2,d2=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,m2=d2,p2=(e,t,r)=>e+r*(t-e),h2=e=>{let t=[];for(let r=0;r<e.length-1;r++){let o=e[r],n=e[r+1];o===void 0&&n===void 0?t.push(void 0):o!==void 0&&n!==void 0?t.push([o,n]):t.push(o!==void 0?[o,o]:[n,n])}return t},g2=e=>t=>{let r=h2(t);return o=>{let n=o*r.length,a=o>=1?r.length-1:Math.max(Math.floor(n),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],n-a)}},T=g2(p2),ee=e=>{let t=!1,r=e.map(o=>o!==void 0?(t=!0,o):1);return t?r:e},b2={mode:"rgb",channels:["r","g","b","alpha"],parse:[f2,qh,Kh,Xh,m2,"srgb"],serialize:"srgb",interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:ee}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Mt=b2,ai=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),y2=e=>{let t=ai(e.r),r=ai(e.g),o=ai(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*o,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*o,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},q0=y2,ii=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),v2=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"a98",r:ii(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:ii(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:ii(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return o!==void 0&&(n.alpha=o),n},W0=v2,si=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},D2=({r:e,g:t,b:r,alpha:o})=>{let n={mode:"lrgb",r:si(e),g:si(t),b:si(r)};return o!==void 0&&(n.alpha=o),n},hr=D2,x2=e=>{let{r:t,g:r,b:o,alpha:n}=hr(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*o,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*o,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*o};return n!==void 0&&(a.alpha=n),a},jt=x2,ui=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},C2=({r:e,g:t,b:r,alpha:o},n="rgb")=>{let a={mode:n,r:ui(e),g:ui(t),b:ui(r)};return o!==void 0&&(a.alpha=o),a},gr=C2,A2=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=gr({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return o!==void 0&&(n.alpha=o),n},Xt=A2,$2={...Mt,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>W0(jt(e)),xyz65:W0},toMode:{rgb:e=>Xt(q0(e)),xyz65:q0}},Ni=$2,E2=e=>(e=e%360)<0?e+360:e,se=E2;function F2({h:e,s:t,l:r,alpha:o}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=r+t*(r<.5?r:1-r),a=n-(n-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:a,b:2*r-n};break;case 1:i={r:a,g:n,b:2*r-n};break;case 2:i={r:2*r-n,g:n,b:a};break;case 3:i={r:2*r-n,g:a,b:n};break;case 4:i={r:a,g:2*r-n,b:n};break;case 5:i={r:n,g:2*r-n,b:a};break;default:i={r:2*r-n,g:2*r-n,b:2*r-n}}return i.mode="rgb",o!==void 0&&(i.alpha=o),i}function M2({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:n===a?0:(n-a)/(1-Math.abs(n+a-1)),l:.5*(n+a)};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var T2=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},k2=T2,w2=new RegExp(`^hsla?\\(\\s*${Gh}${mr}${Zr}${mr}${Zr}\\s*(?:,\\s*${Hi}\\s*)?\\)$`),S2=e=>{let t=e.match(w2);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=k2(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},R2=S2;function B2(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,o,n,a,i]=t;if(o.type!==E.None){if(o.type===E.Percentage)return;r.h=o.value}if(n.type!==E.None){if(n.type===E.Hue)return;r.s=n.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.l=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var O2=B2,P2=(e,t)=>e.map((r,o,n)=>{if(r===void 0)return r;let a=se(r);return o===0||e[o-1]===void 0?a:t(a-se(n[o-1]))}).reduce((r,o)=>!r.length||o===void 0||r[r.length-1]===void 0?(r.push(o),r):(r.push(o+r[r.length-1]),r),[]),it=e=>P2(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),hn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=se(e.h),o=se(t.h),n=Math.sin((o-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},_2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=se(e.h),o=se(t.h);return Math.abs(o-r)>180?r-(o-360*Math.sign(o-r)):o-r},gn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=se(e.h),o=se(t.h),n=Math.sin((o-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},z2=(e="rgb",t=[1,1,1,0])=>{let r=Nt(e),o=r.channels,n=r.difference,a=Ze(e);return(i,s)=>{let u=a(i),l=a(s);return Math.sqrt(o.reduce((c,f,m)=>{let d=n[f]?n[f](u,l):u[f]-l[f];return c+(t[m]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},st=e=>{let t=e.reduce((o,n)=>{if(n!==void 0){let a=n*Math.PI/180;o.sin+=Math.sin(a),o.cos+=Math.cos(a)}return o},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},I2={mode:"hsl",toMode:{rgb:F2},fromMode:{rgb:M2},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[O2,R2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},bn=I2;function Fl({h:e,s:t,v:r,alpha:o}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",o!==void 0&&(a.alpha=o),a}function Ml({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:n===0?0:1-a/n,v:n};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var L2={mode:"hsv",toMode:{rgb:Fl},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Ml},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,v:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},ji=L2;function H2({h:e,w:t,b:r,alpha:o}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let n=t+r;t/=n,r/=n}return Fl({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:o})}function N2(e){let t=Ml(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,o=t.v!==void 0?t.v:0,n={mode:"hwb",w:(1-r)*o,b:1-o};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function j2(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,o,n,a,i]=t;if(o.type!==E.None){if(o.type===E.Percentage)return;r.h=o.value}if(n.type!==E.None){if(n.type===E.Hue)return;r.w=n.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.b=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var X2=j2,U2={mode:"hwb",toMode:{rgb:H2},fromMode:{rgb:N2},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[X2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},w:T,b:T,alpha:{use:T,fixup:ee}},difference:{h:_2},average:{h:st}},Xi=U2,yn=Math.pow(29,3)/Math.pow(3,3),Ui=Math.pow(6,3)/Math.pow(29,3),Z={X:.3457/.3585,Y:1,Z:.2958/.3585},fr={X:.3127/.329,Y:1,Z:.3583/.329},EE=Math.pow(29,3)/Math.pow(3,3),FE=Math.pow(6,3)/Math.pow(29,3),li=e=>Math.pow(e,3)>Ui?Math.pow(e,3):(116*e-16)/yn,V2=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,i=n-r/200,s={mode:"xyz50",x:li(a)*Z.X,y:li(n)*Z.Y,z:li(i)*Z.Z};return o!==void 0&&(s.alpha=o),s},Vi=V2,q2=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=gr({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return o!==void 0&&(n.alpha=o),n},eo=q2,W2=e=>eo(Vi(e)),Tl=W2,G2=e=>{let{r:t,g:r,b:o,alpha:n}=hr(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*o,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*o,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*o};return n!==void 0&&(a.alpha=n),a},to=G2,ci=e=>e>Ui?Math.cbrt(e):(yn*e+16)/116,Y2=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=ci(e/Z.X),a=ci(t/Z.Y),i=ci(r/Z.Z),s={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-i)};return o!==void 0&&(s.alpha=o),s},qi=Y2,J2=e=>{let t=qi(to(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},kl=J2;function Z2(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,o,n,a,i]=t;if(!(o.type===E.Hue||n.type===E.Hue||a.type===E.Hue))return o.type!==E.None&&(r.l=Math.min(Math.max(0,o.value),100)),n.type!==E.None&&(r.a=n.type===E.Number?n.value:n.value*125/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*125/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var K2=Z2,Q2={mode:"lab",toMode:{xyz50:Vi,rgb:Tl},fromMode:{xyz50:qi,rgb:kl},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[K2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},ro=Q2,wl=Math.pow(29,3)/Math.pow(3,3),Sl=Math.pow(6,3)/Math.pow(29,3),fi=e=>Math.pow(e,3)>Sl?Math.pow(e,3):(116*e-16)/wl,eg=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,i=n-r/200,s={mode:"xyz65",x:fi(a)*fr.X,y:fi(n)*fr.Y,z:fi(i)*fr.Z};return o!==void 0&&(s.alpha=o),s},Rl=eg,tg=e=>Xt(Rl(e)),vn=tg,di=e=>e>Sl?Math.cbrt(e):(wl*e+16)/116,rg=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=di(e/fr.X),a=di(t/fr.Y),i=di(r/fr.Z),s={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-i)};return o!==void 0&&(s.alpha=o),s},Bl=rg,og=e=>{let t=Bl(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Dn=og,ng={...ro,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Rl,rgb:vn},fromMode:{xyz65:Bl,rgb:Dn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Wi=ng,ag=({l:e,a:t,b:r,alpha:o},n="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:n,l:e,c:a};return a&&(i.h=se(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(i.alpha=o),i},Et=ag,ig=({l:e,c:t,h:r,alpha:o},n="lab")=>{r===void 0&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(a.alpha=o),a},Ft=ig;function sg(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,o,n,a,i]=t;if(o.type!==E.None){if(o.type===E.Hue)return;r.l=Math.min(Math.max(0,o.value),100)}if(n.type!==E.None&&(r.c=Math.max(0,n.type===E.Number?n.value:n.value*150/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var ug=sg,lg={mode:"lch",toMode:{lab:Ft,rgb:e=>Tl(Ft(e))},fromMode:{rgb:e=>Et(kl(e)),lab:Et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[ug],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},oo=lg,cg={...oo,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Ft(e,"lab65"),rgb:e=>vn(Ft(e,"lab65"))},fromMode:{rgb:e=>Et(Dn(e),"lch65"),lab65:e=>Et(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Ol=cg,fg={...Mt,mode:"lrgb",toMode:{rgb:gr},fromMode:{rgb:hr},parse:["srgb-linear"],serialize:"srgb-linear"},Gi=fg,dg=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*i};return o!==void 0&&(s.alpha=o),s},no=dg,mg=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*i};return o!==void 0&&(s.alpha=o),s},Pl=mg,pg=e=>{let t=Pl(hr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},xn=pg,hg=e=>gr(no(e)),Cn=hg;function gg(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,o,n,a,i]=t;if(!(o.type===E.Hue||n.type===E.Hue||a.type===E.Hue))return o.type!==E.None&&(r.l=Math.min(Math.max(0,o.type===E.Number?o.value:o.value/100),1)),n.type!==E.None&&(r.a=n.type===E.Number?n.value:n.value*.4/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*.4/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var bg=gg,yg={...ro,mode:"oklab",toMode:{lrgb:no,rgb:Cn},fromMode:{lrgb:Pl,rgb:xn},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bg],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},Yi=yg;function vg(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,o,n,a,i]=t;if(o.type!==E.None){if(o.type===E.Hue)return;r.l=Math.min(Math.max(0,o.type===E.Number?o.value:o.value/100),1)}if(n.type!==E.None&&(r.c=Math.max(0,n.type===E.Number?n.value:n.value*.4/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var Dg=vg,xg={...oo,mode:"oklch",toMode:{oklab:e=>Ft(e,"oklab"),rgb:e=>Cn(Ft(e,"oklab"))},fromMode:{rgb:e=>Et(xn(e),"oklch"),oklab:e=>Et(e,"oklch")},parse:[Dg],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Ji=xg,Cg=e=>{let{r:t,g:r,b:o,alpha:n}=hr(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*o,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*o,z:0*t+.0451133818589026*r+1.043944368900976*o};return n!==void 0&&(a.alpha=n),a},G0=Cg,Ag=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=gr({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return o!==void 0&&(n.alpha=o),n},Y0=Ag,$g={...Mt,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Y0(jt(e)),xyz65:Y0},toMode:{rgb:e=>Xt(G0(e)),xyz65:G0}},Zi=$g,mi=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Eg=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"prophoto",r:mi(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:mi(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:mi(e*0+t*0+1.2119675456389452*r)};return o!==void 0&&(n.alpha=o),n},J0=Eg,pi=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Fg=e=>{let t=pi(e.r),r=pi(e.g),o=pi(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*o,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*o,z:0*t+0*r+.8251046025104602*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},Z0=Fg,Mg={...Mt,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:J0,rgb:e=>J0(to(e))},toMode:{xyz50:Z0,rgb:e=>eo(Z0(e))}},Ki=Mg,K0=1.09929682680944,Tg=.018053968510807,hi=e=>{let t=Math.abs(e);return t>Tg?(Math.sign(e)||1)*(K0*Math.pow(t,.45)-(K0-1)):4.5*e},kg=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rec2020",r:hi(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:hi(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:hi(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return o!==void 0&&(n.alpha=o),n},Q0=kg,el=1.09929682680944,wg=.018053968510807,gi=(e=0)=>{let t=Math.abs(e);return t<wg*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+el-1)/el,1/.45)},Sg=e=>{let t=gi(e.r),r=gi(e.g),o=gi(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*o,y:.262700212011267*t+.6779980715188708*r+.059301716469862*o,z:0*t+.0280726930490874*r+1.0609850577107909*o};return e.alpha!==void 0&&(n.alpha=e.alpha),n},tl=Sg,Rg={...Mt,mode:"rec2020",fromMode:{xyz65:Q0,rgb:e=>Q0(jt(e))},toMode:{xyz65:tl,rgb:e=>Xt(tl(e))},parse:["rec2020"],serialize:"rec2020"},Qi=Rg,Bg={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:eo,lab:qi},fromMode:{rgb:to,lab:Vi},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},es=Bg,Og=e=>{let{x:t,y:r,z:o,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),o===void 0&&(o=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*o,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*o,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*o};return n!==void 0&&(a.alpha=n),a},Pg=Og,_g=e=>{let{x:t,y:r,z:o,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),o===void 0&&(o=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*o,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*o,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*o};return n!==void 0&&(a.alpha=n),a},zg=_g,Ig={mode:"xyz65",toMode:{rgb:Xt,xyz50:Pg},fromMode:{rgb:jt,xyz50:zg},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},ts=Ig,ME=w(Ni),TE=w(bn),kE=w(ji),wE=w(Xi),SE=w(ro),RE=w(Wi),BE=w(oo),OE=w(Ol),PE=w(Gi),_E=w(Yi),zE=w(Ji),IE=w(Zi),LE=w(Ki),HE=w(Qi),NE=w(Mt),jE=w(es),XE=w(ts),ae=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Lg=Math.PI/180,Hg=180/Math.PI,rl=ae[3]*ae[4],ol=ae[1]*ae[4],nl=ae[1]*ae[2]-ae[0]*ae[3],Ng=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(nl*r+e*rl-t*ol)/(nl+rl-ol),a=r-n,i=(ae[4]*(t-n)-ae[2]*a)/ae[3],s={mode:"cubehelix",l:n,s:n===0||n===1?void 0:Math.sqrt(a*a+i*i)/(ae[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(i,a)*Hg-120),o!==void 0&&(s.alpha=o),s},jg=Ng,Xg=({h:e,s:t,l:r,alpha:o})=>{let n={mode:"rgb"};e=(e===void 0?0:e+120)*Lg,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return n.r=r+a*(ae[0]*i+ae[1]*s),n.g=r+a*(ae[2]*i+ae[3]*s),n.b=r+a*(ae[4]*i+ae[5]*s),o!==void 0&&(n.alpha=o),n},Ug=Xg,Vg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:jg},toMode:{rgb:Ug},interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},qg=Vg,fn=1,_l=1,Qr=26/180*Math.PI,dn=Math.cos(Qr),mn=Math.sin(Qr),zl=100/Math.log(139/100),Wg=({l:e,c:t,h:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"lab65",l:(Math.exp(e*fn/zl)-1)/.0039},a=(Math.exp(.0435*t*_l*fn)-1)/.075,i=a*Math.cos(r/180*Math.PI-Qr),s=a*Math.sin(r/180*Math.PI-Qr);return n.a=i*dn-s/.83*mn,n.b=i*mn+s/.83*dn,o!==void 0&&(n.alpha=o),n},Ri=Wg,Gg=({l:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=t*dn+r*mn,a=.83*(r*dn-t*mn),i=Math.sqrt(n*n+a*a),s={mode:"dlch",l:zl/fn*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*_l*fn)};return s.c&&(s.h=se((Math.atan2(a,n)+Qr)/Math.PI*180)),o!==void 0&&(s.alpha=o),s},Bi=Gg,al=e=>Ri(Et(e,"dlch")),il=e=>Ft(Bi(e),"dlab"),Yg={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:al,rgb:e=>vn(al(e))},fromMode:{lab65:il,rgb:e=>il(Dn(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},Jg=Yg,Zg={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ri,dlab:e=>Ft(e,"dlab"),rgb:e=>vn(Ri(e))},fromMode:{lab65:Bi,dlab:e=>Et(e,"dlch"),rgb:e=>Bi(Dn(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:T,c:T,h:{use:T,fixup:it},alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},Kg=Zg;function Qg({h:e,s:t,i:r,alpha:o}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",o!==void 0&&(a.alpha=o),a}function e5({r:e,g:t,b:r,alpha:o}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!==0&&(i.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),o!==void 0&&(i.alpha=o),i}var t5={mode:"hsi",toMode:{rgb:Qg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:e5},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,i:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},r5=t5,Il=203,An=.1593017578125,Ll=78.84375,$n=.8359375,En=18.8515625,Fn=18.6875;function bi(e){if(e<0)return 0;let t=Math.pow(e,1/Ll);return 1e4*Math.pow(Math.max(0,t-$n)/(En-Fn*t),1/An)}function yi(e){if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),Ll)}var vi=e=>Math.max(e/Il,0),o5=({i:e,t,p:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=bi(e+.008609037037932761*t+.11102962500302593*r),a=bi(e-.00860903703793275*t-.11102962500302599*r),i=bi(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:vi(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*i),y:vi(.3647385209748074*n+.680566024947227*a-.0453045459220346*i),z:vi(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*i)};return o!==void 0&&(s.alpha=o),s},sl=o5,Di=(e=0)=>Math.max(e*Il,0),n5=({x:e,y:t,z:r,alpha:o})=>{let n=Di(e),a=Di(t),i=Di(r),s=yi(.3592832590121217*n+.6976051147779502*a-.0358915932320289*i),u=yi(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*i),l=yi(.0070797844607477*n+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return o!==void 0&&(d.alpha=o),d},ul=n5,a5={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:sl,rgb:e=>Xt(sl(e))},fromMode:{xyz65:ul,rgb:e=>ul(jt(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:T,t:T,p:T,alpha:{use:T,fixup:ee}}},i5=a5,s5=134.03437499999998,u5=16295499532821565e-27,xi=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),s5)},Ci=(e=0)=>Math.max(e*203,0),l5=({x:e,y:t,z:r,alpha:o})=>{e=Ci(e),t=Ci(t),r=Ci(r);let n=1.15*e-.15*r,a=.66*t+.34*e,i=xi(.41478972*n+.579999*a+.014648*r),s=xi(-.20151*n+1.120649*a+.0531008*r),u=xi(-.0166008*n+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-u5,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return o!==void 0&&(c.alpha=o),c},Hl=l5,c5=134.03437499999998,ll=16295499532821565e-27,Ai=e=>{if(e<0)return 0;let t=Math.pow(e,1/c5);return 1e4*Math.pow(($n-t)/(Fn*t-En),1/An)},$i=e=>e/203,f5=({j:e,a:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+ll)/(.44+.56*(e+ll)),a=Ai(n+.13860504*t+.058047316*r),i=Ai(n-.13860504*t-.058047316*r),s=Ai(n-.096019242*t-.8118919*r),u={mode:"xyz65",x:$i(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:$i(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:$i(-.090982811*a-.31272829*i+1.5227666*s)};return o!==void 0&&(u.alpha=o),u},Nl=f5,d5=e=>{let t=Hl(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},jl=d5,m5=e=>Xt(Nl(e)),Xl=m5,p5={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:jl,xyz65:Hl},toMode:{rgb:Xl,xyz65:Nl},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:T,a:T,b:T,alpha:{use:T,fixup:ee}}},h5=p5,g5=({j:e,a:t,b:r,alpha:o})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(a.alpha=o),a},cl=g5,b5=({j:e,c:t,h:r,alpha:o})=>{r===void 0&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(n.alpha=o),n},fl=b5,y5={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:fl,rgb:e=>Xl(fl(e))},fromMode:{rgb:e=>cl(jl(e)),jab:cl},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,j:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},v5=y5,D5=({l:e,u:t,v:r,alpha:o})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),o!==void 0&&(a.alpha=o),a},Ul=D5,x5=({l:e,c:t,h:r,alpha:o})=>{r===void 0&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return o!==void 0&&(n.alpha=o),n},Vl=x5,ql=(e,t,r)=>4*e/(e+15*t+3*r),Wl=(e,t,r)=>9*t/(e+15*t+3*r),C5=ql(Z.X,Z.Y,Z.Z),A5=Wl(Z.X,Z.Y,Z.Z),$5=e=>e<=Ui?yn*e:116*Math.cbrt(e)-16,E5=({x:e,y:t,z:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=$5(t/Z.Y),a=ql(e,t,r),i=Wl(e,t,r);!isFinite(a)||!isFinite(i)?n=a=i=0:(a=13*n*(a-C5),i=13*n*(i-A5));let s={mode:"luv",l:n,u:a,v:i};return o!==void 0&&(s.alpha=o),s},Oi=E5,F5=(e,t,r)=>4*e/(e+15*t+3*r),M5=(e,t,r)=>9*t/(e+15*t+3*r),T5=F5(Z.X,Z.Y,Z.Z),k5=M5(Z.X,Z.Y,Z.Z),w5=({l:e,u:t,v:r,alpha:o})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let n=t/(13*e)+T5,a=r/(13*e)+k5,i=Z.Y*(e<=8?e/yn:Math.pow((e+16)/116,3)),s=i*(9*n)/(4*a),u=i*(12-3*n-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return o!==void 0&&(l.alpha=o),l},Pi=w5,S5=e=>Ul(Oi(to(e))),R5=e=>eo(Pi(Vl(e))),B5={mode:"lchuv",toMode:{luv:Vl,rgb:R5},fromMode:{rgb:S5,luv:Ul},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},O5=B5,P5={mode:"luv",toMode:{xyz50:Pi,rgb:e=>eo(Pi(e))},fromMode:{xyz50:Oi,rgb:e=>Oi(to(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:T,u:T,v:T,alpha:{use:T,fixup:ee}}},_5=P5;function _i(e){let o=1.170873786407767;return .5*(o*e-.206+Math.sqrt((o*e-.206)*(o*e-.206)+4*.03*o*e))}function pn(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function z5(e,t){let r,o,n,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,o=1.76576728,n=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,o=-.45954404,n=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,o=-.00915799,n=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+o*e+n*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function rs(e,t){let r=z5(e,t),o=no({l:1,a:r*e,b:r*t}),n=Math.cbrt(1/Math.max(o.r,o.g,o.b)),a=n*r;return[n,a]}function I5(e,t,r,o,n,a=null){a||(a=rs(e,t));let i;if((r-n)*a[1]-(a[0]-n)*o<=0)i=a[1]*n/(o*a[0]+a[1]*(n-r));else{i=a[1]*(n-1)/(o*(a[0]-1)+a[1]*(n-r));{let s=r-n,u=o,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=n*(1-i)+i*r,y=i*o,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,K=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=K/(K*K-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ke=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ke,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ke>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function os(e,t,r=null){r||(r=rs(e,t));let o=r[0],n=r[1];return[n/o,n/(1-o)]}function Gl(e,t,r){let o=rs(t,r),n=I5(t,r,e,1,e,o),a=os(t,r,o),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=n/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,n]}function dl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,o=e.b!==void 0?e.b:0,n={mode:"okhsl",l:_i(t)};e.alpha!==void 0&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+o*o);if(!a)return n.s=0,n;let[i,s,u]=Gl(t,r/a,o/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(n.s=l,n.h=se(Math.atan2(o,r)*180/Math.PI)),n}function ml(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.l!==void 0?e.l:0,n={mode:"oklab",l:pn(o)};if(e.alpha!==void 0&&(n.alpha=e.alpha),!r||o===1)return n.a=n.b=0,n;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=Gl(n.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return n.a=g*a,n.b=g*i,n}var L5={...bn,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:dl,rgb:e=>dl(xn(e))},toMode:{oklab:ml,rgb:e=>Cn(ml(e))}},H5=L5;function pl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,o=e.b!==void 0?e.b:0,n=Math.sqrt(r*r+o*o),a=n?r/n:1,i=n?o/n:1,[s,u]=os(a,i),l=.5,c=1-l/s,f=u/(n+t*u),m=f*t,d=f*n,g=pn(m),p=d*g/m,y=no({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,n=n/b*_i(t)/t,t=_i(t);let D={mode:"okhsv",s:n?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=se(Math.atan2(o,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function hl(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,n=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=os(a,i),l=.5,c=1-l/s,f=1-o*l/(l+u-u*c*o),m=o*u*l/(l+u-u*c*o),d=pn(f),g=m*d/f,p=no({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=pn(n*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var N5={...ji,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:pl,rgb:e=>pl(xn(e))},toMode:{oklab:hl,rgb:e=>Cn(hl(e))}},Yl=N5,Ht=.0037930732552754493,Jl=Math.cbrt(Ht),Ei=e=>Math.cbrt(e)-Jl,j5=e=>{let{r:t,g:r,b:o,alpha:n}=hr(e),a=Ei(.3*t+.622*r+.078*o+Ht),i=Ei(.23*t+.692*r+.078*o+Ht),s=Ei(.2434226892454782*t+.2047674442449682*r+.5518098665095535*o+Ht),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return n!==void 0&&(u.alpha=n),u},X5=j5,Fi=e=>Math.pow(e+Jl,3),U5=({x:e,y:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Fi(e+t)-Ht,a=Fi(t-e)-Ht,i=Fi(r+t)-Ht,s=gr({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*i});return o!==void 0&&(s.alpha=o),s},V5=U5,q5={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:V5},fromMode:{rgb:X5},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:T,y:T,b:T,alpha:{use:T,fixup:ee}}},W5=q5,G5=({r:e,g:t,b:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return o!==void 0&&(n.alpha=o),n},Y5=G5,J5=({y:e,i:t,q:r,alpha:o})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return o!==void 0&&(n.alpha=o),n},Z5=J5,K5={mode:"yiq",toMode:{rgb:Z5},fromMode:{rgb:Y5},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:T,i:T,q:T,alpha:{use:T,fixup:ee}}},Q5=K5,eb=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,tb=(e=4)=>t=>typeof t=="number"?eb(t,e):t,Yr=tb,UE=Yr(2),rb=e=>Math.max(0,Math.min(1,e||0)),un=e=>Math.round(rb(e)*255),Zl=Ze("rgb"),VE=Ze("hsl"),Kl=e=>{if(e===void 0)return;let t=un(e.r),r=un(e.g),o=un(e.b);return"#"+(1<<24|t<<16|r<<8|o).toString(16).slice(1)},ob=e=>{if(e===void 0)return;let t=un(e.alpha!==void 0?e.alpha:1);return Kl(e)+(256|t).toString(16).slice(1)},Jr=e=>{let t=Kr(e);if(!t)return;let r=Nt(t.mode);if(!r.serialize||typeof r.serialize=="string"){let o=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((n,a)=>{n!=="alpha"&&(o+=(a?" ":"")+(t[n]!==void 0?t[n]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(o+=` / ${t.alpha}`),o+")"}if(typeof r.serialize=="function")return r.serialize(t)},Ql=e=>Kl(Zl(e)),nb=e=>ob(Zl(e)),ab=Ze("rgb"),ib=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},ec=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function tc(e){return ec(ab(e))}function rc(e="rgb"){let{gamut:t}=Nt(e);if(!t)return o=>!0;let r=Ze(typeof t=="string"?t:e);return o=>ec(r(o))}function sb(e="rgb"){let{gamut:t}=Nt(e);if(!t)return a=>Kr(a);let r=typeof t=="string"?t:e,o=Ze(r),n=rc(r);return a=>{let i=Kr(a);if(!i)return;let s=o(i);if(n(s))return i;let u=ib(s);return i.mode===u.mode?u:Ze(i.mode)(u)}}function Mi(e="rgb",t="oklch",r=z2("oklch"),o=.02){let n=Ze(e),a=Nt(e);if(!a.gamut)return c=>n(c);let i=rc(e),s=sb(e),u=Ze(t),{ranges:l}=Nt(t);if(!l.l||!l.c)throw new Error("LCH-like space expected");return c=>{if(c=Kr(c),c===void 0)return;let f={...u(c)};if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=l.l[1]){let y={...a.white,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(f.l<=l.l[0]){let y={...a.black,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(i(f))return n(f);let m=0,d=f.c,g=(l.c[1]-l.c[0])/4e3,p=s(f);for(;d-m>g;)f.c=(m+d)*.5,p=s(f),i(f)||r&&o>0&&r(f,p)<=o?m=f.c:d=f.c;return n(i(f)?f:p)}}var ub=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gl={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},dr={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function lb(e){let t=El(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in gl))throw new Error(`Unsupported color space: ${t.mode}`);let r=gl[t.mode],o=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":o=[t.r,t.g,t.b];break;case"hsl":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;o=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;o=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":o=[t.l,t.a,t.b];break;case"lch":case"oklch":o=[t.l,t.c,t.h??0];break;case"okhsv":o=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":o=[t.x,t.y,t.z];break}let n={colorSpace:r,components:o,alpha:t.alpha??1};return ub.test(e)&&(n.hex=Ql(t)),n}function cb(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,o]=e.components;return{mode:dr[e.colorSpace]||e.colorSpace,r:t,g:r,b:o,alpha:e.alpha}}case"hsl":{let[t,r,o]=e.components,n=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/n,l:o/a,alpha:e.alpha}}case"hwb":{let[t,r,o]=e.components,n=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/n,b:o/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,o]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:o,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,o]=e.components;return{mode:e.colorSpace,l:t,c:r,h:o,alpha:e.alpha}}case"okhsv":{let[t,r,o]=e.components;return{mode:e.colorSpace,h:t,s:r,v:o,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,o]=e.components;return{mode:dr[e.colorSpace],x:t,y:r,z:o,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(dr).join(", ")}`)}}var At={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function oc(e){let t="";for(let r of e.split("")){if(r==="."){t+="-";continue}let o=!0;if(o&&/\p{Uppercase_Letter}/u.test(r)){t+=`-${r.toLocaleLowerCase()}`,o=!1;continue}else o=!0;t+=r}return t}function zi(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function fb(e){for(var t="",r=0;r<e.length;r++)t+=zi(e[r]);return t}function nc(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(nc(y,t),"$")});return"(?:".concat(r.join("|"),")")}var o="",n="",a=".";t===!0?(o="/",n="[/\\\\]",a="[^/\\\\]"):t&&(o=t,n=fb(o),n.length>1?(n="(?:".concat(n,")"),a="((?!".concat(n,").)")):a="[^".concat(n,"]"));for(var i=t?"".concat(n,"+?"):"",s=t?"".concat(n,"*?"):"",u=t?e.split(o):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=zi(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=zi(p)}l+=d}}return l}function db(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function ac(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=nc(e,t.separator),o=new RegExp("^".concat(r,"$"),t.flags),n=db.bind(null,o);return n.options=t,n.pattern=e,n.regexp=o,n}function mb(e,{$type:t}){if(e){if(typeof e!="string"&&typeof e!="object"||Array.isArray(e))throw new Error(`transform(): expected string or Object of strings, received ${Array.isArray(e)?"Array":typeof e}`);switch(t){case"typography":if(typeof e!="object")throw new Error("transform(): typography tokens must be an object of keys");break}}}var qE=w(Ni),WE=w(qg),GE=w(Jg),YE=w(Kg),JE=w(r5),ZE=w(bn),KE=w(ji),QE=w(Xi),eF=w(i5),tF=w(h5),rF=w(v5),oF=w(ro),nF=w(Wi),aF=w(oo),iF=w(Ol),sF=w(O5),uF=w(Gi),lF=w(_5),cF=w(H5),fF=w(Yl),dF=w(Yi),mF=w(Ji),pF=w(Zi),hF=w(Ki),gF=w(Qi),bF=w(Mt),yF=w(W5),vF=w(es),DF=w(ts),xF=w(Q5);function ue(e){if(!e)throw new Error("Undefined token");return`var(${pr(e.id)})`}function bl({$type:e,localID:t}){if(e==="transition")return["duration","delay","timing-function"].map(r=>pr(`${t}-${r}`,{wrapVar:!0})).join(" ")}var pb=/(?:(\p{Uppercase_Letter}?[\p{Lowercase_Letter}\p{Number}]+|[\p{Uppercase_Letter}\p{Number}]+|[\u{80}-\u{10FFFF}\p{Number}]+)|.)/u;function pr(e,{prefix:t,wrapVar:r=!1}={}){if(typeof e!="string")throw new Error(`makeCSSVar() Expected string, received ${e}`);let o=e.split(pb).filter(Boolean).join("-");t&&!o.startsWith(`${t}-`)&&(o=`${t}-${o}`);let n=`--${o}`.toLocaleLowerCase();return r?`var(${n})`:n}function hb(e,{tokensSet:t,transformAlias:r=ue}){return e.aliasChain?.[0]?r(t[e.aliasChain[0]]):e.$value===!0?"1":"0"}function Mn(e,t){let{transformAlias:r=ue,tokensSet:o}=t;if(e.aliasChain?.[0])return r(o[e.aliasChain[0]]);let{colorSpace:n,components:a,alpha:i=1}=typeof e.$value=="string"?lb(e.$value):e.$value,s=cb({colorSpace:n,components:a,alpha:i});if(!s)throw new Error(`Can\u2019t convert color ${JSON.stringify(e.$value)} to Culori color`);let u=Jr;return t.color?.legacyHex&&(u=s.alpha!==1?nb:Ql),tc(s)?u(s):gb({colorSpace:n,components:a,alpha:i},s,t.color?.depth)}var Ti={a98:w(Ni),hsl:w(bn),hwb:w(Xi),lab:w(ro),lab65:w(Wi),lch:w(oo),lrgb:w(Gi),oklab:w(Yi),oklch:w(Ji),okhsv:w(Yl),p3:w(Zi),prophoto:w(Ki),rec2020:w(Qi),rgb:w(Mt),xyz50:w(es),xyz65:w(ts)},Ii={24:Yr(4),30:Yr(4),36:Yr(5),48:Yr(6)};function gb(e,t,r=30){if(!(e.colorSpace in dr))throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of: ${Object.keys(dr).join(", ")}`);let o=dr[e.colorSpace]||"oklab",n=o;n==="lab"||n==="lab65"?n="lch":n==="oklab"&&(n="oklch");let a=Ti[o](Mi("rgb",n)(t)),i=Ti[o](Mi("p3",n)(t)),s=Ti[o](Mi("rec2020",n)(t));if(typeof r=="number"){if(!Ii[r])throw new Error(`Invalid bit depth: ${r}. Supported values: ${Object.keys(Ii).join(", ")}`);a=ki(a,r),i=ki(i,r),s=ki(s,r)}return{".":Jr(t),srgb:Jr(a),p3:Jr(i),rec2020:Jr(s)}}function ki(e,t=30){if(t==="unlimited")return e;let r={...e};for(let[o,n]of Object.entries(e))typeof n!="number"||o==="mode"||(r[o]=Ii[t](n));return r}function $t(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):e.$value.value===0?"0":`${e.$value.value}${e.$value.unit}`}function ic(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):typeof e.$value=="string"?e.$value:"dashed"}function bb(e,t){let{tokensSet:r,transformAlias:o=ue}=t;if(e.aliasChain?.[0])return o(r[e.aliasChain[0]]);let n=e.partialAliasOf?.width?o(r[e.partialAliasOf.width]):$t({$value:e.$value.width},t),a=e.partialAliasOf?.color?o(r[e.partialAliasOf.color]):Mn({$value:e.$value.color},t),i=e.partialAliasOf?.style?o(r[e.partialAliasOf.style]):ic({$value:e.$value.style},t),s=u=>[n,i,typeof a=="string"?a:a[u]].join(" ");return typeof a=="string"||tc(a.p3)?s("."):{".":s("."),srgb:s("srgb"),p3:s("p3"),rec2020:s("rec2020")}}function sc(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):`cubic-bezier(${e.$value.map((n,a)=>e.partialAliasOf?.[a]?o(r[e.partialAliasOf[a]]):n).join(", ")})`}function Li(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):`${e.$value.value}${e.$value.unit}`}var yb=/^[a-z-]+$/;function uc(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):e.$value.map(n=>yb.test(n)?n:`"${n}"`).join(", ")}function lc(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):String(e.$value)}function vb(e,t){let{tokensSet:r,transformAlias:o=ue}=t;if(e.aliasChain?.[0])return o(r[e.aliasChain[0]]);let n=!1,a=[],i=[];for(let u=0;u<e.$value.length;u++){let{color:l,position:c}=e.$value[u],f=e.partialAliasOf?.[u]?.color?o(r[e.partialAliasOf[u].color]):Mn({$value:l},t);typeof f!="string"&&(n=!0),a.push(f),i.push(e.partialAliasOf?.[u]?.position?o(r[e.partialAliasOf[u].position]):`${100*c}%`)}function s(u,l="."){return`${typeof a[u]=="string"?a[u]:a[u][l]} ${i[u]}`}return n?{".":e.$value.map((u,l)=>s(l,".")).join(", "),srgb:e.$value.map((u,l)=>s(l,"srgb")).join(", "),p3:e.$value.map((u,l)=>s(l,"p3")).join(", "),rec2020:e.$value.map((u,l)=>s(l,"rec2020")).join(", ")}:e.$value.map((u,l)=>s(l,i[l])).join(", ")}function Db(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):`url("${e.$value}")`}function cc(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):String(e.$value)}function xb(e,t){let{tokensSet:r,colorValue:o,partialAliasOf:n,transformAlias:a=ue}=t,i=n?.offsetX?a(r[n.offsetX]):$t({$value:e.offsetX},t),s=n?.offsetY?a(r[n.offsetY]):$t({$value:e.offsetY},t),u=n?.blur?a(r[n.blur]):$t({$value:e.blur},t),l=n?.spread?a(r[n.spread]):$t({$value:e.spread},t);return[e?.inset===!0?"inset":void 0,i,s,u,l,o].filter(Boolean).join(" ")}function Cb(e,t){let{tokensSet:r,transformAlias:o=ue}=t;if(e.aliasChain?.[0])return o(r[e.aliasChain[0]]);let n=e.$value.map((s,u)=>e.partialAliasOf?.[u]?.color?o(r[e.partialAliasOf[u].color]):Mn({$value:s.color},t)),a=n.some(s=>typeof s=="object"),i=s=>e.$value.map((u,l)=>xb(u,{tokensSet:r,colorValue:typeof n[l]=="string"?n[l]:n[l][s],partialAliasOf:e.partialAliasOf?.[l],transformAlias:o})).join(", ");return a?{".":i("."),srgb:i("srgb"),p3:i("p3"),rec2020:i("rec2020")}:i(".")}function fc(e,t){let{tokensSet:r,transformAlias:o=ue}=t;return e.aliasChain?.[0]?o(r[e.aliasChain[0]]):String(e.$value)}function Ab(e,t){let{tokensSet:r,transformAlias:o=ue}=t;if(e.aliasChain?.[0])return o(r[e.aliasChain[0]]);let n=e.partialAliasOf?.duration?o(r[e.partialAliasOf.duration]):Li({$value:e.$value.duration},t),a=e.partialAliasOf?.delay?o(r[e.partialAliasOf.delay]):Li({$value:e.$value.delay},t),i=e.partialAliasOf?.timingFunction?o(r[e.partialAliasOf.timingFunction]):sc({$value:e.$value.timingFunction},t);return`${n} ${a} ${i}`}function $b(e,t){let{tokensSet:r,transformAlias:o=ue}=t,n={};for(let[a,i]of Object.entries(e.$value)){let s,u=e.aliasChain?.[0]??e.partialAliasOf?.[a];if(u){let l=r[u];s=o(l.$type==="typography"?{id:`${u}-${a}`}:l)}else switch(a){case"fontFamily":s=uc({$value:i},t);break;case"fontSize":case"letterSpacing":s=$t({$value:i},t);break;case"fontWeight":s=lc({$value:i},t);break;case"lineHeight":typeof i=="number"?s=cc({$value:i},t):s=$t({$value:i},t);break;default:s=fc({$value:i},t);break}n[oc(a)]=s}return n}function Eb(e,{mode:t,...r}){let o=e.mode[t];if(!o)return;let n={id:e.id,$type:e.$type,...o};switch(n.$type){case"boolean":return hb(n,r);case"border":return bb(n,r);case"color":return Mn(n,r);case"cubicBezier":return sc(n,r);case"dimension":return $t(n,r);case"duration":return Li(n,r);case"fontFamily":return uc(n,r);case"fontWeight":return lc(n,r);case"gradient":return vb(n,r);case"link":return Db(n,r);case"number":return cc(n,r);case"shadow":return Cb(n,r);case"string":return fc(n,r);case"strokeStyle":return ic(n,r);case"transition":return Ab(n,r);case"typography":return $b(n,r)}}var Ct="css",Fb=`/* -------------------------------------------
27
27
  * Autogenerated by \u26CB Terrazzo. DO NOT EDIT!
28
- * ------------------------------------------- */`;function gb(e){let t=[];for(let r of e){if(!r.selectors.length||!Object.keys(r.declarations).length)continue;let n=[],o=[];for(let a of r.selectors)(a.startsWith("@")?n:o).push(a);for(let a of n)t.push(gl({...r,selectors:[a]}));o.length&&t.push(gl({...r,selectors:o}))}return t.join(`
28
+ * ------------------------------------------- */`;function Mb(e){let t=[];for(let r of e){if(!r.selectors.length||!Object.keys(r.declarations).length)continue;let o=[],n=[];for(let a of r.selectors)(a.startsWith("@")?o:n).push(a);for(let a of o)t.push(yl({...r,selectors:[a]}));n.length&&t.push(yl({...r,selectors:n}))}return t.join(`
29
29
 
30
- `)}function gl(e){let t=[],r=e.selectors.some(a=>a.startsWith("@")),n="";e.nestedQuery&&r?(t.push(`${n}${e.selectors.join(`,
31
- ${n}`)} {`),n+=" ",t.push(`${n}${e.nestedQuery} {`)):e.nestedQuery&&!r?(t.push(`${n}${e.nestedQuery} {`),n+=" ",t.push(`${n}${e.selectors.join(`,
32
- ${n}`)} {`)):t.push(`${n}${e.selectors.join(`,
33
- ${n}`)} {`),n+=" ",r&&(t.push(`${n}:root {`),n+=" ");let o=Object.entries(e.declarations);o.sort((a,i)=>a[0].localeCompare(i[0],"en-us",{numeric:!0}));for(let[a,i]of o)t.push(`${n}${a}: ${i.value};${i.description?` /* ${i.description} */`:""}`);for(;n!=="";)n=n.substring(0,n.length-2),t.push(`${n}}`);return t.join(`
34
- `)}var bb={bg:/(^bg-|-bg-)/,border:/(^border-|-border-)/,font:/(^font-|-font-)/,gap:/(^gap-|-gap-)/,m:/(^margin-|-margin-|)/,p:/(^padding-|-padding-|)/,shadow:/(^shadow-|-shadow-)/,text:/(^text-|-text-)/};function be(e,t,r){return`.${t}${r||""}-${tc(e.token.id).replace(bb[t],"")}`}function we(e){return{value:pr(e.localID??e.token.id,{wrapVar:!0})}}function yb(e,t){let r=[],n=Object.entries(e);n.sort((o,a)=>o[0].localeCompare(a[0]));for(let[o,a]of n){let i=oc(a),s=t.filter(u=>i(u.token.id));if(!s.length){console.warn(`[@terrazzo/plugin-css] utility group "${o}" matched 0 tokens: ${JSON.stringify(a)}`);break}switch(o){case"bg":for(let u of s){let l=be(u,"bg");switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{"background-color":we(u)}});break;case"gradient":r.push({selectors:[l],declarations:{"background-image":{value:`linear-gradient(${pr(u.localID??u.token.id,{wrapVar:!0})})`}}})}}break;case"border":for(let u of s){let l={border:"border",color:"border-color",dimension:"border-width",strokeStyle:"border-style"}[u.token.$type];l&&r.push({selectors:[be(u,"border")],declarations:{[l]:we(u)}})}for(let u of s)for(let l of["top","right","bottom","left"]){let c={border:`border-${l}`,color:`border-${l}-color`,dimension:`border-${l}-width`,strokeStyle:`border-${l}-style`}[u.token.$type];c&&r.push({selectors:[be(u,"border",`-${l}`)],declarations:{[c]:we(u)}})}break;case"font":for(let u of s){let l=be(u,"font");if(u.token.$type==="typography"&&u.type==="MULTI_VALUE"){let c={};for(let f of Object.keys(u.value))c[f]={value:pr(`${u.localID??u.token.id}-${f}`,{wrapVar:!0})};r.push({selectors:[l],declarations:c})}else{let c={dimension:"font-size",fontFamily:"font-family",fontWeight:"font-weight"}[u.token.$type];c&&r.push({selectors:[l],declarations:{[c]:we(u)}})}}break;case"layout":{let u=s.filter(l=>l.token.$type==="dimension");for(let l of u)r.push({selectors:[be(l,"gap")],declarations:{gap:we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-col")],declarations:{"column-gap":we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-row")],declarations:{"row-gap":we(l)}});for(let l of["m","p"]){let c=l==="m"?"margin":"padding";for(let f of u)r.push({selectors:[be(f,l,"a")],declarations:{[c]:we(f)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"x")],declarations:{[`${c}-left`]:m,[`${c}-right`]:m}},{selectors:[be(f,l,"y")],declarations:{[`${c}-bottom`]:m,[`${c}-top`]:m}})}for(let f of["top","right","bottom","left"])for(let m of u)r.push({selectors:[be(m,l,f[0])],declarations:{[`${c}-${f}`]:we(m)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"s")],declarations:{[`${c}-inline-start`]:m}},{selectors:[be(f,l,"e")],declarations:{[`${c}-inline-end`]:m}})}}break}case"shadow":for(let u of s)u.token.$type==="shadow"&&r.push({selectors:[be(u,"shadow")],declarations:{"box-shadow":we(u)}});break;case"text":for(let u of s){let l=be(u,"text"),c=we(u);switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{color:c}});break;case"gradient":r.push({selectors:[l],declarations:{background:{value:`-webkit-linear-gradient(${c.value})`},"-webkit-background-clip":{value:"text"},"-webkit-text-fill-color":{value:"transparent"}}});break}}break;default:console.warn(`[@terrazzo/plugin-css] unknown utility CSS group "${o}", ignoring`);break}}return r}var bl="@media (color-gamut: p3)",yl="@media (color-gamut: rec2020)";function vb({getTransforms:e,exclude:t,utility:r,modeSelectors:n,baseSelector:o,baseScheme:a}){let i=[],s=e({format:Ct,mode:"."});if(s.length){let u={selectors:[o],declarations:{}},l={selectors:[o],nestedQuery:bl,declarations:{}},c={selectors:[o],nestedQuery:yl,declarations:{}};i.push(u,l,c);let f=oc(t??[]);a&&(u.declarations["color-scheme"]={value:a});for(let m of s){if(f(m.token.id))continue;let d=m.localID??m.token.id,g=m.token.aliasedBy?.length?e({format:Ct,id:m.token.aliasedBy}):[];if(m.type==="SINGLE_VALUE")u.declarations[d]={value:m.value,description:m.token.$description};else if(m.value.srgb&&m.value.p3&&m.value.rec2020){if(u.declarations[d]={value:m.value.srgb,description:m.token.$description},m.value.p3!==m.value.srgb){l.declarations[d]={value:m.value.p3,description:m.token.$description},c.declarations[d]={value:m.value.rec2020,description:m.token.$description};for(let p of g)p.localID&&typeof p.value=="string"&&(l.declarations[p.localID]??={value:p.value,description:m.token.$description},c.declarations[p.localID]??={value:p.value,description:m.token.$description})}}else if(m.type==="MULTI_VALUE"){let p=hl({$type:m.token.$type,localID:d});p&&(u.declarations[m.localID??m.token.id]={value:p,description:m.token.$description});for(let[y,b]of Object.entries(m.value))u.declarations[y==="."?d:[d,y].join("-")]={value:b,description:m.token.$description}}}}for(let{selectors:u,tokens:l,mode:c,scheme:f}of n??[]){if(!u.length)continue;let m=e({format:Ct,id:l,mode:c});if(!m.length)continue;let d={selectors:u,declarations:{}},g={selectors:u,nestedQuery:bl,declarations:{}},p={selectors:u,nestedQuery:yl,declarations:{}},y={};i.push(d,g,p),f&&(d.declarations["color-scheme"]={value:f});for(let b of m){let D=b.localID??b.token.id,C=b.token.aliasedBy?.length?e({format:Ct,id:b.token.aliasedBy}):[];if(b.type==="SINGLE_VALUE")d.declarations[D]={value:b.value,description:b.token.$description};else if(b.value.srgb&&b.value.p3&&b.value.rec2020){if(d.declarations[D]={value:b.value.srgb,description:b.token.$description},b.value.p3!==b.value.srgb){g.declarations[D]={value:b.value.p3,description:b.token.$description},p.declarations[D]={value:b.value.rec2020,description:b.token.$description};for(let F of C)F.localID&&typeof F.value=="string"&&(g.declarations[F.localID]??={value:F.value,description:b.token.$description},p.declarations[F.localID]??={value:F.value,description:b.token.$description})}}else{let F=hl({$type:b.token.$type,localID:D});F&&(d.declarations[D]={value:F,description:b.token.$description});for(let[v,M]of Object.entries(b.value))d.declarations[`${D}-${v}`]={value:M,description:b.token.$description}}for(let F of C)F.localID&&typeof F.value=="string"&&(y[F.localID]={value:F.value,description:b.token.$description})}for(let[b,{value:D,description:C}]of Object.entries(y))d.declarations[b]??={value:D,description:C}}return r&&Object.keys(r).length&&i.push(...yb(r,e({format:Ct,mode:"."}))),gb(i)}function cc(e){let{exclude:t,variableName:r,modeSelectors:n,transform:o,utility:a,legacyHex:i,skipBuild:s,baseScheme:u}=e??{},l=e?.filename??e?.fileName??"index.css",c=e?.baseSelector??":root";function f(d){let g=r?.(d);if(g!==void 0){if(typeof g!="string")throw new Error(`variableName() must return a string; received ${g}`);return g}return pr(d.id)}let m=d=>`var(${f(d)})`;return{name:"@terrazzo/plugin-css",async transform({tokens:d,getTransforms:g,setTransform:p}){if(!g({format:Ct,id:"*",mode:"*"}).length)for(let[y,b]of Object.entries(d)){let D=f(b);for(let C of Object.keys(b.mode)){if(o){let v=o(b,C);if(v!=null){rb(v,{$type:b.$type}),p(y,{format:Ct,localID:D,value:v,mode:C});continue}}let F=pb(b,{mode:C,tokensSet:d,transformAlias:m,color:{legacyHex:i}});F!==void 0&&p(y,{format:Ct,localID:D,value:F,mode:C})}}},async build({getTransforms:d,outputFile:g}){if(s===!0)return;let p=[hb,""];p.push(vb({exclude:t,getTransforms:d,modeSelectors:n,utility:a,baseSelector:c,baseScheme:u}),`
30
+ `)}function yl(e){let t=[],r=e.selectors.some(a=>a.startsWith("@")),o="";e.nestedQuery&&r?(t.push(`${o}${e.selectors.join(`,
31
+ ${o}`)} {`),o+=" ",t.push(`${o}${e.nestedQuery} {`)):e.nestedQuery&&!r?(t.push(`${o}${e.nestedQuery} {`),o+=" ",t.push(`${o}${e.selectors.join(`,
32
+ ${o}`)} {`)):t.push(`${o}${e.selectors.join(`,
33
+ ${o}`)} {`),o+=" ",r&&(t.push(`${o}:root {`),o+=" ");let n=Object.entries(e.declarations);n.sort((a,i)=>a[0].localeCompare(i[0],"en-us",{numeric:!0}));for(let[a,i]of n)t.push(`${o}${a}: ${i.value};${i.description?` /* ${i.description} */`:""}`);for(;o!=="";)o=o.substring(0,o.length-2),t.push(`${o}}`);return t.join(`
34
+ `)}var Tb={bg:/(^bg-|-bg-)/,border:/(^border-|-border-)/,font:/(^font-|-font-)/,gap:/(^gap-|-gap-)/,m:/(^margin-|-margin-|)/,p:/(^padding-|-padding-|)/,shadow:/(^shadow-|-shadow-)/,text:/(^text-|-text-)/};function be(e,t,r){return`.${t}${r||""}-${oc(e.token.id).replace(Tb[t],"")}`}function we(e){return{value:pr(e.localID??e.token.id,{wrapVar:!0})}}function kb(e,t){let r=[],o=Object.entries(e);o.sort((n,a)=>n[0].localeCompare(a[0]));for(let[n,a]of o){let i=ac(a),s=t.filter(u=>i(u.token.id));if(!s.length){console.warn(`[@terrazzo/plugin-css] utility group "${n}" matched 0 tokens: ${JSON.stringify(a)}`);break}switch(n){case"bg":for(let u of s){let l=be(u,"bg");switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{"background-color":we(u)}});break;case"gradient":r.push({selectors:[l],declarations:{"background-image":{value:`linear-gradient(${pr(u.localID??u.token.id,{wrapVar:!0})})`}}})}}break;case"border":for(let u of s){let l={border:"border",color:"border-color",dimension:"border-width",strokeStyle:"border-style"}[u.token.$type];l&&r.push({selectors:[be(u,"border")],declarations:{[l]:we(u)}})}for(let u of s)for(let l of["top","right","bottom","left"]){let c={border:`border-${l}`,color:`border-${l}-color`,dimension:`border-${l}-width`,strokeStyle:`border-${l}-style`}[u.token.$type];c&&r.push({selectors:[be(u,"border",`-${l}`)],declarations:{[c]:we(u)}})}break;case"font":for(let u of s){let l=be(u,"font");if(u.token.$type==="typography"&&u.type==="MULTI_VALUE"){let c={};for(let f of Object.keys(u.value))c[f]={value:pr(`${u.localID??u.token.id}-${f}`,{wrapVar:!0})};r.push({selectors:[l],declarations:c})}else{let c={dimension:"font-size",fontFamily:"font-family",fontWeight:"font-weight"}[u.token.$type];c&&r.push({selectors:[l],declarations:{[c]:we(u)}})}}break;case"layout":{let u=s.filter(l=>l.token.$type==="dimension");for(let l of u)r.push({selectors:[be(l,"gap")],declarations:{gap:we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-col")],declarations:{"column-gap":we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-row")],declarations:{"row-gap":we(l)}});for(let l of["m","p"]){let c=l==="m"?"margin":"padding";for(let f of u)r.push({selectors:[be(f,l,"a")],declarations:{[c]:we(f)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"x")],declarations:{[`${c}-left`]:m,[`${c}-right`]:m}},{selectors:[be(f,l,"y")],declarations:{[`${c}-bottom`]:m,[`${c}-top`]:m}})}for(let f of["top","right","bottom","left"])for(let m of u)r.push({selectors:[be(m,l,f[0])],declarations:{[`${c}-${f}`]:we(m)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"s")],declarations:{[`${c}-inline-start`]:m}},{selectors:[be(f,l,"e")],declarations:{[`${c}-inline-end`]:m}})}}break}case"shadow":for(let u of s)u.token.$type==="shadow"&&r.push({selectors:[be(u,"shadow")],declarations:{"box-shadow":we(u)}});break;case"text":for(let u of s){let l=be(u,"text"),c=we(u);switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{color:c}});break;case"gradient":r.push({selectors:[l],declarations:{background:{value:`-webkit-linear-gradient(${c.value})`},"-webkit-background-clip":{value:"text"},"-webkit-text-fill-color":{value:"transparent"}}});break}}break;default:console.warn(`[@terrazzo/plugin-css] unknown utility CSS group "${n}", ignoring`);break}}return r}var vl="@media (color-gamut: p3)",Dl="@media (color-gamut: rec2020)";function wb({getTransforms:e,exclude:t,utility:r,modeSelectors:o,baseSelector:n,baseScheme:a}){let i=[],s=e({format:Ct,mode:"."});if(s.length){let u={selectors:[n],declarations:{}},l={selectors:[n],nestedQuery:vl,declarations:{}},c={selectors:[n],nestedQuery:Dl,declarations:{}};i.push(u,l,c);let f=ac(t??[]);a&&(u.declarations["color-scheme"]={value:a});for(let m of s){if(f(m.token.id))continue;let d=m.localID??m.token.id,g=m.token.aliasedBy?.length?e({format:Ct,id:m.token.aliasedBy}):[];if(m.type==="SINGLE_VALUE")u.declarations[d]={value:m.value,description:m.token.$description};else if(m.value.srgb&&m.value.p3&&m.value.rec2020){if(u.declarations[d]={value:m.value.srgb,description:m.token.$description},m.value.p3!==m.value.srgb){l.declarations[d]={value:m.value.p3,description:m.token.$description},c.declarations[d]={value:m.value.rec2020,description:m.token.$description};for(let p of g)p.localID&&typeof p.value=="string"&&(l.declarations[p.localID]??={value:p.value,description:m.token.$description},c.declarations[p.localID]??={value:p.value,description:m.token.$description})}}else if(m.type==="MULTI_VALUE"){let p=bl({$type:m.token.$type,localID:d});p&&(u.declarations[m.localID??m.token.id]={value:p,description:m.token.$description});for(let[y,b]of Object.entries(m.value))u.declarations[y==="."?d:[d,y].join("-")]={value:b,description:m.token.$description}}}}for(let{selectors:u,tokens:l,mode:c,scheme:f}of o??[]){if(!u.length)continue;let m=e({format:Ct,id:l,mode:c});if(!m.length)continue;let d={selectors:u,declarations:{}},g={selectors:u,nestedQuery:vl,declarations:{}},p={selectors:u,nestedQuery:Dl,declarations:{}},y={};i.push(d,g,p),f&&(d.declarations["color-scheme"]={value:f});for(let b of m){let D=b.localID??b.token.id,C=b.token.aliasedBy?.length?e({format:Ct,id:b.token.aliasedBy}):[];if(b.type==="SINGLE_VALUE")d.declarations[D]={value:b.value,description:b.token.$description};else if(b.value.srgb&&b.value.p3&&b.value.rec2020){if(d.declarations[D]={value:b.value.srgb,description:b.token.$description},b.value.p3!==b.value.srgb){g.declarations[D]={value:b.value.p3,description:b.token.$description},p.declarations[D]={value:b.value.rec2020,description:b.token.$description};for(let F of C)F.localID&&typeof F.value=="string"&&(g.declarations[F.localID]??={value:F.value,description:b.token.$description},p.declarations[F.localID]??={value:F.value,description:b.token.$description})}}else{let F=bl({$type:b.token.$type,localID:D});F&&(d.declarations[D]={value:F,description:b.token.$description});for(let[v,M]of Object.entries(b.value))d.declarations[`${D}-${v}`]={value:M,description:b.token.$description}}for(let F of C)F.localID&&typeof F.value=="string"&&(y[F.localID]={value:F.value,description:b.token.$description})}for(let[b,{value:D,description:C}]of Object.entries(y))d.declarations[b]??={value:D,description:C}}return r&&Object.keys(r).length&&i.push(...kb(r,e({format:Ct,mode:"."}))),Mb(i)}function dc(e){let{exclude:t,variableName:r,modeSelectors:o,transform:n,utility:a,legacyHex:i,skipBuild:s,baseScheme:u}=e??{},l=e?.filename??e?.fileName??"index.css",c=e?.baseSelector??":root";function f(d){let g=r?.(d);if(g!==void 0){if(typeof g!="string")throw new Error(`variableName() must return a string; received ${g}`);return g}return pr(d.id)}let m=d=>`var(${f(d)})`;return{name:"@terrazzo/plugin-css",async transform({tokens:d,getTransforms:g,setTransform:p}){if(!g({format:Ct,id:"*",mode:"*"}).length)for(let[y,b]of Object.entries(d)){let D=f(b);for(let C of Object.keys(b.mode)){if(n){let v=n(b,C);if(v!=null){mb(v,{$type:b.$type}),p(y,{format:Ct,localID:D,value:v,mode:C});continue}}let F=Eb(b,{mode:C,tokensSet:d,transformAlias:m,color:{legacyHex:i}});F!==void 0&&p(y,{format:Ct,localID:D,value:F,mode:C})}}},async build({getTransforms:d,outputFile:g}){if(s===!0)return;let p=[Fb,""];p.push(wb({exclude:t,getTransforms:d,modeSelectors:o,utility:a,baseSelector:c,baseScheme:u}),`
35
35
  `),g(l,p.join(`
36
- `))}}}var Db=/\d/,xb=["-","_","/","."];function Cb(e=""){if(!Db.test(e))return e!==e.toLowerCase()}function Ab(e,t){let r=t??xb,n=[];if(!e||typeof e!="string")return n;let o="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){n.push(o),o="",a=void 0;continue}let l=Cb(s);if(i===!1){if(a===!1&&l===!0){n.push(o),o=s,a=l;continue}if(a===!0&&l===!1&&o.length>1){let c=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=c+s,a=l;continue}}o+=s,a=l,i=u}return n.push(o),n}function fc(e,t){return e?(Array.isArray(e)?e:Ab(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function mc(e={}){return{name:"operations-transformer",transform({tokens:t,setTransform:r}){for(let[n,o]of Object.entries(t))o.$type==="color"&&o.originalValue?.$extensions?.alpha&&(dc(n,o,o.$value,o.originalValue?.$extensions?.alpha,r,"."),o.mode&&Object.entries(o.mode).forEach(([a,i])=>{i&&dc(n,o,i,o.originalValue?.$extensions?.alpha,r,a)}))}}}function dc(e,t,r,n,o,a){n&&o(e,{format:"css",value:`RGBA(var(--${fc(t.aliasOf)}), ${n[a]})`,mode:a})}var rs="@media (prefers-color-scheme: dark)";function Tn(e=":root"){return`${e}:not([data-theme='light'])`}function pc({scope:e}={}){let t=e??":root";return{filename:"tokens.css",legacyHex:!0,baseScheme:"light dark",...e?{baseSelector:t}:{},modeSelectors:[{mode:"dark",selectors:[rs,e?`${t}[data-theme='dark']`:"[data-theme='dark']"]}]}}function hc(e,{scope:t}={}){return e.replace(`${rs} {
37
- :root {`,`${rs} {
38
- ${Tn(t)} {`)}var gc={color:{$type:"color",white:{$value:"#ffffff"},black:{$value:"#000000"}}};var bc={color:{$type:"color",red:{"0":{$value:"#000000"},"10":{$value:"#410001"},"20":{$value:"#690002"},"30":{$value:"#930005"},"40":{$value:"#be0c0e"},"50":{$value:"#e32e25"},"60":{$value:"#ff5545"},"70":{$value:"#ff8a7b"},"80":{$value:"#ffb4a9"},"90":{$value:"#ffdad5"},"100":{$value:"#ffffff"},"@":{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}}},"on-red":{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},"red-container":{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},"on-red-container":{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},"inverse-red":{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}},blue:{"0":{$value:"#000000"},"10":{$value:"#001550"},"20":{$value:"#00277f"},"30":{$value:"#003ab2"},"40":{$value:"#2352d5"},"50":{$value:"#446def"},"60":{$value:"#6789ff"},"70":{$value:"#90a7ff"},"80":{$value:"#b6c4ff"},"90":{$value:"#dce1ff"},"100":{$value:"#ffffff"},"@":{$value:"{color.blue.40}",$extensions:{mode:{dark:"{color.blue.80}"}}}},"on-blue":{$value:"{color.blue.100}",$extensions:{mode:{dark:"{color.blue.20}"}}},"blue-container":{$value:"{color.blue.90}",$extensions:{mode:{dark:"{color.blue.30}"}}},"on-blue-container":{$value:"{color.blue.10}",$extensions:{mode:{dark:"{color.blue.90}"}}},"inverse-blue":{$value:"{color.blue.80}",$extensions:{mode:{dark:"{color.blue.40}"}}},green:{"0":{$value:"#000000"},"10":{$value:"#00210b"},"20":{$value:"#003917"},"30":{$value:"#005225"},"40":{$value:"#0f6d35"},"50":{$value:"#31874b"},"60":{$value:"#4da163"},"70":{$value:"#68bd7b"},"80":{$value:"#83d995"},"90":{$value:"#9ff6af"},"100":{$value:"#ffffff"},"@":{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}}},"on-green":{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},"green-container":{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},"on-green-container":{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},"inverse-green":{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},purple:{"0":{$value:"#000000"},"10":{$value:"#3f001c"},"20":{$value:"#650032"},"30":{$value:"#8e0048"},"40":{$value:"#ba0061"},"50":{$value:"#e6067a"},"60":{$value:"#ff4993"},"70":{$value:"#ff84ad"},"80":{$value:"#ffb1c7"},"90":{$value:"#ffd9e2"},"100":{$value:"#ffffff"},"@":{$value:"{color.purple.40}",$extensions:{mode:{dark:"{color.purple.80}"}}}},"on-purple":{$value:"{color.purple.100}",$extensions:{mode:{dark:"{color.purple.20}"}}},"purple-container":{$value:"{color.purple.90}",$extensions:{mode:{dark:"{color.purple.30}"}}},"on-purple-container":{$value:"{color.purple.10}",$extensions:{mode:{dark:"{color.purple.90}"}}},"inverse-purple":{$value:"{color.purple.80}",$extensions:{mode:{dark:"{color.purple.40}"}}},yellow:{"0":{$value:"#000000"},"10":{$value:"#241a00"},"20":{$value:"#3d2f00"},"30":{$value:"#574400"},"40":{$value:"#745b00"},"50":{$value:"#917400"},"60":{$value:"#b08d00"},"70":{$value:"#d0a600"},"80":{$value:"#f0c100"},"90":{$value:"#ffe089"},"100":{$value:"#ffffff"},"@":{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}}},"on-yellow":{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},"yellow-container":{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},"on-yellow-container":{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},"inverse-yellow":{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},orange:{"0":{$value:"#000000"},"10":{$value:"#341100"},"20":{$value:"#552100"},"30":{$value:"#783100"},"40":{$value:"#9e4300"},"50":{$value:"#c55500"},"60":{$value:"#ee6803"},"70":{$value:"#ff8d4c"},"80":{$value:"#ffb691"},"90":{$value:"#ffdbcb"},"100":{$value:"#ffffff"},"@":{$value:"{color.orange.40}",$extensions:{mode:{dark:"{color.orange.80}"}}}},"on-orange":{$value:"{color.orange.100}",$extensions:{mode:{dark:"{color.orange.20}"}}},"orange-container":{$value:"{color.orange.90}",$extensions:{mode:{dark:"{color.orange.30}"}}},"on-orange-container":{$value:"{color.orange.10}",$extensions:{mode:{dark:"{color.orange.90}"}}},"inverse-orange":{$value:"{color.orange.80}",$extensions:{mode:{dark:"{color.orange.40}"}}}}};var yc={"font-family-monospace":{$type:"fontFamily",$value:["Noto Sans Mono","monospace"],$description:"The font family used for code snippets and monospaced text."},"font-weight":{$type:"fontWeight",regular:{$value:"regular",$description:"Standard weight for regular text. 400 weight."},medium:{$value:"medium",$description:"Slightly heavier than regular weight. 500 weight."},"semi-bold":{$value:"semi-bold",$description:"Heavier than medium weight. 600 weight."},bold:{$value:"bold",$description:"Bold weight for emphasis. 700 weight."}}};var vc={spacing:{$type:"dimension",base:{$value:"1rem",$description:"Base spacing unit (1rem = 16px)."},"000":{$value:"0rem",$description:"No spacing (base \xD7 0)."},"025":{$value:"0.125rem",$description:"2px - Smallest increment (base \xD7 0.125)."},"050":{$value:"0.25rem",$description:"4px - Extra small spacing (base \xD7 0.25)."},"075":{$value:"0.375rem",$description:"6px - Extra small spacing (base \xD7 0.375)."},"100":{$value:"0.5rem",$description:"8px - Small spacing (base \xD7 0.5)."},"150":{$value:"0.75rem",$description:"12px - Small-medium spacing (base \xD7 0.75)."},"200":{$value:"1rem",$description:"16px - Base spacing unit (base \xD7 1)."},"250":{$value:"1.25rem",$description:"20px - Medium-small spacing (base \xD7 1.25)."},"300":{$value:"1.5rem",$description:"24px - Medium spacing (base \xD7 1.5)."},"400":{$value:"2rem",$description:"32px - Medium-large spacing (base \xD7 2)."},"500":{$value:"2.5rem",$description:"40px - Large spacing (base \xD7 2.5)."},"600":{$value:"3rem",$description:"48px - Extra large spacing (base \xD7 3)."},"800":{$value:"4rem",$description:"64px - Huge spacing (base \xD7 4)."},"1000":{$value:"5rem",$description:"80px - Massive spacing (base \xD7 5)."},"1200":{$value:"6rem",$description:"96px - Gigantic spacing (base \xD7 6)."},"2000":{$value:"10rem",$description:"160px - Maximum defined spacing (base \xD7 10)."}}};var Dc={container:{$type:"dimension",$comment:"Container widths are intentionally defined in 'px' instead of 'rem'.",sm:{$value:"320px",$description:"Small container width. Use for narrow layouts and small screens such as mobile devices."},md:{$value:"672px",$description:"Medium container width. Suitable for tablet layouts and compact desktop content areas."},lg:{$value:"1056px",$description:"Large container width. Intended for standard desktop layouts with typical content density."},xl:{$value:"1312px",$description:"Extra large container width. Use for wide desktop displays and content-heavy pages."},max:{$value:"1584px",$description:"Maximum container width. Use when constraining very wide layouts to maintain readable line lengths."}}};var xc={duration:{$type:"duration",short1:{$value:"50ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short2:{$value:"100ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short3:{$value:"150ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short4:{$value:"200ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},medium1:{$value:"250ms",$description:"These are used for medium duration transitions, like modal animations."},medium2:{$value:"300ms",$description:"These are used for medium duration transitions, like modal animations."},long1:{$value:"450ms",$description:"These durations are often paired with Emphasized easing."},long2:{$value:"500ms",$description:"These durations are often paired with Emphasized easing."}},easing:{$type:"cubicBezier",standard:{$value:[.2,0,0,1]},"standard-accelerate":{$value:[.3,0,1,1]},"standard-decelerate":{$value:[0,0,0,1]},emphasized:{$value:[.2,0,0,1],$description:"CSS approximation of the M3 emphasized curve. Pair with the long durations."},"emphasized-accelerate":{$value:[.3,0,.8,.15]},"emphasized-decelerate":{$value:[.05,.7,.1,1]},linear:{$value:[0,0,1,1]}}};var Cc={elevation:{$type:"shadow",$description:"M3 elevation levels as box shadows: a key shadow plus an ambient shadow.",level0:{$value:[{color:"#00000000",offsetX:"0px",offsetY:"0px",blur:"0px",spread:"0px"}]},level1:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"1px"}]},level2:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"2px",blur:"6px",spread:"2px"}]},level3:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"4px",blur:"8px",spread:"3px"}]},level4:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"2px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"6px",blur:"10px",spread:"4px"}]},level5:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"4px",blur:"4px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"8px",blur:"12px",spread:"6px"}]}}};var Ac={state:{$type:"number","hover-opacity":{$value:.08,$description:"State layer opacity on hover."},"focus-opacity":{$value:.1,$description:"State layer opacity on keyboard focus."},"pressed-opacity":{$value:.1,$description:"State layer opacity while pressed."},"dragged-opacity":{$value:.16,$description:"State layer opacity while dragged."},"disabled-content-opacity":{$value:.38,$description:"Opacity of disabled text and icons."},"disabled-container-opacity":{$value:.12,$description:"Opacity of disabled container fills."}}};var $c={color:{$type:"color",success:{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}},onSuccess:{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},successContainer:{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},onSuccessContainer:{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},inverseSuccess:{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},warning:{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}},onWarning:{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},warningContainer:{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},onWarningContainer:{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},inverseWarning:{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},error:{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}},onError:{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},errorContainer:{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},onErrorContainer:{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},inverseError:{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}}}};var Ec={color:{$type:"color",chart:{"1":{$value:"{color.primary.40}",$extensions:{mode:{dark:"{color.primary.80}"}}},"2":{$value:"{color.tertiary.50}",$extensions:{mode:{dark:"{color.tertiary.70}"}}},"3":{$value:"{color.blue.50}",$extensions:{mode:{dark:"{color.blue.70}"}}},"4":{$value:"{color.green.50}",$extensions:{mode:{dark:"{color.green.70}"}}},"5":{$value:"{color.orange.50}",$extensions:{mode:{dark:"{color.orange.70}"}}},"6":{$value:"{color.purple.50}",$extensions:{mode:{dark:"{color.purple.70}"}}},"7":{$value:"{color.red.50}",$extensions:{mode:{dark:"{color.red.70}"}}},"8":{$value:"{color.yellow.50}",$extensions:{mode:{dark:"{color.yellow.70}"}}}}}};var Fc={typography:{"display-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"title-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"body-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}}}};var Mc={global:{badge:{color:{$type:"color",$value:"{color.error}"}},avatar:{"container-shape":{$value:"{shape-corner.full}"}}},"z-index":{$type:"number",badge:{$value:10},popover:{$value:1e3},"notification-manager":{$value:9e3}},"scrollbar-width":{$type:"dimension",$value:"8px"}};var Tc=[["primitive/colors/color.palette.json",gc],["primitive/colors/accents.json",bc],["primitive/typography/font-weights.json",yc],["primitive/spacing/spacing.json",vc],["primitive/spacing/container.json",Dc],["primitive/animation/motion.json",xc],["primitive/elevation/elevation.json",Cc],["primitive/state/state.json",Ac],["semantics/colors/color.status.json",$c],["semantics/colors/color.chart.json",Ec],["semantics/typography/font.body.json",Fc],["semantics/components/components.json",Mc]];var kc=new URL("file:///peacock/");async function wc(e,t={}){let r=new Wr({level:"error"}),n=T0({plugins:[cc(pc(t)),mc()]},{logger:r,cwd:kc}),o=[...Tc,...e].map(([u,l])=>({filename:new URL(`tokens/${u}`,kc),src:JSON.stringify(l)})),{tokens:a,sources:i}=await X0(o,{config:n,logger:r,skipLint:!0}),{outputFiles:s}=await p0(a,{sources:i,config:n,logger:r});return hc(s.find(u=>u.filename==="tokens.css").contents,t)}var Rc=[0,10,20,30,40,50,60,70,80,90,95,98,100],Bc=[0,4,6,10,12,17,20,22,30,40,50,60,70,80,87,90,92,94,95,96,98,99,100],Oc=["primary","secondary","tertiary","neutral","neutralVariant"],Pc=[{value:"classic",label:"Classic"},{value:"tonalSpot",label:"Tonal spot"},{value:"vibrant",label:"Vibrant"},{value:"expressive",label:"Expressive"},{value:"fidelity",label:"Fidelity"}],zc={tonalSpot:mo,vibrant:Ot,expressive:Bt,fidelity:fo};function ao(e){return typeof e=="string"&&/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.test(e)}function Sc(e){return B.fromInt(Pt(e))}function zb(e){let t=N.fromInt(Pt(e));return{neutral:B.fromHueAndChroma(t.hue,t.chroma),neutralVariant:B.fromHueAndChroma(t.hue,t.chroma+4)}}function _b(e){let t=gs(Pt(e)),r=Ee.of(t.palettes.primary.keyColor.argb);return{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2}}function Ib(e,t){let r=zc[e],n=new r(N.fromInt(Pt(t)),!1,0);return{primary:n.primaryPalette,secondary:n.secondaryPalette,tertiary:n.tertiaryPalette,neutral:n.neutralPalette,neutralVariant:n.neutralVariantPalette}}function _c(e){let t=e.variant in zc?Ib(e.variant,e.primary):_b(e.primary);return ao(e.secondary)&&(t.secondary=Sc(e.secondary)),ao(e.tertiary)&&(t.tertiary=Sc(e.tertiary)),ao(e.neutral)&&Object.assign(t,zb(e.neutral)),t}function Ic(e,t,r=[]){return[...new Set([...t,...r])].sort((o,a)=>o-a).map(o=>[o,Gt(e.tone(o))])}var br={TONAL_SPOT:2,VIBRANT:3,EXPRESSIVE:4,FIDELITY:5},ns=[{value:"standard",label:"Standard",level:0},{value:"medium",label:"Medium",level:.5},{value:"high",label:"High",level:1}],Lb={classic:br.TONAL_SPOT,tonalSpot:br.TONAL_SPOT,vibrant:br.VIBRANT,expressive:br.EXPRESSIVE,fidelity:br.FIDELITY};function os(e){let t=e.charAt(0).toUpperCase()+e.slice(1);return[[e,e,40,80],[`on${t}`,e,100,20],[`${e}Container`,e,90,30],[`on${t}Container`,e,10,90],[`inverse${t}`,e,80,40],[`${e}Fixed`,e,90,90],[`${e}FixedDim`,e,80,80],[`on${t}Fixed`,e,10,10],[`on${t}FixedVariant`,e,30,30]]}var Hb=[...os("primary"),...os("secondary"),...os("tertiary"),["surfaceTint","primary",40,80],["background","neutral",99,10],["onBackground","neutral",10,90],["surface","neutral",99,10],["onSurface","neutral",10,90],["surfaceVariant","neutralVariant",90,30],["onSurfaceVariant","neutralVariant",30,80],["inverseSurface","neutral",20,90],["inverseOnSurface","neutral",95,20],["surfaceContainerHighest","neutral",90,22],["surfaceContainerHigh","neutral",92,17],["surfaceContainer","neutral",94,12],["surfaceContainerLow","neutral",96,10],["surfaceContainerLowest","neutral",100,4],["surfaceDim","neutral",87,6],["surfaceBright","neutral",98,24],["outline","neutralVariant",50,60],["outlineVariant","neutralVariant",80,30],["shadow","neutral",0,0],["scrim","neutral",0,0]];function kn(e,t,r,n){return new W({sourceColorArgb:Pt(t.primary),variant:Lb[t.variant]??br.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:e.primary,secondaryPalette:e.secondary,tertiaryPalette:e.tertiary,neutralPalette:e.neutral,neutralVariantPalette:e.neutralVariant})}function Nb(e,t){let r=ns.find(o=>o.value===t.contrast)?.level??0;if(r===0)return(o,a,i)=>i;let n={light:[kn(e,t,!1,0),kn(e,t,!1,r)],dark:[kn(e,t,!0,0),kn(e,t,!0,r)]};return(o,a,i)=>{let s=h[o];if(!s)return i;let[u,l]=n[a?"dark":"light"],c=i+s.getTone(l)-s.getTone(u);return Math.min(100,Math.max(0,Math.round(c)))}}function Lc(e,t){let r=Nb(e,t),n=Object.fromEntries(Object.keys(e).map(a=>[a,new Set])),o={};for(let[a,i,s,u]of Hb){let l=r(a,!1,s),c=r(a,!0,u);n[i].add(l).add(c),o[a]={$value:`{color.${i}.${l}}`,$extensions:{mode:{dark:`{color.${i}.${c}}`}}}}return{roles:o,usedTones:n}}var jb=["extra-small","small","medium","large","large-increased","extra-large","full"],wn=[{value:"sharp",label:"Sharp",corners:[0,0,0,0,0,0,0]},{value:"subtle",label:"Subtle",corners:[2,4,6,8,10,14,9999]},{value:"default",label:"Default",corners:[4,8,12,16,20,28,9999]},{value:"rounded",label:"Rounded",corners:[6,12,16,24,28,36,9999]}];function Hc(e){let t=wn.find(n=>n.value===e.shape)??wn.find(n=>n.value==="default"),r={$type:"dimension",none:{$value:"0px"}};return jb.forEach((n,o)=>{r[n]=n==="full"?{$type:"string",$value:`${t.corners[o]}px`}:{$value:`${t.corners[o]}px`}}),{"shape-corner":r}}var Xb="400;500;600;700",io=[{value:"Noto Sans",label:"Noto Sans",google:"Noto Sans",fallback:["sans-serif"]},{value:"Roboto",label:"Roboto",google:"Roboto",fallback:["sans-serif"]},{value:"Inter",label:"Inter",google:"Inter",fallback:["sans-serif"]},{value:"Open Sans",label:"Open Sans",google:"Open Sans",fallback:["sans-serif"]},{value:"Lato",label:"Lato",google:"Lato",fallback:["sans-serif"]},{value:"Poppins",label:"Poppins",google:"Poppins",fallback:["sans-serif"]},{value:"Source Sans 3",label:"Source Sans 3",google:"Source Sans 3",fallback:["sans-serif"]},{value:"system-ui",label:"System UI",google:null,fallback:["-apple-system","Segoe UI","Roboto","sans-serif"]}];function as(e){return io.find(t=>t.value===e)??io[0]}function Nc(e){let t=as(e);return[t.value,...t.fallback]}function jc(e){return{"font-family-brand":{$type:"fontFamily",$value:Nc(e.font?.brand),$description:"The font family used for brand headings and titles."},"font-family-sans":{$type:"fontFamily",$value:Nc(e.font?.plain),$description:"The primary font family used for body text and general content."}}}function is(e){let t=[...new Set([as(e.font?.brand),as(e.font?.plain)])].filter(r=>r.google).map(r=>`family=${r.google.replaceAll(" ","+")}:wght@${Xb}`);return t.length?`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`:null}var Ub=Object.freeze(structuredClone(bs));function Xc(e){if(!ao(e))return;let t=e.replace("#","").toLowerCase();return t.length===3&&(t=[...t].map(r=>r+r).join("")),`#${t}`}function so(e,t,r){return e.some(n=>n.value===t)?t:r}function Vb(e={}){let t=Ub,r={primary:Xc(e.primary)??t.primary,variant:so(Pc,e.variant,t.variant),contrast:so(ns,e.contrast,t.contrast),shape:so(wn,e.shape,t.shape),font:{brand:so(io,e.font?.brand,t.font.brand),plain:so(io,e.font?.plain,t.font.plain)}};for(let n of["secondary","tertiary","neutral"]){let o=Xc(e[n]);o&&(r[n]=o)}return r}function Uc(e){let t=Vb(e),r=_c(t),{roles:n,usedTones:o}=Lc(r,t),a={$type:"color"},i={};for(let s of Oc){let u=s.startsWith("neutral")?Bc:Rc;i[s]=Ic(r[s],u,o[s]),a[s]=Object.fromEntries(i[s].map(([l,c])=>[l,{$value:c}]))}a.neutral["@"]={$value:Gt(r.neutral.tone(50))},a.neutralVariant["@"]={$value:Gt(r.neutralVariant.tone(50))};for(let[s,u]of Object.entries(n))a[s]?a[s]["@"]=u:a[s]=u;return{config:t,palettes:i,documents:[["generated/color.theme.json",{color:a}],["generated/font-family.json",jc(t)],["generated/shape.json",Hc(t)]]}}function qb(e){let t=["primary","secondary","tertiary","neutral"].filter(o=>e[o]).map(o=>`${o} ${e[o]}`).join(", "),r=is(e),n=[`Peacock theme: ${t}`,`variant ${e.variant}, contrast ${e.contrast}, shape ${e.shape}`,`fonts: brand "${e.font.brand}", plain "${e.font.plain}"`];return r&&n.push(`Load the fonts with: <link rel="stylesheet" href="${r}">`),`/*
39
- ${n.map(o=>` * ${o}`).join(`
36
+ `))}}}var Sb=/\d/,Rb=["-","_","/","."];function Bb(e=""){if(!Sb.test(e))return e!==e.toLowerCase()}function Ob(e,t){let r=t??Rb,o=[];if(!e||typeof e!="string")return o;let n="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){o.push(n),n="",a=void 0;continue}let l=Bb(s);if(i===!1){if(a===!1&&l===!0){o.push(n),n=s,a=l;continue}if(a===!0&&l===!1&&n.length>1){let c=n.at(-1);o.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,a=l;continue}}n+=s,a=l,i=u}return o.push(n),o}function mc(e,t){return e?(Array.isArray(e)?e:Ob(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function hc(e={}){return{name:"operations-transformer",transform({tokens:t,setTransform:r}){for(let[o,n]of Object.entries(t))n.$type==="color"&&n.originalValue?.$extensions?.alpha&&(pc(o,n,n.$value,n.originalValue?.$extensions?.alpha,r,"."),n.mode&&Object.entries(n.mode).forEach(([a,i])=>{i&&pc(o,n,i,n.originalValue?.$extensions?.alpha,r,a)}))}}}function pc(e,t,r,o,n,a){o&&n(e,{format:"css",value:`RGBA(var(--${mc(t.aliasOf)}), ${o[a]})`,mode:a})}var bc={"fast-spatial":{stiffness:800,damping:.6},"default-spatial":{stiffness:380,damping:.8},"slow-spatial":{stiffness:200,damping:.8},"fast-effects":{stiffness:3800,damping:1},"default-effects":{stiffness:1600,damping:1},"slow-effects":{stiffness:800,damping:1}},Pb=.002;function yc(e,{stiffness:t,damping:r}){let o=Math.sqrt(t);if(r<1){let n=o*Math.sqrt(1-r*r);return 1-Math.exp(-r*o*e)*(Math.cos(n*e)+r*o/n*Math.sin(n*e))}return 1-Math.exp(-o*e)*(1+o*e)}function vc(e){let r=0;for(let o=0;o<5;o+=.001)Math.abs(1-yc(o,e))>Pb&&(r=o);return r+.001}var gc=(e,t)=>Number(e.toFixed(t));function _b(e,t=40){let r=vc(e),o=[];for(let i=0;i<=t;i++){let s=i/t,u=i===t?1:yc(s*r,e);o.push([gc(u,3),gc(s*100,1)])}let n=o.filter((i,s)=>{if(s===0||s===o.length-1)return!0;let[u,l]=[o[s-1],o[s+1]],c=u[0]+(l[0]-u[0])*(i[1]-u[1])/(l[1]-u[1]);return Math.abs(c-i[0])>.002});return`linear(${n.map(([i,s],u)=>u===0||u===n.length-1?`${i}`:`${i} ${s}%`).join(", ")})`}function Dc(){let e={};for(let[t,r]of Object.entries(bc)){let o=t.endsWith("spatial")?"spatial":"effects";e[t]={easing:{$type:"string",$value:_b(r),$description:`Spring, stiffness ${r.stiffness}, damping ratio ${r.damping}. ${o==="spatial"?"For position, size and shape. Overshoots slightly.":"For color and opacity. Never overshoots."}`},duration:{$type:"duration",$value:`${Math.round(vc(r)*1e3)}ms`,$description:"Time the spring takes to settle. Pair with the matching easing."}}}return{"motion-spring":e}}var Tn="@media (prefers-reduced-motion: reduce)";function xc(e){let t=[];for(let r of Object.keys(bc)){let o=r.endsWith("spatial");t.push(` --motion-spring-${r}-easing: linear;`),t.push(` --motion-spring-${r}-duration: ${o?"0ms":"100ms"};`)}return`
37
+ ${Tn} {
38
+ ${e} {
39
+ ${t.join(`
40
+ `)}
41
+ }
42
+ }
43
+ `}var kn="@media (prefers-color-scheme: dark)";function wn(e=":root"){return`${e}:not([data-theme='light'])`}function Ac({scope:e}={}){let t=e??":root";return{filename:"tokens.css",legacyHex:!0,baseScheme:"light dark",...e?{baseSelector:t}:{},modeSelectors:[{mode:"dark",selectors:[kn,e?`${t}[data-theme='dark']`:"[data-theme='dark']"]}]}}function $c(e,{scope:t,highContrast:r=[]}={}){return e.replace(`${kn} {
44
+ :root {`,`${kn} {
45
+ ${wn(t)} {`)+zb(t??":root",r)+xc(t??":root")}var ns="@media (prefers-contrast: more)",Cc=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function zb(e,t,{anyElement:r=e===":root"}={}){if(t.length===0)return"";let o=(u,l)=>t.map(([c,f,m,d])=>{let g=u?d:m;return`${l}--color-${Cc(c)}: var(--color-${Cc(f)}-${g});`}).join(`
46
+ `),n=(u,l)=>`${u} {
47
+ ${o(l," ")}
48
+ }
49
+ `,a=(u,l,c)=>`${u} {
50
+ ${l} {
51
+ ${o(c," ")}
52
+ }
53
+ }
54
+ `,i=`${e}:not([data-contrast='standard'])`,s=r?"[data-contrast='high']":`${e}[data-contrast='high']`;return`
55
+ ${[a(ns,`${i}:not([data-theme='dark'])`,!1),n(`${s}:not([data-theme='dark'])`,!1),a(ns,`${e}[data-theme='dark']:not([data-contrast='standard'])`,!0),a(`${ns} and (prefers-color-scheme: dark)`,`${i}:not([data-theme='light'])`,!0),n(`${s}[data-theme='dark']`,!0),a(kn,`${s}:not([data-theme='light'])`,!0)].join(`
56
+ `)}`}var Ec={color:{$type:"color",white:{$value:"#ffffff"},black:{$value:"#000000"}}};var Fc={color:{$type:"color",red:{"0":{$value:"#000000"},"10":{$value:"#410001"},"20":{$value:"#690002"},"30":{$value:"#930005"},"40":{$value:"#be0c0e"},"50":{$value:"#e32e25"},"60":{$value:"#ff5545"},"70":{$value:"#ff8a7b"},"80":{$value:"#ffb4a9"},"90":{$value:"#ffdad5"},"100":{$value:"#ffffff"},"@":{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}}},"on-red":{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},"red-container":{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},"on-red-container":{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},"inverse-red":{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}},blue:{"0":{$value:"#000000"},"10":{$value:"#001550"},"20":{$value:"#00277f"},"30":{$value:"#003ab2"},"40":{$value:"#2352d5"},"50":{$value:"#446def"},"60":{$value:"#6789ff"},"70":{$value:"#90a7ff"},"80":{$value:"#b6c4ff"},"90":{$value:"#dce1ff"},"100":{$value:"#ffffff"},"@":{$value:"{color.blue.40}",$extensions:{mode:{dark:"{color.blue.80}"}}}},"on-blue":{$value:"{color.blue.100}",$extensions:{mode:{dark:"{color.blue.20}"}}},"blue-container":{$value:"{color.blue.90}",$extensions:{mode:{dark:"{color.blue.30}"}}},"on-blue-container":{$value:"{color.blue.10}",$extensions:{mode:{dark:"{color.blue.90}"}}},"inverse-blue":{$value:"{color.blue.80}",$extensions:{mode:{dark:"{color.blue.40}"}}},green:{"0":{$value:"#000000"},"10":{$value:"#00210b"},"20":{$value:"#003917"},"30":{$value:"#005225"},"40":{$value:"#0f6d35"},"50":{$value:"#31874b"},"60":{$value:"#4da163"},"70":{$value:"#68bd7b"},"80":{$value:"#83d995"},"90":{$value:"#9ff6af"},"100":{$value:"#ffffff"},"@":{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}}},"on-green":{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},"green-container":{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},"on-green-container":{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},"inverse-green":{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},purple:{"0":{$value:"#000000"},"10":{$value:"#3f001c"},"20":{$value:"#650032"},"30":{$value:"#8e0048"},"40":{$value:"#ba0061"},"50":{$value:"#e6067a"},"60":{$value:"#ff4993"},"70":{$value:"#ff84ad"},"80":{$value:"#ffb1c7"},"90":{$value:"#ffd9e2"},"100":{$value:"#ffffff"},"@":{$value:"{color.purple.40}",$extensions:{mode:{dark:"{color.purple.80}"}}}},"on-purple":{$value:"{color.purple.100}",$extensions:{mode:{dark:"{color.purple.20}"}}},"purple-container":{$value:"{color.purple.90}",$extensions:{mode:{dark:"{color.purple.30}"}}},"on-purple-container":{$value:"{color.purple.10}",$extensions:{mode:{dark:"{color.purple.90}"}}},"inverse-purple":{$value:"{color.purple.80}",$extensions:{mode:{dark:"{color.purple.40}"}}},yellow:{"0":{$value:"#000000"},"10":{$value:"#241a00"},"20":{$value:"#3d2f00"},"30":{$value:"#574400"},"40":{$value:"#745b00"},"50":{$value:"#917400"},"60":{$value:"#b08d00"},"70":{$value:"#d0a600"},"80":{$value:"#f0c100"},"90":{$value:"#ffe089"},"100":{$value:"#ffffff"},"@":{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}}},"on-yellow":{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},"yellow-container":{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},"on-yellow-container":{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},"inverse-yellow":{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},orange:{"0":{$value:"#000000"},"10":{$value:"#341100"},"20":{$value:"#552100"},"30":{$value:"#783100"},"40":{$value:"#9e4300"},"50":{$value:"#c55500"},"60":{$value:"#ee6803"},"70":{$value:"#ff8d4c"},"80":{$value:"#ffb691"},"90":{$value:"#ffdbcb"},"100":{$value:"#ffffff"},"@":{$value:"{color.orange.40}",$extensions:{mode:{dark:"{color.orange.80}"}}}},"on-orange":{$value:"{color.orange.100}",$extensions:{mode:{dark:"{color.orange.20}"}}},"orange-container":{$value:"{color.orange.90}",$extensions:{mode:{dark:"{color.orange.30}"}}},"on-orange-container":{$value:"{color.orange.10}",$extensions:{mode:{dark:"{color.orange.90}"}}},"inverse-orange":{$value:"{color.orange.80}",$extensions:{mode:{dark:"{color.orange.40}"}}}}};var Mc={"font-family-monospace":{$type:"fontFamily",$value:["Noto Sans Mono","monospace"],$description:"The font family used for code snippets and monospaced text."},"font-weight":{$type:"fontWeight",regular:{$value:"regular",$description:"Standard weight for regular text. 400 weight."},medium:{$value:"medium",$description:"Slightly heavier than regular weight. 500 weight."},"semi-bold":{$value:"semi-bold",$description:"Heavier than medium weight. 600 weight."},bold:{$value:"bold",$description:"Bold weight for emphasis. 700 weight."}}};var Tc={spacing:{$type:"dimension",base:{$value:"1rem",$description:"Base spacing unit (1rem = 16px)."},"000":{$value:"0rem",$description:"No spacing (base \xD7 0)."},"025":{$value:"0.125rem",$description:"2px - Smallest increment (base \xD7 0.125)."},"050":{$value:"0.25rem",$description:"4px - Extra small spacing (base \xD7 0.25)."},"075":{$value:"0.375rem",$description:"6px - Extra small spacing (base \xD7 0.375)."},"100":{$value:"0.5rem",$description:"8px - Small spacing (base \xD7 0.5)."},"150":{$value:"0.75rem",$description:"12px - Small-medium spacing (base \xD7 0.75)."},"200":{$value:"1rem",$description:"16px - Base spacing unit (base \xD7 1)."},"250":{$value:"1.25rem",$description:"20px - Medium-small spacing (base \xD7 1.25)."},"300":{$value:"1.5rem",$description:"24px - Medium spacing (base \xD7 1.5)."},"400":{$value:"2rem",$description:"32px - Medium-large spacing (base \xD7 2)."},"500":{$value:"2.5rem",$description:"40px - Large spacing (base \xD7 2.5)."},"600":{$value:"3rem",$description:"48px - Extra large spacing (base \xD7 3)."},"800":{$value:"4rem",$description:"64px - Huge spacing (base \xD7 4)."},"1000":{$value:"5rem",$description:"80px - Massive spacing (base \xD7 5)."},"1200":{$value:"6rem",$description:"96px - Gigantic spacing (base \xD7 6)."},"2000":{$value:"10rem",$description:"160px - Maximum defined spacing (base \xD7 10)."}}};var kc={container:{$type:"dimension",$comment:"Container widths are intentionally defined in 'px' instead of 'rem'.",sm:{$value:"320px",$description:"Small container width. Use for narrow layouts and small screens such as mobile devices."},md:{$value:"672px",$description:"Medium container width. Suitable for tablet layouts and compact desktop content areas."},lg:{$value:"1056px",$description:"Large container width. Intended for standard desktop layouts with typical content density."},xl:{$value:"1312px",$description:"Extra large container width. Use for wide desktop displays and content-heavy pages."},max:{$value:"1584px",$description:"Maximum container width. Use when constraining very wide layouts to maintain readable line lengths."}}};var wc={duration:{$type:"duration",short1:{$value:"50ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short2:{$value:"100ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short3:{$value:"150ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short4:{$value:"200ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},medium1:{$value:"250ms",$description:"These are used for medium duration transitions, like modal animations."},medium2:{$value:"300ms",$description:"These are used for medium duration transitions, like modal animations."},long1:{$value:"450ms",$description:"These durations are often paired with Emphasized easing."},long2:{$value:"500ms",$description:"These durations are often paired with Emphasized easing."}},easing:{$type:"cubicBezier",standard:{$value:[.2,0,0,1]},"standard-accelerate":{$value:[.3,0,1,1]},"standard-decelerate":{$value:[0,0,0,1]},emphasized:{$value:[.2,0,0,1],$description:"CSS approximation of the M3 emphasized curve. Pair with the long durations."},"emphasized-accelerate":{$value:[.3,0,.8,.15]},"emphasized-decelerate":{$value:[.05,.7,.1,1]},linear:{$value:[0,0,1,1]}}};var Sc={elevation:{$type:"shadow",$description:"M3 elevation levels as box shadows: a key shadow plus an ambient shadow.",level0:{$value:[{color:"#00000000",offsetX:"0px",offsetY:"0px",blur:"0px",spread:"0px"}]},level1:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"1px"}]},level2:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"2px",blur:"6px",spread:"2px"}]},level3:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"4px",blur:"8px",spread:"3px"}]},level4:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"2px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"6px",blur:"10px",spread:"4px"}]},level5:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"4px",blur:"4px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"8px",blur:"12px",spread:"6px"}]}}};var Rc={state:{$type:"number","hover-opacity":{$value:.08,$description:"State layer opacity on hover."},"focus-opacity":{$value:.1,$description:"State layer opacity on keyboard focus."},"pressed-opacity":{$value:.1,$description:"State layer opacity while pressed."},"dragged-opacity":{$value:.16,$description:"State layer opacity while dragged."},"disabled-content-opacity":{$value:.38,$description:"Opacity of disabled text and icons."},"disabled-container-opacity":{$value:.12,$description:"Opacity of disabled container fills."}}};var Bc={color:{$type:"color",success:{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}},onSuccess:{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},successContainer:{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},onSuccessContainer:{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},inverseSuccess:{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},warning:{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}},onWarning:{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},warningContainer:{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},onWarningContainer:{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},inverseWarning:{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},error:{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}},onError:{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},errorContainer:{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},onErrorContainer:{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},inverseError:{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}}}};var Oc={color:{$type:"color",chart:{"1":{$value:"{color.primary.40}",$extensions:{mode:{dark:"{color.primary.80}"}}},"2":{$value:"{color.tertiary.50}",$extensions:{mode:{dark:"{color.tertiary.70}"}}},"3":{$value:"{color.blue.50}",$extensions:{mode:{dark:"{color.blue.70}"}}},"4":{$value:"{color.green.50}",$extensions:{mode:{dark:"{color.green.70}"}}},"5":{$value:"{color.orange.50}",$extensions:{mode:{dark:"{color.orange.70}"}}},"6":{$value:"{color.purple.50}",$extensions:{mode:{dark:"{color.purple.70}"}}},"7":{$value:"{color.red.50}",$extensions:{mode:{dark:"{color.red.70}"}}},"8":{$value:"{color.yellow.50}",$extensions:{mode:{dark:"{color.yellow.70}"}}}}}};var Pc={typography:{"display-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"title-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"body-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}}}};var _c={global:{badge:{color:{$type:"color",$value:"{color.error}"}},avatar:{"container-shape":{$value:"{shape-corner.full}"}}},"z-index":{$type:"number",badge:{$value:10},popover:{$value:1e3},"notification-manager":{$value:9e3}},"scrollbar-width":{$type:"dimension",$value:"8px"}};var zc=[["primitive/colors/color.palette.json",Ec],["primitive/colors/accents.json",Fc],["primitive/typography/font-weights.json",Mc],["primitive/spacing/spacing.json",Tc],["primitive/spacing/container.json",kc],["primitive/animation/motion.json",wc],["primitive/elevation/elevation.json",Sc],["primitive/state/state.json",Rc],["semantics/colors/color.status.json",Bc],["semantics/colors/color.chart.json",Oc],["semantics/typography/font.body.json",Pc],["semantics/components/components.json",_c]];var Ic=new URL("file:///peacock/");async function Lc(e,t={}){let r=new Wr({level:"error"}),o=w0({plugins:[dc(Ac(t)),hc()]},{logger:r,cwd:Ic}),n=[...zc,...e].map(([u,l])=>({filename:new URL(`tokens/${u}`,Ic),src:JSON.stringify(l)})),{tokens:a,sources:i}=await V0(n,{config:o,logger:r,skipLint:!0}),{outputFiles:s}=await g0(a,{sources:i,config:o,logger:r});return $c(s.find(u=>u.filename==="tokens.css").contents,t)}var Nc=[0,10,20,30,40,50,60,70,80,90,95,98,100],jc=[0,4,6,10,12,17,20,22,30,40,50,60,70,80,87,90,92,94,95,96,98,99,100],Xc=["primary","secondary","tertiary","neutral","neutralVariant"],Uc=[{value:"classic",label:"Classic"},{value:"tonalSpot",label:"Tonal spot"},{value:"vibrant",label:"Vibrant"},{value:"expressive",label:"Expressive"},{value:"fidelity",label:"Fidelity"}],Vc={tonalSpot:mo,vibrant:Ot,expressive:Bt,fidelity:fo};function ao(e){return typeof e=="string"&&/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.test(e)}function Hc(e){return B.fromInt(Pt(e))}function Jb(e){let t=N.fromInt(Pt(e));return{neutral:B.fromHueAndChroma(t.hue,t.chroma),neutralVariant:B.fromHueAndChroma(t.hue,t.chroma+4)}}function Zb(e){let t=ys(Pt(e)),r=Ee.of(t.palettes.primary.keyColor.argb);return{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2}}function Kb(e,t){let r=Vc[e],o=new r(N.fromInt(Pt(t)),!1,0);return{primary:o.primaryPalette,secondary:o.secondaryPalette,tertiary:o.tertiaryPalette,neutral:o.neutralPalette,neutralVariant:o.neutralVariantPalette}}function qc(e){let t=e.variant in Vc?Kb(e.variant,e.primary):Zb(e.primary);return ao(e.secondary)&&(t.secondary=Hc(e.secondary)),ao(e.tertiary)&&(t.tertiary=Hc(e.tertiary)),ao(e.neutral)&&Object.assign(t,Jb(e.neutral)),t}function Wc(e,t,r=[]){return[...new Set([...t,...r])].sort((n,a)=>n-a).map(n=>[n,Gt(e.tone(n))])}var br={TONAL_SPOT:2,VIBRANT:3,EXPRESSIVE:4,FIDELITY:5},is=[{value:"standard",label:"Standard",level:0},{value:"medium",label:"Medium",level:.5},{value:"high",label:"High",level:1}],Qb={classic:br.TONAL_SPOT,tonalSpot:br.TONAL_SPOT,vibrant:br.VIBRANT,expressive:br.EXPRESSIVE,fidelity:br.FIDELITY};function as(e){let t=e.charAt(0).toUpperCase()+e.slice(1);return[[e,e,40,80],[`on${t}`,e,100,20],[`${e}Container`,e,90,30],[`on${t}Container`,e,10,90],[`inverse${t}`,e,80,40],[`${e}Fixed`,e,90,90],[`${e}FixedDim`,e,80,80],[`on${t}Fixed`,e,10,10],[`on${t}FixedVariant`,e,30,30]]}var Gc=[...as("primary"),...as("secondary"),...as("tertiary"),["surfaceTint","primary",40,80],["background","neutral",99,10],["onBackground","neutral",10,90],["surface","neutral",99,10],["onSurface","neutral",10,90],["surfaceVariant","neutralVariant",90,30],["onSurfaceVariant","neutralVariant",30,80],["inverseSurface","neutral",20,90],["inverseOnSurface","neutral",95,20],["surfaceContainerHighest","neutral",90,22],["surfaceContainerHigh","neutral",92,17],["surfaceContainer","neutral",94,12],["surfaceContainerLow","neutral",96,10],["surfaceContainerLowest","neutral",100,4],["surfaceDim","neutral",87,6],["surfaceBright","neutral",98,24],["outline","neutralVariant",50,60],["outlineVariant","neutralVariant",80,30],["shadow","neutral",0,0],["scrim","neutral",0,0]];function Sn(e,t,r,o){return new W({sourceColorArgb:Pt(t.primary),variant:Qb[t.variant]??br.TONAL_SPOT,contrastLevel:o,isDark:r,primaryPalette:e.primary,secondaryPalette:e.secondary,tertiaryPalette:e.tertiary,neutralPalette:e.neutral,neutralVariantPalette:e.neutralVariant})}function e6(e,t){let r=is.find(o=>o.value===t.contrast)?.level??0;return Yc(e,t,r)}function Yc(e,t,r){if(r===0)return(n,a,i)=>i;let o={light:[Sn(e,t,!1,0),Sn(e,t,!1,r)],dark:[Sn(e,t,!0,0),Sn(e,t,!0,r)]};return(n,a,i)=>{let s=h[n];if(!s)return i;let[u,l]=o[a?"dark":"light"],c=i+s.getTone(l)-s.getTone(u);return Math.min(100,Math.max(0,Math.round(c)))}}function Jc(e,t){let r=e6(e,t),o=Object.fromEntries(Object.keys(e).map(i=>[i,new Set])),n={};for(let[i,s,u,l]of Gc){let c=r(i,!1,u),f=r(i,!0,l);o[s].add(c).add(f),n[i]={$value:`{color.${s}.${c}}`,$extensions:{mode:{dark:`{color.${s}.${f}}`}}}}let a=[];if(t.contrast!=="high"){let i=Yc(e,t,1);for(let[s,u,l,c]of Gc){let f=i(s,!1,l),m=i(s,!0,c);o[u].add(f).add(m),a.push([s,u,f,m])}}return{roles:n,usedTones:o,highContrast:a}}var t6=["extra-small","small","medium","large","large-increased","extra-large","extra-large-increased","extra-extra-large","full"],Rn=[{value:"sharp",label:"Sharp",corners:[0,0,0,0,0,0,0,0,0]},{value:"subtle",label:"Subtle",corners:[2,4,6,8,10,14,16,24,9999]},{value:"default",label:"Default",corners:[4,8,12,16,20,28,32,48,9999]},{value:"rounded",label:"Rounded",corners:[6,12,16,24,28,36,40,56,9999]}];function Zc(e){let t=Rn.find(o=>o.value===e.shape)??Rn.find(o=>o.value==="default"),r={$type:"dimension",none:{$value:"0px"}};return t6.forEach((o,n)=>{r[o]=o==="full"?{$type:"string",$value:`${t.corners[n]}px`}:{$value:`${t.corners[n]}px`}}),{"shape-corner":r}}var r6="400;500;600;700",io=[{value:"Noto Sans",label:"Noto Sans",google:"Noto Sans",fallback:["sans-serif"]},{value:"Roboto",label:"Roboto",google:"Roboto",fallback:["sans-serif"]},{value:"Inter",label:"Inter",google:"Inter",fallback:["sans-serif"]},{value:"Open Sans",label:"Open Sans",google:"Open Sans",fallback:["sans-serif"]},{value:"Lato",label:"Lato",google:"Lato",fallback:["sans-serif"]},{value:"Poppins",label:"Poppins",google:"Poppins",fallback:["sans-serif"]},{value:"Source Sans 3",label:"Source Sans 3",google:"Source Sans 3",fallback:["sans-serif"]},{value:"system-ui",label:"System UI",google:null,fallback:["-apple-system","Segoe UI","Roboto","sans-serif"]}];function ss(e){return io.find(t=>t.value===e)??io[0]}function Kc(e){let t=ss(e);return[t.value,...t.fallback]}function Qc(e){return{"font-family-brand":{$type:"fontFamily",$value:Kc(e.font?.brand),$description:"The font family used for brand headings and titles."},"font-family-sans":{$type:"fontFamily",$value:Kc(e.font?.plain),$description:"The primary font family used for body text and general content."}}}function us(e){let t=[...new Set([ss(e.font?.brand),ss(e.font?.plain)])].filter(r=>r.google).map(r=>`family=${r.google.replaceAll(" ","+")}:wght@${r6}`);return t.length?`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`:null}var o6=`${Tn} {
57
+ :root {`;var n6=Object.freeze(structuredClone(vs));function ef(e){if(!ao(e))return;let t=e.replace("#","").toLowerCase();return t.length===3&&(t=[...t].map(r=>r+r).join("")),`#${t}`}function so(e,t,r){return e.some(o=>o.value===t)?t:r}function a6(e={}){let t=n6,r={primary:ef(e.primary)??t.primary,variant:so(Uc,e.variant,t.variant),contrast:so(is,e.contrast,t.contrast),shape:so(Rn,e.shape,t.shape),font:{brand:so(io,e.font?.brand,t.font.brand),plain:so(io,e.font?.plain,t.font.plain)}};for(let o of["secondary","tertiary","neutral"]){let n=ef(e[o]);n&&(r[o]=n)}return r}function tf(e){let t=a6(e),r=qc(t),{roles:o,usedTones:n,highContrast:a}=Jc(r,t),i={$type:"color"},s={};for(let u of Xc){let l=u.startsWith("neutral")?jc:Nc;s[u]=Wc(r[u],l,n[u]),i[u]=Object.fromEntries(s[u].map(([c,f])=>[c,{$value:f}]))}i.neutral["@"]={$value:Gt(r.neutral.tone(50))},i.neutralVariant["@"]={$value:Gt(r.neutralVariant.tone(50))};for(let[u,l]of Object.entries(o))i[u]?i[u]["@"]=l:i[u]=l;return{config:t,palettes:s,highContrast:a,documents:[["generated/color.theme.json",{color:i}],["generated/font-family.json",Qc(t)],["generated/shape.json",Zc(t)],["generated/motion-spring.json",Dc()]]}}function i6(e){let t=["primary","secondary","tertiary","neutral"].filter(n=>e[n]).map(n=>`${n} ${e[n]}`).join(", "),r=us(e),o=[`Peacock theme: ${t}`,`variant ${e.variant}, contrast ${e.contrast}, shape ${e.shape}`,`fonts: brand "${e.font.brand}", plain "${e.font.plain}"`];return r&&o.push(`Load the fonts with: <link rel="stylesheet" href="${r}">`),`/*
58
+ ${o.map(n=>` * ${n}`).join(`
40
59
  `)}
41
60
  */
42
- `}function nM(e){let{palettes:t}=Uc(e),r={};for(let[n,o]of Object.entries(t)){let a=`--color-${n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`;for(let[i,s]of o)r[`${a}-${i}`]=s}return r}function aM(e,t){return e.replace(/^:root \{/m,`${t} {`).replace(` ${Tn()} {`,` ${Tn(t)} {`).replace(/^\[data-theme='dark'\] \{/m,`${t}[data-theme='dark'] {`)}async function iM(e,t={}){return(await Vc(e,t)).css}async function Vc(e,t={}){let{config:r,documents:n,palettes:o}=Uc(e),a=qb(r)+await wc(n,t);return{config:r,css:a,fontsUrl:is(r),palettes:o}}async function sM(e,{root:t=document,scope:r,id:n="peacock-theme"}={}){let o=await Vc(e,{scope:r}),a=t instanceof Document?t.head:t,i=a.querySelector(`style#${n}`);i||(i=document.createElement("style"),i.id=n,a.append(i)),i.textContent=o.css;let s=a.querySelector(`link#${n}-fonts`);return o.fontsUrl?(s||(s=document.createElement("link"),s.id=`${n}-fonts`,s.rel="stylesheet",a.append(s)),s.href=o.fontsUrl):s?.remove(),o}export{ns as CONTRAST_LEVELS,io as FONT_OPTIONS,wn as SHAPE_PRESETS,Pc as VARIANTS,sM as applyTheme,iM as buildThemeCss,Vc as createTheme,Uc as createThemeTokens,Ub as defaultThemeConfig,is as googleFontsUrl,Vb as normalizeThemeConfig,nM as paletteVariables,aM as scopeThemeCss};
61
+ `}function xM(e){let{palettes:t}=tf(e),r={};for(let[o,n]of Object.entries(t)){let a=`--color-${o.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`;for(let[i,s]of n)r[`${a}-${i}`]=s}return r}function CM(e,t){return e.replace(/^:root \{/m,`${t} {`).replace(` ${wn()} {`,` ${wn(t)} {`).replace(/^\[data-theme='dark'\] \{/m,`${t}[data-theme='dark'] {`).replace(/:root(?=\S*data-contrast)/g,t).replace(/^( *)\[data-contrast='high'\]/gm,`$1${t}[data-contrast='high']`).replace(o6,`${Tn} {
62
+ ${t} {`)}async function AM(e,t={}){return(await rf(e,t)).css}async function rf(e,t={}){let{config:r,documents:o,palettes:n,highContrast:a}=tf(e),i=i6(r)+await Lc(o,{...t,highContrast:a});return{config:r,css:i,fontsUrl:us(r),palettes:n}}async function $M(e,{root:t=document,scope:r,id:o="peacock-theme"}={}){let n=await rf(e,{scope:r}),a=t instanceof Document?t.head:t,i=a.querySelector(`style#${o}`);i||(i=document.createElement("style"),i.id=o,a.append(i)),i.textContent=n.css;let s=a.querySelector(`link#${o}-fonts`);return n.fontsUrl?(s||(s=document.createElement("link"),s.id=`${o}-fonts`,s.rel="stylesheet",a.append(s)),s.href=n.fontsUrl):s?.remove(),n}export{is as CONTRAST_LEVELS,io as FONT_OPTIONS,Rn as SHAPE_PRESETS,Uc as VARIANTS,$M as applyTheme,AM as buildThemeCss,rf as createTheme,tf as createThemeTokens,n6 as defaultThemeConfig,us as googleFontsUrl,a6 as normalizeThemeConfig,xM as paletteVariables,CM as scopeThemeCss};
43
63
  /*! Bundled license information:
44
64
 
45
65
  @material/material-color-utilities/utils/math_utils.js: