@mdn/fred 0.1.0 → 0.2.0

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 (640) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/build/render.js +3 -3
  3. package/build/server-worker.js +2 -2
  4. package/build/types.d.ts +2 -2
  5. package/components/a11y-menu/server.css +1 -1
  6. package/components/about-tabs/element.css +3 -1
  7. package/components/about-tabs/element.js +8 -0
  8. package/components/advertising/server.css +1 -1
  9. package/components/article-footer/server.css +0 -4
  10. package/components/article-footer/server.js +13 -16
  11. package/components/baseline-indicator/server.css +5 -6
  12. package/components/baseline-indicator/server.js +1 -6
  13. package/components/blog-index/server.css +2 -2
  14. package/components/blog-post/server.css +3 -3
  15. package/components/breadcrumbs-bar/server.js +26 -7
  16. package/components/button/pure.js +6 -3
  17. package/components/code-example/common.css +47 -3
  18. package/components/code-example/element.js +4 -5
  19. package/components/code-example/prism.css +62 -59
  20. package/components/color/area.css +11 -0
  21. package/components/color/border.css +1 -1
  22. package/components/color/global.css +5 -4
  23. package/components/color-theme/element.css +4 -0
  24. package/components/color-theme/element.js +19 -30
  25. package/components/compat-table/index-common.css +4 -2
  26. package/components/content-section/server.css +137 -23
  27. package/components/contributor-spotlight/server.css +4 -4
  28. package/components/curriculum/assets/curriculum-landing-top.svg +1 -1
  29. package/components/curriculum/layout.css +81 -13
  30. package/components/curriculum/module-list.css +5 -5
  31. package/components/curriculum/module.css +3 -3
  32. package/components/curriculum/shared.css +14 -47
  33. package/components/curriculum/sidebar.css +66 -294
  34. package/components/curriculum/toc.css +9 -23
  35. package/components/curriculum/utils.js +47 -58
  36. package/components/curriculum/vars.css +68 -39
  37. package/components/curriculum-about/server.css +17 -3
  38. package/components/curriculum-about/server.js +18 -15
  39. package/components/curriculum-default/server.css +11 -0
  40. package/components/curriculum-default/server.js +17 -14
  41. package/components/curriculum-landing/server.css +7 -7
  42. package/components/curriculum-module/server.css +75 -73
  43. package/components/curriculum-module/server.js +19 -17
  44. package/components/curriculum-overview/server.css +11 -0
  45. package/components/curriculum-overview/server.js +60 -24
  46. package/components/dropdown/element.js +3 -1
  47. package/components/featured-articles/server.css +1 -1
  48. package/components/font/README.md +11 -0
  49. package/components/font/fonts/jetbrains-mono-cyrillic.woff2 +0 -0
  50. package/components/font/fonts/jetbrains-mono-italic-cyrillic.woff2 +0 -0
  51. package/components/font/fonts/jetbrains-mono-italic-latin-extended.woff2 +0 -0
  52. package/components/font/fonts/jetbrains-mono-italic-latin.woff2 +0 -0
  53. package/components/font/fonts/jetbrains-mono-latin-extended.woff2 +0 -0
  54. package/components/font/fonts/jetbrains-mono-latin.woff2 +0 -0
  55. package/components/font/fonts/jetbrains-mono-nl.patch +4758 -0
  56. package/components/font/fonts/source/jetbrains-mono-italic.ttf +0 -0
  57. package/components/font/fonts/source/jetbrains-mono.ttf +0 -0
  58. package/components/font/global.css +3 -0
  59. package/components/font/inter.css +6 -0
  60. package/components/footer/server.css +20 -3
  61. package/components/footer/server.js +3 -0
  62. package/components/generic-about/server.css +16 -14
  63. package/components/generic-community/server.css +16 -16
  64. package/components/generic-community/server.js +11 -4
  65. package/components/generic-content/server.css +1 -1
  66. package/components/generic-sidebar/server.css +2 -2
  67. package/components/generic-sidebar/server.js +14 -5
  68. package/components/generic-toc/server.css +2 -2
  69. package/components/homepage-search/element.css +14 -17
  70. package/components/html/global.css +3 -0
  71. package/components/icon/chart-no-axes-combined.svg +1 -0
  72. package/components/icon/circle-play.svg +1 -0
  73. package/components/icon/log-in.svg +1 -0
  74. package/components/icon/mdn-m.svg +1 -0
  75. package/components/icon/shield-check.svg +1 -0
  76. package/components/icon/users.svg +1 -0
  77. package/components/interactive-example/element.css +3 -1
  78. package/components/issues-table/element.css +2 -2
  79. package/components/ix-tab/element.css +1 -1
  80. package/components/language-switcher/element.css +2 -1
  81. package/components/language-switcher/element.js +1 -0
  82. package/components/latest-news/server.css +1 -1
  83. package/components/left-sidebar/server.css +12 -15
  84. package/components/live-sample-result/element.css +1 -0
  85. package/components/live-sample-result/element.js +10 -2
  86. package/components/logo/server.css +5 -0
  87. package/components/mandala/server.css +2 -2
  88. package/components/media/index.css +3 -0
  89. package/components/menu/base.css +40 -11
  90. package/components/menu/desktop.css +1 -1
  91. package/components/menu/mobile.css +1 -1
  92. package/components/menu/server.js +34 -45
  93. package/components/modal/element.js +1 -1
  94. package/components/navigation/base.css +0 -8
  95. package/components/navigation/desktop.css +22 -5
  96. package/components/navigation/mobile.css +25 -6
  97. package/components/navigation/server.js +5 -2
  98. package/components/not-found/element.css +1 -0
  99. package/components/not-found/element.js +1 -1
  100. package/components/observatory/colors.css +64 -0
  101. package/components/observatory/common.css +5 -0
  102. package/components/observatory-comparison-table/element.css +6 -6
  103. package/components/observatory-form/element.css +6 -11
  104. package/components/observatory-header-link/element.css +1 -9
  105. package/components/observatory-human-duration/element.css +1 -0
  106. package/components/observatory-human-duration/element.js +4 -3
  107. package/components/observatory-landing/server.css +208 -1
  108. package/components/observatory-landing/server.js +76 -66
  109. package/components/observatory-rescan-button/element.css +1 -0
  110. package/components/observatory-rescan-button/element.js +11 -3
  111. package/components/observatory-results/element.css +38 -42
  112. package/components/observatory-results/server.css +119 -1
  113. package/components/observatory-results/server.js +47 -43
  114. package/components/observatory-tests-and-scores/element.css +3 -1
  115. package/components/outer-layout/server.js +8 -2
  116. package/components/placement-sidebar/element.css +1 -1
  117. package/components/play-console/element.css +1 -1
  118. package/components/play-runner/element.css +3 -0
  119. package/components/playground/element.css +35 -9
  120. package/components/playground/element.js +63 -3
  121. package/components/prev-next/index.css +32 -3
  122. package/components/radius/global.css +6 -0
  123. package/components/reference-layout/server.css +4 -4
  124. package/components/reference-layout/server.js +6 -3
  125. package/components/reference-toc/server.css +2 -2
  126. package/components/scrim-inline/element.css +2 -2
  127. package/components/scrim-inline/global.css +1 -1
  128. package/components/search-button/element.css +7 -1
  129. package/components/search-modal/element.css +61 -27
  130. package/components/search-modal/element.js +14 -0
  131. package/components/sidebar-filter/element.css +1 -1
  132. package/components/site-search/element.css +6 -7
  133. package/components/specifications-list/index.js +18 -26
  134. package/components/switch/element.css +1 -1
  135. package/components/user-menu/base.css +0 -7
  136. package/components/user-menu/desktop.css +15 -3
  137. package/components/user-menu/element.js +10 -2
  138. package/components/user-menu/mobile.css +2 -14
  139. package/components/utils/index.js +9 -0
  140. package/components/vars/global.css +1 -1
  141. package/components/writer-open-editor/element.js +31 -0
  142. package/components/writer-toolbar/server.css +11 -0
  143. package/components/writer-toolbar/server.js +27 -0
  144. package/dist/client/{1048.7f6f1de50a1fda0d.js → 1048.9db1491a9a9f26c3.js} +2 -2
  145. package/dist/client/{1048.7f6f1de50a1fda0d.js.map → 1048.9db1491a9a9f26c3.js.map} +1 -1
  146. package/dist/client/1197.65020044d7ef7add.css +32 -0
  147. package/dist/client/1197.65020044d7ef7add.css.map +1 -0
  148. package/dist/client/1241.691b26f66d52ce68.css +2 -0
  149. package/dist/client/1241.691b26f66d52ce68.css.map +1 -0
  150. package/dist/client/{1342.b05de4cd80d4c221.js → 1342.a66390274e8adda1.js} +8 -8
  151. package/dist/client/{1342.b05de4cd80d4c221.js.map → 1342.a66390274e8adda1.js.map} +1 -1
  152. package/dist/client/1624.98ead28526f7a6a1.js +69 -0
  153. package/dist/client/{1624.5694c64f5e45232c.js.map → 1624.98ead28526f7a6a1.js.map} +1 -1
  154. package/dist/client/1739.8793c189d4f57b38.js +8 -0
  155. package/dist/client/{1739.505aa54ed62222c8.js.map → 1739.8793c189d4f57b38.js.map} +1 -1
  156. package/dist/client/{1916.bc7551ab839d52f8.js → 1916.53595bf8d5201723.js} +3 -3
  157. package/dist/client/{1916.bc7551ab839d52f8.js.map → 1916.53595bf8d5201723.js.map} +1 -1
  158. package/dist/client/2254.85c84b41fe477e9f.css +2 -0
  159. package/dist/client/2254.85c84b41fe477e9f.css.map +1 -0
  160. package/dist/client/2299.15bde599f83bc9f8.js +2 -0
  161. package/dist/client/2299.15bde599f83bc9f8.js.map +1 -0
  162. package/dist/client/{2448.92286b4e96ad1c02.js → 2448.34e8a46d8ac913b9.js} +7 -7
  163. package/dist/client/2448.34e8a46d8ac913b9.js.map +1 -0
  164. package/dist/client/{2656.0009ef5e53d43860.js → 2656.9ffeb69f976e1ada.js} +3 -3
  165. package/dist/client/{2656.0009ef5e53d43860.js.map → 2656.9ffeb69f976e1ada.js.map} +1 -1
  166. package/dist/client/268.5b8cf50cd9481947.js +50 -0
  167. package/dist/client/268.5b8cf50cd9481947.js.map +1 -0
  168. package/dist/client/2826.d61ca617ff379ad4.js +29 -0
  169. package/dist/client/2826.d61ca617ff379ad4.js.map +1 -0
  170. package/dist/client/{9632.b317ca4ae5930b4a.js → 3536.38f4b1a8002b53e2.js} +30 -2
  171. package/dist/client/3536.38f4b1a8002b53e2.js.map +1 -0
  172. package/dist/client/{3580.bf3f2a7896833bd8.js → 3580.92db5b07a85b0961.js} +2 -2
  173. package/dist/client/{3580.bf3f2a7896833bd8.js.map → 3580.92db5b07a85b0961.js.map} +1 -1
  174. package/dist/client/37.d890a50de1313ae7.js +120 -0
  175. package/dist/client/37.d890a50de1313ae7.js.map +1 -0
  176. package/dist/client/{3769.d1f1fcf335099c33.js → 3769.f46716bd58921c06.js} +6 -5
  177. package/dist/client/3769.f46716bd58921c06.js.map +1 -0
  178. package/dist/client/3892.db79ccfcc2e8b5a2.js +5 -0
  179. package/dist/client/3892.db79ccfcc2e8b5a2.js.map +1 -0
  180. package/dist/client/391.947b429ccac6ca45.js +8 -0
  181. package/dist/client/391.947b429ccac6ca45.js.map +1 -0
  182. package/dist/client/{4036.5ca9997e4c034473.js → 4036.4aa9a690073ccbac.js} +11 -7
  183. package/dist/client/4036.4aa9a690073ccbac.js.map +1 -0
  184. package/dist/client/4045.ec4c143648ab2280.js +8 -0
  185. package/dist/client/4045.ec4c143648ab2280.js.map +1 -0
  186. package/dist/client/4531.5f4701b319065b2b.js +34 -0
  187. package/dist/client/4531.5f4701b319065b2b.js.map +1 -0
  188. package/dist/client/{476.0de6391161b814ad.js → 476.67faa1bd02f2479c.js} +3 -3
  189. package/dist/client/{476.0de6391161b814ad.js.map → 476.67faa1bd02f2479c.js.map} +1 -1
  190. package/dist/client/{4849.4da5f274175b7cc7.js → 4849.2d0d91db57dc6419.js} +2 -2
  191. package/dist/client/{4849.4da5f274175b7cc7.js.map → 4849.2d0d91db57dc6419.js.map} +1 -1
  192. package/dist/client/{5066.31235bae47282d5a.js → 5066.c3b69e4601465269.js} +9 -9
  193. package/dist/client/{5066.31235bae47282d5a.js.map → 5066.c3b69e4601465269.js.map} +1 -1
  194. package/dist/client/{533.518751bfb02cbcee.js → 533.43be64a8c12d5411.js} +2 -2
  195. package/dist/client/{533.518751bfb02cbcee.js.map → 533.43be64a8c12d5411.js.map} +1 -1
  196. package/dist/client/5531.ff59053d35a9ebc5.js +387 -0
  197. package/dist/client/{5531.3f07c9b4290520c7.js.map → 5531.ff59053d35a9ebc5.js.map} +1 -1
  198. package/dist/client/{5557.247c4c4c61d91b4d.js → 5557.3923ba7ade67d4c8.js} +4 -4
  199. package/dist/client/{5557.247c4c4c61d91b4d.js.map → 5557.3923ba7ade67d4c8.js.map} +1 -1
  200. package/dist/client/{5837.52bd8ccde0085adc.js → 5837.2173cfac5b28fb95.js} +2 -2
  201. package/dist/client/5837.2173cfac5b28fb95.js.map +1 -0
  202. package/dist/client/5911.7dd68675e0a4ff43.js +2 -0
  203. package/dist/client/5911.7dd68675e0a4ff43.js.map +1 -0
  204. package/dist/client/614.b7c7bcd4ee6e4f7d.css +2 -0
  205. package/dist/client/614.b7c7bcd4ee6e4f7d.css.map +1 -0
  206. package/dist/client/6213.ba167b80474036f0.js +20 -0
  207. package/dist/client/6213.ba167b80474036f0.js.map +1 -0
  208. package/dist/client/665.7d96ffb19066da27.js +34 -0
  209. package/dist/client/665.7d96ffb19066da27.js.map +1 -0
  210. package/dist/client/6681.51b917ef9762ead2.js +6 -0
  211. package/dist/client/{6681.4bc549fb34f3fd5c.js.map → 6681.51b917ef9762ead2.js.map} +1 -1
  212. package/dist/client/6955.3de7286d9ee3c36f.js +33 -0
  213. package/dist/client/6955.3de7286d9ee3c36f.js.map +1 -0
  214. package/dist/client/{7326.b1ad5a6bece08bb2.js → 7326.9d0d137e939223ba.js} +2 -2
  215. package/dist/client/7326.9d0d137e939223ba.js.map +1 -0
  216. package/dist/client/{736.c130ba990b1ed252.js → 736.0fa146c2a494e88c.js} +5 -5
  217. package/dist/client/{736.c130ba990b1ed252.js.map → 736.0fa146c2a494e88c.js.map} +1 -1
  218. package/dist/client/7461.7d6383069ad3bded.js +35 -0
  219. package/dist/client/7461.7d6383069ad3bded.js.map +1 -0
  220. package/dist/client/7509.c7697df525e5b425.js +9 -0
  221. package/dist/client/7509.c7697df525e5b425.js.map +1 -0
  222. package/dist/client/{7731.401da89d94c0e064.js → 7731.dab635045f8c8801.js} +2 -2
  223. package/dist/client/{7731.401da89d94c0e064.js.map → 7731.dab635045f8c8801.js.map} +1 -1
  224. package/dist/client/{7816.086a6f46f1339f10.js → 7816.fcae90f472f6a101.js} +2 -2
  225. package/dist/client/{7816.086a6f46f1339f10.js.map → 7816.fcae90f472f6a101.js.map} +1 -1
  226. package/dist/client/833.a99cc1ff95a9361c.js +5 -0
  227. package/dist/client/833.a99cc1ff95a9361c.js.map +1 -0
  228. package/dist/client/{8468.add3c4feb6c9e926.js → 8468.f45cbbf88e617172.js} +3 -3
  229. package/dist/client/{8468.add3c4feb6c9e926.js.map → 8468.f45cbbf88e617172.js.map} +1 -1
  230. package/dist/client/{8483.e69da156837fde23.js → 8483.42cb8809ffb7c809.js} +3 -3
  231. package/dist/client/{8483.e69da156837fde23.js.map → 8483.42cb8809ffb7c809.js.map} +1 -1
  232. package/dist/client/{8551.4cf05a456e8b9b36.js → 8551.88765e00cf64cda8.js} +2 -2
  233. package/dist/client/{8551.4cf05a456e8b9b36.js.map → 8551.88765e00cf64cda8.js.map} +1 -1
  234. package/dist/client/{8684.538d49e436a77c37.js → 8684.9d7a1ac15f75f143.js} +5 -5
  235. package/dist/client/{8684.538d49e436a77c37.js.map → 8684.9d7a1ac15f75f143.js.map} +1 -1
  236. package/dist/client/8896.c876205851967073.js +9 -0
  237. package/dist/client/8896.c876205851967073.js.map +1 -0
  238. package/dist/client/{8911.e1fd0ac2f979c2ea.js → 8911.74685697a6189123.js} +7 -7
  239. package/dist/client/8911.74685697a6189123.js.map +1 -0
  240. package/dist/client/9021.3d43ecdc365948b8.js +16 -0
  241. package/dist/client/9021.3d43ecdc365948b8.js.map +1 -0
  242. package/dist/client/917.f2551a4b63ec4d86.js +17 -0
  243. package/dist/client/917.f2551a4b63ec4d86.js.map +1 -0
  244. package/dist/client/9222.a2d629b05b5c3c7e.js +104 -0
  245. package/dist/client/9222.a2d629b05b5c3c7e.js.LICENSE.txt +5 -0
  246. package/dist/client/9222.a2d629b05b5c3c7e.js.map +1 -0
  247. package/dist/client/chart-no-axes-combined.aee09a7064cb8b35.svg +1 -0
  248. package/dist/client/{circle-alert.4199b283585ef0bb.svg → circle-play.6ed4ac1fb3c93a04.svg} +1 -1
  249. package/dist/client/{curriculum-about-covered.74e453cf7e1a86c2.svg → curriculum-about-covered.a0e620d9fa0a96bb.svg} +1 -1
  250. package/dist/client/{curriculum-about-detail.515f645950e2300b.svg → curriculum-about-detail.73feb705e269ebbe.svg} +1 -1
  251. package/dist/client/{curriculum-about-educators.91685cbbd58c65fb.svg → curriculum-about-educators.03744c34dabd5fe7.svg} +1 -1
  252. package/dist/client/{curriculum-about-not.42caac16e07477b5.svg → curriculum-about-not.aa3c2baa11be115d.svg} +1 -1
  253. package/dist/client/{curriculum-about-students.36ca88cba5f00272.svg → curriculum-about-students.842af9608002c05a.svg} +1 -1
  254. package/dist/client/{curriculum-bullet.934e76f0055c7737.svg → curriculum-bullet.ae8de1d4f7e37953.svg} +1 -1
  255. package/dist/client/{curriculum-landing-about-beginner.c283306531a0a760.svg → curriculum-landing-about-beginner.9603b098f49dfb52.svg} +1 -1
  256. package/dist/client/{curriculum-landing-about-bullet.329a46667f2b7b1c.svg → curriculum-landing-about-bullet.1a31ffce2d5917cb.svg} +1 -1
  257. package/dist/client/{curriculum-landing-about-free.860c02f993720011.svg → curriculum-landing-about-free.1ff3ec55692670ba.svg} +1 -1
  258. package/dist/client/{curriculum-landing-about-pace.caf53bc7642d2d9e.svg → curriculum-landing-about-pace.04fd0a480b4ef342.svg} +1 -1
  259. package/dist/client/{curriculum-landing-arrow.37d9469e2da628fb.svg → curriculum-landing-arrow.b4d5ba21e3dc087e.svg} +1 -1
  260. package/dist/client/{curriculum-landing-started-advanced.6aa084114d4a009d.svg → curriculum-landing-started-advanced.bd07b9246e350d6f.svg} +1 -1
  261. package/dist/client/{curriculum-landing-started-beginner.684ee16fbad28594.svg → curriculum-landing-started-beginner.62cf58049310b5c1.svg} +1 -1
  262. package/dist/client/{curriculum-landing-started-educator.1fc04ca1f8ce8d38.svg → curriculum-landing-started-educator.779ce85811a81d19.svg} +1 -1
  263. package/dist/client/{curriculum-landing-started-employment.ad9634ce6c19f3ba.svg → curriculum-landing-started-employment.4e7b977d45493058.svg} +1 -1
  264. package/dist/client/{curriculum-mdn-resource.f452724542f874b8.svg → curriculum-mdn-resource.335ee2e480d302fb.svg} +1 -1
  265. package/dist/client/{curriculum-partner-bg.247900de90ec7d1e.svg → curriculum-partner-bg.70de155df588311a.svg} +1 -1
  266. package/dist/client/{curriculum-scrim-bg.66afaab49246fbd9.svg → curriculum-scrim-bg.29a27117721ff3e9.svg} +1 -1
  267. package/dist/client/index.31463704d14e154c.js +260 -0
  268. package/dist/client/index.31463704d14e154c.js.LICENSE.txt +25 -0
  269. package/dist/client/index.31463704d14e154c.js.map +1 -0
  270. package/dist/client/jetbrains-mono-cyrillic.577e793cdf179ae1.woff2 +0 -0
  271. package/dist/client/jetbrains-mono-italic-cyrillic.8d00711fdb1702e0.woff2 +0 -0
  272. package/dist/client/jetbrains-mono-italic-latin-extended.c25d5e1f309ed948.woff2 +0 -0
  273. package/dist/client/jetbrains-mono-italic-latin.55b330522e5e3ed9.woff2 +0 -0
  274. package/dist/client/jetbrains-mono-latin-extended.01c891f9c832ce28.woff2 +0 -0
  275. package/dist/client/jetbrains-mono-latin.119994ed445212c7.woff2 +0 -0
  276. package/dist/client/mdn-m.70aac857e4a908d0.svg +1 -0
  277. package/dist/client/{runtime.51020603a07b972d.js → runtime.ee03d594ff24ae70.js} +2 -2
  278. package/dist/client/runtime.ee03d594ff24ae70.js.map +1 -0
  279. package/dist/client/shield-check.07bdc37f20ac5cc6.svg +1 -0
  280. package/dist/client/stats.json +1096 -1024
  281. package/dist/client/styles-a11y-menu.5796ee87cb69f93f.css +2 -0
  282. package/dist/client/styles-a11y-menu.5796ee87cb69f93f.css.map +1 -0
  283. package/dist/client/styles-a11y-menu.c408da1c50de7848.js +1 -0
  284. package/dist/client/styles-advertising.4c00484729f959ad.js +1 -0
  285. package/dist/client/{styles-advertising.c54670419b34708a.css → styles-advertising.c4692f68b3c61df1.css} +2 -2
  286. package/dist/client/{styles-advertising.c54670419b34708a.css.map → styles-advertising.c4692f68b3c61df1.css.map} +1 -1
  287. package/dist/client/styles-article-footer.81ae18c89fc527dc.css +2 -0
  288. package/dist/client/styles-article-footer.81ae18c89fc527dc.css.map +1 -0
  289. package/dist/client/styles-article-footer.f591a23b879db7bc.js +1 -0
  290. package/dist/client/styles-banner.cce5a46592f9ae9c.js +1 -0
  291. package/dist/client/{styles-baseline-indicator.32a52f7b51085fbb.css → styles-baseline-indicator.083aba7301c6f745.css} +2 -2
  292. package/dist/client/styles-baseline-indicator.083aba7301c6f745.css.map +1 -0
  293. package/dist/client/styles-baseline-indicator.35315666a6ff6562.js +1 -0
  294. package/dist/client/styles-blog-index.65525134178d64fd.js +1 -0
  295. package/dist/client/styles-blog-index.acbe792e1ec96930.css +2 -0
  296. package/dist/client/styles-blog-index.acbe792e1ec96930.css.map +1 -0
  297. package/dist/client/styles-blog-post.0cc5813f0a44aff0.js +1 -0
  298. package/dist/client/styles-blog-post.5085aa38dc1ab3a3.css +2 -0
  299. package/dist/client/styles-blog-post.5085aa38dc1ab3a3.css.map +1 -0
  300. package/dist/client/styles-breadcrumbs-bar.740212452ad4a93e.js +1 -0
  301. package/dist/client/{styles-breadcrumbs-bar.b7a94abe36578bab.css → styles-breadcrumbs-bar.e2fa6dfb04a38166.css} +2 -2
  302. package/dist/client/{styles-breadcrumbs-bar.b7a94abe36578bab.css.map → styles-breadcrumbs-bar.e2fa6dfb04a38166.css.map} +1 -1
  303. package/dist/client/{styles-breadcrumbs.d07ccd5520eeea01.css → styles-breadcrumbs.0afde562052673c5.css} +2 -2
  304. package/dist/client/{styles-breadcrumbs.d07ccd5520eeea01.css.map → styles-breadcrumbs.0afde562052673c5.css.map} +1 -1
  305. package/dist/client/styles-breadcrumbs.3b39fd6a3c2edb2e.js +1 -0
  306. package/dist/client/styles-button.a58118f8ded7e527.js +1 -0
  307. package/dist/client/styles-content-section.06ab08df9b9e047e.js +1 -0
  308. package/dist/client/styles-content-section.ffa19ece6d4fa70f.css +2 -0
  309. package/dist/client/styles-content-section.ffa19ece6d4fa70f.css.map +1 -0
  310. package/dist/client/styles-contributor-spotlight.38657357f29e301d.css +2 -0
  311. package/dist/client/styles-contributor-spotlight.38657357f29e301d.css.map +1 -0
  312. package/dist/client/styles-contributor-spotlight.5303aa09b91c2b0f.js +1 -0
  313. package/dist/client/styles-curriculum-about.75e3406bfe012d87.css +2 -0
  314. package/dist/client/styles-curriculum-about.75e3406bfe012d87.css.map +1 -0
  315. package/dist/client/styles-curriculum-about.c7d034c5eb1cedfc.js +1 -0
  316. package/dist/client/styles-curriculum-default.425c715d690a611c.js +1 -0
  317. package/dist/client/styles-curriculum-default.ceb6f07d1ba3a1fe.css +2 -0
  318. package/dist/client/styles-curriculum-default.ceb6f07d1ba3a1fe.css.map +1 -0
  319. package/dist/client/styles-curriculum-landing.1558840404f90c97.js +1 -0
  320. package/dist/client/styles-curriculum-landing.4c266be210279754.css +2 -0
  321. package/dist/client/styles-curriculum-landing.4c266be210279754.css.map +1 -0
  322. package/dist/client/styles-curriculum-module.7e5cd517e846d594.js +1 -0
  323. package/dist/client/styles-curriculum-module.986c101af5734725.css +2 -0
  324. package/dist/client/styles-curriculum-module.986c101af5734725.css.map +1 -0
  325. package/dist/client/styles-curriculum-overview.4c7cb02c1ddc853e.js +1 -0
  326. package/dist/client/styles-curriculum-overview.5e1cf930403c07b3.css +2 -0
  327. package/dist/client/styles-curriculum-overview.5e1cf930403c07b3.css.map +1 -0
  328. package/dist/client/styles-featured-articles.b4ecc71ab736bd5b.css +2 -0
  329. package/dist/client/styles-featured-articles.b4ecc71ab736bd5b.css.map +1 -0
  330. package/dist/client/styles-featured-articles.e307bb8142f33739.js +1 -0
  331. package/dist/client/styles-footer.a2850e459e2d290b.css +2 -0
  332. package/dist/client/{styles-footer.c1a53f0a58f04928.css.map → styles-footer.a2850e459e2d290b.css.map} +1 -1
  333. package/dist/client/styles-footer.c29033543af832fb.js +1 -0
  334. package/dist/client/styles-generic-about.2d4dc610496035b0.js +1 -0
  335. package/dist/client/styles-generic-about.766241910cf1bfdf.css +2 -0
  336. package/dist/client/styles-generic-about.766241910cf1bfdf.css.map +1 -0
  337. package/dist/client/styles-generic-community.76b2cea1e9b36907.js +1 -0
  338. package/dist/client/styles-generic-community.aa93fe32626f89a4.css +2 -0
  339. package/dist/client/styles-generic-community.aa93fe32626f89a4.css.map +1 -0
  340. package/dist/client/{styles-generic-content.7960b980b98f1d3d.css → styles-generic-content.3c8089706edb022d.css} +2 -2
  341. package/dist/client/{styles-generic-content.7960b980b98f1d3d.css.map → styles-generic-content.3c8089706edb022d.css.map} +1 -1
  342. package/dist/client/styles-generic-content.95822f3a7d72b2af.js +1 -0
  343. package/dist/client/styles-generic-layout.42a5e62407bd0066.css +2 -0
  344. package/dist/client/{styles-generic-layout.55441b1a560f5c9f.css.map → styles-generic-layout.42a5e62407bd0066.css.map} +1 -1
  345. package/dist/client/styles-generic-layout.e3b1cbc7db109acc.js +1 -0
  346. package/dist/client/styles-generic-sidebar.2e998de436f774c4.css +2 -0
  347. package/dist/client/styles-generic-sidebar.2e998de436f774c4.css.map +1 -0
  348. package/dist/client/styles-generic-sidebar.9767d319bbbde061.js +1 -0
  349. package/dist/client/styles-generic-toc.109e07ffeb20bc67.css +2 -0
  350. package/dist/client/styles-generic-toc.109e07ffeb20bc67.css.map +1 -0
  351. package/dist/client/styles-generic-toc.56e46052fca1042a.js +1 -0
  352. package/dist/client/styles-global.50c705928b5966d2.css +2 -0
  353. package/dist/client/styles-global.50c705928b5966d2.css.map +1 -0
  354. package/dist/client/styles-global.5928df920ab8d790.js +1 -0
  355. package/dist/client/styles-heading-anchor.0eec5185ab9425b7.css +2 -0
  356. package/dist/client/{styles-heading-anchor.f2760897211efe98.css.map → styles-heading-anchor.0eec5185ab9425b7.css.map} +1 -1
  357. package/dist/client/styles-heading-anchor.69440b0832b0c7b6.js +1 -0
  358. package/dist/client/styles-homepage-body.a1dd591dfd38a0e2.js +1 -0
  359. package/dist/client/{styles-homepage-contributor-spotlight.f02bdd82c7536b72.css → styles-homepage-contributor-spotlight.38935642cba8718d.css} +2 -2
  360. package/dist/client/{styles-homepage-contributor-spotlight.f02bdd82c7536b72.css.map → styles-homepage-contributor-spotlight.38935642cba8718d.css.map} +1 -1
  361. package/dist/client/styles-homepage-contributor-spotlight.a872f7a5144621ce.js +1 -0
  362. package/dist/client/styles-homepage-footer.56ccee76430fb4b6.js +1 -0
  363. package/dist/client/styles-homepage-header.ef7007190d01e72b.js +1 -0
  364. package/dist/client/styles-homepage-hero.db4057884586bcc0.js +1 -0
  365. package/dist/client/styles-homepage.643e215e9b541f48.js +1 -0
  366. package/dist/client/styles-latest-news.b28826e707e5a793.js +1 -0
  367. package/dist/client/styles-latest-news.ef3b9e57333a87bc.css +2 -0
  368. package/dist/client/styles-latest-news.ef3b9e57333a87bc.css.map +1 -0
  369. package/dist/client/styles-left-sidebar.07f68fb381233e5e.css +2 -0
  370. package/dist/client/styles-left-sidebar.07f68fb381233e5e.css.map +1 -0
  371. package/dist/client/styles-left-sidebar.689072b681b6085c.js +1 -0
  372. package/dist/client/styles-logo.5fe2004c01665043.js +1 -0
  373. package/dist/client/styles-logo.f9c13d56f40d50b6.css +2 -0
  374. package/dist/client/styles-logo.f9c13d56f40d50b6.css.map +1 -0
  375. package/dist/client/styles-mandala.39843b917e3341c1.js +1 -0
  376. package/dist/client/styles-mandala.8fbfeb0567dbde40.css +2 -0
  377. package/dist/client/styles-mandala.8fbfeb0567dbde40.css.map +1 -0
  378. package/dist/client/styles-menu.0df94f3d4546f4e2.js +1 -0
  379. package/dist/client/styles-menu.5193bf2642ae7d64.css +2 -0
  380. package/dist/client/styles-menu.5193bf2642ae7d64.css.map +1 -0
  381. package/dist/client/styles-navigation.013b4a4ed330892a.css +2 -0
  382. package/dist/client/styles-navigation.013b4a4ed330892a.css.map +1 -0
  383. package/dist/client/styles-navigation.f10f27bc66c78348.js +1 -0
  384. package/dist/client/styles-not-found.db6d6367152f676d.js +1 -0
  385. package/dist/client/styles-observatory-landing.28dd60cf0de05bec.js +1 -0
  386. package/dist/client/styles-observatory-landing.7b47ee0004877825.css +2 -0
  387. package/dist/client/styles-observatory-landing.7b47ee0004877825.css.map +1 -0
  388. package/dist/client/styles-observatory-results.36b6175e7444ec4e.css +2 -0
  389. package/dist/client/styles-observatory-results.36b6175e7444ec4e.css.map +1 -0
  390. package/dist/client/styles-observatory-results.7ce6d37475f9cf58.js +1 -0
  391. package/dist/client/styles-page-layout.0d53ebc97d7b7bf1.js +1 -0
  392. package/dist/client/styles-page-layout.e52a43c97f04cf90.css +2 -0
  393. package/dist/client/{styles-page-layout.5db9be57df19de0c.css.map → styles-page-layout.e52a43c97f04cf90.css.map} +1 -1
  394. package/dist/client/styles-pagination.19bf90db76d7d8d3.css +2 -0
  395. package/dist/client/{styles-pagination.0b3aa3fd6f6d3808.css.map → styles-pagination.19bf90db76d7d8d3.css.map} +1 -1
  396. package/dist/client/styles-pagination.e6fa33b9eadd8ab2.js +1 -0
  397. package/dist/client/styles-playground.59775225856ba2c6.js +1 -0
  398. package/dist/client/styles-recent-contributions.c51e066b59d22fca.js +1 -0
  399. package/dist/client/styles-reference-layout.0ab1a4d92d4a0966.css +2 -0
  400. package/dist/client/styles-reference-layout.0ab1a4d92d4a0966.css.map +1 -0
  401. package/dist/client/styles-reference-layout.218edbd3288fad71.js +1 -0
  402. package/dist/client/styles-reference-toc.67439c41e5f07bef.js +1 -0
  403. package/dist/client/{styles-reference-toc.5ce4f97dbe6e3ed0.css → styles-reference-toc.9b9bd019efd16b86.css} +2 -2
  404. package/dist/client/{styles-reference-toc.5ce4f97dbe6e3ed0.css.map → styles-reference-toc.9b9bd019efd16b86.css.map} +1 -1
  405. package/dist/client/styles-sandbox.22c29067838f22d9.js +1 -0
  406. package/dist/client/styles-site-search.5d4b622a11b82915.js +1 -0
  407. package/dist/client/styles-site-search.ec3b6780533a8750.css +2 -0
  408. package/dist/client/{styles-site-search.cf345ef99e0d06b5.css.map → styles-site-search.ec3b6780533a8750.css.map} +1 -1
  409. package/dist/client/styles-translation-banner.b923aed537f60120.js +1 -0
  410. package/dist/client/styles-writer-toolbar.00468688f6144393.js +1 -0
  411. package/dist/client/styles-writer-toolbar.70bdeddd3734ab11.css +2 -0
  412. package/dist/client/styles-writer-toolbar.70bdeddd3734ab11.css.map +1 -0
  413. package/dist/client/styles.7fb7069c86aa338c.js +2 -0
  414. package/dist/client/styles.7fb7069c86aa338c.js.map +1 -0
  415. package/dist/client/users.f7e6f1f213744762.svg +1 -0
  416. package/dist/legacy/{1284.0939e1a7de12c23c.js → 1284.9609d9ed70761e2f.js} +3 -3
  417. package/dist/legacy/{1284.0939e1a7de12c23c.js.map → 1284.9609d9ed70761e2f.js.map} +1 -1
  418. package/dist/legacy/3957.798f0651121f0fa7.js.map +1 -1
  419. package/dist/legacy/{7664.eee0fe67e04785f4.js → 7664.7bf14ff753e36b72.js} +3 -3
  420. package/dist/legacy/7664.7bf14ff753e36b72.js.map +1 -0
  421. package/dist/legacy/{8716.9fde41ad50c3078d.js → 8716.0a9d049bf166f65a.js} +7 -7
  422. package/dist/legacy/{8716.9fde41ad50c3078d.js.map → 8716.0a9d049bf166f65a.js.map} +1 -1
  423. package/dist/legacy/afree.da56b83d257902e0.png +0 -0
  424. package/dist/legacy/{index.9db2264bb6151226.css → index.92ea4d5b7af91171.css} +2 -2
  425. package/dist/legacy/index.92ea4d5b7af91171.css.map +1 -0
  426. package/dist/legacy/{index.b760891bfcc63977.js → index.dd25b33b92ab6c72.js} +5 -5
  427. package/dist/legacy/index.dd25b33b92ab6c72.js.map +1 -0
  428. package/dist/legacy/stats.json +12 -12
  429. package/dist/ssr/index.js +483 -485
  430. package/dist/ssr/index.js.map +1 -1
  431. package/dist/ssr/results-icon.b469eb939df034e7.svg +1 -0
  432. package/dist/ssr/stats.json +54 -46
  433. package/dist/ssr/summary-icon.eff7a61e59b7e02f.svg +1 -0
  434. package/entry.client.js +1 -1
  435. package/entry.ssr.js +3 -4
  436. package/hooks/dialog-closedby.js +42 -0
  437. package/l10n/de.ftl +2 -2
  438. package/l10n/en-US.ftl +10 -10
  439. package/legacy/index.tsx +1 -0
  440. package/legacy/legacy.css +5 -0
  441. package/package.json +22 -21
  442. package/rspack.config.js +27 -11
  443. package/server.js +37 -3
  444. package/svgo.config.js +22 -11
  445. package/types/element-map.d.ts +1 -0
  446. package/types/fred.ts +5 -1
  447. package/components/css-formal-syntax/index.css +0 -10
  448. package/components/observatory/index.css +0 -406
  449. package/components/observatory-landing/faq.js +0 -16
  450. package/components/observatory-landing/feedback.js +0 -16
  451. package/dist/client/1197.25090f81ab4208bc.css +0 -32
  452. package/dist/client/1197.25090f81ab4208bc.css.map +0 -1
  453. package/dist/client/1624.5694c64f5e45232c.js +0 -69
  454. package/dist/client/1739.505aa54ed62222c8.js +0 -8
  455. package/dist/client/2254.5fbfe2d0124ff3ba.css +0 -2
  456. package/dist/client/2254.5fbfe2d0124ff3ba.css.map +0 -1
  457. package/dist/client/2448.92286b4e96ad1c02.js.map +0 -1
  458. package/dist/client/2826.2162e19b0f72cf75.js +0 -29
  459. package/dist/client/2826.2162e19b0f72cf75.js.map +0 -1
  460. package/dist/client/3536.d17eba9caa4089c1.js +0 -30
  461. package/dist/client/3536.d17eba9caa4089c1.js.map +0 -1
  462. package/dist/client/37.feff9590370f461a.js +0 -102
  463. package/dist/client/37.feff9590370f461a.js.map +0 -1
  464. package/dist/client/3769.d1f1fcf335099c33.js.map +0 -1
  465. package/dist/client/3892.62b28110dbb3645e.js +0 -5
  466. package/dist/client/3892.62b28110dbb3645e.js.map +0 -1
  467. package/dist/client/391.ead0b358d96c9c13.js +0 -8
  468. package/dist/client/391.ead0b358d96c9c13.js.map +0 -1
  469. package/dist/client/4036.5ca9997e4c034473.js.map +0 -1
  470. package/dist/client/4045.c0fd898eab0b2a5c.js +0 -8
  471. package/dist/client/4045.c0fd898eab0b2a5c.js.map +0 -1
  472. package/dist/client/4531.4ae011f8a64a2b27.js +0 -34
  473. package/dist/client/4531.4ae011f8a64a2b27.js.map +0 -1
  474. package/dist/client/5531.3f07c9b4290520c7.js +0 -387
  475. package/dist/client/5837.52bd8ccde0085adc.js.map +0 -1
  476. package/dist/client/614.01075c8e848f77c4.css +0 -2
  477. package/dist/client/614.01075c8e848f77c4.css.map +0 -1
  478. package/dist/client/6213.32f53c1c3ef65496.js +0 -20
  479. package/dist/client/6213.32f53c1c3ef65496.js.map +0 -1
  480. package/dist/client/665.bfa5abb72f818c34.js +0 -34
  481. package/dist/client/665.bfa5abb72f818c34.js.map +0 -1
  482. package/dist/client/6681.4bc549fb34f3fd5c.js +0 -6
  483. package/dist/client/6955.90a316f179d37d80.js +0 -52
  484. package/dist/client/6955.90a316f179d37d80.js.map +0 -1
  485. package/dist/client/7326.b1ad5a6bece08bb2.js.map +0 -1
  486. package/dist/client/7345.6d89013575f169db.js +0 -16
  487. package/dist/client/7345.6d89013575f169db.js.map +0 -1
  488. package/dist/client/7461.c7551ade83fa6056.js +0 -35
  489. package/dist/client/7461.c7551ade83fa6056.js.map +0 -1
  490. package/dist/client/7509.780e429ccb3e9290.js +0 -9
  491. package/dist/client/7509.780e429ccb3e9290.js.map +0 -1
  492. package/dist/client/781.389e02e257b52721.css +0 -2
  493. package/dist/client/781.389e02e257b52721.css.map +0 -1
  494. package/dist/client/7898.7fd3ac2396a8dd7b.js +0 -45
  495. package/dist/client/7898.7fd3ac2396a8dd7b.js.map +0 -1
  496. package/dist/client/8877.6b7cc9370ff77f02.js +0 -2
  497. package/dist/client/8877.6b7cc9370ff77f02.js.map +0 -1
  498. package/dist/client/8896.85df788778cc02ca.js +0 -9
  499. package/dist/client/8896.85df788778cc02ca.js.map +0 -1
  500. package/dist/client/8911.e1fd0ac2f979c2ea.js.map +0 -1
  501. package/dist/client/917.f2371f7a8ef08c84.js +0 -17
  502. package/dist/client/917.f2371f7a8ef08c84.js.map +0 -1
  503. package/dist/client/9222.f3820fec7e0a91be.js +0 -104
  504. package/dist/client/9222.f3820fec7e0a91be.js.map +0 -1
  505. package/dist/client/9632.b317ca4ae5930b4a.js.map +0 -1
  506. package/dist/client/index.e36c34deca671725.js +0 -251
  507. package/dist/client/index.e36c34deca671725.js.map +0 -1
  508. package/dist/client/jetbrains-mono-cyrillic.4be0050294dbaee4.woff2 +0 -0
  509. package/dist/client/jetbrains-mono-italic-cyrillic.789710e9fe5a2b03.woff2 +0 -0
  510. package/dist/client/jetbrains-mono-italic-latin-extended.58430489c22fda09.woff2 +0 -0
  511. package/dist/client/jetbrains-mono-italic-latin.80ad93ea1dcec528.woff2 +0 -0
  512. package/dist/client/jetbrains-mono-latin-extended.2b8ab8f35e622fdb.woff2 +0 -0
  513. package/dist/client/jetbrains-mono-latin.eaa3472268346b6c.woff2 +0 -0
  514. package/dist/client/runtime.51020603a07b972d.js.map +0 -1
  515. package/dist/client/styles-a11y-menu.53797029a4c05806.css +0 -2
  516. package/dist/client/styles-a11y-menu.53797029a4c05806.css.map +0 -1
  517. package/dist/client/styles-a11y-menu.8c2ae6bc250fdde3.js +0 -1
  518. package/dist/client/styles-advertising.f01a816ffb81826d.js +0 -1
  519. package/dist/client/styles-article-footer.3bc45ecc7223c0ee.css +0 -2
  520. package/dist/client/styles-article-footer.3bc45ecc7223c0ee.css.map +0 -1
  521. package/dist/client/styles-article-footer.abc86d1bc28dbbea.js +0 -1
  522. package/dist/client/styles-banner.dd24262bb896879a.js +0 -1
  523. package/dist/client/styles-baseline-indicator.26595fbb926e3339.js +0 -1
  524. package/dist/client/styles-baseline-indicator.32a52f7b51085fbb.css.map +0 -1
  525. package/dist/client/styles-blog-index.7af1563c6077a7be.css +0 -2
  526. package/dist/client/styles-blog-index.7af1563c6077a7be.css.map +0 -1
  527. package/dist/client/styles-blog-index.805cf1995d84466a.js +0 -1
  528. package/dist/client/styles-blog-post.5824db4f15723a68.css +0 -2
  529. package/dist/client/styles-blog-post.5824db4f15723a68.css.map +0 -1
  530. package/dist/client/styles-blog-post.87f4fe5450147ce8.js +0 -1
  531. package/dist/client/styles-breadcrumbs-bar.474628c11d128ace.js +0 -1
  532. package/dist/client/styles-breadcrumbs.b0241eed8398fe84.js +0 -1
  533. package/dist/client/styles-button.bd90715982da863b.js +0 -1
  534. package/dist/client/styles-content-section.a1f8a5f77270d1dc.js +0 -1
  535. package/dist/client/styles-content-section.f47b61c45a723af0.css +0 -2
  536. package/dist/client/styles-content-section.f47b61c45a723af0.css.map +0 -1
  537. package/dist/client/styles-contributor-spotlight.a77d55cfef159e66.css +0 -2
  538. package/dist/client/styles-contributor-spotlight.a77d55cfef159e66.css.map +0 -1
  539. package/dist/client/styles-contributor-spotlight.a992b1d366637c5d.js +0 -1
  540. package/dist/client/styles-curriculum-about.4b80aa2f2b88e8e4.js +0 -1
  541. package/dist/client/styles-curriculum-about.b8d113b14323c909.css +0 -2
  542. package/dist/client/styles-curriculum-about.b8d113b14323c909.css.map +0 -1
  543. package/dist/client/styles-curriculum-default.190eba828fd99e0a.js +0 -1
  544. package/dist/client/styles-curriculum-default.ef46db3751d8e999.css +0 -0
  545. package/dist/client/styles-curriculum-landing.56209b30561d82e0.css +0 -2
  546. package/dist/client/styles-curriculum-landing.56209b30561d82e0.css.map +0 -1
  547. package/dist/client/styles-curriculum-landing.e73c9557dd2057aa.js +0 -1
  548. package/dist/client/styles-curriculum-module.7fc982bc6793fa48.js +0 -1
  549. package/dist/client/styles-curriculum-module.c7271eb90af85eba.css +0 -2
  550. package/dist/client/styles-curriculum-module.c7271eb90af85eba.css.map +0 -1
  551. package/dist/client/styles-curriculum-overview.d00ecdc305f40125.js +0 -1
  552. package/dist/client/styles-curriculum-overview.ef46db3751d8e999.css +0 -0
  553. package/dist/client/styles-featured-articles.27e767c8b538f066.js +0 -1
  554. package/dist/client/styles-featured-articles.c518f93ad0470cdf.css +0 -2
  555. package/dist/client/styles-featured-articles.c518f93ad0470cdf.css.map +0 -1
  556. package/dist/client/styles-footer.c1a53f0a58f04928.css +0 -2
  557. package/dist/client/styles-footer.e86ec0a935d5937f.js +0 -1
  558. package/dist/client/styles-generic-about.27a13c39db15963c.js +0 -1
  559. package/dist/client/styles-generic-about.481f176f22ba0def.css +0 -2
  560. package/dist/client/styles-generic-about.481f176f22ba0def.css.map +0 -1
  561. package/dist/client/styles-generic-community.44405e7e3938a4b6.js +0 -1
  562. package/dist/client/styles-generic-community.ddbcb9e0488bf017.css +0 -2
  563. package/dist/client/styles-generic-community.ddbcb9e0488bf017.css.map +0 -1
  564. package/dist/client/styles-generic-content.a2ddd6aac780a65f.js +0 -1
  565. package/dist/client/styles-generic-layout.55441b1a560f5c9f.css +0 -2
  566. package/dist/client/styles-generic-layout.670f75c4f806be84.js +0 -1
  567. package/dist/client/styles-generic-sidebar.515ed6dc89aec542.css +0 -2
  568. package/dist/client/styles-generic-sidebar.515ed6dc89aec542.css.map +0 -1
  569. package/dist/client/styles-generic-sidebar.d1528b01acb49222.js +0 -1
  570. package/dist/client/styles-generic-toc.88e45e1e72c77b73.css +0 -2
  571. package/dist/client/styles-generic-toc.88e45e1e72c77b73.css.map +0 -1
  572. package/dist/client/styles-generic-toc.db854e6e0376fb6b.js +0 -1
  573. package/dist/client/styles-global.698ebe57a5418ca2.css +0 -2
  574. package/dist/client/styles-global.698ebe57a5418ca2.css.map +0 -1
  575. package/dist/client/styles-global.cb63a51fc1146957.js +0 -1
  576. package/dist/client/styles-heading-anchor.6ffff34f5421dc9f.js +0 -1
  577. package/dist/client/styles-heading-anchor.f2760897211efe98.css +0 -2
  578. package/dist/client/styles-homepage-body.4a9eaf99a6d5a434.js +0 -1
  579. package/dist/client/styles-homepage-contributor-spotlight.a91a262ee949a587.js +0 -1
  580. package/dist/client/styles-homepage-footer.cddd4004e597dbdf.js +0 -1
  581. package/dist/client/styles-homepage-header.6fc6295b2124ce59.js +0 -1
  582. package/dist/client/styles-homepage-hero.d56f468fb0364b60.js +0 -1
  583. package/dist/client/styles-homepage.be456abdb86e4bd2.js +0 -1
  584. package/dist/client/styles-latest-news.1b5fd7a95688fea4.css +0 -2
  585. package/dist/client/styles-latest-news.1b5fd7a95688fea4.css.map +0 -1
  586. package/dist/client/styles-latest-news.f725dd4127faabc2.js +0 -1
  587. package/dist/client/styles-left-sidebar.135a5bc6ad04c4f0.css +0 -2
  588. package/dist/client/styles-left-sidebar.135a5bc6ad04c4f0.css.map +0 -1
  589. package/dist/client/styles-left-sidebar.6cdadac4a1db951d.js +0 -1
  590. package/dist/client/styles-logo.8e7830628a9d7ef5.js +0 -1
  591. package/dist/client/styles-logo.a89a79f82f933ef6.css +0 -2
  592. package/dist/client/styles-logo.a89a79f82f933ef6.css.map +0 -1
  593. package/dist/client/styles-mandala.41af6b0b37aa7987.js +0 -1
  594. package/dist/client/styles-mandala.96281d90e09ea84c.css +0 -2
  595. package/dist/client/styles-mandala.96281d90e09ea84c.css.map +0 -1
  596. package/dist/client/styles-menu.786218f8a3e51b45.js +0 -1
  597. package/dist/client/styles-menu.d6b6e63ef2bff0d6.css +0 -2
  598. package/dist/client/styles-menu.d6b6e63ef2bff0d6.css.map +0 -1
  599. package/dist/client/styles-navigation.94adc2be697cca49.css +0 -2
  600. package/dist/client/styles-navigation.94adc2be697cca49.css.map +0 -1
  601. package/dist/client/styles-navigation.fac8722caf14abc8.js +0 -1
  602. package/dist/client/styles-not-found.f42949546ffd210c.js +0 -1
  603. package/dist/client/styles-observatory-landing.994044845e174ebc.js +0 -1
  604. package/dist/client/styles-observatory-landing.ef46db3751d8e999.css +0 -0
  605. package/dist/client/styles-observatory-results.2ebe1e1263bf9901.js +0 -1
  606. package/dist/client/styles-observatory-results.ef46db3751d8e999.css +0 -0
  607. package/dist/client/styles-page-layout.17e57aa7087c3c14.js +0 -1
  608. package/dist/client/styles-page-layout.5db9be57df19de0c.css +0 -2
  609. package/dist/client/styles-pagination.0b3aa3fd6f6d3808.css +0 -2
  610. package/dist/client/styles-pagination.8e0e077c056abb08.js +0 -1
  611. package/dist/client/styles-playground.6ba82a762ed428cd.js +0 -1
  612. package/dist/client/styles-recent-contributions.049ea82f38aea973.js +0 -1
  613. package/dist/client/styles-reference-layout.3fdc304c65153216.css +0 -2
  614. package/dist/client/styles-reference-layout.3fdc304c65153216.css.map +0 -1
  615. package/dist/client/styles-reference-layout.dffb8a58fa542929.js +0 -1
  616. package/dist/client/styles-reference-toc.885940cc1b62f05f.js +0 -1
  617. package/dist/client/styles-sandbox.28b391e75fd280b4.js +0 -1
  618. package/dist/client/styles-site-search.442cfc8fc77298a8.js +0 -1
  619. package/dist/client/styles-site-search.cf345ef99e0d06b5.css +0 -2
  620. package/dist/client/styles-translation-banner.ddf203bc7bb2e1bc.js +0 -1
  621. package/dist/client/styles.23fb47137258e781.js +0 -2
  622. package/dist/client/styles.23fb47137258e781.js.map +0 -1
  623. package/dist/legacy/7664.eee0fe67e04785f4.js.map +0 -1
  624. package/dist/legacy/afree.23e42bd4c44a110f.png +0 -0
  625. package/dist/legacy/index.9db2264bb6151226.css.map +0 -1
  626. package/dist/legacy/index.b760891bfcc63977.js.map +0 -1
  627. package/hooks/css-formal-syntax.js +0 -21
  628. /package/dist/client/{1342.b05de4cd80d4c221.js.LICENSE.txt → 1342.a66390274e8adda1.js.LICENSE.txt} +0 -0
  629. /package/dist/client/{2448.92286b4e96ad1c02.js.LICENSE.txt → 2448.34e8a46d8ac913b9.js.LICENSE.txt} +0 -0
  630. /package/dist/client/{4036.5ca9997e4c034473.js.LICENSE.txt → 4036.4aa9a690073ccbac.js.LICENSE.txt} +0 -0
  631. /package/dist/client/{4045.c0fd898eab0b2a5c.js.LICENSE.txt → 4045.ec4c143648ab2280.js.LICENSE.txt} +0 -0
  632. /package/dist/client/{4531.4ae011f8a64a2b27.js.LICENSE.txt → 4531.5f4701b319065b2b.js.LICENSE.txt} +0 -0
  633. /package/dist/client/{5557.247c4c4c61d91b4d.js.LICENSE.txt → 5557.3923ba7ade67d4c8.js.LICENSE.txt} +0 -0
  634. /package/dist/client/{8468.add3c4feb6c9e926.js.LICENSE.txt → 833.a99cc1ff95a9361c.js.LICENSE.txt} +0 -0
  635. /package/dist/client/{917.f2371f7a8ef08c84.js.LICENSE.txt → 8468.f45cbbf88e617172.js.LICENSE.txt} +0 -0
  636. /package/dist/client/{9222.f3820fec7e0a91be.js.LICENSE.txt → 917.f2551a4b63ec4d86.js.LICENSE.txt} +0 -0
  637. /package/dist/legacy/{1284.0939e1a7de12c23c.js.LICENSE.txt → 1284.9609d9ed70761e2f.js.LICENSE.txt} +0 -0
  638. /package/dist/legacy/{7664.eee0fe67e04785f4.js.LICENSE.txt → 7664.7bf14ff753e36b72.js.LICENSE.txt} +0 -0
  639. /package/dist/legacy/{8716.9fde41ad50c3078d.js.LICENSE.txt → 8716.0a9d049bf166f65a.js.LICENSE.txt} +0 -0
  640. /package/dist/legacy/{index.b760891bfcc63977.js.LICENSE.txt → index.dd25b33b92ab6c72.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ export const __webpack_ids__=["5911"];export const __webpack_modules__={56523:function(e,r,o){o.d(r,{Z:()=>g});var a=o(8081),i=o.n(a),n=o(23645),l=o.n(n),d=o(61667),c=o.n(d),p=new o.U(o(50623)),t=new o.U(o(59866)),m=l()(i()),s=c()(p),x=c()(t);m.push([e.id,`.code-example{--border:1px solid var(--color-border-primary);border:var(--border);border-radius:.25rem;overflow:hidden}.code-example .example-header{align-items:center;border-bottom:var(--border);display:flex;line-height:var(--font-line-ui);min-height:3.1rem;padding:.5rem 1rem}:is(.code-example .example-header) .language-name{text-transform:uppercase}.code-example pre{background-color:var(--color-background-secondary);display:flex;margin:0;white-space:pre-wrap}:is(.code-example pre) code{background-color:initial;flex-grow:1;flex-shrink:1;font-family:var(--font-family-code);overflow:auto;padding:1rem}.hidden:is(.code-example pre),[class*=interactive-example]:is(.code-example pre){display:none}:is(.example-good:is(.code-example pre),.example-bad:is(.code-example pre)):after{content:"";display:inline-block;flex-shrink:0;height:1.24rem;margin:1.255rem 1rem;-webkit-mask-size:cover;mask-size:cover;width:1.24rem}.example-good:is(.code-example pre){background-color:var(--color-background-green)}.example-good:is(.code-example pre):after{background-color:var(--color-text-green);-webkit-mask-image:url(${s});mask-image:url(${s})}.example-bad:is(.code-example pre){background-color:var(--color-background-red)}.example-bad:is(.code-example pre):after{background-color:var(--color-text-red);-webkit-mask-image:url(${x});mask-image:url(${x})}.code-example:has(.hidden,[class*=interactive-example]){display:none}.code-example iframe,.code-example mdn-play-runner{border:none;box-sizing:initial;display:block;padding:1rem}`,""]);let g=m.toString()},54681:function(e,r,o){o.d(r,{Z:()=>d});var a=o(8081),i=o.n(a),n=o(23645),l=o.n(n)()(i());l.push([e.id,"*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer}img{height:auto;max-width:100%}a{color:var(--color-link-normal)}[hidden]{display:none!important}",""]);let d=l.toString()},50623:function(e,r,o){e.exports=o.p+"circle-check.205f48f66c3c9d17.svg"},59866:function(e,r,o){e.exports=o.p+"circle-x.4b1c3fa0511867e7.svg"}};
2
+ //# sourceMappingURL=5911.7dd68675e0a4ff43.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"5911.7dd68675e0a4ff43.js","sources":["webpack://@mdn/fred/./components/code-example/common.css?834f","webpack://@mdn/fred/./components/global/global.css?272a"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"../icon/circle-check.svg\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"../icon/circle-x.svg\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.code-example{--border:1px solid var(--color-border-primary);border:var(--border);border-radius:.25rem;overflow:hidden}.code-example .example-header{align-items:center;border-bottom:var(--border);display:flex;line-height:var(--font-line-ui);min-height:3.1rem;padding:.5rem 1rem}:is(.code-example .example-header) .language-name{text-transform:uppercase}.code-example pre{background-color:var(--color-background-secondary);display:flex;margin:0;white-space:pre-wrap}:is(.code-example pre) code{background-color:initial;flex-grow:1;flex-shrink:1;font-family:var(--font-family-code);overflow:auto;padding:1rem}.hidden:is(.code-example pre),[class*=interactive-example]:is(.code-example pre){display:none}:is(.example-good:is(.code-example pre),.example-bad:is(.code-example pre)):after{content:\"\";display:inline-block;flex-shrink:0;height:1.24rem;margin:1.255rem 1rem;-webkit-mask-size:cover;mask-size:cover;width:1.24rem}.example-good:is(.code-example pre){background-color:var(--color-background-green)}.example-good:is(.code-example pre):after{background-color:var(--color-text-green);-webkit-mask-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___});mask-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___})}.example-bad:is(.code-example pre){background-color:var(--color-background-red)}.example-bad:is(.code-example pre):after{background-color:var(--color-text-red);-webkit-mask-image:url(${___CSS_LOADER_URL_REPLACEMENT_1___});mask-image:url(${___CSS_LOADER_URL_REPLACEMENT_1___})}.code-example:has(.hidden,[class*=interactive-example]){display:none}.code-example iframe,.code-example mdn-play-runner{border:none;box-sizing:initial;display:block;padding:1rem}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer}img{height:auto;max-width:100%}a{color:var(--color-link-normal)}[hidden]{display:none!important}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":[],"mappings":"8KAII,EAAgC,kBAChC,EAAgC,kBAChC,EAA0B,IAA4B,KACtD,EAAqC,IAAgC,GACrE,EAAqC,IAAgC,GAEzE,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,CAAC,olCAAolC,EAAE,EAAmC,iBAAiB,EAAE,EAAmC,yLAAyL,EAAE,EAAmC,iBAAiB,EAAE,EAAmC,oLAAoL,CAAC,CAAE,GAAG,EAEvqD,MAAe,EAAwB,QAAQ,E,2ECT3C,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,0MAA2M,GAAG,EAEvP,MAAe,EAAwB,QAAQ,E"}
@@ -0,0 +1,2 @@
1
+ .curriculum-content-container .left-sidebar{overflow-wrap:anywhere;padding-bottom:3rem;position:sticky;top:var(--sticky-header-height)}:is(.curriculum-content-container .left-sidebar) ol{list-style:none;margin:0;padding:0}:is(.curriculum-content-container .left-sidebar) details{width:100%}[open]:is(:is(.curriculum-content-container .left-sidebar) details)>summary{margin-bottom:.5rem}:is([open]:is(:is(.curriculum-content-container .left-sidebar) details)>summary):before{transform:rotate(90deg)}:is(:is(.curriculum-content-container .left-sidebar) details) summary{align-items:center;cursor:pointer;display:flex}:is(:is(:is(.curriculum-content-container .left-sidebar) details) summary):before{background-color:currentcolor;content:"";display:inline-block;flex-shrink:0;height:1rem;margin:.25rem;-webkit-mask-image:url(/static/client/chevron-right.a81fc439dd5e4839.svg);mask-image:url(/static/client/chevron-right.a81fc439dd5e4839.svg);-webkit-mask-size:cover;mask-size:cover;width:1rem}:is(:is(:is(.curriculum-content-container .left-sidebar) details) summary):hover{background-color:var(--color-background-secondary)}:is(:is(:is(.curriculum-content-container .left-sidebar) details) summary):hover:has(a:hover){background-color:unset}:is(:is(.curriculum-content-container .left-sidebar) details) ol{padding-left:1.5rem}:is(.curriculum-content-container .left-sidebar) li{align-items:center;display:flex;justify-content:stretch}:is(:is(.curriculum-content-container .left-sidebar) li):not(:last-child){margin-bottom:.5rem}.section:is(:is(.curriculum-content-container .left-sidebar) li){font-weight:var(--font-weight-bold)}.section:is(:is(.curriculum-content-container .left-sidebar) li):not(:first-child){margin-top:1em}:is(.curriculum-content-container .left-sidebar) a,:is(.curriculum-content-container .left-sidebar) span:not(.highlight-container){display:inline-flex;padding-block:.25rem}:is(.curriculum-content-container .left-sidebar) a{color:var(--color-text-primary)}:is(:is(.curriculum-content-container .left-sidebar) a):hover{color:var(--color-area-link)}:is(:is(.curriculum-content-container .left-sidebar) a):not(:hover){-webkit-text-decoration:none;text-decoration:none}:is(.curriculum-content-container .left-sidebar) em{align-items:center;background-color:var(--background-toc-active);border-left:2px solid var(--category-color);display:inline-flex;font-style:normal;padding-inline:.5rem}.curriculum-content-container{display:grid;grid-template-areas:"sidebar . header . toc" "sidebar . body . toc";grid-template-columns:var(--layout-2-sidebars);grid-template-rows:min-content auto;justify-content:space-between;padding-inline:var(--layout-side-padding)}.curriculum-content-container .curriculum-layout__content{display:contents}.curriculum-content-container .curriculum-layout__header{grid-area:header}.curriculum-content-container .curriculum-layout__body{grid-area:body;padding-bottom:3rem}.curriculum-content-container .curriculum-layout__sidebar{grid-area:sidebar;padding-top:0}@media (width >= calc(1rem * 2 + (14rem + 2rem) * 2 + 31rem)){:is(.curriculum-content-container .curriculum-layout__sidebar) .left-sidebar{margin-right:calc(var(--layout-sidebar-gap)/-2);padding-right:calc(var(--layout-sidebar-gap)/2)}}.curriculum-content-container .curriculum-layout__toc{align-content:start;align-items:start;display:flex;flex-wrap:wrap;gap:.5rem;grid-area:toc;justify-content:space-between}.curriculum-content-container .curriculum-layout__sidebar .left-sidebar,.curriculum-content-container .curriculum-layout__toc{max-height:calc(100vh - var(--sticky-header-height));overflow-y:auto;position:sticky;top:var(--sticky-header-height)}@media (width < calc(1rem * 2 + (14rem + 2rem) * 2 + 31rem)){.curriculum-content-container{grid-template-areas:"toc . header" "toc . body";grid-template-columns:var(--layout-1-sidebar-left)}.curriculum-content-container .curriculum-layout__sidebar{background:var(--color-background-page);display:none;grid-area:toc;z-index:1}}@media (width < calc(1rem * 2 + 14rem + 2rem + 31rem)){.curriculum-content-container{display:block}.curriculum-content-container .curriculum-layout__sidebar{inset:0;position:fixed;top:var(--sticky-header-height);z-index:var(--z-index-sidebar-mobile)}:is(.curriculum-content-container .curriculum-layout__sidebar) .left-sidebar{padding:1rem}.curriculum-content-container .curriculum-layout__toc{max-height:unset;overflow-y:unset;position:unset;top:unset;--toc-header-font-size:var(--font-size-larger)}}
2
+ /*# sourceMappingURL=614.b7c7bcd4ee6e4f7d.css.map*/
@@ -0,0 +1 @@
1
+ {"version":3,"file":"614.b7c7bcd4ee6e4f7d.css","sources":["webpack://@mdn/fred/./components/curriculum/sidebar.css","webpack://@mdn/fred/./components/curriculum/layout.css"],"sourcesContent":[".curriculum-content-container .left-sidebar {\n position: sticky;\n top: var(--sticky-header-height);\n\n padding-bottom: 3rem;\n\n overflow-wrap: anywhere;\n\n ol {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n details {\n width: 100%;\n\n &[open] {\n > summary {\n margin-bottom: 0.5rem;\n\n &::before {\n transform: rotate(90deg);\n }\n }\n }\n\n summary {\n display: flex;\n align-items: center;\n cursor: pointer;\n\n &::before {\n display: inline-block;\n\n flex-shrink: 0;\n\n width: 1rem;\n height: 1rem;\n\n margin: 0.25rem;\n\n content: \"\";\n\n background-color: currentcolor;\n\n mask-image: url(\"../icon/chevron-right.svg\");\n mask-size: cover;\n }\n\n &:hover {\n background-color: var(--color-background-secondary);\n\n &:has(a:hover) {\n /* Don't highlight, as link click doesn't toggle. */\n background-color: unset;\n }\n }\n }\n\n ol {\n padding-left: 1.5rem;\n }\n }\n\n li {\n display: flex;\n align-items: center;\n justify-content: stretch;\n\n &:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n\n &.section {\n font-weight: var(--font-weight-bold);\n\n &:not(:first-child) {\n margin-top: 1em;\n }\n }\n }\n\n a,\n span:not(.highlight-container) {\n display: inline-flex;\n padding-block: 0.25rem;\n }\n\n a {\n color: var(--color-text-primary);\n\n &:hover {\n color: var(--color-area-link);\n }\n\n &:not(:hover) {\n text-decoration: none;\n }\n }\n\n em {\n display: inline-flex;\n\n align-items: center;\n\n padding-inline: 0.5rem;\n\n font-style: normal;\n\n background-color: var(--background-toc-active);\n border-left: 2px solid var(--category-color);\n }\n}\n",".curriculum-content-container {\n display: grid;\n\n grid-template-areas:\n \"sidebar . header . toc\"\n \"sidebar . body . toc\";\n grid-template-rows: min-content auto;\n grid-template-columns: var(--layout-2-sidebars);\n\n justify-content: space-between;\n\n padding-inline: var(--layout-side-padding);\n\n .curriculum-layout__content {\n display: contents;\n }\n\n .curriculum-layout__header {\n grid-area: header;\n }\n\n .curriculum-layout__body {\n grid-area: body;\n padding-bottom: 3rem;\n }\n\n .curriculum-layout__sidebar {\n grid-area: sidebar;\n padding-top: 0;\n\n @media (--screen-layout-2-sidebars) {\n .left-sidebar {\n padding-right: calc(var(--layout-sidebar-gap) / 2);\n margin-right: calc(var(--layout-sidebar-gap) / -2);\n }\n }\n }\n\n .curriculum-layout__toc {\n display: flex;\n\n flex-wrap: wrap;\n\n grid-area: toc;\n\n gap: 0.5rem;\n align-content: start;\n align-items: start;\n justify-content: space-between;\n }\n\n .curriculum-layout__sidebar .left-sidebar,\n .curriculum-layout__toc {\n position: sticky;\n top: var(--sticky-header-height);\n\n max-height: calc(100vh - var(--sticky-header-height));\n\n overflow-y: auto;\n }\n\n @media (--screen-layout-1-sidebar-or-less) {\n grid-template-areas:\n \"toc . header\"\n \"toc . body\";\n grid-template-columns: var(--layout-1-sidebar-left);\n\n .curriculum-layout__sidebar {\n z-index: 1;\n\n display: none;\n\n grid-area: toc;\n\n background: var(--color-background-page);\n }\n }\n\n @media (--screen-layout-no-sidebar) {\n display: block;\n\n .curriculum-layout__sidebar {\n position: fixed;\n inset: 0;\n top: var(--sticky-header-height);\n z-index: var(--z-index-sidebar-mobile);\n\n .left-sidebar {\n padding: 1rem;\n }\n }\n\n .curriculum-layout__toc {\n position: unset;\n top: unset;\n\n max-height: unset;\n\n overflow-y: unset;\n --toc-header-font-size: var(--font-size-larger);\n }\n }\n}\n"],"names":[],"mappings":"AAAA,4CAME,sBAAuB,CAFvB,mBAAoB,CAHpB,eAAgB,CAChB,+BA+GF,CAzGE,oDAGE,eAAgB,CADhB,QAAS,CADT,SAGF,CAEA,yDACE,UAgDF,CA7CI,4EACE,mBAKF,CAHE,wFACE,uBACF,CAIJ,sEAEE,kBAAmB,CACnB,cAAe,CAFf,YA8BF,CA1BE,kFAYE,6BAA8B,CAF9B,UAAW,CATX,oBAAqB,CAErB,aAAc,CAGd,WAAY,CAEZ,aAAe,CAMf,yEAA4C,CAA5C,iEAA4C,CAC5C,uBAAgB,CAAhB,eAAgB,CAVhB,UAWF,CAEA,iFACE,kDAMF,CAJE,8FAEE,sBACF,CAIJ,iEACE,mBACF,CAGF,oDAEE,kBAAmB,CADnB,YAAa,CAEb,uBAaF,CAXE,0EACE,mBACF,CAEA,iEACE,mCAKF,CAHE,mFACE,cACF,CAIJ,mIAEE,mBAAoB,CACpB,oBACF,CAEA,mDACE,+BASF,CAPE,8DACE,4BACF,CAEA,oEACE,4BAAqB,CAArB,oBACF,CAGF,oDAGE,kBAAmB,CAMnB,6CAA8C,CAC9C,2CAA4C,CAT5C,mBAAoB,CAMpB,iBAAkB,CAFlB,oBAMF,CChHF,8BACE,YAAa,CAEb,qEAE0B,CAE1B,8CAA+C,CAD/C,mCAAoC,CAGpC,6BAA8B,CAE9B,yCA2FF,CAzFE,0DACE,gBACF,CAEA,yDACE,gBACF,CAEA,uDACE,cAAe,CACf,mBACF,CAEA,0DACE,iBAAkB,CAClB,aAQF,CANE,8DACE,6EAEE,+CAAkD,CADlD,+CAEF,CACF,CAGF,sDAQE,mBAAoB,CACpB,iBAAkB,CARlB,YAAa,CAEb,cAAe,CAIf,SAAW,CAFX,aAAc,CAKd,6BACF,CAEA,8HAKE,oDAAqD,CAErD,eAAgB,CALhB,eAAgB,CAChB,+BAKF,CAEA,6DA7DF,8BA8DI,+CAEc,CACd,kDAqCJ,CAnCI,0DAOE,uCAAwC,CAJxC,YAAa,CAEb,aAAc,CAJd,SAOF,CACF,CAEA,uDA9EF,8BA+EI,aAuBJ,CArBI,0DAEE,OAAQ,CADR,cAAe,CAEf,+BAAgC,CAChC,qCAKF,CAHE,6EACE,YACF,CAGF,sDAIE,gBAAiB,CAEjB,gBAAiB,CALjB,cAAe,CACf,SAAU,CAKV,8CACF,CACF"}
@@ -0,0 +1,20 @@
1
+ export const __webpack_ids__=["6213"];export const __webpack_modules__={28072:function(e,s,t){t.d(s,{Z:()=>i});var o=t(8081),a=t.n(o),l=t(23645),c=t.n(l)()(a());c.push([e.id,":is(.code-example,.css-formal-syntax) .token.cdata,:is(.code-example,.css-formal-syntax) .token.comment,:is(.code-example,.css-formal-syntax) .token.doctype,:is(.code-example,.css-formal-syntax) .token.prolog{--csstools-light-dark-toggle--0:var(--csstools-color-scheme--light) #b3b3b3;color:var(--csstools-light-dark-toggle--0,#51565d);color:light-dark(#51565d,#b3b3b3)}:is(.code-example,.css-formal-syntax) .token.punctuation{--csstools-light-dark-toggle--1:var(--csstools-color-scheme--light) #b3b3b3;color:var(--csstools-light-dark-toggle--1,#51565d);color:light-dark(#51565d,#b3b3b3)}:is(.code-example,.css-formal-syntax) .token.attr-name,:is(.code-example,.css-formal-syntax) .token.builtin,:is(.code-example,.css-formal-syntax) .token.class-name,:is(.code-example,.css-formal-syntax) .token.function,:is(.code-example,.css-formal-syntax) .token.inserted,:is(.code-example,.css-formal-syntax) .token.property,:is(.code-example,.css-formal-syntax) .token.selector{--csstools-light-dark-toggle--2:var(--csstools-color-scheme--light) #ff97a0;color:var(--csstools-light-dark-toggle--2,#d30038);color:light-dark(#d30038,#ff97a0)}:is(.code-example,.css-formal-syntax) .token.atrule,:is(.code-example,.css-formal-syntax) .token.attr-value{--csstools-light-dark-toggle--3:var(--csstools-color-scheme--light) #00d061;color:var(--csstools-light-dark-toggle--3,#007936);color:light-dark(#007936,#00d061)}:is(.code-example,.css-formal-syntax) .token.keyword{--csstools-light-dark-toggle--4:var(--csstools-color-scheme--light) #c1cff1;color:var(--csstools-light-dark-toggle--4,#0069c2);color:light-dark(#0069c2,#c1cff1)}:is(.code-example,.css-formal-syntax) .token.boolean,:is(.code-example,.css-formal-syntax) .token.char,:is(.code-example,.css-formal-syntax) .token.constant,:is(.code-example,.css-formal-syntax) .token.deleted,:is(.code-example,.css-formal-syntax) .token.number,:is(.code-example,.css-formal-syntax) .token.string,:is(.code-example,.css-formal-syntax) .token.symbol,:is(.code-example,.css-formal-syntax) .token.tag{--csstools-light-dark-toggle--5:var(--csstools-color-scheme--light) #00d061;color:var(--csstools-light-dark-toggle--5,#007936);color:light-dark(#007936,#00d061)}:is(.code-example,.css-formal-syntax) .token.builtin,:is(.code-example,.css-formal-syntax) .token.inserted,:is(.code-example,.css-formal-syntax) .token.selector,:is(.code-example,.css-formal-syntax) .token.template-string>.token.string{--csstools-light-dark-toggle--6:var(--csstools-color-scheme--light) #bea5ff;color:var(--csstools-light-dark-toggle--6,#872bff);color:light-dark(#872bff,#bea5ff)}:is(.code-example,.css-formal-syntax) .token.bold,:is(.code-example,.css-formal-syntax) .token.important{font-weight:700}:is(.code-example,.css-formal-syntax) .token.italic{font-style:italic}:is(.code-example,.css-formal-syntax) .token.entity{cursor:help}",""]);let i=c.toString()},66178:function(e,s,t){t.r(s),t.d(s,{MDNCodeExample:()=>MDNCodeExample,upgradePre:()=>n});var o=t(35470),a=t(14703),l=t(51968),c=t(67621);t(28553);var i=t(58620);let r=new Set(["html","js","css","wat"]);let MDNCodeExample=class MDNCodeExample extends a.oi{static styles=i.Z;static properties={language:{type:String},code:{type:String}};constructor(){super(),this.language="",this.code="",this._liveSample=void 0,this._liveSampleUpdate=this._liveSampleUpdate.bind(this)}get liveSample(){return this._liveSample}set liveSample(e){e&&(this._liveSample&&this._liveSample.removeEventListener("mdn-play-runner-src",this._liveSampleUpdate),this._liveSample=e,this._liveSample.addEventListener("mdn-play-runner-src",this._liveSampleUpdate))}_liveSampleUpdate(){this.requestUpdate()}_codeRef=(0,l.V)();_highlightTask=new o.iQ(this,{args:()=>[this.language,this.code],task:async([e,s])=>{let{highlightString:o}=await Promise.all([t.e("4876"),t.e("7194")]).then(t.bind(t,55508));return o(s,e)}});render(){return(0,a.dy)`
2
+ <div class="code-example">
3
+ <div class="example-header">
4
+ <span class="language-name">${this.language}</span>
5
+ <mdn-copy-button
6
+ .copiesFrom=${this._codeRef.value}
7
+ variant="secondary"
8
+ ></mdn-copy-button>
9
+ ${this.liveSample?.breakoutLink?(0,a.dy)`<mdn-button
10
+ variant="secondary"
11
+ href=${this.liveSample?.breakoutLink}
12
+ target="_blank"
13
+ rel="opener"
14
+ >Play</mdn-button
15
+ >`:a.Ld}
16
+ </div>
17
+ <pre class=${this.className}><code ${(0,l.i)(this._codeRef)}>${this._highlightTask.render({initial:()=>this.code,pending:()=>this.code,complete:e=>(0,c.A)(e)})}</code></pre>
18
+ </div>
19
+ `}};function n(e){if(e instanceof HTMLPreElement){let s=e.closest("div.code-example"),t=[...e.classList].find(e=>r.has(e))||s?.querySelector(".language-name")?.textContent?.trim(),o=[...e.classList].some(e=>"hidden"===e||e.startsWith("interactive-example")),a=e.querySelector("code")?.textContent;if(s&&t&&a){let l=document.createElement("mdn-code-example");return l.language=t,l.code=a,l.hidden=o,l.className=e.className,s.replaceWith(l),l}}}customElements.define("mdn-code-example",MDNCodeExample)},58620:function(e,s,t){t.d(s,{Z:()=>p});var o=t(14703),a=t(8081),l=t.n(a),c=t(23645),i=t.n(c),r=t(54681),n=t(28072),d=t(56523),m=i()(l());m.i(r.Z),m.i(n.Z),m.i(d.Z),m.push([e.id,".code-example .example-header{gap:.5rem;padding-right:.5rem}:is(.code-example .example-header) .language-name{margin-right:auto}",""]);let p=(0,o.iv)([m.toString()])}};
20
+ //# sourceMappingURL=6213.ba167b80474036f0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"6213.ba167b80474036f0.js","sources":["webpack://@mdn/fred/./components/code-example/prism.css?e531","webpack://@mdn/fred/./components/code-example/element.js","webpack://@mdn/fred/./components/code-example/element.css"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:is(.code-example,.css-formal-syntax) .token.cdata,:is(.code-example,.css-formal-syntax) .token.comment,:is(.code-example,.css-formal-syntax) .token.doctype,:is(.code-example,.css-formal-syntax) .token.prolog{--csstools-light-dark-toggle--0:var(--csstools-color-scheme--light) #b3b3b3;color:var(--csstools-light-dark-toggle--0,#51565d);color:light-dark(#51565d,#b3b3b3)}:is(.code-example,.css-formal-syntax) .token.punctuation{--csstools-light-dark-toggle--1:var(--csstools-color-scheme--light) #b3b3b3;color:var(--csstools-light-dark-toggle--1,#51565d);color:light-dark(#51565d,#b3b3b3)}:is(.code-example,.css-formal-syntax) .token.attr-name,:is(.code-example,.css-formal-syntax) .token.builtin,:is(.code-example,.css-formal-syntax) .token.class-name,:is(.code-example,.css-formal-syntax) .token.function,:is(.code-example,.css-formal-syntax) .token.inserted,:is(.code-example,.css-formal-syntax) .token.property,:is(.code-example,.css-formal-syntax) .token.selector{--csstools-light-dark-toggle--2:var(--csstools-color-scheme--light) #ff97a0;color:var(--csstools-light-dark-toggle--2,#d30038);color:light-dark(#d30038,#ff97a0)}:is(.code-example,.css-formal-syntax) .token.atrule,:is(.code-example,.css-formal-syntax) .token.attr-value{--csstools-light-dark-toggle--3:var(--csstools-color-scheme--light) #00d061;color:var(--csstools-light-dark-toggle--3,#007936);color:light-dark(#007936,#00d061)}:is(.code-example,.css-formal-syntax) .token.keyword{--csstools-light-dark-toggle--4:var(--csstools-color-scheme--light) #c1cff1;color:var(--csstools-light-dark-toggle--4,#0069c2);color:light-dark(#0069c2,#c1cff1)}:is(.code-example,.css-formal-syntax) .token.boolean,:is(.code-example,.css-formal-syntax) .token.char,:is(.code-example,.css-formal-syntax) .token.constant,:is(.code-example,.css-formal-syntax) .token.deleted,:is(.code-example,.css-formal-syntax) .token.number,:is(.code-example,.css-formal-syntax) .token.string,:is(.code-example,.css-formal-syntax) .token.symbol,:is(.code-example,.css-formal-syntax) .token.tag{--csstools-light-dark-toggle--5:var(--csstools-color-scheme--light) #00d061;color:var(--csstools-light-dark-toggle--5,#007936);color:light-dark(#007936,#00d061)}:is(.code-example,.css-formal-syntax) .token.builtin,:is(.code-example,.css-formal-syntax) .token.inserted,:is(.code-example,.css-formal-syntax) .token.selector,:is(.code-example,.css-formal-syntax) .token.template-string>.token.string{--csstools-light-dark-toggle--6:var(--csstools-color-scheme--light) #bea5ff;color:var(--csstools-light-dark-toggle--6,#872bff);color:light-dark(#872bff,#bea5ff)}:is(.code-example,.css-formal-syntax) .token.bold,:is(.code-example,.css-formal-syntax) .token.important{font-weight:700}:is(.code-example,.css-formal-syntax) .token.italic{font-style:italic}:is(.code-example,.css-formal-syntax) .token.entity{cursor:help}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { Task } from \"@lit/task\";\nimport { LitElement, html, nothing } from \"lit\";\nimport { createRef, ref } from \"lit/directives/ref.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\n\nimport \"../copy-button/element.js\";\nimport styles from \"./element.css?lit\";\n\n/**\n * @import { MDNLiveSampleResult } from \"../live-sample-result/element.js\";\n */\n\nconst LANGUAGE_CLASSES = new Set([\"html\", \"js\", \"css\", \"wat\"]);\n\nexport class MDNCodeExample extends LitElement {\n static styles = styles;\n\n static properties = {\n language: { type: String },\n code: { type: String },\n };\n\n constructor() {\n super();\n this.language = \"\";\n this.code = \"\";\n /** @type {MDNLiveSampleResult | undefined} */\n this._liveSample = undefined;\n this._liveSampleUpdate = this._liveSampleUpdate.bind(this);\n }\n\n get liveSample() {\n return this._liveSample;\n }\n\n set liveSample(result) {\n if (result) {\n if (this._liveSample) {\n this._liveSample.removeEventListener(\n \"mdn-play-runner-src\",\n this._liveSampleUpdate,\n );\n }\n this._liveSample = result;\n this._liveSample.addEventListener(\n \"mdn-play-runner-src\",\n this._liveSampleUpdate,\n );\n }\n }\n\n _liveSampleUpdate() {\n this.requestUpdate();\n }\n\n _codeRef = createRef();\n\n _highlightTask = new Task(this, {\n args: () => [this.language, this.code],\n task: async ([language, code]) => {\n const { highlightString } = await import(\"./syntax-highlight.js\");\n return highlightString(code, language);\n },\n });\n\n render() {\n return html`\n <div class=\"code-example\">\n <div class=\"example-header\">\n <span class=\"language-name\">${this.language}</span>\n <mdn-copy-button\n .copiesFrom=${this._codeRef.value}\n variant=\"secondary\"\n ></mdn-copy-button>\n ${this.liveSample?.breakoutLink\n ? html`<mdn-button\n variant=\"secondary\"\n href=${this.liveSample?.breakoutLink}\n target=\"_blank\"\n rel=\"opener\"\n >Play</mdn-button\n >`\n : nothing}\n </div>\n <pre class=${this.className}><code ${ref(\n this._codeRef,\n )}>${this._highlightTask.render({\n initial: () => this.code,\n pending: () => this.code,\n complete: (highlighted) => unsafeHTML(highlighted),\n })}</code></pre>\n </div>\n `;\n }\n}\n\ncustomElements.define(\"mdn-code-example\", MDNCodeExample);\n\n/**\n * @param {Element} pre\n * @returns {MDNCodeExample | undefined}\n */\nexport function upgradePre(pre) {\n if (pre instanceof HTMLPreElement) {\n const example = pre.closest(\"div.code-example\");\n const language =\n [...pre.classList].find((c) => LANGUAGE_CLASSES.has(c)) ||\n example?.querySelector(\".language-name\")?.textContent?.trim();\n const hidden = [...pre.classList].some(\n (c) => c === \"hidden\" || c.startsWith(\"interactive-example\"),\n );\n const code = pre.querySelector(\"code\")?.textContent;\n if (example && language && code) {\n const newExample = document.createElement(\"mdn-code-example\");\n newExample.language = language;\n newExample.code = code;\n newExample.hidden = hidden;\n newExample.className = pre.className;\n example.replaceWith(newExample);\n return newExample;\n }\n }\n return;\n}\n","import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../global/global.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_1___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./prism.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_2___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./common.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_1___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_2___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.code-example .example-header{gap:.5rem;padding-right:.5rem}:is(.code-example .example-header) .language-name{margin-right:auto}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n"],"names":["Set","MDNCodeExample","String","HTMLPreElement","document","customElements"],"mappings":"iJAGI,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,2xFAA4xF,GAAG,EAEx0F,MAAe,EAAwB,QAAQ,E,mKCK/C,IAAM,EAAmB,IAAIA,IAAI,CAAC,OAAQ,KAAM,MAAO,MAAM,EAEtD,IAAMC,eAAN,MAAMA,uBAAuB,IAAU,CAC5C,OAAO,OAAS,GAAM,AAAC,AAEvB,QAAO,WAAa,CAClB,SAAU,CAAE,KAAMC,MAAO,EACzB,KAAM,CAAE,KAAMA,MAAO,CACvB,CAAE,AAEF,cAAc,CACZ,KAAK,GACL,IAAI,CAAC,QAAQ,CAAG,GAChB,IAAI,CAAC,IAAI,CAAG,GAEZ,IAAI,CAAC,WAAW,CAAG,OACnB,IAAI,CAAC,iBAAiB,CAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAC3D,CAEA,IAAI,YAAa,CACf,OAAO,IAAI,CAAC,WAAW,AACzB,CAEA,IAAI,WAAW,CAAM,CAAE,CACjB,IACE,IAAI,CAAC,WAAW,EAClB,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAClC,sBACA,IAAI,CAAC,iBAAiB,EAG1B,IAAI,CAAC,WAAW,CAAG,EACnB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAC/B,sBACA,IAAI,CAAC,iBAAiB,EAG5B,CAEA,mBAAoB,CAClB,IAAI,CAAC,aAAa,EACpB,CAEA,SAAW,SAAY,AAEvB,gBAAiB,IAAI,IAAI,CAAC,IAAI,CAAE,CAC9B,KAAM,IAAM,CAAC,IAAI,CAAC,QAAQ,CAAE,IAAI,CAAC,IAAI,CAAC,CACtC,KAAM,MAAO,CAAC,EAAU,EAAK,IAC3B,GAAM,CAAE,iBAAe,CAAE,CAAG,MAAM,6DAClC,OAAO,EAAgB,EAAM,EAC/B,CACF,EAAG,AAEH,SAAS,CACP,MAAO,QAAI,CAAC;;;sCAGsB,EAAE,IAAI,CAAC,QAAQ,CAAC;;wBAE9B,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;;;UAGpC,EAAE,IAAI,CAAC,UAAU,EAAE,aACf,QAAI,CAAC;;qBAEE,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa;;;;eAItC,CAAC,CACF,IAAO,CAAC;;mBAEH,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QACnC,IAAI,CAAC,QAAQ,EACb,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAC9B,QAAS,IAAM,IAAI,CAAC,IAAI,CACxB,QAAS,IAAM,IAAI,CAAC,IAAI,CACxB,SAAU,AAAC,GAAgB,QAAW,EACxC,GAAG;;IAEP,CAAC,AACH,CACF,EAQO,SAAS,EAAW,CAAG,EAC5B,GAAI,aAAeC,eAAgB,CACjC,IAAM,EAAU,EAAI,OAAO,CAAC,oBACtB,EACJ,IAAI,EAAI,SAAS,CAAC,CAAC,IAAI,CAAC,AAAC,GAAM,EAAiB,GAAG,CAAC,KACpD,GAAS,cAAc,mBAAmB,aAAa,OACnD,EAAS,IAAI,EAAI,SAAS,CAAC,CAAC,IAAI,CACpC,AAAC,GAAM,AAAM,WAAN,GAAkB,EAAE,UAAU,CAAC,wBAElC,EAAO,EAAI,aAAa,CAAC,SAAS,YACxC,GAAI,GAAW,GAAY,EAAM,CAC/B,IAAM,EAAaC,SAAS,aAAa,CAAC,oBAM1C,OALA,EAAW,QAAQ,CAAG,EACtB,EAAW,IAAI,CAAG,EAClB,EAAW,MAAM,CAAG,EACpB,EAAW,SAAS,CAAG,EAAI,SAAS,CACpC,EAAQ,WAAW,CAAC,GACb,CACT,CACF,CAEF,CA3BAC,eAAe,MAAM,CAAC,mBAAoBJ,e,gICzFtC,EAA0B,IAA4B,KAC1D,EAAwB,CAAC,CAAC,GAAiC,EAC3D,EAAwB,CAAC,CAAC,GAAiC,EAC3D,EAAwB,CAAC,CAAC,GAAiC,EAE3D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,mIAAoI,GAAG,EAEhL,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C"}
@@ -0,0 +1,34 @@
1
+ export const __webpack_ids__=["665"];export const __webpack_modules__={54681:function(t,r,e){e.d(r,{Z:()=>s});var o=e(8081),a=e.n(o),n=e(23645),i=e.n(n)()(a());i.push([t.id,"*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer}img{height:auto;max-width:100%}a{color:var(--color-link-normal)}[hidden]{display:none!important}",""]);let s=i.toString()},65034:function(t,r,e){e.r(r),e.d(r,{MDNObservatoryTestsAndScores:()=>MDNObservatoryTestsAndScores});var o=e(35470),a=e(14703),n=e(67621),i=e(66176),s=e(51513);let MDNObservatoryTestsAndScores=class MDNObservatoryTestsAndScores extends a.oi{static styles=s.Z;static ssr=!1;_fetchMatrixTask=new o.iQ(this,{task:async()=>{let t=await fetch(`${i._v}/api/v2/recommendation_matrix`);return t.ok?(await t.json()).map(t=>({...t,results:t.results.map(t=>({...t,description_html:t.description}))})):[]},args:()=>[]});render(){return this._fetchMatrixTask.render({pending:()=>(0,a.dy)`<div class="loading">Loading tests and scoring data...</div>`,complete:t=>t.map(t=>(0,a.dy)`
2
+ <section>
3
+ <h3 id=${t.name}>${t.title}</h3>
4
+ <p>
5
+ See <a href=${t.mdnLink}>${t.title}</a> for guidance.
6
+ </p>
7
+ <figure class="table-container">
8
+ <table>
9
+ <thead>
10
+ <tr>
11
+ <th>Test result</th>
12
+ <th>Description</th>
13
+ <th align="center">Modifier</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ ${t.results.map(t=>(0,a.dy)`
18
+ <tr>
19
+ <td>${t.name}</td>
20
+ <td>${(0,n.A)(t.description_html)}</td>
21
+ <td>${t.scoreModifier}</td>
22
+ </tr>
23
+ `)}
24
+ </tbody>
25
+ </table>
26
+ </figure>
27
+ </section>
28
+ `),error:t=>(0,a.dy)`
29
+ <div class="error">
30
+ Failed to load tests and scoring data. Please try again later.
31
+ ${console.error("Observatory matrix fetch error:",t)}
32
+ </div>
33
+ `})}};customElements.define("mdn-observatory-tests-and-scores",MDNObservatoryTestsAndScores)},51513:function(t,r,e){e.d(r,{Z:()=>l});var o=e(14703),a=e(8081),n=e.n(a),i=e(23645),s=e.n(i),d=e(54681),c=s()(n());c.i(d.Z),c.push([t.id,":host{display:block}.error{background-color:var(--error-bg,#fee);border-radius:.25rem;color:var(--error-color,#d33);margin:1rem 0;padding:1rem}section{margin-bottom:3rem}h3{font-size:var(--font-size-large);font-weight:var(--font-weight-normal);line-height:var(--font-line-content);margin-bottom:1rem;margin-top:2rem}.table-container{margin:1rem 0;overflow-x:auto}table{border-collapse:collapse;min-width:600px;width:100%}td,th{border:1px solid var(--color-border-primary);padding:.5rem .75rem;text-align:left}th{background-color:var(--color-background-secondary,#f5f5f5);font-weight:700}th[align=center]{text-align:center}tr:nth-child(2n){background-color:var(--color-background-secondary)}td:last-child{text-align:center}",""]);let l=(0,o.iv)([c.toString()])}};
34
+ //# sourceMappingURL=665.7d96ffb19066da27.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"665.7d96ffb19066da27.js","sources":["webpack://@mdn/fred/./components/global/global.css?272a","webpack://@mdn/fred/./components/observatory-tests-and-scores/element.js","webpack://@mdn/fred/./components/observatory-tests-and-scores/element.css"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*,:after,:before{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer}img{height:auto;max-width:100%}a{color:var(--color-link-normal)}[hidden]{display:none!important}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { Task } from \"@lit/task\";\nimport { LitElement, html } from \"lit\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\n\nimport { OBSERVATORY_API_URL } from \"../observatory/constants.js\";\n\nimport styles from \"./element.css?lit\";\n\nexport class MDNObservatoryTestsAndScores extends LitElement {\n static styles = styles;\n static ssr = false;\n\n _fetchMatrixTask = new Task(this, {\n task: async () => {\n const response = await fetch(\n `${OBSERVATORY_API_URL}/api/v2/recommendation_matrix`,\n );\n\n if (!response.ok) {\n return [];\n }\n\n /**\n * @type {import(\"@observatory\").ScoringResponse}\n */\n const data = await response.json();\n\n const ret = data.map((entry) => ({\n ...entry,\n results: entry.results.map((result) => ({\n ...result,\n description_html: result.description,\n })),\n }));\n return ret;\n },\n args: () => [],\n });\n\n render() {\n return this._fetchMatrixTask.render({\n pending: () =>\n html`<div class=\"loading\">Loading tests and scoring data...</div>`,\n complete: (data) =>\n data.map(\n (entry) => html`\n <section>\n <h3 id=${entry.name}>${entry.title}</h3>\n <p>\n See <a href=${entry.mdnLink}>${entry.title}</a> for guidance.\n </p>\n <figure class=\"table-container\">\n <table>\n <thead>\n <tr>\n <th>Test result</th>\n <th>Description</th>\n <th align=\"center\">Modifier</th>\n </tr>\n </thead>\n <tbody>\n ${entry.results.map(\n (result) => html`\n <tr>\n <td>${result.name}</td>\n <td>${unsafeHTML(result.description_html)}</td>\n <td>${result.scoreModifier}</td>\n </tr>\n `,\n )}\n </tbody>\n </table>\n </figure>\n </section>\n `,\n ),\n error: (error) => html`\n <div class=\"error\">\n Failed to load tests and scoring data. Please try again later.\n ${console.error(\"Observatory matrix fetch error:\", error)}\n </div>\n `,\n });\n }\n}\n\ncustomElements.define(\n \"mdn-observatory-tests-and-scores\",\n MDNObservatoryTestsAndScores,\n);\n","import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../global/global.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}.error{background-color:var(--error-bg,#fee);border-radius:.25rem;color:var(--error-color,#d33);margin:1rem 0;padding:1rem}section{margin-bottom:3rem}h3{font-size:var(--font-size-large);font-weight:var(--font-weight-normal);line-height:var(--font-line-content);margin-bottom:1rem;margin-top:2rem}.table-container{margin:1rem 0;overflow-x:auto}table{border-collapse:collapse;min-width:600px;width:100%}td,th{border:1px solid var(--color-border-primary);padding:.5rem .75rem;text-align:left}th{background-color:var(--color-background-secondary,#f5f5f5);font-weight:700}th[align=center]{text-align:center}tr:nth-child(2n){background-color:var(--color-background-secondary)}td:last-child{text-align:center}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n"],"names":["MDNObservatoryTestsAndScores","s","fetch","console","customElements"],"mappings":"gJAGI,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,0MAA2M,GAAG,EAEvP,MAAe,EAAwB,QAAQ,E,iKCCxC,IAAMA,6BAAN,MAAMA,qCAAqC,IAAU,CAC1D,OAAO,OAASC,EAAA,CAAM,AAAC,AACvB,QAAO,IAAM,EAAM,AAEnB,kBAAmB,IAAI,IAAI,CAAC,IAAI,CAAE,CAChC,KAAM,UACJ,IAAM,EAAW,MAAMC,MACrB,CAAC,EAAE,IAAmB,CAAC,6BAA6B,CAAC,SAGvD,AAAK,EAAS,EAAE,CASJ,AAFC,OAAM,EAAS,IAAI,EAAC,EAEhB,GAAG,CAAC,AAAC,GAAW,EAC/B,GAAG,CAAK,CACR,QAAS,EAAM,OAAO,CAAC,GAAG,CAAC,AAAC,GAAY,EACtC,GAAG,CAAM,CACT,iBAAkB,EAAO,WAAW,AACtC,GACF,IAdS,EAAE,AAgBb,EACA,KAAM,IAAM,EAAE,AAChB,EAAG,AAEH,SAAS,CACP,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAClC,QAAS,IACP,QAAI,CAAC,4DAA4D,CAAC,CACpE,SAAU,AAAC,GACT,EAAK,GAAG,CACN,AAAC,GAAU,QAAI,CAAC;;qBAEL,EAAE,EAAM,IAAI,CAAC,CAAC,EAAE,EAAM,KAAK,CAAC;;4BAErB,EAAE,EAAM,OAAO,CAAC,CAAC,EAAE,EAAM,KAAK,CAAC;;;;;;;;;;;;oBAYvC,EAAE,EAAM,OAAO,CAAC,GAAG,CACjB,AAAC,GAAW,QAAI,CAAC;;8BAET,EAAE,EAAO,IAAI,CAAC;8BACd,EAAE,QAAW,EAAO,gBAAgB,EAAE;8BACtC,EAAE,EAAO,aAAa,CAAC;;sBAE/B,CAAC,EACD;;;;;UAKZ,CAAC,EAEL,MAAO,AAAC,GAAU,QAAI,CAAC;;;UAGnB,EAAEC,QAAQ,KAAK,CAAC,kCAAmC,GAAO;;MAE9D,CAAC,AACH,EACF,CACF,EAEAC,eAAe,MAAM,CACnB,mCACAJ,6B,0GCnFE,EAA0B,IAA4B,KAC1D,EAAwB,CAAC,CAAC,GAAiC,EAE3D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,qtBAAstB,GAAG,EAElwB,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C"}
@@ -0,0 +1,6 @@
1
+ export const __webpack_ids__=["6681"];export const __webpack_modules__={55072:function(e,t,s){s.r(t),s.d(t,{MDNObservatoryHeaderLink:()=>MDNObservatoryHeaderLink});var r=s(35470),i=s(14703),a=s(28110),n=s(64643);let MDNObservatoryHeaderLink=class MDNObservatoryHeaderLink extends i.oi{static styles=n.Z;static properties={header:{type:String},_headerExists:{type:Boolean,state:!0},_isChecking:{type:Boolean,state:!0},_hasChecked:{type:Boolean,state:!0}};constructor(){super(),this.header="",this._headerExists=!1,this._isChecking=!1,this._hasChecked=!1}_checkHeaderTask=new r.iQ(this,{task:async([e])=>{if(!e)return{exists:!1};let t=(0,a.M2)(e),s=`/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(t)}`;try{return{exists:(await fetch(`${s}/index.json`,{method:"HEAD"})).ok,displayHeaderName:t,headerPath:s}}catch{return{exists:!1,displayHeaderName:t,headerPath:s}}},args:()=>[this.header],onComplete:e=>{this._headerExists=e.exists,this._isChecking=!1,this._hasChecked=!0},onError:()=>{this._headerExists=!1,this._isChecking=!1,this._hasChecked=!0}});connectedCallback(){super.connectedCallback(),this.header&&!this._hasChecked&&(this._isChecking=!0,this._checkHeaderTask.run())}render(){let e=(0,a.M2)(this.header||"");if(this._isChecking||!this._hasChecked)return(0,i.dy)`${e}`;if(this._headerExists){let t=`/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(e)}`;return(0,i.dy)`
2
+ <a href=${t} target="_blank" rel="noreferrer">
3
+ ${e}
4
+ </a>
5
+ `}return(0,i.dy)`${e}`}};customElements.define("mdn-observatory-header-link",MDNObservatoryHeaderLink)},64643:function(e,t,s){s.d(t,{Z:()=>o});var r=s(14703),i=s(8081),a=s.n(i),n=s(23645),h=s.n(n),d=s(54681),c=h()(a());c.i(d.Z),c.push([e.id,"",""]);let o=(0,r.iv)([c.toString()])}};
6
+ //# sourceMappingURL=6681.51b917ef9762ead2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"6681.4bc549fb34f3fd5c.js","sources":["webpack://@mdn/fred/./components/observatory-header-link/element.js","webpack://@mdn/fred/./components/observatory-header-link/element.css"],"sourcesContent":["import { Task } from \"@lit/task\";\nimport { LitElement, html } from \"lit\";\n\nimport { upperCaseHeaderName } from \"../observatory/utils.js\";\n\nimport styles from \"./element.css?lit\";\n\nexport class MDNObservatoryHeaderLink extends LitElement {\n static styles = styles;\n\n static properties = {\n header: { type: String },\n _headerExists: { type: Boolean, state: true },\n _isChecking: { type: Boolean, state: true },\n _hasChecked: { type: Boolean, state: true },\n };\n\n constructor() {\n super();\n this.header = \"\";\n this._headerExists = false;\n this._isChecking = false;\n this._hasChecked = false;\n }\n\n // Task to check if the header documentation page exists\n _checkHeaderTask = new Task(this, {\n task: async ([header]) => {\n if (!header) return { exists: false };\n\n const displayHeaderName = upperCaseHeaderName(header);\n const headerPath = `/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(displayHeaderName)}`;\n\n try {\n const response = await fetch(`${headerPath}/index.json`, {\n method: \"HEAD\",\n });\n return {\n exists: response.ok,\n displayHeaderName,\n headerPath,\n };\n } catch {\n return {\n exists: false,\n displayHeaderName,\n headerPath,\n };\n }\n },\n args: () => [this.header],\n onComplete: (result) => {\n this._headerExists = result.exists;\n this._isChecking = false;\n this._hasChecked = true;\n },\n onError: () => {\n this._headerExists = false;\n this._isChecking = false;\n this._hasChecked = true;\n },\n });\n\n connectedCallback() {\n super.connectedCallback();\n if (this.header && !this._hasChecked) {\n this._isChecking = true;\n this._checkHeaderTask.run();\n }\n }\n\n render() {\n const displayHeaderName = upperCaseHeaderName(this.header || \"\");\n\n if (this._isChecking || !this._hasChecked) {\n return html`${displayHeaderName}`;\n }\n\n if (this._headerExists) {\n const headerPath = `/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(displayHeaderName)}`;\n return html`\n <a href=${headerPath} target=\"_blank\" rel=\"noreferrer\">\n ${displayHeaderName}\n </a>\n `;\n }\n\n return html`${displayHeaderName}`;\n }\n}\n\ncustomElements.define(\"mdn-observatory-header-link\", MDNObservatoryHeaderLink);\n","import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `a{color:var(--color-text-primary);-webkit-text-decoration:underline;text-decoration:underline;text-decoration-color:var(--color-text-secondary)}a:hover{-webkit-text-decoration:none;text-decoration:none}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n"],"names":["MDNObservatoryHeaderLink","String","Boolean","encodeURIComponent","fetch","customElements"],"mappings":"oNAOO,IAAMA,yBAAN,MAAMA,iCAAiC,IAAU,CACtD,OAAO,OAAS,GAAM,AAAC,AAEvB,QAAO,WAAa,CAClB,OAAQ,CAAE,KAAMC,MAAO,EACvB,cAAe,CAAE,KAAMC,QAAS,MAAO,EAAK,EAC5C,YAAa,CAAE,KAAMA,QAAS,MAAO,EAAK,EAC1C,YAAa,CAAE,KAAMA,QAAS,MAAO,EAAK,CAC5C,CAAE,AAEF,cAAc,CACZ,KAAK,GACL,IAAI,CAAC,MAAM,CAAG,GACd,IAAI,CAAC,aAAa,CAAG,GACrB,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,CAGA,iBAAmB,IAAI,IAAI,CAAC,IAAI,CAAE,CAChC,KAAM,MAAO,CAAC,EAAO,IACnB,GAAI,CAAC,EAAQ,MAAO,CAAE,OAAQ,EAAM,EAEpC,IAAM,EAAoB,SAAoB,GACxC,EAAa,CAAC,uCAAuC,EAAEC,mBAAmB,GAAmB,CAAC,CAEpG,GAAI,CAIF,MAAO,CACL,OAAQ,AAJO,OAAMC,MAAM,CAAC,EAAE,EAAW,WAAW,CAAC,CAAE,CACvD,OAAQ,MACV,EAAC,EAEkB,EAAE,CACnB,oBACA,YACF,CACF,CAAE,KAAM,CACN,MAAO,CACL,OAAQ,GACR,oBACA,YACF,CACF,CACF,EACA,KAAM,IAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CACzB,WAAY,AAAC,IACX,IAAI,CAAC,aAAa,CAAG,EAAO,MAAM,CAClC,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,EACA,QAAS,KACP,IAAI,CAAC,aAAa,CAAG,GACrB,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,CACF,EAAG,AAEH,oBAAoB,CAClB,KAAK,CAAC,oBACF,IAAI,CAAC,MAAM,EAAI,CAAC,IAAI,CAAC,WAAW,GAClC,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,gBAAgB,CAAC,GAAG,GAE7B,CAEA,QAAS,CACP,IAAM,EAAoB,SAAoB,IAAI,CAAC,MAAM,EAAI,IAE7D,GAAI,IAAI,CAAC,WAAW,EAAI,CAAC,IAAI,CAAC,WAAW,CACvC,MAAO,QAAI,CAAC,EAAE,EAAkB,CAAC,CAGnC,GAAI,IAAI,CAAC,aAAa,CAAE,CACtB,IAAM,EAAa,CAAC,uCAAuC,EAAED,mBAAmB,GAAmB,CAAC,CACpG,MAAO,QAAI,CAAC;gBACF,EAAE,EAAW;UACnB,EAAE,EAAkB;;MAExB,CAAC,AACH,CAEA,MAAO,QAAI,CAAC,EAAE,EAAkB,CAAC,AACnC,CACF,EAEAE,eAAe,MAAM,CAAC,8BAA+BL,yB,sFCvFjD,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,6MAA8M,GAAG,EAE1P,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C"}
1
+ {"version":3,"file":"6681.51b917ef9762ead2.js","sources":["webpack://@mdn/fred/./components/observatory-header-link/element.js","webpack://@mdn/fred/./components/observatory-header-link/element.css"],"sourcesContent":["import { Task } from \"@lit/task\";\nimport { LitElement, html } from \"lit\";\n\nimport { upperCaseHeaderName } from \"../observatory/utils.js\";\n\nimport styles from \"./element.css?lit\";\n\nexport class MDNObservatoryHeaderLink extends LitElement {\n static styles = styles;\n\n static properties = {\n header: { type: String },\n _headerExists: { type: Boolean, state: true },\n _isChecking: { type: Boolean, state: true },\n _hasChecked: { type: Boolean, state: true },\n };\n\n constructor() {\n super();\n this.header = \"\";\n this._headerExists = false;\n this._isChecking = false;\n this._hasChecked = false;\n }\n\n // Task to check if the header documentation page exists\n _checkHeaderTask = new Task(this, {\n task: async ([header]) => {\n if (!header) return { exists: false };\n\n const displayHeaderName = upperCaseHeaderName(header);\n const headerPath = `/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(displayHeaderName)}`;\n\n try {\n const response = await fetch(`${headerPath}/index.json`, {\n method: \"HEAD\",\n });\n return {\n exists: response.ok,\n displayHeaderName,\n headerPath,\n };\n } catch {\n return {\n exists: false,\n displayHeaderName,\n headerPath,\n };\n }\n },\n args: () => [this.header],\n onComplete: (result) => {\n this._headerExists = result.exists;\n this._isChecking = false;\n this._hasChecked = true;\n },\n onError: () => {\n this._headerExists = false;\n this._isChecking = false;\n this._hasChecked = true;\n },\n });\n\n connectedCallback() {\n super.connectedCallback();\n if (this.header && !this._hasChecked) {\n this._isChecking = true;\n this._checkHeaderTask.run();\n }\n }\n\n render() {\n const displayHeaderName = upperCaseHeaderName(this.header || \"\");\n\n if (this._isChecking || !this._hasChecked) {\n return html`${displayHeaderName}`;\n }\n\n if (this._headerExists) {\n const headerPath = `/en-US/docs/Web/HTTP/Reference/Headers/${encodeURIComponent(displayHeaderName)}`;\n return html`\n <a href=${headerPath} target=\"_blank\" rel=\"noreferrer\">\n ${displayHeaderName}\n </a>\n `;\n }\n\n return html`${displayHeaderName}`;\n }\n}\n\ncustomElements.define(\"mdn-observatory-header-link\", MDNObservatoryHeaderLink);\n","import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../global/global.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n"],"names":["MDNObservatoryHeaderLink","String","Boolean","encodeURIComponent","fetch","customElements"],"mappings":"oNAOO,IAAMA,yBAAN,MAAMA,iCAAiC,IAAU,CACtD,OAAO,OAAS,GAAM,AAAC,AAEvB,QAAO,WAAa,CAClB,OAAQ,CAAE,KAAMC,MAAO,EACvB,cAAe,CAAE,KAAMC,QAAS,MAAO,EAAK,EAC5C,YAAa,CAAE,KAAMA,QAAS,MAAO,EAAK,EAC1C,YAAa,CAAE,KAAMA,QAAS,MAAO,EAAK,CAC5C,CAAE,AAEF,cAAc,CACZ,KAAK,GACL,IAAI,CAAC,MAAM,CAAG,GACd,IAAI,CAAC,aAAa,CAAG,GACrB,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,CAGA,iBAAmB,IAAI,IAAI,CAAC,IAAI,CAAE,CAChC,KAAM,MAAO,CAAC,EAAO,IACnB,GAAI,CAAC,EAAQ,MAAO,CAAE,OAAQ,EAAM,EAEpC,IAAM,EAAoB,SAAoB,GACxC,EAAa,CAAC,uCAAuC,EAAEC,mBAAmB,GAAmB,CAAC,CAEpG,GAAI,CAIF,MAAO,CACL,OAAQ,AAJO,OAAMC,MAAM,CAAC,EAAE,EAAW,WAAW,CAAC,CAAE,CACvD,OAAQ,MACV,EAAC,EAEkB,EAAE,CACnB,oBACA,YACF,CACF,CAAE,KAAM,CACN,MAAO,CACL,OAAQ,GACR,oBACA,YACF,CACF,CACF,EACA,KAAM,IAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CACzB,WAAY,AAAC,IACX,IAAI,CAAC,aAAa,CAAG,EAAO,MAAM,CAClC,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,EACA,QAAS,KACP,IAAI,CAAC,aAAa,CAAG,GACrB,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,WAAW,CAAG,EACrB,CACF,EAAG,AAEH,oBAAoB,CAClB,KAAK,CAAC,oBACF,IAAI,CAAC,MAAM,EAAI,CAAC,IAAI,CAAC,WAAW,GAClC,IAAI,CAAC,WAAW,CAAG,GACnB,IAAI,CAAC,gBAAgB,CAAC,GAAG,GAE7B,CAEA,QAAS,CACP,IAAM,EAAoB,SAAoB,IAAI,CAAC,MAAM,EAAI,IAE7D,GAAI,IAAI,CAAC,WAAW,EAAI,CAAC,IAAI,CAAC,WAAW,CACvC,MAAO,QAAI,CAAC,EAAE,EAAkB,CAAC,CAGnC,GAAI,IAAI,CAAC,aAAa,CAAE,CACtB,IAAM,EAAa,CAAC,uCAAuC,EAAED,mBAAmB,GAAmB,CAAC,CACpG,MAAO,QAAI,CAAC;gBACF,EAAE,EAAW;UACnB,EAAE,EAAkB;;MAExB,CAAC,AACH,CAEA,MAAO,QAAI,CAAC,EAAE,EAAkB,CAAC,AACnC,CACF,EAEAE,eAAe,MAAM,CAAC,8BAA+BL,yB,0GCtFjD,EAA0B,IAA4B,KAC1D,EAAwB,CAAC,CAAC,GAAiC,EAE3D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,GAAI,GAAG,EAEhD,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C"}
@@ -0,0 +1,33 @@
1
+ export const __webpack_ids__=["6955"];export const __webpack_modules__={55196:function(e,o,t){e.exports=t.p+"contrast.d86e85c43de8dee8.svg"},87665:function(e,o,t){e.exports=t.p+"moon.74026b9da82b0694.svg"},96971:function(e,o,t){e.exports=t.p+"sun.1d7c3ad7bf6fc390.svg"},56379:function(e,o,t){t.r(o),t.d(o,{MDNColorTheme:()=>MDNColorTheme});var r=t(14703),a=t(69535),i=t(56409);t(18399);let MDNColorTheme=class MDNColorTheme extends(0,a.q)(r.oi){static styles=i.Z;static properties={_mode:{state:!0}};constructor(){super(),this._mode="light dark",this._options=Object.entries({"light dark":this.l10n("theme-default")`OS default`,light:this.l10n`Light`,dark:this.l10n`Dark`})}_setMode({target:e}){if(e instanceof HTMLElement){let o=e.dataset.mode;if("light dark"===o||"light"===o||"dark"===o){this._mode=o;try{localStorage.setItem("theme",o)}catch(e){console.warn("Unable to write theme to localStorage",e)}let e=this.shadowRoot?.querySelector("mdn-dropdown");e&&(e.open=!1)}}}willUpdate(e){e.has("_mode")&&globalThis.document&&(document.documentElement.style.colorScheme=this._mode,document.documentElement.dataset.theme=this._mode,this.dispatchEvent(new CustomEvent("mdn-color-theme-update",{bubbles:!0,composed:!0,detail:this._mode})))}render(){return(0,r.dy)`<div class="color-theme">
2
+ <mdn-dropdown>
3
+ <button
4
+ slot="button"
5
+ class="color-theme__button"
6
+ data-mode=${this._mode}
7
+ type="button"
8
+ aria-label=${this.l10n`Switch color theme`}
9
+ >
10
+ <span>${this.l10n`Theme`}</span>
11
+ </button>
12
+ <div
13
+ slot="dropdown"
14
+ class="color-theme__dropdown"
15
+ id="color-theme__dropdown"
16
+ >
17
+ <ul class="color-theme__list">
18
+ ${this._options.map(([e,o])=>(0,r.dy)`<li>
19
+ <button
20
+ class="color-theme__option"
21
+ data-mode=${e}
22
+ ?data-current=${e===this._mode}
23
+ type="button"
24
+ @click=${this._setMode}
25
+ >
26
+ ${o}
27
+ </button>
28
+ </li>`)}
29
+ </ul>
30
+ </div>
31
+ </mdn-dropdown>
32
+ </div>`}firstUpdated(){let e;try{e=localStorage.getItem("theme")}catch(e){console.warn("Unable to read theme from localStorage",e)}("light dark"===e||"light"===e||"dark"===e)&&(this._mode=e)}};customElements.define("mdn-color-theme",MDNColorTheme)},56409:function(e,o,t){t.d(o,{Z:()=>b});var r=t(14703),a=t(8081),i=t.n(a),l=t(23645),n=t.n(l),d=t(61667),m=t.n(d),c=new t.U(t(55196)),s=new t.U(t(96971)),h=new t.U(t(87665)),g=n()(i()),_=m()(c),u=m()(s),p=m()(h);g.push([e.id,`.color-theme{--color-theme-light-dark:url(${_});--color-theme-light:url(${u});--color-theme-dark:url(${p});position:relative}.color-theme__button{align-items:center;background-color:initial;border:none;color:inherit;column-gap:.25rem;cursor:pointer;display:flex;font:inherit;margin:0;padding:0 .5rem}.color-theme__button:is(:hover,:focus,[aria-expanded=true]){background-color:var(--color-background-secondary)}@media (width <= 769px){.color-theme__button>span{display:none}}.color-theme__button:before{background-color:currentcolor;content:"";height:1.25rem;-webkit-mask-size:cover;mask-size:cover;width:1.25rem}.color-theme__button[data-mode="light dark"]:before{-webkit-mask-image:var(--color-theme-light-dark);mask-image:var(--color-theme-light-dark)}.color-theme__button[data-mode=light]:before{-webkit-mask-image:var(--color-theme-light);mask-image:var(--color-theme-light)}.color-theme__button[data-mode=dark]:before{-webkit-mask-image:var(--color-theme-dark);mask-image:var(--color-theme-dark)}.color-theme__dropdown{border:1px solid var(--color-border-primary);padding:.75rem;position:absolute;right:0;z-index:1}.color-theme__dropdown,.color-theme__list{background-color:var(--color-background-primary);margin:0;width:max-content}.color-theme__list{list-style:none;padding:0}.color-theme__option{align-items:center;background-color:initial;border:none;color:var(--color-text-primary);column-gap:.25rem;cursor:pointer;display:flex;font:inherit;margin:0;padding:.25rem;width:100%}.color-theme__option:hover{background-color:var(--color-background-secondary)}.color-theme__option:before{background-color:currentcolor;content:"";height:1.25rem;-webkit-mask-size:cover;mask-size:cover;width:1.25rem}.color-theme__option[data-mode="light dark"]:before{-webkit-mask-image:var(--color-theme-light-dark);mask-image:var(--color-theme-light-dark)}.color-theme__option[data-mode=light]:before{-webkit-mask-image:var(--color-theme-light);mask-image:var(--color-theme-light)}.color-theme__option[data-mode=dark]:before{-webkit-mask-image:var(--color-theme-dark);mask-image:var(--color-theme-dark)}.color-theme__option[data-current]{background:var(--color-background-secondary)}`,""]);let b=(0,r.iv)([g.toString()])}};
33
+ //# sourceMappingURL=6955.3de7286d9ee3c36f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"6955.3de7286d9ee3c36f.js","sources":["webpack://@mdn/fred/./components/color-theme/element.js","webpack://@mdn/fred/./components/color-theme/element.css"],"sourcesContent":["import { LitElement, html } from \"lit\";\n\nimport { L10nMixin } from \"../../l10n/mixin.js\";\n\nimport styles from \"./element.css?lit\";\n\nimport \"../dropdown/element.js\";\n\nexport class MDNColorTheme extends L10nMixin(LitElement) {\n static styles = styles;\n\n static properties = {\n _mode: { state: true },\n };\n\n constructor() {\n super();\n /** @type {import(\"./types.js\").ColorScheme} */\n this._mode = \"light dark\";\n this._options = Object.entries({\n \"light dark\": this.l10n(\"theme-default\")`OS default`,\n light: this.l10n`Light`,\n dark: this.l10n`Dark`,\n });\n }\n\n /** @param {MouseEvent} event */\n _setMode({ target }) {\n if (target instanceof HTMLElement) {\n const mode = target.dataset.mode;\n if (mode === \"light dark\" || mode === \"light\" || mode === \"dark\") {\n this._mode = mode;\n try {\n localStorage.setItem(\"theme\", mode);\n } catch (error) {\n console.warn(\"Unable to write theme to localStorage\", error);\n }\n const dropdown = this.shadowRoot?.querySelector(\"mdn-dropdown\");\n if (dropdown) {\n dropdown.open = false;\n }\n }\n }\n }\n\n /**\n * @param {import(\"lit\").PropertyValues<this>} changedProperties\n */\n willUpdate(changedProperties) {\n if (changedProperties.has(\"_mode\") && globalThis.document) {\n document.documentElement.style.colorScheme = this._mode;\n document.documentElement.dataset.theme = this._mode;\n this.dispatchEvent(\n new CustomEvent(\"mdn-color-theme-update\", {\n bubbles: true,\n composed: true,\n detail: this._mode,\n }),\n );\n }\n }\n\n render() {\n return html`<div class=\"color-theme\">\n <mdn-dropdown>\n <button\n slot=\"button\"\n class=\"color-theme__button\"\n data-mode=${this._mode}\n type=\"button\"\n aria-label=${this.l10n`Switch color theme`}\n >\n <span>${this.l10n`Theme`}</span>\n </button>\n <div\n slot=\"dropdown\"\n class=\"color-theme__dropdown\"\n id=\"color-theme__dropdown\"\n >\n <ul class=\"color-theme__list\">\n ${this._options.map(\n ([mode, option]) =>\n html`<li>\n <button\n class=\"color-theme__option\"\n data-mode=${mode}\n ?data-current=${mode === this._mode}\n type=\"button\"\n @click=${this._setMode}\n >\n ${option}\n </button>\n </li>`,\n )}\n </ul>\n </div>\n </mdn-dropdown>\n </div>`;\n }\n\n firstUpdated() {\n // we have to do this here and immediately cause a re-render\n // as doing so in connectedCallback causes a hydration error:\n // https://github.com/lit/lit/issues/1434\n\n // this logic is also reflected in \"/entry.inline.js\"\n\n let mode;\n try {\n mode = localStorage.getItem(\"theme\");\n } catch (error) {\n console.warn(\"Unable to read theme from localStorage\", error);\n }\n if (mode === \"light dark\" || mode === \"light\" || mode === \"dark\") {\n this._mode = mode;\n }\n }\n}\n\ncustomElements.define(\"mdn-color-theme\", MDNColorTheme);\n","import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"../icon/contrast.svg\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"../icon/sun.svg\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"../icon/moon.svg\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.color-theme{--color-theme-light-dark:url(${___CSS_LOADER_URL_REPLACEMENT_0___});--color-theme-light:url(${___CSS_LOADER_URL_REPLACEMENT_1___});--color-theme-dark:url(${___CSS_LOADER_URL_REPLACEMENT_2___});position:relative}.color-theme__button{align-items:center;background-color:initial;border:none;color:inherit;column-gap:.25rem;cursor:pointer;display:flex;font:inherit;margin:0;padding:0 .5rem}.color-theme__button:is(:hover,:focus,[aria-expanded=true]){background-color:var(--color-background-secondary)}@media (width <= 769px){.color-theme__button>span{display:none}}.color-theme__button:before{background-color:currentcolor;content:\"\";height:1.25rem;-webkit-mask-size:cover;mask-size:cover;width:1.25rem}.color-theme__button[data-mode=\"light dark\"]:before{-webkit-mask-image:var(--color-theme-light-dark);mask-image:var(--color-theme-light-dark)}.color-theme__button[data-mode=light]:before{-webkit-mask-image:var(--color-theme-light);mask-image:var(--color-theme-light)}.color-theme__button[data-mode=dark]:before{-webkit-mask-image:var(--color-theme-dark);mask-image:var(--color-theme-dark)}.color-theme__dropdown{border:1px solid var(--color-border-primary);padding:.75rem;position:absolute;right:0;z-index:1}.color-theme__dropdown,.color-theme__list{background-color:var(--color-background-primary);margin:0;width:max-content}.color-theme__list{list-style:none;padding:0}.color-theme__option{align-items:center;background-color:initial;border:none;color:var(--color-text-primary);column-gap:.25rem;cursor:pointer;display:flex;font:inherit;margin:0;padding:.25rem;width:100%}.color-theme__option:hover{background-color:var(--color-background-secondary)}.color-theme__option:before{background-color:currentcolor;content:\"\";height:1.25rem;-webkit-mask-size:cover;mask-size:cover;width:1.25rem}.color-theme__option[data-mode=\"light dark\"]:before{-webkit-mask-image:var(--color-theme-light-dark);mask-image:var(--color-theme-light-dark)}.color-theme__option[data-mode=light]:before{-webkit-mask-image:var(--color-theme-light);mask-image:var(--color-theme-light)}.color-theme__option[data-mode=dark]:before{-webkit-mask-image:var(--color-theme-dark);mask-image:var(--color-theme-dark)}.color-theme__option[data-current]{background:var(--color-background-secondary)}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n"],"names":["MDNColorTheme","Object","HTMLElement","localStorage","e","console","globalThis","document","CustomEvent","o","customElements","_"],"mappings":"kYAQO,IAAMA,cAAN,MAAMA,qBAAsB,QAAU,IAAU,EACrD,OAAO,OAAS,GAAM,AAAC,AAEvB,QAAO,WAAa,CAClB,MAAO,CAAE,MAAO,EAAK,CACvB,CAAE,AAEF,cAAc,CACZ,KAAK,GAEL,IAAI,CAAC,KAAK,CAAG,aACb,IAAI,CAAC,QAAQ,CAAGC,OAAO,OAAO,CAAC,CAC7B,aAAc,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CACpD,MAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CACvB,KAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,AACvB,EACF,CAGA,SAAS,CAAE,QAAM,CAAE,CAAE,CACnB,GAAI,aAAkBC,YAAa,CACjC,IAAM,EAAO,EAAO,OAAO,CAAC,IAAI,CAChC,GAAI,AAAS,eAAT,GAAyB,AAAS,UAAT,GAAoB,AAAS,SAAT,EAAiB,CAChE,IAAI,CAAC,KAAK,CAAG,EACb,GAAI,CACFC,aAAa,OAAO,CAAC,QAAS,EAChC,CAAE,MAAOC,EAAO,CACdC,QAAQ,IAAI,CAAC,wCAAyCD,EACxD,CACA,IAAM,EAAW,IAAI,CAAC,UAAU,EAAE,cAAc,eAC5C,IACF,GAAS,IAAI,CAAG,EAAI,CAExB,CACF,CACF,CAKA,WAAW,CAAiB,CAAE,CACxB,EAAkB,GAAG,CAAC,UAAYE,WAAW,QAAQ,GACvDC,SAAS,eAAe,CAAC,KAAK,CAAC,WAAW,CAAG,IAAI,CAAC,KAAK,CACvDA,SAAS,eAAe,CAAC,OAAO,CAAC,KAAK,CAAG,IAAI,CAAC,KAAK,CACnD,IAAI,CAAC,aAAa,CAChB,IAAIC,YAAY,yBAA0B,CACxC,QAAS,GACT,SAAU,GACV,OAAQ,IAAI,CAAC,KAAK,AACpB,IAGN,CAEA,QAAS,CACP,MAAO,QAAI,CAAC;;;;;oBAKI,EAAE,IAAI,CAAC,KAAK,CAAC;;qBAEZ,EAAE,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;;gBAErC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;;;;;YAQvB,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CACjB,CAAC,CAAC,EAAMC,EAAO,GACb,QAAI,CAAC;;;8BAGS,EAAE,EAAK;kCACH,EAAE,IAAS,IAAI,CAAC,KAAK,CAAC;;2BAE7B,EAAE,IAAI,CAAC,QAAQ,CAAC;;oBAEvB,EAAEA,EAAO;;qBAER,CAAC,EACR;;;;UAIJ,CAAC,AACT,CAEA,cAAe,CAOb,IAAI,EACJ,GAAI,CACF,EAAON,aAAa,OAAO,CAAC,QAC9B,CAAE,MAAOC,EAAO,CACdC,QAAQ,IAAI,CAAC,yCAA0CD,EACzD,CACI,CAAS,eAAT,GAAyB,AAAS,UAAT,GAAoB,AAAS,SAAT,CAAc,GAC7D,KAAI,CAAC,KAAK,CAAG,CAAG,CAEpB,CACF,EAEAM,eAAe,MAAM,CAAC,kBAAmBV,c,mHClHrC,EAAgC,kBAChC,EAAgC,kBAChC,EAAgC,kBAChC,EAA0B,IAA4B,KACtDW,EAAqC,IAAgC,GACrE,EAAqC,IAAgC,GACrE,EAAqC,IAAgC,GAEzE,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,CAAC,0CAA0C,EAAEA,EAAmC,0BAA0B,EAAE,EAAmC,yBAAyB,EAAE,EAAmC,mhEAAmhE,CAAC,CAAE,GAAG,EAE/wE,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C"}
@@ -1,3 +1,3 @@
1
- export const __webpack_ids__=["7326"];export const __webpack_modules__={21755:function(e,t,n){n.d(t,{E1:()=>d,Ei:()=>o,M6:()=>g,Oo:()=>i,Q9:()=>r,Ui:()=>c,ey:()=>l,ky:()=>p,ni:()=>a,og:()=>u,xW:()=>s,yb:()=>h});let i=1,r="5.0.4",a="glean_ping_info",s="glean_client_info",o="c0ffeec0-ffee-c0ff-eec0-ffeec0ffeec0",l="https://incoming.telemetry.mozilla.org",c="deletion-request",d="events",u=5,g="#glean_reference_time",p="#glean_execution_counter",h=[p,g]},83586:function(e,t,n){n.d(t,{_:()=>Context});var i=n(5979);let r="core.Context";let Context=class Context{constructor(){this.initialized=!1,this.testing=!1,this.supportedMetrics={},this.startTime=new Date}static get instance(){return Context._instance||(Context._instance=new Context),Context._instance}static testUninitialize(){Context._instance=void 0}static get uploadEnabled(){return void 0===Context.instance.uploadEnabled&&(0,i.Z)(r,["Attempted to access Context.uploadEnabled before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.uploadEnabled}static set uploadEnabled(e){Context.instance.uploadEnabled=e}static get metricsDatabase(){return void 0===Context.instance.metricsDatabase&&(0,i.Z)(r,["Attempted to access Context.metricsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.metricsDatabase}static set metricsDatabase(e){Context.instance.metricsDatabase=e}static get eventsDatabase(){return void 0===Context.instance.eventsDatabase&&(0,i.Z)(r,["Attempted to access Context.eventsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.eventsDatabase}static set eventsDatabase(e){Context.instance.eventsDatabase=e}static get pingsDatabase(){return void 0===Context.instance.pingsDatabase&&(0,i.Z)(r,["Attempted to access Context.pingsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.pingsDatabase}static set pingsDatabase(e){Context.instance.pingsDatabase=e}static get errorManager(){return void 0===Context.instance.errorManager&&(0,i.Z)(r,["Attempted to access Context.errorManager before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.errorManager}static set errorManager(e){Context.instance.errorManager=e}static get applicationId(){return void 0===Context.instance.applicationId&&(0,i.Z)(r,["Attempted to access Context.applicationId before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.applicationId}static set applicationId(e){Context.instance.applicationId=e}static get initialized(){return Context.instance.initialized}static set initialized(e){Context.instance.initialized=e}static get config(){return void 0===Context.instance.config&&(0,i.Z)(r,["Attempted to access Context.config before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.config}static set config(e){Context.instance.config=e}static get startTime(){return Context.instance.startTime}static get testing(){return Context.instance.testing}static set testing(e){Context.instance.testing=e}static get corePings(){return Context.instance.corePings}static set corePings(e){Context.instance.corePings=e}static get coreMetrics(){return Context.instance.coreMetrics}static set coreMetrics(e){Context.instance.coreMetrics=e}static set platform(e){Context.instance.platform=e}static get platform(){return void 0===Context.instance.platform&&(0,i.Z)(r,["Attempted to access Context.platform before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.platform}static isPlatformSet(){return!!Context.instance.platform}static getSupportedMetric(e){return Context.instance.supportedMetrics[e]}static addSupportedMetric(e,t){e in Context.instance.supportedMetrics||(Context.instance.supportedMetrics[e]=t)}}},39706:function(e,t,n){var i,r;n.d(t,{N:()=>i}),(r=i||(i={})).InvalidValue="invalid_value",r.InvalidLabel="invalid_label",r.InvalidState="invalid_state",r.InvalidOverflow="invalid_overflow",r.InvalidType="invalid_type"},26362:function(e,t,n){n.d(t,{Z:()=>p});var i,r=n(83586),a=n(10674),s=n(92949),o=n(21755),l=n(5979);let c="core.glean_metrics";var d=i||(i={});let u={pageLoad:new s.Z({category:"glean",name:"page_load",sendInPings:[o.E1],lifetime:"ping",disabled:!1},["url","referrer","title"]),elementClick:new s.Z({category:"glean",name:"element_click",sendInPings:[o.E1],lifetime:"ping",disabled:!1},["id","type","label"]),pageId:new a.ZP({category:"glean",name:"page_id",sendInPings:[o.E1],lifetime:"application",disabled:!1})};function g(e){if(!r._.initialized)return void(0,l.Z)(c,"Attempted to record element click event before Glean was initialized. This is a no-op.",l.G.Warn);u.elementClick.record(e)}d.pageLoad=function(e){var t,n,i;if(!r._.initialized)return void(0,l.Z)(c,"Attempted to record a page load event before Glean was initialized. This is a no-op.",l.G.Warn);u.pageId.generateAndSet(),u.pageLoad.record({url:null!=(t=null==e?void 0:e.url)?t:"undefined"!=typeof window?window.location.href:"URL_NOT_PROVIDED_OR_AVAILABLE",referrer:null!=(n=null==e?void 0:e.referrer)?n:"undefined"!=typeof document?document.referrer:"REFERRER_NOT_PROVIDED_OR_AVAILABLE",title:null!=(i=null==e?void 0:e.title)?i:"undefined"!=typeof document?document.title:"TITLE_NOT_PROVIDED_OR_AVAILABLE"})},d.handleClickEvent=function(e){let t=e.target.closest("[data-glean-id], [data-glean-type], [data-glean-label]");t&&g(function(e){let t=e.dataset;return{...t.gleanId&&{id:t.gleanId},...t.gleanType&&{type:t.gleanType},...t.gleanLabel&&{label:t.gleanLabel}}}(t))},d.recordElementClick=g;let p=i},5979:function(e,t,n){var i,r;function a(e,t,n=i.Debug){let r=`(Glean.${e})`;Array.isArray(t)?console[n](r,...t):console[n](r,t)}n.d(t,{G:()=>i,Z:()=>a}),(r=i||(i={})).Debug="debug",r.Info="info",r.Warn="warn",r.Error="error",r.Trace="trace"},66842:function(e,t,n){n.d(t,{K:()=>RecordedEvent});var i=n(21755),r=n(96929),a=n(78114),s=n(90952);let RecordedEvent=class RecordedEvent extends a.jb{constructor(e){super(e)}static withTransformedExtras(e,t){let n=t(e.extra||{});return{category:e.category,name:e.name,timestamp:e.timestamp,extra:n&&Object.keys(n).length>0?n:void 0}}addExtra(e,t){this.inner.extra||(this.inner.extra={}),this.inner.extra[e]=t}withoutReservedExtras(){return RecordedEvent.withTransformedExtras(this.get(),e=>Object.keys(e).filter(e=>!i.yb.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}))}validate(e){if(!(0,r.Kn)(e))return{type:a.XQ.Error,errorMessage:`Expected Glean event object, got ${typeof e}`};let t="category"in e&&(0,r.HD)(e.category),n="name"in e&&(0,r.HD)(e.name);if(!t||!n)return{type:a.XQ.Error,errorMessage:`Unexpected value for "category" or "name" in event object: ${JSON.stringify(e)}`};if(!("timestamp"in e&&(0,r.U)(e.timestamp)&&e.timestamp>=0))return{type:a.XQ.Error,errorMessage:`Event timestamp must be a positive integer, got ${JSON.stringify(e)}`};if(e.extra){if(!(0,r.Kn)(e.extra))return{type:a.XQ.Error,errorMessage:`Expected Glean extras object, got ${typeof e}`};for(let[t,n]of Object.entries(e.extra)){let e=(0,s.Cp)(t);if(e.type===a.XQ.Error)return e;if(!(0,r.HD)(n)&&!(0,r.hj)(n)&&!(0,r.jn)(n))return{type:a.XQ.Error,errorMessage:`Unexpected value for extra key ${t}: ${JSON.stringify(n)}`}}}return{type:a.XQ.Success}}payload(){return RecordedEvent.withTransformedExtras(this.withoutReservedExtras(),e=>Object.keys(e).reduce((t,n)=>(t[n]=e[n].toString(),t),{}))}}},1051:function(e,t,n){n.d(t,{t:()=>MetricType});var i=n(83586),r=n(96929),a=n(14197);let MetricType=class MetricType{constructor(e,t,n){n&&i._.addSupportedMetric(e,n),this.type=e,this.name=t.name,this.category=t.category,this.sendInPings=t.sendInPings,this.lifetime=t.lifetime,this.disabled=t.disabled,this.dynamicLabel=t.dynamicLabel}baseIdentifier(){return this.category.length>0?`${this.category}.${this.name}`:this.name}identifier(){let e=this.baseIdentifier();return(0,r.o8)(this.dynamicLabel)?e:(0,a.qd)(this)}shouldRecord(e){return e&&!this.disabled}testGetNumRecordedErrors(e,t=this.sendInPings[0]){return(0,r.sJ)("testGetNumRecordedErrors")?i._.errorManager.testGetNumRecordedErrors(this,e,t):0}}},78114:function(e,t,n){n.d(t,{Cn:()=>MetricValidationError,XQ:()=>r,jb:()=>Metric});var i,r,a=n(83586),s=n(39706);(i=r||(r={}))[i.Success=0]="Success",i[i.Error=1]="Error";let MetricValidationError=class MetricValidationError extends Error{constructor(e,t=s.N.InvalidType){super(e),this.type=t,this.name="MetricValidationError"}recordError(e){a._.errorManager.record(e,this.type,this.message)}};let Metric=class Metric{constructor(e){this.inner=this.validateOrThrow(e)}get(){return this.inner}set(e){this.inner=e}validateOrThrow(e){let t=this.validate(e);if(t.type===r.Error)throw new MetricValidationError(t.errorMessage,t.errorType);return e}}},92949:function(e,t,n){n.d(t,{Z:()=>EventMetricType,_:()=>InternalEventMetricType});var i,r=n(66842),a=n(1051),s=n(96929),o=n(83586),l=n(39706),c=n(78114),d=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},u=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};let InternalEventMetricType=class InternalEventMetricType extends a.t{constructor(e,t){super("event",e),this.allowedExtraKeys=t}record(e,t=(0,s.ts)()){if(!this.shouldRecord(o._.uploadEnabled))return;let n=Date.now();try{let i=new r.K({category:this.category,name:this.name,timestamp:t,extra:e}),a={};if(e&&this.allowedExtraKeys)for(let[t,n]of Object.entries(e))if(this.allowedExtraKeys.includes(t))(0,s.HD)(n)?a[t]=(0,s.HE)(this,n,500):a[t]=n;else{o._.errorManager.record(this,l.N.InvalidValue,`Invalid key index: ${t}`);continue}a.glean_timestamp=n.toString(),i.set({...i.get(),extra:a}),o._.eventsDatabase.record(this,i)}catch(e){e instanceof c.Cn&&e.recordError(this)}}testGetValue(e=this.sendInPings[0]){if((0,s.sJ)("testGetValue","core.metrics.EventMetricType")){let t=o._.eventsDatabase.getEvents(e,this);return t&&t.forEach(e=>{e.extra&&(delete e.extra.glean_timestamp,0==Object.keys(e.extra).length&&(e.extra=void 0))}),t}}};let EventMetricType=class EventMetricType{constructor(e,t){i.set(this,void 0),d(this,i,new InternalEventMetricType(e,t),"f")}record(e){u(this,i,"f").record(e)}testGetValue(e=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetValue(e)}testGetNumRecordedErrors(e,t=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetNumRecordedErrors(e,t)}};i=new WeakMap},14197:function(e,t,n){n.d(t,{Dc:()=>LabeledMetric,ho:()=>l,lb:()=>o,qd:()=>c});var i=n(78114),r=n(83586),a=n(39706);let LabeledMetric=class LabeledMetric extends i.jb{constructor(e){super(e)}validate(e){return{type:i.XQ.Success}}payload(){return this.inner}};let s=/^[a-z_][a-z0-9_-]{0,29}(\.[a-z_][a-z0-9_-]{0,29})*$/;function o(e,t){return`${e}/${t}`}function l(e){return e.split("/")[0]}function c(e){if(void 0===e.dynamicLabel)throw Error("This point should never be reached.");let t=o(e.baseIdentifier(),e.dynamicLabel);for(let n of e.sendInPings)if(r._.metricsDatabase.hasMetric(e.lifetime,n,e.type,t))return t;let n=0;for(let t of e.sendInPings)n+=r._.metricsDatabase.countByBaseIdentifier(e.lifetime,t,e.type,e.baseIdentifier());let i=!1;return n>=16?i=!0:e.dynamicLabel.length>61?(i=!0,r._.errorManager.record(e,a.N.InvalidLabel,`Label length ${e.dynamicLabel.length} exceeds maximum of 61.`)):s.test(e.dynamicLabel)||(i=!0,r._.errorManager.record(e,a.N.InvalidLabel,`Label must be snake_case, got '${e.dynamicLabel}'.`)),i?o(e.baseIdentifier(),"__other__"):t}},10674:function(e,t,n){n.d(t,{ZP:()=>p,te:()=>InternalUUIDMetricType});var i,r=n(1051),a=n(96929),s=n(83586),o=n(78114),l=n(39706),c=n(90952),d=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},u=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};let g=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;let UUIDMetric=class UUIDMetric extends o.jb{constructor(e){super(e)}validate(e){let t=(0,c.Cp)(e);return t.type===o.XQ.Error?t:g.test(e)?{type:o.XQ.Success}:{type:o.XQ.Error,errorMessage:`"${e}" is not a valid UUID`,errorType:l.N.InvalidValue}}payload(){return this.inner}};let InternalUUIDMetricType=class InternalUUIDMetricType extends r.t{constructor(e){super("uuid",e,UUIDMetric)}set(e){let t;if(this.shouldRecord(s._.uploadEnabled)){e||(e=(0,a.Ln)());try{t=new UUIDMetric(e),s._.metricsDatabase.record(this,t)}catch(e){e instanceof o.Cn&&e.recordError(this)}}}generateAndSet(){if(!this.shouldRecord(s._.uploadEnabled))return;let e=(0,a.Ln)();return this.set(e),e}testGetValue(e=this.sendInPings[0]){if((0,a.sJ)("testGetValue","core.metrics.UUIDMetricType"))return s._.metricsDatabase.getMetric(e,this)}};let p=class{constructor(e){i.set(this,void 0),d(this,i,new InternalUUIDMetricType(e),"f")}set(e){u(this,i,"f").set(e)}generateAndSet(){return u(this,i,"f").generateAndSet()}testGetValue(e=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetValue(e)}testGetNumRecordedErrors(e,t=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetNumRecordedErrors(e,t)}};i=new WeakMap},90952:function(e,t,n){n.d(t,{Cp:()=>g,Lg:()=>c,Rj:()=>u,g:()=>d});var i=n(78114),r=n(96929),a=n(14197),s=n(83586),o=n(39706),l=n(5979);function c(e,t){e.startsWith("labeled_")&&s._.addSupportedMetric(e,a.Dc);let n=s._.getSupportedMetric(e);if(!n)throw Error(`Unable to create metric of unknown type "${e}".`);return new n(t)}function d(e,t){try{return c(e,t),!0}catch(e){return(0,l.Z)("Glean.core.Metrics.utils",e.message,l.G.Error),!1}}function u(e,t=!0){return(0,r.U)(e)?(t?e<0:e<=0)?{type:i.XQ.Error,errorMessage:`Expected positive value, got ${JSON.stringify(e)}`,errorType:o.N.InvalidValue}:{type:i.XQ.Success}:{type:i.XQ.Error,errorMessage:`Expected integer value, got ${JSON.stringify(e)}`}}function g(e){return(0,r.HD)(e)?{type:i.XQ.Success}:{type:i.XQ.Error,errorMessage:`Expected string value, got ${JSON.stringify(e)}`}}},96929:function(e,t,n){let i;n.d(t,{hj:()=>m,hL:()=>v,hU:()=>M,Kn:()=>g,U:()=>b,sJ:()=>x,ts:()=>I,Ln:()=>S,AK:()=>_,pJ:()=>y,r4:()=>w,jn:()=>f,HE:()=>E,qT:()=>function e(t){if(h(t)||f(t)||m(t))return!0;if(g(t)){if(0===Object.keys(t).length)return!0;for(let n in t)return e(t[n])}return!!Array.isArray(t)&&t.every(t=>e(t))},HD:()=>h,YL:()=>D,o8:()=>p});let r="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let o=function(e,t,n){if(r&&!t&&!e)return r();let o=(e=e||{}).random||(e.rng||function(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(a)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(o)};var l=n(83586),c=n(39706),d=n(5979),u=n(78114);function g(e){return"object"==typeof e&&null!==e&&e.constructor===Object}function p(e){return void 0===e}function h(e){return"string"==typeof e}function f(e){return"boolean"==typeof e}function m(e){return"number"==typeof e&&!isNaN(e)}function b(e){return m(e)&&Number.isInteger(e)}function y(e){return"true"===e.toLowerCase()||"false"!==e.toLowerCase()&&void 0}function v(e){return e.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}function w(e){return/^(http|https):\/\/[a-zA-Z0-9._-]+(:\d+){0,1}(\/{0,1})$/i.test(e)}function _(e){return/^[a-z0-9-]{1,20}$/i.test(e)}function S(){return"undefined"!=typeof crypto?o():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}function I(){return Math.round("undefined"==typeof performance?Date.now():performance.now())}function E(e,t,n){if(!h(t))throw new u.Cn(`Expected string, got ${JSON.stringify(t)}`);let i=new TextEncoder,r=new TextDecoder("utf-8"),a=i.encode(t).slice(0,n),s=r.decode(a);return s!==t&&l._.errorManager.record(e,c.N.InvalidOverflow,`Value length ${new Blob([t]).size} exceeds maximum of ${t.length} bytes.`),s}function x(e,t="core.utils"){return!!l._.testing||((0,d.Z)(t,[`Attempted to access test only method \`${e||"unknown"}\`,`,"but Glean is not in testing mode. Ignoring. Make sure to put Glean in testing mode","before accessing such methods, by calling `testResetGlean`."],d.G.Error),!1)}function D(...e){let t=e.reduce((e,t)=>e+t,0);return t>Number.MAX_SAFE_INTEGER&&(t=Number.MAX_SAFE_INTEGER),t}function M(){return"undefined"==typeof window}},68247:function(e,t,n){let i;n.d(t,{ZP:()=>eo});var r,a,s,o,l,c,d,u,g,p,h,f=n(5979);(r=c||(c={}))[r.RecoverableFailure=0]="RecoverableFailure",r[r.UnrecoverableFailure=1]="UnrecoverableFailure",r[r.Success=2]="Success";let UploadResult=class UploadResult{constructor(e,t){this.result=e,this.status=t}};let Uploader=class Uploader{};let m=Uploader,b="platform.browser.FetchUploader";let BrowserFetchUploader=class BrowserFetchUploader extends m{constructor(){super(...arguments),this.timeoutMs=1e4}async post(e,t,n=!0){let i,r=new AbortController,a=setTimeout(()=>r.abort(),this.timeoutMs),s=t.asCompressedPayload();try{i=await fetch(e.toString(),{headers:s.headers,method:"POST",body:s.payload,keepalive:n,credentials:"omit",signal:r.signal,redirect:"error"})}catch(t){if(t instanceof DOMException)(0,f.Z)(b,["Timeout while attempting to upload ping.\n",t],f.G.Error);else if(t instanceof TypeError){if(n)return this.post(e,s,!1);(0,f.Z)(b,["Network error while attempting to upload ping.\n",t],f.G.Error)}else(0,f.Z)(b,["Unknown error while attempting to upload ping.\n",t],f.G.Error);return clearTimeout(a),new UploadResult(0)}return clearTimeout(a),new UploadResult(2,i.status)}supportsCustomHeaders(){return!0}};let y=new BrowserFetchUploader;let BrowserSendBeaconUploader=class BrowserSendBeaconUploader extends m{constructor(){super(...arguments),this.timeoutMs=1e4}async post(e,t,n=!0){return navigator.sendBeacon(e,t.payload)?new UploadResult(2,200):(n&&(0,f.Z)("platform.browser.SendBeaconUploader","The `sendBeacon` call was not serviced by the browser. Deleting data.",f.G.Error),new UploadResult(1))}supportsCustomHeaders(){return!1}};let v=new BrowserSendBeaconUploader;var w=n(83586);let _="platform.browser.SendBeaconFallbackUploader";let BrowserSendBeaconFallbackUploader=class BrowserSendBeaconFallbackUploader extends m{constructor(){super(...arguments),this.fetchUploader=y,this.sendBeaconUploader=v}async post(e,t){var n,i;if(!(null==(n=w._.config)?void 0:n.sourceTags)&&!(null==(i=w._.config)?void 0:i.debugViewTag)&&navigator&&navigator.sendBeacon){let n=await this.sendBeaconUploader.post(e,t,!1);if(2==n.result)return n;(0,f.Z)(_,"The `sendBeacon` call was not serviced by the browser. Falling back to the `fetch` uploader.",f.G.Warn)}else(0,f.Z)(_,"`sendBeacon` is not available. Falling back to the `fetch` uploader.",f.G.Warn);return this.fetchUploader.post(e,t)}supportsCustomHeaders(){return!1}};let S=new BrowserSendBeaconFallbackUploader;var I=n(96929);let E="platform.web.Storage";let WebStore=class WebStore{constructor(e){this.rootKey=e,this.logTag=`${E}.${e}`}get(e=[]){let t;if(!(0,I.hU)()){try{let n=localStorage.getItem(this.rootKey)||"{}",i=JSON.parse(n);t=e.length>0?function(e,t){if(0===t.length)throw Error("The index must contain at least one property to get.");let n=e;for(let e of t)if(!(0,I.Kn)(n)||!(e in n))return;else{let t=n[e];(0,I.qT)(t)&&(n=t)}return n}(i,e):0===Object.keys(i).length?void 0:i}catch(e){(0,f.Z)(E,["Unable to fetch value from local storage.",e],f.G.Error)}return this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo(),t}}update(e,t){if(!(0,I.hU)()){try{let n=localStorage.getItem(this.rootKey)||"{}",i=JSON.parse(n),r=function(e,t,n){if(0===t.length)throw Error("The index must contain at least one property to update.");let i={...e},r=i;for(let e of t.slice(0,t.length-1))(0,I.Kn)(r[e])||(r[e]={}),r=r[e];let a=t[t.length-1],s=n(r[a]);return r[a]=s,i}(i,e,t);localStorage.setItem(this.rootKey,JSON.stringify(r))}catch(e){(0,f.Z)(E,["Unable to update value from local storage.",e],f.G.Error)}this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo()}}delete(e){if(!(0,I.hU)()){try{let t=localStorage.getItem(this.rootKey)||"{}",n=JSON.parse(t);if(0===e.length)localStorage.removeItem(this.rootKey);else try{let t=function(e,t){if(0===t.length)return{};let n={...e},i=n;for(let e of t.slice(0,t.length-1)){let n=i[e];if((0,I.Kn)(n))i=n;else throw Error(`Attempted to delete an entry from an inexistent index: ${JSON.stringify(t)}.`)}let r=t[t.length-1];return delete i[r],n}(n,e);localStorage.setItem(this.rootKey,JSON.stringify(t))}catch(t){(0,f.Z)(this.logTag,[`Error attempting to delete key ${e.toString()} from storage. Ignoring.`,t],f.G.Warn)}}catch(e){(0,f.Z)(E,["Unable to delete value from storage.",e],f.G.Error)}this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo()}}shouldUpdateSession(e){return!e.includes("session_id")&&!e.includes("session_count")}};var x=n(21755);let D="core.Config";let Configuration=class Configuration{constructor(e){var t;if(this.channel=null==e?void 0:e.channel,this.appBuild=null==e?void 0:e.appBuild,this.appDisplayVersion=null==e?void 0:e.appDisplayVersion,this.buildDate=null==e?void 0:e.buildDate,this.maxEvents=(null==e?void 0:e.maxEvents)||1,this.enableAutoPageLoadEvents=null==e?void 0:e.enableAutoPageLoadEvents,this.enableAutoElementClickEvents=null==e?void 0:e.enableAutoElementClickEvents,this.experimentationId=null==e?void 0:e.experimentationId,this.sessionLengthInMinutesOverride=null==e?void 0:e.sessionLengthInMinutesOverride,this.debug={},(null==e?void 0:e.serverEndpoint)&&!(0,I.r4)(e.serverEndpoint))throw Error(`Unable to initialize Glean, serverEndpoint ${e.serverEndpoint} is an invalid URL.`);if(!w._.testing&&(null==(t=null==e?void 0:e.serverEndpoint)?void 0:t.startsWith("http:")))throw Error(`Unable to initialize Glean, serverEndpoint ${e.serverEndpoint} must use the HTTPS protocol.`);this.serverEndpoint=e&&e.serverEndpoint?e.serverEndpoint:x.ey,this.httpClient=null==e?void 0:e.httpClient}get logPings(){return this.debug.logPings||!1}set logPings(e){this.debug.logPings=e}get debugViewTag(){return this.debug.debugViewTag}set debugViewTag(e){if(!(0,I.AK)(e||""))return void(0,f.Z)(D,[`"${e||""}" is not a valid \`debugViewTag\` value.`,"Please make sure the value passed satisfies the regex `^[a-zA-Z0-9-]{1,20}$`."],f.G.Error);this.debug.debugViewTag=e}get sourceTags(){return this.debug.sourceTags}set sourceTags(e){if(!e||e.length<1||e.length>x.og)return void(0,f.Z)(D,`A list of tags cannot contain more than ${x.og} elements or less than one.`,f.G.Error);for(let t of e){if(t.startsWith("glean"))return void(0,f.Z)(D,"Tags starting with `glean` are reserved and must not be used.",f.G.Error);if(!(0,I.AK)(t))return}this.debug.sourceTags=e}};var M=n(93778);let T="core.Pings.Database";let PingsDatabase=class PingsDatabase{constructor(){this.store=new w._.platform.Storage("pings")}attachObserver(e){this.observer=e}recordPing(e,t,n,i){let r={collectionDate:new Date().toISOString(),path:e,payload:n};i&&(r.headers=i),this.store.update([t],()=>r),this.observer&&this.observer.update(t,r)}deletePing(e){this.store.delete([e])}getAllPings(){let e=this.store.get(),t={};if((0,I.Kn)(e))for(let n in e){let i=e[n];!function(e){if((0,I.Kn)(e)){let t="collectionDate"in e&&(0,I.HD)(e.collectionDate)&&(0,I.hj)(new Date(e.collectionDate).getTime()),n="path"in e&&(0,I.HD)(e.path),i="payload"in e&&(0,I.qT)(e.payload)&&(0,I.Kn)(e.payload),r=!("headers"in e)||(0,I.qT)(e.headers)&&(0,I.Kn)(e.headers);return!!t&&!!n&&!!i&&!!r}return!1}(i)?((0,f.Z)(T,`Unexpected data found in pings database: ${JSON.stringify(i,null,2)}. Deleting.`,f.G.Warn),this.store.delete([n])):t[n]=i}return Object.entries(t).sort(([e,{collectionDate:t}],[n,{collectionDate:i}])=>new Date(t).getTime()-new Date(i).getTime())}scanPendingPings(){if(this.observer)for(let[e,t]of this.getAllPingsWithoutSurplus())this.observer.update(e,t)}clearAll(){this.store.delete([])}getAllPingsWithoutSurplus(e=250,t=0xa00000){let n=this.getAllPings(),i=n.filter(([e,t])=>!P(t)).reverse(),r=n.filter(([e,t])=>P(t)),a=i.length;a>e&&(0,f.Z)(T,[`More than ${e} pending pings in the pings database,`,`will delete ${a-e} old pings.`],f.G.Warn);let s=!1,o=0,l=0,c=[];for(let[n,r]of i){var d;o++,l+=(d=r,(0,M.TD)(JSON.stringify(d)).length),!s&&l>t&&((0,f.Z)(T,[`Pending pings database has reached the size quota of ${t} bytes,`,"outstanding pings will be deleted."],f.G.Warn),s=!0),o>e&&(s=!0),s?this.deletePing(n):c.unshift([n,r])}return[...r,...c]}};function P(e){return e.path.split("/")[3]===x.Ui}(a=d||(d={}))[a.Incrementing=0]="Incrementing",a[a.Throttled=1]="Throttled";let RateLimiter=class RateLimiter{constructor(e=6e4,t=40,n=0,i){this.interval=e,this.maxCount=t,this.count=n,this.started=i}get elapsed(){if((0,I.o8)(this.started))return NaN;let e=(0,I.ts)()-this.started;return e<0?NaN:e}reset(){this.started=(0,I.ts)(),this.count=0}shouldReset(){return!!((0,I.o8)(this.started)||isNaN(this.elapsed)||this.elapsed>this.interval)}getState(){this.shouldReset()&&this.reset();let e=this.interval-this.elapsed;return this.count>=this.maxCount?{state:1,remainingTime:e}:(this.count++,{state:0})}};let Policy=class Policy{constructor(e=3,t=3,n=1048576){this.maxWaitAttempts=e,this.maxRecoverableFailures=t,this.maxPingBodySize=n}};let PingBodyOverflowError=class PingBodyOverflowError extends Error{constructor(e){super(e),this.name="PingBodyOverflow"}};let PingRequest=class PingRequest{constructor(e,t,n,i){this.identifier=e,this.headers=t,this.payload=n,this.maxBodySize=i}asCompressedPayload(){let e;if("gzip"==this.headers["Content-Encoding"])return this;let t=(0,M.TD)(this.payload),n=this.headers;try{e=(0,M.rZ)(t),n["Content-Encoding"]="gzip",n["Content-Length"]=e.length.toString()}catch(e){return this}if(e.length>this.maxBodySize)throw new PingBodyOverflowError(`Body for ping ${this.identifier} exceeds ${this.maxBodySize} bytes. Discarding.`);return new PingRequest(this.identifier,n,e,this.maxBodySize)}};let C="core.Upload.PingUploadWorker";let PingUploadWorker=class PingUploadWorker{constructor(e,t,n=new Policy){this.uploader=e,this.serverEndpoint=t,this.policy=n,this.isBlocking=!1}buildPingRequest(e){let t=e.headers||{};t={...e.headers,"Content-Type":"application/json; charset=utf-8",Date:new Date().toISOString(),"X-Telemetry-Agent":`Glean/${x.Q9} (JS on ${w._.platform.info.os()})`};let n=JSON.stringify(e.payload);if(n.length>this.policy.maxPingBodySize)throw new PingBodyOverflowError(`Body for ping ${e.identifier} exceeds ${this.policy.maxPingBodySize}bytes. Discarding.`);return t["Content-Length"]=n.length.toString(),new PingRequest(e.identifier,t,n,this.policy.maxPingBodySize)}async attemptPingUpload(e){try{let t=this.buildPingRequest(e);return this.uploader.post(`${this.serverEndpoint}${e.path}`,t)}catch(e){return(0,f.Z)(C,["Error trying to build or post ping request:",e],f.G.Warn),new UploadResult(1)}}work(e,t){for(;;)try{let n=e();switch(n.type){case"upload":if(this.isBlocking)return;this.attemptPingUpload(n.ping).then(e=>{t(n.ping,e)}).catch(e=>{console.log(e)});continue;case"done":return}}catch(e){(0,f.Z)(C,["IMPOSSIBLE: Something went wrong while processing ping upload tasks.",e],f.G.Error)}}blockUploading(){this.isBlocking=!0}resumeUploading(){this.isBlocking=!1}};(s=u||(u={})).Done="done",s.Wait="wait",s.Upload="upload";let $=()=>({type:"done"}),U="core.Upload.PingUploadManager";let PingUploadManager=class PingUploadManager{constructor(e,t,n=new Policy,i=new RateLimiter){this.pingsDatabase=t,this.policy=n,this.rateLimiter=i,this.recoverableFailureCount=0,this.waitAttemptCount=0,this.queue=[],this.processing=new Set,this.worker=new PingUploadWorker(e.httpClient?e.httpClient:w._.platform.uploader,e.serverEndpoint,n),t.attachObserver(this)}getUploadTask(){let e=this.getUploadTaskInternal();return"wait"!==e.type&&this.waitAttemptCount>0&&(this.waitAttemptCount=0),"upload"!==e.type&&this.recoverableFailureCount>0&&(this.recoverableFailureCount=0),e}processPingUploadResponse(e,t){let{identifier:n}=e;this.processing.has(n)&&this.processing.delete(n);let{status:i,result:r}=t;if(i&&i>=200&&i<300){(0,f.Z)(U,`Ping ${n} successfully sent ${i}.`,f.G.Info),this.pingsDatabase.deletePing(n);return}if(1===r||i&&i>=400&&i<500){(0,f.Z)(U,`Unrecoverable upload failure while attempting to send ping ${n}. Error was: ${null!=i?i:"no status"}.`,f.G.Warn),this.pingsDatabase.deletePing(n);return}(0,f.Z)(U,[`Recoverable upload failure while attempting to send ping ${n}, will retry.`,`Error was: ${null!=i?i:"no status"}.`],f.G.Warn),this.recoverableFailureCount++,this.enqueuePing(e)}clearPendingPingsQueue(){this.queue=this.queue.filter(e=>P(e))}blockUploads(){this.worker.blockUploading()}resumeUploads(){this.worker.resumeUploading()}update(e,t){this.enqueuePing({identifier:e,...t}),this.worker.isBlocking||(this.processing.delete(e),this.pingsDatabase.deletePing(e)),this.worker.work(()=>this.getUploadTask(),(e,t)=>this.processPingUploadResponse(e,t))}enqueuePing(e){if(!this.processing.has(e.identifier)){for(let t of this.queue)if(t.identifier===e.identifier)return;this.queue.push(e)}}getUploadTaskInternal(){if(this.recoverableFailureCount>=this.policy.maxRecoverableFailures)return(0,f.Z)(U,"Glean has reached maximum recoverable upload failures for the current uploading window.",f.G.Debug),$();if(this.queue.length>0){let{state:e,remainingTime:t}=this.rateLimiter.getState();if(1===e)return((0,f.Z)(U,["Glean is currently throttled.",`Pending pings may be uploaded in ${(t||0)/1e3}s.`],f.G.Debug),this.waitAttemptCount++,this.waitAttemptCount>this.policy.maxWaitAttempts)?$():{type:"wait",remainingTime:t||0};let n=this.queue.shift();return this.processing.add(n.identifier),{type:"upload",ping:n}}return $()}};var G=n(10674),O=n(1051);(o=g||(g={})).Nanosecond="nanosecond",o.Microsecond="microsecond",o.Millisecond="millisecond",o.Second="second",o.Minute="minute",o.Hour="hour",o.Day="day";let k=g;var A=n(78114);let DatetimeMetric=class DatetimeMetric extends A.jb{constructor(e){super(e)}static fromDate(e,t){if(!(e instanceof Date))throw new A.Cn(`Expected Date object, got ${JSON.stringify(e)}`);return new DatetimeMetric({timeUnit:t,timezone:e.getTimezoneOffset(),date:e.toISOString()})}get date(){return new Date(this.inner.date)}get timezone(){return this.inner.timezone}get timeUnit(){return this.inner.timeUnit}get dateISOString(){return this.inner.date}validate(e){if(!(0,I.Kn)(e)||3!==Object.keys(e).length)return{type:A.XQ.Error,errorMessage:`Expected Glean datetime metric object, got ${JSON.stringify(e)}`};let t="timeUnit"in e&&(0,I.HD)(e.timeUnit)&&Object.values(k).includes(e.timeUnit),n="timezone"in e&&(0,I.hj)(e.timezone),i="date"in e&&(0,I.HD)(e.date)&&24===e.date.length&&!isNaN(Date.parse(e.date));return t&&n&&i?{type:A.XQ.Success}:{type:A.XQ.Error,errorMessage:`Invalid property on datetime metric, got ${JSON.stringify(e)}`}}payload(){let e=this.dateISOString.match(/\d+/g);if(!e||e.length<0)throw Error("IMPOSSIBLE: Unable to extract date information from DatetimeMetric.");let t=new Date(parseInt(e[0]),parseInt(e[1])-1,parseInt(e[2]),parseInt(e[3])-this.timezone/60,parseInt(e[4]),parseInt(e[5]),parseInt(e[6])),n=function(e){let t=-(e/60*1),n=Math.abs(t).toString().padStart(2,"0");return`${t>0?"+":"-"}${n}:00`}(this.timezone),i=t.getFullYear().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0");if(this.timeUnit===k.Day)return`${i}-${r}-${a}${n}`;let s=t.getHours().toString().padStart(2,"0");if(this.timeUnit===k.Hour)return`${i}-${r}-${a}T${s}${n}`;let o=t.getMinutes().toString().padStart(2,"0");if(this.timeUnit===k.Minute)return`${i}-${r}-${a}T${s}:${o}${n}`;let l=t.getSeconds().toString().padStart(2,"0");if(this.timeUnit===k.Second)return`${i}-${r}-${a}T${s}:${o}:${l}${n}`;let c=t.getMilliseconds().toString().padStart(3,"0");return this.timeUnit===k.Millisecond?`${i}-${r}-${a}T${s}:${o}:${l}.${c}${n}`:this.timeUnit===k.Microsecond?`${i}-${r}-${a}T${s}:${o}:${l}.${c}000${n}`:`${i}-${r}-${a}T${s}:${o}:${l}.${c}000000${n}`}};let InternalDatetimeMetricType=class InternalDatetimeMetricType extends O.t{constructor(e,t){super("datetime",e,DatetimeMetric),this.timeUnit=t}set(e){if(!this.shouldRecord(w._.uploadEnabled))return;let t=this.truncateDate(e);try{let e=DatetimeMetric.fromDate(t,this.timeUnit);w._.metricsDatabase.record(this,e)}catch(e){e instanceof A.Cn&&e.recordError(this)}}truncateDate(e){e||(e=new Date);let t=e;switch(this.timeUnit){case k.Day:t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0),t.setMilliseconds(0);case k.Hour:t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0);case k.Minute:t.setMilliseconds(0),t.setSeconds(0);case k.Second:t.setMilliseconds(0)}return t}testGetValueAsDatetimeMetric(e,t){if((0,I.sJ)(t,"core.metrics.DatetimeMetricType")){let t=w._.metricsDatabase.getMetric(e,this);if(t)return new DatetimeMetric(t)}}testGetValueAsString(e=this.sendInPings[0]){let t=this.testGetValueAsDatetimeMetric(e,"testGetValueAsString");return t?t.payload():void 0}testGetValue(e=this.sendInPings[0]){let t=this.testGetValueAsDatetimeMetric(e,"testGetValue");return t?t.date:void 0}};new WeakMap;var L=n(90952);let StringMetric=class StringMetric extends A.jb{constructor(e){super(e)}validate(e){return(0,L.Cp)(e)}payload(){return this.inner}};let InternalStringMetricType=class InternalStringMetricType extends O.t{constructor(e){super("string",e,StringMetric)}set(e){if(this.shouldRecord(w._.uploadEnabled))try{let t=(0,I.HE)(this,e,100),n=new StringMetric(t);w._.metricsDatabase.record(this,n)}catch(e){e instanceof A.Cn&&e.recordError(this)}}testGetValue(e=this.sendInPings[0]){if((0,I.sJ)("testGetValue","core.metrics.StringMetricType"))return w._.metricsDatabase.getMetric(e,this)}};new WeakMap;let N="core.metrics.CounterMetricType";let CounterMetric=class CounterMetric extends A.jb{constructor(e){super(e)}validate(e){return(0,L.Rj)(e,!1)}payload(){return this.inner}saturatingAdd(e){let t=this.validateOrThrow(e);this.inner=(0,I.YL)(this.inner,t)}};let InternalCounterMetricType=class InternalCounterMetricType extends O.t{constructor(e){super("counter",e,CounterMetric)}add(e){if(this.shouldRecord(w._.uploadEnabled)){(0,I.o8)(e)&&(e=1);try{w._.metricsDatabase.transform(this,this.transformFn(e))}catch(e){e instanceof A.Cn&&e.recordError(this)}}}transformFn(e){return t=>{let n=new CounterMetric(e);if(t)try{n.saturatingAdd(t)}catch(e){(0,f.Z)(N,`Unexpected value found in storage for metric ${this.name}: ${JSON.stringify(t)}. Overwriting.`)}return n}}testGetValue(e=this.sendInPings[0]){if((0,I.sJ)("testGetValue",N))return w._.metricsDatabase.getMetric(e,this)}};new WeakMap;let CoreMetrics=class CoreMetrics{constructor(){this.clientId=new G.te({name:"client_id",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1}),this.firstRunDate=new InternalDatetimeMetricType({name:"first_run_date",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1},k.Day),this.os=new InternalStringMetricType({name:"os",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.osVersion=new InternalStringMetricType({name:"os_version",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.architecture=new InternalStringMetricType({name:"architecture",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.locale=new InternalStringMetricType({name:"locale",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appChannel=new InternalStringMetricType({name:"app_channel",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appBuild=new InternalStringMetricType({name:"app_build",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appDisplayVersion=new InternalStringMetricType({name:"app_display_version",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.buildDate=new InternalDatetimeMetricType({name:"build_date",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1},"second"),this.sessionId=new G.te({name:"session_id",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1}),this.sessionCount=new InternalCounterMetricType({name:"session_count",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1})}initialize(){!(!w._.testing&&(0,I.hU)())&&(this.initializeClientId(),this.initializeFirstRunDate(),this.updateSessionInfo(),this.os.set(w._.platform.info.os()),this.osVersion.set(w._.platform.info.osVersion()),this.architecture.set(w._.platform.info.arch()),this.locale.set(w._.platform.info.locale()),this.appBuild.set(w._.config.appBuild||"Unknown"),this.appDisplayVersion.set(w._.config.appDisplayVersion||"Unknown"),w._.config.channel&&this.appChannel.set(w._.config.channel),w._.config.buildDate&&this.buildDate.set())}updateSessionInfo(){if(!(0,I.hU)()){if(w._.metricsDatabase.getMetric(x.xW,this.sessionId))try{(function(e=30){let t=new Date(Number(localStorage.getItem("glean_session_last_active"))),n=new Date;return n.setMinutes(n.getMinutes()-e),n>t})(w._.config.sessionLengthInMinutesOverride)&&this.generateNewSession()}catch(e){this.generateNewSession()}else this.generateNewSession();localStorage.setItem("glean_session_last_active",Date.now().toString())}}initializeClientId(){let e=!1,t=w._.metricsDatabase.getMetric(x.xW,this.clientId);if(t)try{(0,L.Lg)("uuid",t).payload()===x.Ei&&(e=!0)}catch(t){(0,f.Z)("core.InternalMetrics","Unexpected value found for Glean clientId. Ignoring.",f.G.Warn),e=!0}else e=!0;e&&this.clientId.set((0,I.Ln)())}initializeFirstRunDate(){w._.metricsDatabase.getMetric(x.xW,this.firstRunDate)||this.firstRunDate.set()}generateNewSession(){this.sessionId.generateAndSet(),this.sessionCount.add()}};let z="core.Pings.Maker",Z=function(e,t,n){let i=function(e,t){let n=w._.eventsDatabase.getPingEvents(e.name,!0),i=w._.metricsDatabase.getPingMetrics(e.name,!0);if(!i&&!n){if(!e.sendIfEmpty)return void(0,f.Z)(z,`Storage for ${e.name} empty. Bailing out.`,f.G.Info);(0,f.Z)(z,`Storage for ${e.name} empty. Ping will still be sent.`,f.G.Info)}e.includeClientId&&w._.config.experimentationId&&(i=void 0!==i?{...i,string:{...(null==i?void 0:i.string)||void 0,"glean.client.annotation.experimentation_id":w._.config.experimentationId}}:{string:{"glean.client.annotation.experimentation_id":w._.config.experimentationId}});let r=i?{metrics:i}:{},a=function(e,t){let n=function(e){let t=new InternalCounterMetricType({category:"",name:`${e.name}#sequence`,sendInPings:[x.ni],lifetime:"user",disabled:!1}),n=w._.metricsDatabase.getMetric(x.ni,t);if(t.add(1),n)try{return new CounterMetric(n).payload()}catch(t){(0,f.Z)(z,`Unexpected value found for sequence number in ping ${e.name}. Ignoring.`,f.G.Warn)}return 0}(e),{startTime:i,endTime:r}=function(e){let{startTimeMetric:t,startTime:n}=function(e){let t=new InternalDatetimeMetricType({category:"",name:`${e.name}#start`,sendInPings:[x.ni],lifetime:"user",disabled:!1},k.Minute),n=w._.metricsDatabase.getMetric(x.ni,t);return{startTimeMetric:t,startTime:n?new DatetimeMetric(n):DatetimeMetric.fromDate(w._.startTime,k.Minute)}}(e),i=new Date;t.set(i);let r=DatetimeMetric.fromDate(i,k.Minute);return{startTime:n.payload(),endTime:r.payload()}}(e),a={seq:n,start_time:i,end_time:r};return t&&(a.reason=t),a}(e,t),s=function(e){let t=w._.metricsDatabase.getPingMetrics(x.xW,!0);t||((0,f.Z)(z,"Empty client info data. Will submit anyways.",f.G.Warn),t={});let n={telemetry_sdk_build:x.Q9};for(let e in t)n={...n,...t[e]};return e.includeClientId||(delete n.client_id,delete n.session_id),n}(e);return{...r,...n?{events:n}:{},ping_info:a,client_info:s}}(t,n);if(!i)return;w._.config.logPings&&(0,f.Z)(z,JSON.stringify(i,null,2),f.G.Info);let r=function(){let e={};if(w._.config.debugViewTag&&(e["X-Debug-ID"]=w._.config.debugViewTag),w._.config.sourceTags&&(e["X-Source-Tags"]=w._.config.sourceTags.toString()),Object.keys(e).length>0)return e}();w._.pingsDatabase.recordPing(`/submit/${w._.applicationId}/${t.name}/${x.Oo}/${e}`,e,i,r)},V="core.Pings.PingType";let InternalPingType=class InternalPingType{constructor(e){var t;this.name=e.name,this.includeClientId=e.includeClientId,this.sendIfEmpty=e.sendIfEmpty,this.reasonCodes=null!=(t=e.reasonCodes)?t:[],this.preciseTimestamps=e.preciseTimestamps}submit(e){this.testCallback?this.testCallback(e).then(()=>{this.internalSubmit(e,this.resolveTestPromiseFunction)}).catch(t=>{(0,f.Z)(V,[`There was an error validating "${this.name}" (${null!=e?e:"no reason"}):`,t],f.G.Error),this.internalSubmit(e,this.rejectTestPromiseFunction)}):this.internalSubmit(e)}internalSubmit(e,t){if(!w._.initialized)return void(0,f.Z)(V,"Glean must be initialized before submitting pings.",f.G.Info);if(!w._.uploadEnabled&&this.name!==x.Ui)return void(0,f.Z)(V,"Glean disabled: not submitting pings. Glean may still submit the deletion-request ping.",f.G.Info);let n=e;e&&!this.reasonCodes.includes(e)&&((0,f.Z)(V,`Invalid reason code ${e} from ${this.name}. Ignoring.`,f.G.Warn),n=void 0),Z((0,I.Ln)(),this,n),t&&(t(),this.resolveTestPromiseFunction=void 0,this.rejectTestPromiseFunction=void 0,this.testCallback=void 0)}async testBeforeNextSubmit(e){if((0,I.sJ)("testBeforeNextSubmit",V))return this.testCallback?void(0,f.Z)(V,`There is an existing test call for ping "${this.name}". Ignoring.`,f.G.Error):new Promise((t,n)=>{this.resolveTestPromiseFunction=t,this.rejectTestPromiseFunction=n,this.testCallback=e})}};new WeakMap;let CorePings=class CorePings{constructor(){this.deletionRequest=new InternalPingType({name:x.Ui,includeClientId:!0,sendIfEmpty:!0,reasonCodes:["at_init","set_upload_enabled"]}),this.events=new InternalPingType({name:x.E1,includeClientId:!0,sendIfEmpty:!1,reasonCodes:["startup","max_capacity"]})}};let R="core.Metrics.Database",B="reserved#",W=`glean.${B}`;let MetricsDatabase=class MetricsDatabase{constructor(){this.userStore=new w._.platform.Storage("userLifetimeMetrics"),this.pingStore=new w._.platform.Storage("pingLifetimeMetrics"),this.appStore=new w._.platform.Storage("appLifetimeMetrics")}record(e,t){this.transform(e,()=>t)}transform(e,t){if(e.disabled)return;let n=this.chooseStore(e.lifetime),i=e.identifier();for(let r of e.sendInPings){let a=e=>t(e).get();n.update([r,e.type,i],a)}}hasMetric(e,t,n,i){let r=this.chooseStore(e).get([t,n,i]);return!(0,I.o8)(r)}countByBaseIdentifier(e,t,n,i){let r=this.chooseStore(e).get([t,n]);return(0,I.o8)(r)?0:Object.keys(r).filter(e=>e.startsWith(i)).length}getMetric(e,t){let n=this.chooseStore(t.lifetime),i=t.identifier(),r=n.get([e,t.type,i]);if((0,I.o8)(r)||(0,L.g)(t.type,r))return r;(0,f.Z)(R,`Unexpected value found for metric ${i}: ${JSON.stringify(r)}. Clearing.`,f.G.Error),n.delete([e,t.type,i])}getPingMetrics(e,t){let n=this.getCorrectedPingData(e,"user"),i=this.getCorrectedPingData(e,"ping"),r=this.getCorrectedPingData(e,"application");t&&Object.keys(i).length>0&&this.clear("ping",e);let a={};for(let e of[n,i,r])for(let t in e)for(let n in e[t])n.startsWith(W)||(n.includes("/")?this.processLabeledMetric(a,t,n,e[t][n]):a[t]={...a[t],[n]:e[t][n]});if(0!==Object.keys(a).length){let e={};for(let t in a){let n=a[t];for(let i in e[t]={},n){let r=(0,L.Lg)(t,n[i]);e[t][i]=r.payload()}}return e}}clear(e,t){this.chooseStore(e).delete(t?[t]:[])}clearAll(){this.userStore.delete([]),this.pingStore.delete([]),this.appStore.delete([])}chooseStore(e){switch(e){case"user":return this.userStore;case"ping":return this.pingStore;case"application":return this.appStore}}getCorrectedPingData(e,t){let n=this.chooseStore(t),i=n.get([e]);if((0,I.o8)(i))return{};if(!(0,I.Kn)(i))return(0,f.Z)(R,`Invalid value found in storage for ping "${e}". Deleting.`,f.G.Debug),n.delete([e]),{};let r={};for(let t in i){let a=i[t];if(!(0,I.Kn)(a)){(0,f.Z)(R,`Unexpected data found in storage for metrics of type "${t}" in ping "${e}". Deleting.`,f.G.Debug),n.delete([e,t]);continue}for(let i in a){if(!(0,L.g)(t,a[i])){(0,f.Z)(R,`Invalid value "${JSON.stringify(a[i])}" found in storage for metric "${i}". Deleting.`,f.G.Debug),n.delete([e,t,i]);continue}r[t]||(r[t]={}),r[t][i]=a[i]}}return r}processLabeledMetric(e,t,n,i){let r=`labeled_${t}`,a=n.split("/",2),s=a[0],o=a[1];if(r in e&&s in e[r]){let t=e[r][s];e[r][s]={...t,[o]:i}}else e[r]={...e[r],[s]:{[o]:i}}}};var j=n(39706),J=n(92949),F=n(66842);let K="core.Metric.EventsDatabase";function q(e,t=w._.startTime){H(e).record({[x.M6]:t.toISOString()},0)}function X(e){(0,I.HD)(e)||(e="");let t=new Date(e);if(isNaN(t.getTime()))throw Error(`Error attempting to generate Date object from string: ${e}`);return t}function Q(e){return new InternalCounterMetricType({...{category:"glean",name:`${B}execution_counter`},sendInPings:e.filter(e=>e!==x.E1),lifetime:"ping",disabled:!1})}function H(e){return new J._({category:"glean",name:"restarted",sendInPings:e.filter(e=>e!==x.E1),lifetime:"ping",disabled:!1},[x.M6])}let EventsDatabase=class EventsDatabase{constructor(){this.initialized=!1,this.eventsStore=new w._.platform.Storage("events")}initialize(){var e;if(this.initialized)return;let t=this.getAvailableStoreNames();if(t.includes(x.E1)){let t=null!=(e=this.eventsStore.get([x.E1]))?e:[];t.length>0&&t.length>=w._.config.maxEvents&&w._.corePings.events.submit("startup")}Q(t).add(1),q(t),this.initialized=!0}record(e,t){if(!e.disabled)for(let n of e.sendInPings){let e=Q([n]),i=w._.metricsDatabase.getMetric(n,e);i||(e.add(1),i=1,q([n],new Date)),t.addExtra(x.ky,i);let r=0,a=e=>{let n=null!=e?e:[];return n.push(t.get()),r=n.length,n};this.eventsStore.update([n],a),n===x.E1&&r>=w._.config.maxEvents&&w._.corePings.events.submit("max_capacity")}}getEvents(e,t){let n=this.getAndValidatePingData(e);if(0!==n.length)return n.filter(e=>e.get().category===t.category&&e.get().name===t.name).map(e=>e.withoutReservedExtras())}getPingEvents(e,t){let n=this.getAndValidatePingData(e);if(t&&Object.keys(n).length>0&&this.eventsStore.delete([e]),0===n.length)return;let i=this.prepareEventsPayload(e,n);if(i.length>0)return i}clearAll(){this.eventsStore.delete([])}getAvailableStoreNames(){let e=this.eventsStore.get([]);return(0,I.o8)(e)?[]:Object.keys(e)}getAndValidatePingData(e){let t=this.eventsStore.get([e]);return(0,I.o8)(t)?[]:Array.isArray(t)?t.reduce((e,t)=>{try{let n=new F.K(t);return[...e,n]}catch(n){return(0,f.Z)(K,`Unexpected data found in events storage: ${JSON.stringify(t)}. Ignoring.`),e}},[]):((0,f.Z)(K,`Unexpected value found for ping ${e}: ${JSON.stringify(t)}. Clearing.`,f.G.Error),this.eventsStore.delete([e]),[])}prepareEventsPayload(e,t){var n,i,r,a;let s,o=t.sort((e,t)=>{var n,i;let r=Number(null==(n=e.get().extra)?void 0:n[x.ky]),a=Number(null==(i=t.get().extra)?void 0:i[x.ky]);return r!==a?r-a:e.get().timestamp-t.get().timestamp});try{s=X(null==(n=o[0].get().extra)?void 0:n[x.M6]),o.shift()}catch(e){s=w._.startTime}let l=(null==(i=o[0])?void 0:i.get().timestamp)||0,c=0;for(let[t,n]of o.entries()){let i;try{let i=X(null==(r=n.get().extra)?void 0:r[x.M6]),a=i.getTime()-s.getTime();s=i;let l=c+a,d=o[t-1].get().timestamp;l<=d?(c=d+1,w._.errorManager.record(H([e]),j.N.InvalidValue,`Invalid time offset between application sessions found for ping "${e}". Ignoring.`)):c=l}catch(e){}i=1===Number((null==(a=n.get().extra)?void 0:a[x.ky])||1)?n.get().timestamp-l:n.get().timestamp+c,o[t]=new F.K({category:n.get().category,name:n.get().name,timestamp:i,extra:n.get().extra})}return(o=function(e){for(var t,n,i;e.length&&(null==(i=null==(n=null==(t=e[e.length-1])?void 0:t.get())?void 0:n.extra)?void 0:i[x.M6]);)e.pop();return e}(o)).map(e=>e.payload())}};var Y=n(14197);function ee(e,t){let n=e.baseIdentifier(),i=(0,Y.ho)(n);return new InternalCounterMetricType({name:(0,Y.lb)(t,i),category:"glean.error",lifetime:"ping",sendInPings:e.sendInPings,disabled:!1})}let ErrorManager=class ErrorManager{record(e,t,n,i=1){let r=ee(e,t);(0,f.Z)(function(e){let t=e.type.charAt(0).toUpperCase()+e.type.slice(1);return`core.metrics.${t}`}(e),[`${e.baseIdentifier()}:`,n]),i>0&&r.add(i)}testGetNumRecordedErrors(e,t,n){return ee(e,t).testGetValue(n)||0}};var et=n(26362);let en="core.Glean";(l=p||(p={})).DebugTag="DebugTag",l.SourceTags="SourceTags",l.LogPings="LogPings";let ei=(e,t)=>{let n=`Glean.${e.toString()}`;switch(e){case p.DebugTag:sessionStorage.setItem(n,t);break;case p.LogPings:sessionStorage.setItem(n,t.toString());break;case p.SourceTags:sessionStorage.setItem(n,t.join(","))}},er=e=>sessionStorage.getItem(`Glean.${e.toString()}`)||void 0;!function(e){function t(){w._.uploadEnabled=!0,e.pingUploader.resumeUploads()}function n(e){w._.uploadEnabled=!1,w._.corePings.deletionRequest.submit(e?"at_init":"set_upload_enabled"),i()}function i(){let t;e.pingUploader.clearPendingPingsQueue();try{t=new DatetimeMetric(w._.metricsDatabase.getMetric(x.xW,w._.coreMetrics.firstRunDate)).date}catch(e){t=new Date}w._.eventsDatabase.clearAll(),w._.metricsDatabase.clearAll(),w._.pingsDatabase.clearAll(),w._.uploadEnabled=!0,w._.coreMetrics.clientId.set(x.Ei),w._.coreMetrics.firstRunDate.set(t),w._.uploadEnabled=!1}e.initialize=function(r,a,s){if(w._.initialized)return void(0,f.Z)(en,"Attempted to initialize Glean, but it has already been initialized. Ignoring.",f.G.Warn);if(!(0,I.HD)(r))return void(0,f.Z)(en,"Unable to initialize Glean, applicationId must be a string.",f.G.Error);if(!(0,I.jn)(a))return void(0,f.Z)(en,"Unable to initialize Glean, uploadEnabled must be a boolean.",f.G.Error);if(0===r.length)return void(0,f.Z)(en,"Unable to initialize Glean, applicationId cannot be an empty string.",f.G.Error);if(!w._.platform)return void(0,f.Z)(en,"Unable to initialize Glean, platform has not been set.",f.G.Error);if(w._.coreMetrics=new CoreMetrics,w._.corePings=new CorePings,w._.applicationId=(0,I.hL)(r),w._.config=new Configuration(s),!function(){if("undefined"==typeof window||void 0===window.sessionStorage)return;let t=er(p.LogPings);t&&(e.preInitLogPings=(0,I.pJ)(t));let n=er(p.DebugTag);n&&(e.preInitDebugViewTag=n);let i=er(p.SourceTags);i&&(e.preInitSourceTags=i.split(","))}(),e.preInitLogPings&&(w._.config.logPings=e.preInitLogPings),e.preInitDebugViewTag&&(w._.config.debugViewTag=e.preInitDebugViewTag),e.preInitSourceTags&&(w._.config.sourceTags=e.preInitSourceTags),w._.metricsDatabase=new MetricsDatabase,w._.eventsDatabase=new EventsDatabase,w._.pingsDatabase=new PingsDatabase,w._.errorManager=new ErrorManager,e.pingUploader=new PingUploadManager(w._.config,w._.pingsDatabase),w._.initialized=!0,w._.uploadEnabled=a,w._.eventsDatabase.initialize(),a)w._.metricsDatabase.clear("application"),t(),w._.coreMetrics.initialize(),(null==s?void 0:s.enableAutoPageLoadEvents)&&et.Z.pageLoad(),(null==s?void 0:s.enableAutoElementClickEvents)&&document.addEventListener("click",e=>{et.Z.handleClickEvent(e)});else{let e=w._.metricsDatabase.getMetric(x.xW,w._.coreMetrics.clientId);e?e!==x.Ei&&n(!0):i()}w._.pingsDatabase.scanPendingPings()},e.setUploadEnabled=function(e){return w._.initialized?(0,I.jn)(e)?void(w._.uploadEnabled!==e&&(e?(t(),w._.coreMetrics.initialize()):n(!1))):void(0,f.Z)(en,"Unable to change upload state, new value must be a boolean. Ignoring.",f.G.Error):void(0,f.Z)(en,["Changing upload enabled before Glean is initialized is not supported.\n","Pass the correct state into `initialize`.\n","See documentation at https://mozilla.github.io/glean/book/user/general-api.html#initializing-the-glean-sdk`"],f.G.Error)},e.setExperimentationId=function(e){w._.config.experimentationId=e},e.setLogPings=function(t){w._.initialized?w._.config.logPings=t:e.preInitLogPings=t},e.setDebugViewTag=function(t){w._.initialized?w._.config.debugViewTag=t:e.preInitDebugViewTag=t},e.setSourceTags=function(t){w._.initialized?w._.config.sourceTags=t:e.preInitSourceTags=t},e.setPlatform=function(e){w._.initialized||(w._.isPlatformSet()&&w._.platform.name!==e.name&&!w._.testing&&(0,f.Z)(en,[`IMPOSSIBLE: Attempted to change Glean's targeted platform",
1
+ export const __webpack_ids__=["7326"];export const __webpack_modules__={21755:function(e,t,n){n.d(t,{E1:()=>d,Ei:()=>o,M6:()=>g,Oo:()=>i,Q9:()=>r,Ui:()=>c,ey:()=>l,ky:()=>p,ni:()=>a,og:()=>u,xW:()=>s,yb:()=>h});let i=1,r="5.0.5",a="glean_ping_info",s="glean_client_info",o="c0ffeec0-ffee-c0ff-eec0-ffeec0ffeec0",l="https://incoming.telemetry.mozilla.org",c="deletion-request",d="events",u=5,g="#glean_reference_time",p="#glean_execution_counter",h=[p,g]},83586:function(e,t,n){n.d(t,{_:()=>Context});var i=n(5979);let r="core.Context";let Context=class Context{constructor(){this.initialized=!1,this.testing=!1,this.supportedMetrics={},this.startTime=new Date}static get instance(){return Context._instance||(Context._instance=new Context),Context._instance}static testUninitialize(){Context._instance=void 0}static get uploadEnabled(){return void 0===Context.instance.uploadEnabled&&(0,i.Z)(r,["Attempted to access Context.uploadEnabled before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.uploadEnabled}static set uploadEnabled(e){Context.instance.uploadEnabled=e}static get metricsDatabase(){return void 0===Context.instance.metricsDatabase&&(0,i.Z)(r,["Attempted to access Context.metricsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.metricsDatabase}static set metricsDatabase(e){Context.instance.metricsDatabase=e}static get eventsDatabase(){return void 0===Context.instance.eventsDatabase&&(0,i.Z)(r,["Attempted to access Context.eventsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.eventsDatabase}static set eventsDatabase(e){Context.instance.eventsDatabase=e}static get pingsDatabase(){return void 0===Context.instance.pingsDatabase&&(0,i.Z)(r,["Attempted to access Context.pingsDatabase before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.pingsDatabase}static set pingsDatabase(e){Context.instance.pingsDatabase=e}static get errorManager(){return void 0===Context.instance.errorManager&&(0,i.Z)(r,["Attempted to access Context.errorManager before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.errorManager}static set errorManager(e){Context.instance.errorManager=e}static get applicationId(){return void 0===Context.instance.applicationId&&(0,i.Z)(r,["Attempted to access Context.applicationId before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.applicationId}static set applicationId(e){Context.instance.applicationId=e}static get initialized(){return Context.instance.initialized}static set initialized(e){Context.instance.initialized=e}static get config(){return void 0===Context.instance.config&&(0,i.Z)(r,["Attempted to access Context.config before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.config}static set config(e){Context.instance.config=e}static get startTime(){return Context.instance.startTime}static get testing(){return Context.instance.testing}static set testing(e){Context.instance.testing=e}static get corePings(){return Context.instance.corePings}static set corePings(e){Context.instance.corePings=e}static get coreMetrics(){return Context.instance.coreMetrics}static set coreMetrics(e){Context.instance.coreMetrics=e}static set platform(e){Context.instance.platform=e}static get platform(){return void 0===Context.instance.platform&&(0,i.Z)(r,["Attempted to access Context.platform before it was set. This may cause unexpected behaviour."],i.G.Trace),Context.instance.platform}static isPlatformSet(){return!!Context.instance.platform}static getSupportedMetric(e){return Context.instance.supportedMetrics[e]}static addSupportedMetric(e,t){e in Context.instance.supportedMetrics||(Context.instance.supportedMetrics[e]=t)}}},39706:function(e,t,n){var i,r;n.d(t,{N:()=>i}),(r=i||(i={})).InvalidValue="invalid_value",r.InvalidLabel="invalid_label",r.InvalidState="invalid_state",r.InvalidOverflow="invalid_overflow",r.InvalidType="invalid_type"},26362:function(e,t,n){n.d(t,{Z:()=>p});var i,r=n(83586),a=n(10674),s=n(92949),o=n(21755),l=n(5979);let c="core.glean_metrics";var d=i||(i={});let u={pageLoad:new s.Z({category:"glean",name:"page_load",sendInPings:[o.E1],lifetime:"ping",disabled:!1},["url","referrer","title"]),elementClick:new s.Z({category:"glean",name:"element_click",sendInPings:[o.E1],lifetime:"ping",disabled:!1},["id","type","label"]),pageId:new a.ZP({category:"glean",name:"page_id",sendInPings:[o.E1],lifetime:"application",disabled:!1})};function g(e){if(!r._.initialized)return void(0,l.Z)(c,"Attempted to record element click event before Glean was initialized. This is a no-op.",l.G.Warn);u.elementClick.record(e)}d.pageLoad=function(e){var t,n,i;if(!r._.initialized)return void(0,l.Z)(c,"Attempted to record a page load event before Glean was initialized. This is a no-op.",l.G.Warn);u.pageId.generateAndSet(),u.pageLoad.record({url:null!=(t=null==e?void 0:e.url)?t:"undefined"!=typeof window?window.location.href:"URL_NOT_PROVIDED_OR_AVAILABLE",referrer:null!=(n=null==e?void 0:e.referrer)?n:"undefined"!=typeof document?document.referrer:"REFERRER_NOT_PROVIDED_OR_AVAILABLE",title:null!=(i=null==e?void 0:e.title)?i:"undefined"!=typeof document?document.title:"TITLE_NOT_PROVIDED_OR_AVAILABLE"})},d.handleClickEvent=function(e){let t=e.target.closest("[data-glean-id], [data-glean-type], [data-glean-label]");t&&g(function(e){let t=e.dataset;return{...t.gleanId&&{id:t.gleanId},...t.gleanType&&{type:t.gleanType},...t.gleanLabel&&{label:t.gleanLabel}}}(t))},d.recordElementClick=g;let p=i},5979:function(e,t,n){var i,r;function a(e,t,n=i.Debug){let r=`(Glean.${e})`;Array.isArray(t)?console[n](r,...t):console[n](r,t)}n.d(t,{G:()=>i,Z:()=>a}),(r=i||(i={})).Debug="debug",r.Info="info",r.Warn="warn",r.Error="error",r.Trace="trace"},66842:function(e,t,n){n.d(t,{K:()=>RecordedEvent});var i=n(21755),r=n(96929),a=n(78114),s=n(90952);let RecordedEvent=class RecordedEvent extends a.jb{constructor(e){super(e)}static withTransformedExtras(e,t){let n=t(e.extra||{});return{category:e.category,name:e.name,timestamp:e.timestamp,extra:n&&Object.keys(n).length>0?n:void 0}}addExtra(e,t){this.inner.extra||(this.inner.extra={}),this.inner.extra[e]=t}withoutReservedExtras(){return RecordedEvent.withTransformedExtras(this.get(),e=>Object.keys(e).filter(e=>!i.yb.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}))}validate(e){if(!(0,r.Kn)(e))return{type:a.XQ.Error,errorMessage:`Expected Glean event object, got ${typeof e}`};let t="category"in e&&(0,r.HD)(e.category),n="name"in e&&(0,r.HD)(e.name);if(!t||!n)return{type:a.XQ.Error,errorMessage:`Unexpected value for "category" or "name" in event object: ${JSON.stringify(e)}`};if(!("timestamp"in e&&(0,r.U)(e.timestamp)&&e.timestamp>=0))return{type:a.XQ.Error,errorMessage:`Event timestamp must be a positive integer, got ${JSON.stringify(e)}`};if(e.extra){if(!(0,r.Kn)(e.extra))return{type:a.XQ.Error,errorMessage:`Expected Glean extras object, got ${typeof e}`};for(let[t,n]of Object.entries(e.extra)){let e=(0,s.Cp)(t);if(e.type===a.XQ.Error)return e;if(!(0,r.HD)(n)&&!(0,r.hj)(n)&&!(0,r.jn)(n))return{type:a.XQ.Error,errorMessage:`Unexpected value for extra key ${t}: ${JSON.stringify(n)}`}}}return{type:a.XQ.Success}}payload(){return RecordedEvent.withTransformedExtras(this.withoutReservedExtras(),e=>Object.keys(e).reduce((t,n)=>(t[n]=e[n].toString(),t),{}))}}},1051:function(e,t,n){n.d(t,{t:()=>MetricType});var i=n(83586),r=n(96929),a=n(14197);let MetricType=class MetricType{constructor(e,t,n){n&&i._.addSupportedMetric(e,n),this.type=e,this.name=t.name,this.category=t.category,this.sendInPings=t.sendInPings,this.lifetime=t.lifetime,this.disabled=t.disabled,this.dynamicLabel=t.dynamicLabel}baseIdentifier(){return this.category.length>0?`${this.category}.${this.name}`:this.name}identifier(){let e=this.baseIdentifier();return(0,r.o8)(this.dynamicLabel)?e:(0,a.qd)(this)}shouldRecord(e){return e&&!this.disabled}testGetNumRecordedErrors(e,t=this.sendInPings[0]){return(0,r.sJ)("testGetNumRecordedErrors")?i._.errorManager.testGetNumRecordedErrors(this,e,t):0}}},78114:function(e,t,n){n.d(t,{Cn:()=>MetricValidationError,XQ:()=>r,jb:()=>Metric});var i,r,a=n(83586),s=n(39706);(i=r||(r={}))[i.Success=0]="Success",i[i.Error=1]="Error";let MetricValidationError=class MetricValidationError extends Error{constructor(e,t=s.N.InvalidType){super(e),this.type=t,this.name="MetricValidationError"}recordError(e){a._.errorManager.record(e,this.type,this.message)}};let Metric=class Metric{constructor(e){this.inner=this.validateOrThrow(e)}get(){return this.inner}set(e){this.inner=e}validateOrThrow(e){let t=this.validate(e);if(t.type===r.Error)throw new MetricValidationError(t.errorMessage,t.errorType);return e}}},92949:function(e,t,n){n.d(t,{Z:()=>EventMetricType,_:()=>InternalEventMetricType});var i,r=n(66842),a=n(1051),s=n(96929),o=n(83586),l=n(39706),c=n(78114),d=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},u=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};let InternalEventMetricType=class InternalEventMetricType extends a.t{constructor(e,t){super("event",e),this.allowedExtraKeys=t}record(e,t=(0,s.ts)()){if(!this.shouldRecord(o._.uploadEnabled))return;let n=Date.now();try{let i=new r.K({category:this.category,name:this.name,timestamp:t,extra:e}),a={};if(e&&this.allowedExtraKeys)for(let[t,n]of Object.entries(e))if(this.allowedExtraKeys.includes(t))(0,s.HD)(n)?a[t]=(0,s.HE)(this,n,500):a[t]=n;else{o._.errorManager.record(this,l.N.InvalidValue,`Invalid key index: ${t}`);continue}a.glean_timestamp=n.toString(),i.set({...i.get(),extra:a}),o._.eventsDatabase.record(this,i)}catch(e){e instanceof c.Cn&&e.recordError(this)}}testGetValue(e=this.sendInPings[0]){if((0,s.sJ)("testGetValue","core.metrics.EventMetricType")){let t=o._.eventsDatabase.getEvents(e,this);return t&&t.forEach(e=>{e.extra&&(delete e.extra.glean_timestamp,0==Object.keys(e.extra).length&&(e.extra=void 0))}),t}}};let EventMetricType=class EventMetricType{constructor(e,t){i.set(this,void 0),d(this,i,new InternalEventMetricType(e,t),"f")}record(e){u(this,i,"f").record(e)}testGetValue(e=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetValue(e)}testGetNumRecordedErrors(e,t=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetNumRecordedErrors(e,t)}};i=new WeakMap},14197:function(e,t,n){n.d(t,{Dc:()=>LabeledMetric,ho:()=>l,lb:()=>o,qd:()=>c});var i=n(78114),r=n(83586),a=n(39706);let LabeledMetric=class LabeledMetric extends i.jb{constructor(e){super(e)}validate(e){return{type:i.XQ.Success}}payload(){return this.inner}};let s=/^[a-z_][a-z0-9_-]{0,29}(\.[a-z_][a-z0-9_-]{0,29})*$/;function o(e,t){return`${e}/${t}`}function l(e){return e.split("/")[0]}function c(e){if(void 0===e.dynamicLabel)throw Error("This point should never be reached.");let t=o(e.baseIdentifier(),e.dynamicLabel);for(let n of e.sendInPings)if(r._.metricsDatabase.hasMetric(e.lifetime,n,e.type,t))return t;let n=0;for(let t of e.sendInPings)n+=r._.metricsDatabase.countByBaseIdentifier(e.lifetime,t,e.type,e.baseIdentifier());let i=!1;return n>=16?i=!0:e.dynamicLabel.length>61?(i=!0,r._.errorManager.record(e,a.N.InvalidLabel,`Label length ${e.dynamicLabel.length} exceeds maximum of 61.`)):s.test(e.dynamicLabel)||(i=!0,r._.errorManager.record(e,a.N.InvalidLabel,`Label must be snake_case, got '${e.dynamicLabel}'.`)),i?o(e.baseIdentifier(),"__other__"):t}},10674:function(e,t,n){n.d(t,{ZP:()=>p,te:()=>InternalUUIDMetricType});var i,r=n(1051),a=n(96929),s=n(83586),o=n(78114),l=n(39706),c=n(90952),d=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n},u=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)};let g=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;let UUIDMetric=class UUIDMetric extends o.jb{constructor(e){super(e)}validate(e){let t=(0,c.Cp)(e);return t.type===o.XQ.Error?t:g.test(e)?{type:o.XQ.Success}:{type:o.XQ.Error,errorMessage:`"${e}" is not a valid UUID`,errorType:l.N.InvalidValue}}payload(){return this.inner}};let InternalUUIDMetricType=class InternalUUIDMetricType extends r.t{constructor(e){super("uuid",e,UUIDMetric)}set(e){let t;if(this.shouldRecord(s._.uploadEnabled)){e||(e=(0,a.Ln)());try{t=new UUIDMetric(e),s._.metricsDatabase.record(this,t)}catch(e){e instanceof o.Cn&&e.recordError(this)}}}generateAndSet(){if(!this.shouldRecord(s._.uploadEnabled))return;let e=(0,a.Ln)();return this.set(e),e}testGetValue(e=this.sendInPings[0]){if((0,a.sJ)("testGetValue","core.metrics.UUIDMetricType"))return s._.metricsDatabase.getMetric(e,this)}};let p=class{constructor(e){i.set(this,void 0),d(this,i,new InternalUUIDMetricType(e),"f")}set(e){u(this,i,"f").set(e)}generateAndSet(){return u(this,i,"f").generateAndSet()}testGetValue(e=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetValue(e)}testGetNumRecordedErrors(e,t=u(this,i,"f").sendInPings[0]){return u(this,i,"f").testGetNumRecordedErrors(e,t)}};i=new WeakMap},90952:function(e,t,n){n.d(t,{Cp:()=>g,Lg:()=>c,Rj:()=>u,g:()=>d});var i=n(78114),r=n(96929),a=n(14197),s=n(83586),o=n(39706),l=n(5979);function c(e,t){e.startsWith("labeled_")&&s._.addSupportedMetric(e,a.Dc);let n=s._.getSupportedMetric(e);if(!n)throw Error(`Unable to create metric of unknown type "${e}".`);return new n(t)}function d(e,t){try{return c(e,t),!0}catch(e){return(0,l.Z)("Glean.core.Metrics.utils",e.message,l.G.Error),!1}}function u(e,t=!0){return(0,r.U)(e)?(t?e<0:e<=0)?{type:i.XQ.Error,errorMessage:`Expected positive value, got ${JSON.stringify(e)}`,errorType:o.N.InvalidValue}:{type:i.XQ.Success}:{type:i.XQ.Error,errorMessage:`Expected integer value, got ${JSON.stringify(e)}`}}function g(e){return(0,r.HD)(e)?{type:i.XQ.Success}:{type:i.XQ.Error,errorMessage:`Expected string value, got ${JSON.stringify(e)}`}}},96929:function(e,t,n){let i;n.d(t,{hj:()=>m,hL:()=>v,hU:()=>M,Kn:()=>g,U:()=>b,sJ:()=>x,ts:()=>I,Ln:()=>S,AK:()=>_,pJ:()=>y,r4:()=>w,jn:()=>f,HE:()=>E,qT:()=>function e(t){if(h(t)||f(t)||m(t))return!0;if(g(t)){if(0===Object.keys(t).length)return!0;for(let n in t)return e(t[n])}return!!Array.isArray(t)&&t.every(t=>e(t))},HD:()=>h,YL:()=>D,o8:()=>p});let r="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let o=function(e,t,n){if(r&&!t&&!e)return r();let o=(e=e||{}).random||(e.rng||function(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(a)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(o)};var l=n(83586),c=n(39706),d=n(5979),u=n(78114);function g(e){return"object"==typeof e&&null!==e&&e.constructor===Object}function p(e){return void 0===e}function h(e){return"string"==typeof e}function f(e){return"boolean"==typeof e}function m(e){return"number"==typeof e&&!isNaN(e)}function b(e){return m(e)&&Number.isInteger(e)}function y(e){return"true"===e.toLowerCase()||"false"!==e.toLowerCase()&&void 0}function v(e){return e.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}function w(e){return/^(http|https):\/\/[a-zA-Z0-9._-]+(:\d+){0,1}(\/{0,1})$/i.test(e)}function _(e){return/^[a-z0-9-]{1,20}$/i.test(e)}function S(){return"undefined"!=typeof crypto?o():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}function I(){return Math.round("undefined"==typeof performance?Date.now():performance.now())}function E(e,t,n){if(!h(t))throw new u.Cn(`Expected string, got ${JSON.stringify(t)}`);let i=new TextEncoder,r=new TextDecoder("utf-8"),a=i.encode(t).slice(0,n),s=r.decode(a);return s!==t&&l._.errorManager.record(e,c.N.InvalidOverflow,`Value length ${new Blob([t]).size} exceeds maximum of ${t.length} bytes.`),s}function x(e,t="core.utils"){return!!l._.testing||((0,d.Z)(t,[`Attempted to access test only method \`${e||"unknown"}\`,`,"but Glean is not in testing mode. Ignoring. Make sure to put Glean in testing mode","before accessing such methods, by calling `testResetGlean`."],d.G.Error),!1)}function D(...e){let t=e.reduce((e,t)=>e+t,0);return t>Number.MAX_SAFE_INTEGER&&(t=Number.MAX_SAFE_INTEGER),t}function M(){return"undefined"==typeof window}},68247:function(e,t,n){let i;n.d(t,{ZP:()=>eo});var r,a,s,o,l,c,d,u,g,p,h,f=n(5979);(r=c||(c={}))[r.RecoverableFailure=0]="RecoverableFailure",r[r.UnrecoverableFailure=1]="UnrecoverableFailure",r[r.Success=2]="Success";let UploadResult=class UploadResult{constructor(e,t){this.result=e,this.status=t}};let Uploader=class Uploader{};let m=Uploader,b="platform.browser.FetchUploader";let BrowserFetchUploader=class BrowserFetchUploader extends m{constructor(){super(...arguments),this.timeoutMs=1e4}async post(e,t,n=!0){let i,r=new AbortController,a=setTimeout(()=>r.abort(),this.timeoutMs),s=t.asCompressedPayload();try{i=await fetch(e.toString(),{headers:s.headers,method:"POST",body:s.payload,keepalive:n,credentials:"omit",signal:r.signal,redirect:"error"})}catch(t){if(t instanceof DOMException)(0,f.Z)(b,["Timeout while attempting to upload ping.\n",t],f.G.Error);else if(t instanceof TypeError){if(n)return this.post(e,s,!1);(0,f.Z)(b,["Network error while attempting to upload ping.\n",t],f.G.Error)}else(0,f.Z)(b,["Unknown error while attempting to upload ping.\n",t],f.G.Error);return clearTimeout(a),new UploadResult(0)}return clearTimeout(a),new UploadResult(2,i.status)}supportsCustomHeaders(){return!0}};let y=new BrowserFetchUploader;let BrowserSendBeaconUploader=class BrowserSendBeaconUploader extends m{constructor(){super(...arguments),this.timeoutMs=1e4}async post(e,t,n=!0){return navigator.sendBeacon(e,t.payload)?new UploadResult(2,200):(n&&(0,f.Z)("platform.browser.SendBeaconUploader","The `sendBeacon` call was not serviced by the browser. Deleting data.",f.G.Error),new UploadResult(1))}supportsCustomHeaders(){return!1}};let v=new BrowserSendBeaconUploader;var w=n(83586);let _="platform.browser.SendBeaconFallbackUploader";let BrowserSendBeaconFallbackUploader=class BrowserSendBeaconFallbackUploader extends m{constructor(){super(...arguments),this.fetchUploader=y,this.sendBeaconUploader=v}async post(e,t){var n,i;if(!(null==(n=w._.config)?void 0:n.sourceTags)&&!(null==(i=w._.config)?void 0:i.debugViewTag)&&navigator&&navigator.sendBeacon){let n=await this.sendBeaconUploader.post(e,t,!1);if(2==n.result)return n;(0,f.Z)(_,"The `sendBeacon` call was not serviced by the browser. Falling back to the `fetch` uploader.",f.G.Warn)}else(0,f.Z)(_,"`sendBeacon` is not available. Falling back to the `fetch` uploader.",f.G.Warn);return this.fetchUploader.post(e,t)}supportsCustomHeaders(){return!1}};let S=new BrowserSendBeaconFallbackUploader;var I=n(96929);let E="platform.web.Storage";let WebStore=class WebStore{constructor(e){this.rootKey=e,this.logTag=`${E}.${e}`}get(e=[]){let t;if(!(0,I.hU)()){try{let n=localStorage.getItem(this.rootKey)||"{}",i=JSON.parse(n);t=e.length>0?function(e,t){if(0===t.length)throw Error("The index must contain at least one property to get.");let n=e;for(let e of t)if(!(0,I.Kn)(n)||!(e in n))return;else{let t=n[e];(0,I.qT)(t)&&(n=t)}return n}(i,e):0===Object.keys(i).length?void 0:i}catch(e){(0,f.Z)(E,["Unable to fetch value from local storage.",e],f.G.Error)}return this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo(),t}}update(e,t){if(!(0,I.hU)()){try{let n=localStorage.getItem(this.rootKey)||"{}",i=JSON.parse(n),r=function(e,t,n){if(0===t.length)throw Error("The index must contain at least one property to update.");let i={...e},r=i;for(let e of t.slice(0,t.length-1))(0,I.Kn)(r[e])||(r[e]={}),r=r[e];let a=t[t.length-1],s=n(r[a]);return r[a]=s,i}(i,e,t);localStorage.setItem(this.rootKey,JSON.stringify(r))}catch(e){(0,f.Z)(E,["Unable to update value from local storage.",e],f.G.Error)}this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo()}}delete(e){if(!(0,I.hU)()){try{let t=localStorage.getItem(this.rootKey)||"{}",n=JSON.parse(t);if(0===e.length)localStorage.removeItem(this.rootKey);else try{let t=function(e,t){if(0===t.length)return{};let n={...e},i=n;for(let e of t.slice(0,t.length-1)){let n=i[e];if((0,I.Kn)(n))i=n;else throw Error(`Attempted to delete an entry from an inexistent index: ${JSON.stringify(t)}.`)}let r=t[t.length-1];return delete i[r],n}(n,e);localStorage.setItem(this.rootKey,JSON.stringify(t))}catch(t){(0,f.Z)(this.logTag,[`Error attempting to delete key ${e.toString()} from storage. Ignoring.`,t],f.G.Warn)}}catch(e){(0,f.Z)(E,["Unable to delete value from storage.",e],f.G.Error)}this.shouldUpdateSession(e)&&w._.coreMetrics.updateSessionInfo()}}shouldUpdateSession(e){return!e.includes("session_id")&&!e.includes("session_count")}};var x=n(21755);let D="core.Config";let Configuration=class Configuration{constructor(e){var t;if(this.channel=null==e?void 0:e.channel,this.appBuild=null==e?void 0:e.appBuild,this.appDisplayVersion=null==e?void 0:e.appDisplayVersion,this.buildDate=null==e?void 0:e.buildDate,this.maxEvents=(null==e?void 0:e.maxEvents)||1,this.enableAutoPageLoadEvents=null==e?void 0:e.enableAutoPageLoadEvents,this.enableAutoElementClickEvents=null==e?void 0:e.enableAutoElementClickEvents,this.experimentationId=null==e?void 0:e.experimentationId,this.sessionLengthInMinutesOverride=null==e?void 0:e.sessionLengthInMinutesOverride,this.debug={},(null==e?void 0:e.serverEndpoint)&&!(0,I.r4)(e.serverEndpoint))throw Error(`Unable to initialize Glean, serverEndpoint ${e.serverEndpoint} is an invalid URL.`);if(!w._.testing&&(null==(t=null==e?void 0:e.serverEndpoint)?void 0:t.startsWith("http:")))throw Error(`Unable to initialize Glean, serverEndpoint ${e.serverEndpoint} must use the HTTPS protocol.`);this.serverEndpoint=e&&e.serverEndpoint?e.serverEndpoint:x.ey,this.httpClient=null==e?void 0:e.httpClient}get logPings(){return this.debug.logPings||!1}set logPings(e){this.debug.logPings=e}get debugViewTag(){return this.debug.debugViewTag}set debugViewTag(e){if(!(0,I.AK)(e||""))return void(0,f.Z)(D,[`"${e||""}" is not a valid \`debugViewTag\` value.`,"Please make sure the value passed satisfies the regex `^[a-zA-Z0-9-]{1,20}$`."],f.G.Error);this.debug.debugViewTag=e}get sourceTags(){return this.debug.sourceTags}set sourceTags(e){if(!e||e.length<1||e.length>x.og)return void(0,f.Z)(D,`A list of tags cannot contain more than ${x.og} elements or less than one.`,f.G.Error);for(let t of e){if(t.startsWith("glean"))return void(0,f.Z)(D,"Tags starting with `glean` are reserved and must not be used.",f.G.Error);if(!(0,I.AK)(t))return}this.debug.sourceTags=e}};var M=n(93778);let T="core.Pings.Database";let PingsDatabase=class PingsDatabase{constructor(){this.store=new w._.platform.Storage("pings")}attachObserver(e){this.observer=e}recordPing(e,t,n,i){let r={collectionDate:new Date().toISOString(),path:e,payload:n};i&&(r.headers=i),this.store.update([t],()=>r),this.observer&&this.observer.update(t,r)}deletePing(e){this.store.delete([e])}getAllPings(){let e=this.store.get(),t={};if((0,I.Kn)(e))for(let n in e){let i=e[n];!function(e){if((0,I.Kn)(e)){let t="collectionDate"in e&&(0,I.HD)(e.collectionDate)&&(0,I.hj)(new Date(e.collectionDate).getTime()),n="path"in e&&(0,I.HD)(e.path),i="payload"in e&&(0,I.qT)(e.payload)&&(0,I.Kn)(e.payload),r=!("headers"in e)||(0,I.qT)(e.headers)&&(0,I.Kn)(e.headers);return!!t&&!!n&&!!i&&!!r}return!1}(i)?((0,f.Z)(T,`Unexpected data found in pings database: ${JSON.stringify(i,null,2)}. Deleting.`,f.G.Warn),this.store.delete([n])):t[n]=i}return Object.entries(t).sort(([e,{collectionDate:t}],[n,{collectionDate:i}])=>new Date(t).getTime()-new Date(i).getTime())}scanPendingPings(){if(this.observer)for(let[e,t]of this.getAllPingsWithoutSurplus())this.observer.update(e,t)}clearAll(){this.store.delete([])}getAllPingsWithoutSurplus(e=250,t=0xa00000){let n=this.getAllPings(),i=n.filter(([e,t])=>!P(t)).reverse(),r=n.filter(([e,t])=>P(t)),a=i.length;a>e&&(0,f.Z)(T,[`More than ${e} pending pings in the pings database,`,`will delete ${a-e} old pings.`],f.G.Warn);let s=!1,o=0,l=0,c=[];for(let[n,r]of i){var d;o++,l+=(d=r,(0,M.TD)(JSON.stringify(d)).length),!s&&l>t&&((0,f.Z)(T,[`Pending pings database has reached the size quota of ${t} bytes,`,"outstanding pings will be deleted."],f.G.Warn),s=!0),o>e&&(s=!0),s?this.deletePing(n):c.unshift([n,r])}return[...r,...c]}};function P(e){return e.path.split("/")[3]===x.Ui}(a=d||(d={}))[a.Incrementing=0]="Incrementing",a[a.Throttled=1]="Throttled";let RateLimiter=class RateLimiter{constructor(e=6e4,t=40,n=0,i){this.interval=e,this.maxCount=t,this.count=n,this.started=i}get elapsed(){if((0,I.o8)(this.started))return NaN;let e=(0,I.ts)()-this.started;return e<0?NaN:e}reset(){this.started=(0,I.ts)(),this.count=0}shouldReset(){return!!((0,I.o8)(this.started)||isNaN(this.elapsed)||this.elapsed>this.interval)}getState(){this.shouldReset()&&this.reset();let e=this.interval-this.elapsed;return this.count>=this.maxCount?{state:1,remainingTime:e}:(this.count++,{state:0})}};let Policy=class Policy{constructor(e=3,t=3,n=1048576){this.maxWaitAttempts=e,this.maxRecoverableFailures=t,this.maxPingBodySize=n}};let PingBodyOverflowError=class PingBodyOverflowError extends Error{constructor(e){super(e),this.name="PingBodyOverflow"}};let PingRequest=class PingRequest{constructor(e,t,n,i){this.identifier=e,this.headers=t,this.payload=n,this.maxBodySize=i}asCompressedPayload(){let e;if("gzip"==this.headers["Content-Encoding"])return this;let t=(0,M.TD)(this.payload),n=this.headers;try{e=(0,M.rZ)(t),n["Content-Encoding"]="gzip",n["Content-Length"]=e.length.toString()}catch(e){return this}if(e.length>this.maxBodySize)throw new PingBodyOverflowError(`Body for ping ${this.identifier} exceeds ${this.maxBodySize} bytes. Discarding.`);return new PingRequest(this.identifier,n,e,this.maxBodySize)}};let C="core.Upload.PingUploadWorker";let PingUploadWorker=class PingUploadWorker{constructor(e,t,n=new Policy){this.uploader=e,this.serverEndpoint=t,this.policy=n,this.isBlocking=!1}buildPingRequest(e){let t=e.headers||{};t={...e.headers,"Content-Type":"application/json; charset=utf-8",Date:new Date().toISOString(),"X-Telemetry-Agent":`Glean/${x.Q9} (JS on ${w._.platform.info.os()})`};let n=JSON.stringify(e.payload);if(n.length>this.policy.maxPingBodySize)throw new PingBodyOverflowError(`Body for ping ${e.identifier} exceeds ${this.policy.maxPingBodySize}bytes. Discarding.`);return t["Content-Length"]=n.length.toString(),new PingRequest(e.identifier,t,n,this.policy.maxPingBodySize)}async attemptPingUpload(e){try{let t=this.buildPingRequest(e);return this.uploader.post(`${this.serverEndpoint}${e.path}`,t)}catch(e){return(0,f.Z)(C,["Error trying to build or post ping request:",e],f.G.Warn),new UploadResult(1)}}work(e,t){for(;;)try{let n=e();switch(n.type){case"upload":if(this.isBlocking)return;this.attemptPingUpload(n.ping).then(e=>{t(n.ping,e)}).catch(e=>{console.log(e)});continue;case"done":return}}catch(e){(0,f.Z)(C,["IMPOSSIBLE: Something went wrong while processing ping upload tasks.",e],f.G.Error)}}blockUploading(){this.isBlocking=!0}resumeUploading(){this.isBlocking=!1}};(s=u||(u={})).Done="done",s.Wait="wait",s.Upload="upload";let $=()=>({type:"done"}),U="core.Upload.PingUploadManager";let PingUploadManager=class PingUploadManager{constructor(e,t,n=new Policy,i=new RateLimiter){this.pingsDatabase=t,this.policy=n,this.rateLimiter=i,this.recoverableFailureCount=0,this.waitAttemptCount=0,this.queue=[],this.processing=new Set,this.worker=new PingUploadWorker(e.httpClient?e.httpClient:w._.platform.uploader,e.serverEndpoint,n),t.attachObserver(this)}getUploadTask(){let e=this.getUploadTaskInternal();return"wait"!==e.type&&this.waitAttemptCount>0&&(this.waitAttemptCount=0),"upload"!==e.type&&this.recoverableFailureCount>0&&(this.recoverableFailureCount=0),e}processPingUploadResponse(e,t){let{identifier:n}=e;this.processing.has(n)&&this.processing.delete(n);let{status:i,result:r}=t;if(i&&i>=200&&i<300){(0,f.Z)(U,`Ping ${n} successfully sent ${i}.`,f.G.Info),this.pingsDatabase.deletePing(n);return}if(1===r||i&&i>=400&&i<500){(0,f.Z)(U,`Unrecoverable upload failure while attempting to send ping ${n}. Error was: ${null!=i?i:"no status"}.`,f.G.Warn),this.pingsDatabase.deletePing(n);return}(0,f.Z)(U,[`Recoverable upload failure while attempting to send ping ${n}, will retry.`,`Error was: ${null!=i?i:"no status"}.`],f.G.Warn),this.recoverableFailureCount++,this.enqueuePing(e)}clearPendingPingsQueue(){this.queue=this.queue.filter(e=>P(e))}blockUploads(){this.worker.blockUploading()}resumeUploads(){this.worker.resumeUploading()}update(e,t){this.enqueuePing({identifier:e,...t}),this.worker.isBlocking||(this.processing.delete(e),this.pingsDatabase.deletePing(e)),this.worker.work(()=>this.getUploadTask(),(e,t)=>this.processPingUploadResponse(e,t))}enqueuePing(e){if(!this.processing.has(e.identifier)){for(let t of this.queue)if(t.identifier===e.identifier)return;this.queue.push(e)}}getUploadTaskInternal(){if(this.recoverableFailureCount>=this.policy.maxRecoverableFailures)return(0,f.Z)(U,"Glean has reached maximum recoverable upload failures for the current uploading window.",f.G.Debug),$();if(this.queue.length>0){let{state:e,remainingTime:t}=this.rateLimiter.getState();if(1===e)return((0,f.Z)(U,["Glean is currently throttled.",`Pending pings may be uploaded in ${(t||0)/1e3}s.`],f.G.Debug),this.waitAttemptCount++,this.waitAttemptCount>this.policy.maxWaitAttempts)?$():{type:"wait",remainingTime:t||0};let n=this.queue.shift();return this.processing.add(n.identifier),{type:"upload",ping:n}}return $()}};var G=n(10674),O=n(1051);(o=g||(g={})).Nanosecond="nanosecond",o.Microsecond="microsecond",o.Millisecond="millisecond",o.Second="second",o.Minute="minute",o.Hour="hour",o.Day="day";let k=g;var A=n(78114);let DatetimeMetric=class DatetimeMetric extends A.jb{constructor(e){super(e)}static fromDate(e,t){if(!(e instanceof Date))throw new A.Cn(`Expected Date object, got ${JSON.stringify(e)}`);return new DatetimeMetric({timeUnit:t,timezone:e.getTimezoneOffset(),date:e.toISOString()})}get date(){return new Date(this.inner.date)}get timezone(){return this.inner.timezone}get timeUnit(){return this.inner.timeUnit}get dateISOString(){return this.inner.date}validate(e){if(!(0,I.Kn)(e)||3!==Object.keys(e).length)return{type:A.XQ.Error,errorMessage:`Expected Glean datetime metric object, got ${JSON.stringify(e)}`};let t="timeUnit"in e&&(0,I.HD)(e.timeUnit)&&Object.values(k).includes(e.timeUnit),n="timezone"in e&&(0,I.hj)(e.timezone),i="date"in e&&(0,I.HD)(e.date)&&24===e.date.length&&!isNaN(Date.parse(e.date));return t&&n&&i?{type:A.XQ.Success}:{type:A.XQ.Error,errorMessage:`Invalid property on datetime metric, got ${JSON.stringify(e)}`}}payload(){let e=this.dateISOString.match(/\d+/g);if(!e||e.length<0)throw Error("IMPOSSIBLE: Unable to extract date information from DatetimeMetric.");let t=new Date(parseInt(e[0]),parseInt(e[1])-1,parseInt(e[2]),parseInt(e[3])-this.timezone/60,parseInt(e[4]),parseInt(e[5]),parseInt(e[6])),n=function(e){let t=-(e/60*1),n=Math.abs(t).toString().padStart(2,"0");return`${t>0?"+":"-"}${n}:00`}(this.timezone),i=t.getFullYear().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0");if(this.timeUnit===k.Day)return`${i}-${r}-${a}${n}`;let s=t.getHours().toString().padStart(2,"0");if(this.timeUnit===k.Hour)return`${i}-${r}-${a}T${s}${n}`;let o=t.getMinutes().toString().padStart(2,"0");if(this.timeUnit===k.Minute)return`${i}-${r}-${a}T${s}:${o}${n}`;let l=t.getSeconds().toString().padStart(2,"0");if(this.timeUnit===k.Second)return`${i}-${r}-${a}T${s}:${o}:${l}${n}`;let c=t.getMilliseconds().toString().padStart(3,"0");return this.timeUnit===k.Millisecond?`${i}-${r}-${a}T${s}:${o}:${l}.${c}${n}`:this.timeUnit===k.Microsecond?`${i}-${r}-${a}T${s}:${o}:${l}.${c}000${n}`:`${i}-${r}-${a}T${s}:${o}:${l}.${c}000000${n}`}};let InternalDatetimeMetricType=class InternalDatetimeMetricType extends O.t{constructor(e,t){super("datetime",e,DatetimeMetric),this.timeUnit=t}set(e){if(!this.shouldRecord(w._.uploadEnabled))return;let t=this.truncateDate(e);try{let e=DatetimeMetric.fromDate(t,this.timeUnit);w._.metricsDatabase.record(this,e)}catch(e){e instanceof A.Cn&&e.recordError(this)}}truncateDate(e){e||(e=new Date);let t=e;switch(this.timeUnit){case k.Day:t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0),t.setMilliseconds(0);case k.Hour:t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0);case k.Minute:t.setMilliseconds(0),t.setSeconds(0);case k.Second:t.setMilliseconds(0)}return t}testGetValueAsDatetimeMetric(e,t){if((0,I.sJ)(t,"core.metrics.DatetimeMetricType")){let t=w._.metricsDatabase.getMetric(e,this);if(t)return new DatetimeMetric(t)}}testGetValueAsString(e=this.sendInPings[0]){let t=this.testGetValueAsDatetimeMetric(e,"testGetValueAsString");return t?t.payload():void 0}testGetValue(e=this.sendInPings[0]){let t=this.testGetValueAsDatetimeMetric(e,"testGetValue");return t?t.date:void 0}};new WeakMap;var L=n(90952);let StringMetric=class StringMetric extends A.jb{constructor(e){super(e)}validate(e){return(0,L.Cp)(e)}payload(){return this.inner}};let InternalStringMetricType=class InternalStringMetricType extends O.t{constructor(e){super("string",e,StringMetric)}set(e){if(this.shouldRecord(w._.uploadEnabled))try{let t=(0,I.HE)(this,e,100),n=new StringMetric(t);w._.metricsDatabase.record(this,n)}catch(e){e instanceof A.Cn&&e.recordError(this)}}testGetValue(e=this.sendInPings[0]){if((0,I.sJ)("testGetValue","core.metrics.StringMetricType"))return w._.metricsDatabase.getMetric(e,this)}};new WeakMap;let N="core.metrics.CounterMetricType";let CounterMetric=class CounterMetric extends A.jb{constructor(e){super(e)}validate(e){return(0,L.Rj)(e,!1)}payload(){return this.inner}saturatingAdd(e){let t=this.validateOrThrow(e);this.inner=(0,I.YL)(this.inner,t)}};let InternalCounterMetricType=class InternalCounterMetricType extends O.t{constructor(e){super("counter",e,CounterMetric)}add(e){if(this.shouldRecord(w._.uploadEnabled)){(0,I.o8)(e)&&(e=1);try{w._.metricsDatabase.transform(this,this.transformFn(e))}catch(e){e instanceof A.Cn&&e.recordError(this)}}}transformFn(e){return t=>{let n=new CounterMetric(e);if(t)try{n.saturatingAdd(t)}catch(e){(0,f.Z)(N,`Unexpected value found in storage for metric ${this.name}: ${JSON.stringify(t)}. Overwriting.`)}return n}}testGetValue(e=this.sendInPings[0]){if((0,I.sJ)("testGetValue",N))return w._.metricsDatabase.getMetric(e,this)}};new WeakMap;let CoreMetrics=class CoreMetrics{constructor(){this.clientId=new G.te({name:"client_id",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1}),this.firstRunDate=new InternalDatetimeMetricType({name:"first_run_date",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1},k.Day),this.os=new InternalStringMetricType({name:"os",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.osVersion=new InternalStringMetricType({name:"os_version",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.architecture=new InternalStringMetricType({name:"architecture",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.locale=new InternalStringMetricType({name:"locale",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appChannel=new InternalStringMetricType({name:"app_channel",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appBuild=new InternalStringMetricType({name:"app_build",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.appDisplayVersion=new InternalStringMetricType({name:"app_display_version",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1}),this.buildDate=new InternalDatetimeMetricType({name:"build_date",category:"",sendInPings:["glean_client_info"],lifetime:"application",disabled:!1},"second"),this.sessionId=new G.te({name:"session_id",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1}),this.sessionCount=new InternalCounterMetricType({name:"session_count",category:"",sendInPings:["glean_client_info"],lifetime:"user",disabled:!1})}initialize(){!(!w._.testing&&(0,I.hU)())&&(this.initializeClientId(),this.initializeFirstRunDate(),this.updateSessionInfo(),this.os.set(w._.platform.info.os()),this.osVersion.set(w._.platform.info.osVersion()),this.architecture.set(w._.platform.info.arch()),this.locale.set(w._.platform.info.locale()),this.appBuild.set(w._.config.appBuild||"Unknown"),this.appDisplayVersion.set(w._.config.appDisplayVersion||"Unknown"),w._.config.channel&&this.appChannel.set(w._.config.channel),w._.config.buildDate&&this.buildDate.set())}updateSessionInfo(){if(!(0,I.hU)()){if(w._.metricsDatabase.getMetric(x.xW,this.sessionId))try{(function(e=30){let t=null;try{t=localStorage.getItem("glean_session_last_active")}catch(e){console.warn(e)}let n=new Date(Number(t)),i=new Date;return i.setMinutes(i.getMinutes()-e),i>n})(w._.config.sessionLengthInMinutesOverride)&&this.generateNewSession()}catch(e){this.generateNewSession()}else this.generateNewSession();try{localStorage.setItem("glean_session_last_active",Date.now().toString())}catch(e){console.warn(e)}}}initializeClientId(){let e=!1,t=w._.metricsDatabase.getMetric(x.xW,this.clientId);if(t)try{(0,L.Lg)("uuid",t).payload()===x.Ei&&(e=!0)}catch(t){(0,f.Z)("core.InternalMetrics","Unexpected value found for Glean clientId. Ignoring.",f.G.Warn),e=!0}else e=!0;e&&this.clientId.set((0,I.Ln)())}initializeFirstRunDate(){w._.metricsDatabase.getMetric(x.xW,this.firstRunDate)||this.firstRunDate.set()}generateNewSession(){this.sessionId.generateAndSet(),this.sessionCount.add()}};let z="core.Pings.Maker",Z=function(e,t,n){let i=function(e,t){let n=w._.eventsDatabase.getPingEvents(e.name,!0),i=w._.metricsDatabase.getPingMetrics(e.name,!0);if(!i&&!n){if(!e.sendIfEmpty)return void(0,f.Z)(z,`Storage for ${e.name} empty. Bailing out.`,f.G.Info);(0,f.Z)(z,`Storage for ${e.name} empty. Ping will still be sent.`,f.G.Info)}e.includeClientId&&w._.config.experimentationId&&(i=void 0!==i?{...i,string:{...(null==i?void 0:i.string)||void 0,"glean.client.annotation.experimentation_id":w._.config.experimentationId}}:{string:{"glean.client.annotation.experimentation_id":w._.config.experimentationId}});let r=i?{metrics:i}:{},a=function(e,t){let n=function(e){let t=new InternalCounterMetricType({category:"",name:`${e.name}#sequence`,sendInPings:[x.ni],lifetime:"user",disabled:!1}),n=w._.metricsDatabase.getMetric(x.ni,t);if(t.add(1),n)try{return new CounterMetric(n).payload()}catch(t){(0,f.Z)(z,`Unexpected value found for sequence number in ping ${e.name}. Ignoring.`,f.G.Warn)}return 0}(e),{startTime:i,endTime:r}=function(e){let{startTimeMetric:t,startTime:n}=function(e){let t=new InternalDatetimeMetricType({category:"",name:`${e.name}#start`,sendInPings:[x.ni],lifetime:"user",disabled:!1},k.Minute),n=w._.metricsDatabase.getMetric(x.ni,t);return{startTimeMetric:t,startTime:n?new DatetimeMetric(n):DatetimeMetric.fromDate(w._.startTime,k.Minute)}}(e),i=new Date;t.set(i);let r=DatetimeMetric.fromDate(i,k.Minute);return{startTime:n.payload(),endTime:r.payload()}}(e),a={seq:n,start_time:i,end_time:r};return t&&(a.reason=t),a}(e,t),s=function(e){let t=w._.metricsDatabase.getPingMetrics(x.xW,!0);t||((0,f.Z)(z,"Empty client info data. Will submit anyways.",f.G.Warn),t={});let n={telemetry_sdk_build:x.Q9};for(let e in t)n={...n,...t[e]};return e.includeClientId||(delete n.client_id,delete n.session_id),n}(e);return{...r,...n?{events:n}:{},ping_info:a,client_info:s}}(t,n);if(!i)return;w._.config.logPings&&(0,f.Z)(z,JSON.stringify(i,null,2),f.G.Info);let r=function(){let e={};if(w._.config.debugViewTag&&(e["X-Debug-ID"]=w._.config.debugViewTag),w._.config.sourceTags&&(e["X-Source-Tags"]=w._.config.sourceTags.toString()),Object.keys(e).length>0)return e}();w._.pingsDatabase.recordPing(`/submit/${w._.applicationId}/${t.name}/${x.Oo}/${e}`,e,i,r)},V="core.Pings.PingType";let InternalPingType=class InternalPingType{constructor(e){var t;this.name=e.name,this.includeClientId=e.includeClientId,this.sendIfEmpty=e.sendIfEmpty,this.reasonCodes=null!=(t=e.reasonCodes)?t:[],this.preciseTimestamps=e.preciseTimestamps}submit(e){this.testCallback?this.testCallback(e).then(()=>{this.internalSubmit(e,this.resolveTestPromiseFunction)}).catch(t=>{(0,f.Z)(V,[`There was an error validating "${this.name}" (${null!=e?e:"no reason"}):`,t],f.G.Error),this.internalSubmit(e,this.rejectTestPromiseFunction)}):this.internalSubmit(e)}internalSubmit(e,t){if(!w._.initialized)return void(0,f.Z)(V,"Glean must be initialized before submitting pings.",f.G.Info);if(!w._.uploadEnabled&&this.name!==x.Ui)return void(0,f.Z)(V,"Glean disabled: not submitting pings. Glean may still submit the deletion-request ping.",f.G.Info);let n=e;e&&!this.reasonCodes.includes(e)&&((0,f.Z)(V,`Invalid reason code ${e} from ${this.name}. Ignoring.`,f.G.Warn),n=void 0),Z((0,I.Ln)(),this,n),t&&(t(),this.resolveTestPromiseFunction=void 0,this.rejectTestPromiseFunction=void 0,this.testCallback=void 0)}async testBeforeNextSubmit(e){if((0,I.sJ)("testBeforeNextSubmit",V))return this.testCallback?void(0,f.Z)(V,`There is an existing test call for ping "${this.name}". Ignoring.`,f.G.Error):new Promise((t,n)=>{this.resolveTestPromiseFunction=t,this.rejectTestPromiseFunction=n,this.testCallback=e})}};new WeakMap;let CorePings=class CorePings{constructor(){this.deletionRequest=new InternalPingType({name:x.Ui,includeClientId:!0,sendIfEmpty:!0,reasonCodes:["at_init","set_upload_enabled"]}),this.events=new InternalPingType({name:x.E1,includeClientId:!0,sendIfEmpty:!1,reasonCodes:["startup","max_capacity"]})}};let R="core.Metrics.Database",B="reserved#",W=`glean.${B}`;let MetricsDatabase=class MetricsDatabase{constructor(){this.userStore=new w._.platform.Storage("userLifetimeMetrics"),this.pingStore=new w._.platform.Storage("pingLifetimeMetrics"),this.appStore=new w._.platform.Storage("appLifetimeMetrics")}record(e,t){this.transform(e,()=>t)}transform(e,t){if(e.disabled)return;let n=this.chooseStore(e.lifetime),i=e.identifier();for(let r of e.sendInPings){let a=e=>t(e).get();n.update([r,e.type,i],a)}}hasMetric(e,t,n,i){let r=this.chooseStore(e).get([t,n,i]);return!(0,I.o8)(r)}countByBaseIdentifier(e,t,n,i){let r=this.chooseStore(e).get([t,n]);return(0,I.o8)(r)?0:Object.keys(r).filter(e=>e.startsWith(i)).length}getMetric(e,t){let n=this.chooseStore(t.lifetime),i=t.identifier(),r=n.get([e,t.type,i]);if((0,I.o8)(r)||(0,L.g)(t.type,r))return r;(0,f.Z)(R,`Unexpected value found for metric ${i}: ${JSON.stringify(r)}. Clearing.`,f.G.Error),n.delete([e,t.type,i])}getPingMetrics(e,t){let n=this.getCorrectedPingData(e,"user"),i=this.getCorrectedPingData(e,"ping"),r=this.getCorrectedPingData(e,"application");t&&Object.keys(i).length>0&&this.clear("ping",e);let a={};for(let e of[n,i,r])for(let t in e)for(let n in e[t])n.startsWith(W)||(n.includes("/")?this.processLabeledMetric(a,t,n,e[t][n]):a[t]={...a[t],[n]:e[t][n]});if(0!==Object.keys(a).length){let e={};for(let t in a){let n=a[t];for(let i in e[t]={},n){let r=(0,L.Lg)(t,n[i]);e[t][i]=r.payload()}}return e}}clear(e,t){this.chooseStore(e).delete(t?[t]:[])}clearAll(){this.userStore.delete([]),this.pingStore.delete([]),this.appStore.delete([])}chooseStore(e){switch(e){case"user":return this.userStore;case"ping":return this.pingStore;case"application":return this.appStore}}getCorrectedPingData(e,t){let n=this.chooseStore(t),i=n.get([e]);if((0,I.o8)(i))return{};if(!(0,I.Kn)(i))return(0,f.Z)(R,`Invalid value found in storage for ping "${e}". Deleting.`,f.G.Debug),n.delete([e]),{};let r={};for(let t in i){let a=i[t];if(!(0,I.Kn)(a)){(0,f.Z)(R,`Unexpected data found in storage for metrics of type "${t}" in ping "${e}". Deleting.`,f.G.Debug),n.delete([e,t]);continue}for(let i in a){if(!(0,L.g)(t,a[i])){(0,f.Z)(R,`Invalid value "${JSON.stringify(a[i])}" found in storage for metric "${i}". Deleting.`,f.G.Debug),n.delete([e,t,i]);continue}r[t]||(r[t]={}),r[t][i]=a[i]}}return r}processLabeledMetric(e,t,n,i){let r=`labeled_${t}`,a=n.split("/",2),s=a[0],o=a[1];if(r in e&&s in e[r]){let t=e[r][s];e[r][s]={...t,[o]:i}}else e[r]={...e[r],[s]:{[o]:i}}}};var j=n(39706),J=n(92949),F=n(66842);let K="core.Metric.EventsDatabase";function q(e,t=w._.startTime){H(e).record({[x.M6]:t.toISOString()},0)}function X(e){(0,I.HD)(e)||(e="");let t=new Date(e);if(isNaN(t.getTime()))throw Error(`Error attempting to generate Date object from string: ${e}`);return t}function Q(e){return new InternalCounterMetricType({...{category:"glean",name:`${B}execution_counter`},sendInPings:e.filter(e=>e!==x.E1),lifetime:"ping",disabled:!1})}function H(e){return new J._({category:"glean",name:"restarted",sendInPings:e.filter(e=>e!==x.E1),lifetime:"ping",disabled:!1},[x.M6])}let EventsDatabase=class EventsDatabase{constructor(){this.initialized=!1,this.eventsStore=new w._.platform.Storage("events")}initialize(){var e;if(this.initialized)return;let t=this.getAvailableStoreNames();if(t.includes(x.E1)){let t=null!=(e=this.eventsStore.get([x.E1]))?e:[];t.length>0&&t.length>=w._.config.maxEvents&&w._.corePings.events.submit("startup")}Q(t).add(1),q(t),this.initialized=!0}record(e,t){if(!e.disabled)for(let n of e.sendInPings){let e=Q([n]),i=w._.metricsDatabase.getMetric(n,e);i||(e.add(1),i=1,q([n],new Date)),t.addExtra(x.ky,i);let r=0,a=e=>{let n=null!=e?e:[];return n.push(t.get()),r=n.length,n};this.eventsStore.update([n],a),n===x.E1&&r>=w._.config.maxEvents&&w._.corePings.events.submit("max_capacity")}}getEvents(e,t){let n=this.getAndValidatePingData(e);if(0!==n.length)return n.filter(e=>e.get().category===t.category&&e.get().name===t.name).map(e=>e.withoutReservedExtras())}getPingEvents(e,t){let n=this.getAndValidatePingData(e);if(t&&Object.keys(n).length>0&&this.eventsStore.delete([e]),0===n.length)return;let i=this.prepareEventsPayload(e,n);if(i.length>0)return i}clearAll(){this.eventsStore.delete([])}getAvailableStoreNames(){let e=this.eventsStore.get([]);return(0,I.o8)(e)?[]:Object.keys(e)}getAndValidatePingData(e){let t=this.eventsStore.get([e]);return(0,I.o8)(t)?[]:Array.isArray(t)?t.reduce((e,t)=>{try{let n=new F.K(t);return[...e,n]}catch(n){return(0,f.Z)(K,`Unexpected data found in events storage: ${JSON.stringify(t)}. Ignoring.`),e}},[]):((0,f.Z)(K,`Unexpected value found for ping ${e}: ${JSON.stringify(t)}. Clearing.`,f.G.Error),this.eventsStore.delete([e]),[])}prepareEventsPayload(e,t){var n,i,r,a;let s,o=t.sort((e,t)=>{var n,i;let r=Number(null==(n=e.get().extra)?void 0:n[x.ky]),a=Number(null==(i=t.get().extra)?void 0:i[x.ky]);return r!==a?r-a:e.get().timestamp-t.get().timestamp});try{s=X(null==(n=o[0].get().extra)?void 0:n[x.M6]),o.shift()}catch(e){s=w._.startTime}let l=(null==(i=o[0])?void 0:i.get().timestamp)||0,c=0;for(let[t,n]of o.entries()){let i;try{let i=X(null==(r=n.get().extra)?void 0:r[x.M6]),a=i.getTime()-s.getTime();s=i;let l=c+a,d=o[t-1].get().timestamp;l<=d?(c=d+1,w._.errorManager.record(H([e]),j.N.InvalidValue,`Invalid time offset between application sessions found for ping "${e}". Ignoring.`)):c=l}catch(e){}i=1===Number((null==(a=n.get().extra)?void 0:a[x.ky])||1)?n.get().timestamp-l:n.get().timestamp+c,o[t]=new F.K({category:n.get().category,name:n.get().name,timestamp:i,extra:n.get().extra})}return(o=function(e){for(var t,n,i;e.length&&(null==(i=null==(n=null==(t=e[e.length-1])?void 0:t.get())?void 0:n.extra)?void 0:i[x.M6]);)e.pop();return e}(o)).map(e=>e.payload())}};var Y=n(14197);function ee(e,t){let n=e.baseIdentifier(),i=(0,Y.ho)(n);return new InternalCounterMetricType({name:(0,Y.lb)(t,i),category:"glean.error",lifetime:"ping",sendInPings:e.sendInPings,disabled:!1})}let ErrorManager=class ErrorManager{record(e,t,n,i=1){let r=ee(e,t);(0,f.Z)(function(e){let t=e.type.charAt(0).toUpperCase()+e.type.slice(1);return`core.metrics.${t}`}(e),[`${e.baseIdentifier()}:`,n]),i>0&&r.add(i)}testGetNumRecordedErrors(e,t,n){return ee(e,t).testGetValue(n)||0}};var et=n(26362);let en="core.Glean";(l=p||(p={})).DebugTag="DebugTag",l.SourceTags="SourceTags",l.LogPings="LogPings";let ei=(e,t)=>{let n=`Glean.${e.toString()}`;try{switch(e){case p.DebugTag:sessionStorage.setItem(n,t);break;case p.LogPings:sessionStorage.setItem(n,t.toString());break;case p.SourceTags:sessionStorage.setItem(n,t.join(","))}}catch(e){console.warn(e)}},er=e=>{try{return sessionStorage.getItem(`Glean.${e.toString()}`)||void 0}catch(e){console.warn(e);return}};!function(e){function t(){w._.uploadEnabled=!0,e.pingUploader.resumeUploads()}function n(e){w._.uploadEnabled=!1,w._.corePings.deletionRequest.submit(e?"at_init":"set_upload_enabled"),i()}function i(){let t;e.pingUploader.clearPendingPingsQueue();try{t=new DatetimeMetric(w._.metricsDatabase.getMetric(x.xW,w._.coreMetrics.firstRunDate)).date}catch(e){t=new Date}w._.eventsDatabase.clearAll(),w._.metricsDatabase.clearAll(),w._.pingsDatabase.clearAll(),w._.uploadEnabled=!0,w._.coreMetrics.clientId.set(x.Ei),w._.coreMetrics.firstRunDate.set(t),w._.uploadEnabled=!1}e.initialize=function(r,a,s){if(w._.initialized)return void(0,f.Z)(en,"Attempted to initialize Glean, but it has already been initialized. Ignoring.",f.G.Warn);if(!(0,I.HD)(r))return void(0,f.Z)(en,"Unable to initialize Glean, applicationId must be a string.",f.G.Error);if(!(0,I.jn)(a))return void(0,f.Z)(en,"Unable to initialize Glean, uploadEnabled must be a boolean.",f.G.Error);if(0===r.length)return void(0,f.Z)(en,"Unable to initialize Glean, applicationId cannot be an empty string.",f.G.Error);if(!w._.platform)return void(0,f.Z)(en,"Unable to initialize Glean, platform has not been set.",f.G.Error);if(w._.coreMetrics=new CoreMetrics,w._.corePings=new CorePings,w._.applicationId=(0,I.hL)(r),w._.config=new Configuration(s),!function(){if("undefined"==typeof window||void 0===window.sessionStorage)return;let t=er(p.LogPings);t&&(e.preInitLogPings=(0,I.pJ)(t));let n=er(p.DebugTag);n&&(e.preInitDebugViewTag=n);let i=er(p.SourceTags);i&&(e.preInitSourceTags=i.split(","))}(),e.preInitLogPings&&(w._.config.logPings=e.preInitLogPings),e.preInitDebugViewTag&&(w._.config.debugViewTag=e.preInitDebugViewTag),e.preInitSourceTags&&(w._.config.sourceTags=e.preInitSourceTags),w._.metricsDatabase=new MetricsDatabase,w._.eventsDatabase=new EventsDatabase,w._.pingsDatabase=new PingsDatabase,w._.errorManager=new ErrorManager,e.pingUploader=new PingUploadManager(w._.config,w._.pingsDatabase),w._.initialized=!0,w._.uploadEnabled=a,w._.eventsDatabase.initialize(),a)w._.metricsDatabase.clear("application"),t(),w._.coreMetrics.initialize(),(null==s?void 0:s.enableAutoPageLoadEvents)&&et.Z.pageLoad(),(null==s?void 0:s.enableAutoElementClickEvents)&&document.addEventListener("click",e=>{et.Z.handleClickEvent(e)});else{let e=w._.metricsDatabase.getMetric(x.xW,w._.coreMetrics.clientId);e?e!==x.Ei&&n(!0):i()}w._.pingsDatabase.scanPendingPings()},e.setUploadEnabled=function(e){return w._.initialized?(0,I.jn)(e)?void(w._.uploadEnabled!==e&&(e?(t(),w._.coreMetrics.initialize()):n(!1))):void(0,f.Z)(en,"Unable to change upload state, new value must be a boolean. Ignoring.",f.G.Error):void(0,f.Z)(en,["Changing upload enabled before Glean is initialized is not supported.\n","Pass the correct state into `initialize`.\n","See documentation at https://mozilla.github.io/glean/book/user/general-api.html#initializing-the-glean-sdk`"],f.G.Error)},e.setExperimentationId=function(e){w._.config.experimentationId=e},e.setLogPings=function(t){w._.initialized?w._.config.logPings=t:e.preInitLogPings=t},e.setDebugViewTag=function(t){w._.initialized?w._.config.debugViewTag=t:e.preInitDebugViewTag=t},e.setSourceTags=function(t){w._.initialized?w._.config.sourceTags=t:e.preInitSourceTags=t},e.setPlatform=function(e){w._.initialized||(w._.isPlatformSet()&&w._.platform.name!==e.name&&!w._.testing&&(0,f.Z)(en,[`IMPOSSIBLE: Attempted to change Glean's targeted platform",
2
2
  "from "${w._.platform.name}" to "${e.name}". Ignoring.`],f.G.Error),w._.platform=e)}}(h||(h={}));let ea=!1;try{ea="undefined"!=typeof window&&void 0!==window.sessionStorage}catch(e){console.error("No session storage available",e)}ea&&(window.Glean={setLogPings:e=>{ei(p.LogPings,e),h.setLogPings(e),console.log("Pings will be logged to the console until this tab is closed.")},setDebugViewTag:e=>{ei(p.DebugTag,e),h.setDebugViewTag(e),console.log("Pings will be sent to the Debug Ping Viewer until this tab is closed. Pings can be found here: https://debug-ping-preview.firebaseapp.com/.")},setSourceTags:e=>{ei(p.SourceTags,e),h.setSourceTags(e),console.log("Pings will be given the specified tags until the tab is closed.")},debugSession:()=>{let e=w._.metricsDatabase.getMetric(x.xW,w._.coreMetrics.sessionId);e&&"string"==typeof e&&w._.config.debugViewTag?window.open(`https://debug-ping-preview.firebaseapp.com/stream/${w._.config.debugViewTag}#${e}`,"_blank"):console.info("You must set a debug tag via `window.Glean.setDebugViewTag` before debugging your session.")}});let es=h,eo=(i={Storage:WebStore,uploader:S,info:{os(){let e;return(e=navigator&&navigator.userAgent?navigator.userAgent:"Unknown").includes("Windows")?"Windows":/tvOS/i.test(e)?"TvOS":/Watch( OS)?/i.test(e)?"WatchOS":/iPhone|iPad|iOS/i.test(e)?"iOS":/Mac OS X|macOS/i.test(e)?"Darwin":/Android/i.test(e)?"Android":/CrOS/i.test(e)?"ChromeOS":/WebOS/i.test(e)?"WebOS":/Linux/i.test(e)?"Linux":/OpenBSD/i.test(e)?"OpenBSD":/FreeBSD/i.test(e)?"FreeBSD":/NetBSD/i.test(e)?"NetBSD":/SunOS/i.test(e)?"SunOS":/AIX/i.test(e)?"IBM_AIX":"Unknown"},osVersion:()=>"Unknown",arch:()=>"Unknown",locale:()=>navigator&&navigator.language?navigator.language:"und"},timer:{setTimeout,clearTimeout},name:"web"},{initialize(e,t,n){es.setPlatform(i),es.initialize(e,t,n)},setUploadEnabled(e){es.setUploadEnabled(e)},setLogPings(e){es.setLogPings(e)},setDebugViewTag(e){es.setDebugViewTag(e)},setSourceTags(e){es.setSourceTags(e)}})}};
3
- //# sourceMappingURL=7326.b1ad5a6bece08bb2.js.map
3
+ //# sourceMappingURL=7326.9d0d137e939223ba.js.map