govuk_publishing_components 17.21.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (476) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +1 -1
  4. data/app/assets/javascripts/govuk_publishing_components/components/character-count.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/error-summary.js +1 -1
  7. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  8. data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +1 -1
  9. data/app/assets/stylesheets/component_guide/application.scss +5 -7
  10. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +5 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -15
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +28 -9
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +1 -13
  25. data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
  27. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
  28. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +3 -3
  29. data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
  30. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +18 -7
  31. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
  32. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
  33. data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
  34. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
  35. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -1
  36. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +6 -6
  37. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +8 -3
  38. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
  39. data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
  40. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +6 -3
  41. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
  42. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
  43. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +10 -3
  44. data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
  45. data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
  46. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +3 -3
  47. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +17 -1
  48. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
  49. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +8 -6
  50. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
  51. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
  52. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +5 -5
  53. data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
  54. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_advisory.scss +1 -1
  55. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +2 -2
  56. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  57. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +2 -2
  58. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +2 -2
  59. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
  60. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +2 -2
  61. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +2 -2
  62. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +2 -2
  63. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_highlight-answer.scss +2 -2
  64. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +2 -2
  65. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
  66. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
  67. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
  68. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
  69. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
  70. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
  71. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
  72. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
  73. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +0 -4
  74. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +4 -1
  75. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +1 -1
  76. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +1 -1
  77. data/app/views/govuk_publishing_components/component_guide/index.html.erb +14 -12
  78. data/app/views/govuk_publishing_components/components/_accordion.html.erb +1 -1
  79. data/app/views/govuk_publishing_components/components/_button.html.erb +16 -2
  80. data/app/views/govuk_publishing_components/components/_character_count.html.erb +1 -1
  81. data/app/views/govuk_publishing_components/components/_checkboxes.html.erb +1 -1
  82. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +5 -1
  83. data/app/views/govuk_publishing_components/components/_details.html.erb +3 -1
  84. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +1 -1
  85. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +2 -2
  86. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
  87. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +2 -2
  88. data/app/views/govuk_publishing_components/components/_tabs.html.erb +1 -1
  89. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  90. data/app/views/govuk_publishing_components/components/_title.html.erb +1 -1
  91. data/app/views/govuk_publishing_components/components/docs/button.yml +1 -1
  92. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +12 -0
  93. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  94. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -1
  95. data/app/views/govuk_publishing_components/components/docs/label.yml +4 -1
  96. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -0
  97. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +2 -2
  98. data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +2 -2
  99. data/config/initializers/assets.rb +3 -3
  100. data/config/locales/en.yml +0 -2
  101. data/lib/govuk_publishing_components/version.rb +1 -1
  102. data/node_modules/govuk-frontend/README.md +4 -9
  103. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +4 -5
  104. data/node_modules/govuk-frontend/{all-ie8.scss → govuk/all-ie8.scss} +0 -0
  105. data/node_modules/govuk-frontend/{all.js → govuk/all.js} +116 -63
  106. data/node_modules/govuk-frontend/{all.scss → govuk/all.scss} +0 -0
  107. data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
  108. data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  109. data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  110. data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  111. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/favicon.ico +0 -0
  112. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-152x152.png +0 -0
  113. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-167x167.png +0 -0
  114. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon-180x180.png +0 -0
  115. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-apple-touch-icon.png +0 -0
  116. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest-2x.png +0 -0
  117. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-crest.png +0 -0
  118. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-logotype-crown.png +0 -0
  119. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-mask-icon.svg +0 -0
  120. data/node_modules/govuk-frontend/{assets → govuk/assets}/images/govuk-opengraph-image.png +0 -0
  121. data/node_modules/govuk-frontend/{common.js → govuk/common.js} +0 -0
  122. data/node_modules/govuk-frontend/{components → govuk/components}/_all.scss +0 -0
  123. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/README.md +0 -0
  124. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/_accordion.scss +48 -28
  125. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/accordion.js +0 -0
  126. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro-options.json +8 -2
  127. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/macro.njk +0 -0
  128. data/node_modules/govuk-frontend/{components → govuk/components}/accordion/template.njk +1 -3
  129. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/README.md +0 -0
  130. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/_back-link.scss +17 -9
  131. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro-options.json +0 -0
  132. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/macro.njk +0 -0
  133. data/node_modules/govuk-frontend/{components → govuk/components}/back-link/template.njk +0 -0
  134. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/README.md +0 -0
  135. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/_breadcrumbs.scss +10 -11
  136. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro-options.json +0 -0
  137. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/macro.njk +0 -0
  138. data/node_modules/govuk-frontend/{components → govuk/components}/breadcrumbs/template.njk +0 -0
  139. data/node_modules/govuk-frontend/{components → govuk/components}/button/README.md +0 -0
  140. data/node_modules/govuk-frontend/{components → govuk/components}/button/_button.scss +76 -46
  141. data/node_modules/govuk-frontend/{components → govuk/components}/button/button.js +168 -17
  142. data/node_modules/govuk-frontend/{components → govuk/components}/button/macro-options.json +0 -0
  143. data/node_modules/govuk-frontend/{components → govuk/components}/button/macro.njk +0 -0
  144. data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
  145. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/README.md +0 -0
  146. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/_character-count.scss +0 -0
  147. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/character-count.js +5 -1
  148. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro-options.json +0 -0
  149. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/macro.njk +0 -0
  150. data/node_modules/govuk-frontend/{components → govuk/components}/character-count/template.njk +2 -2
  151. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/README.md +0 -0
  152. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/_checkboxes.scss +4 -6
  153. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/checkboxes.js +0 -0
  154. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro-options.json +6 -0
  155. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/macro.njk +0 -0
  156. data/node_modules/govuk-frontend/{components → govuk/components}/checkboxes/template.njk +18 -5
  157. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/README.md +0 -0
  158. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/_date-input.scss +0 -0
  159. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro-options.json +0 -0
  160. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/macro.njk +0 -0
  161. data/node_modules/govuk-frontend/{components → govuk/components}/date-input/template.njk +1 -1
  162. data/node_modules/govuk-frontend/{components → govuk/components}/details/README.md +0 -0
  163. data/node_modules/govuk-frontend/{components → govuk/components}/details/_details.scss +12 -13
  164. data/node_modules/govuk-frontend/{components → govuk/components}/details/details.js +3 -4
  165. data/node_modules/govuk-frontend/{components → govuk/components}/details/implementation.md +0 -0
  166. data/node_modules/govuk-frontend/{components → govuk/components}/details/macro-options.json +0 -0
  167. data/node_modules/govuk-frontend/{components → govuk/components}/details/macro.njk +0 -0
  168. data/node_modules/govuk-frontend/{components → govuk/components}/details/template.njk +1 -1
  169. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/README.md +0 -0
  170. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/_error-message.scss +0 -0
  171. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro-options.json +0 -0
  172. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/macro.njk +0 -0
  173. data/node_modules/govuk-frontend/{components → govuk/components}/error-message/template.njk +0 -0
  174. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/README.md +0 -0
  175. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/_error-summary.scss +4 -17
  176. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/error-summary.js +0 -10
  177. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro-options.json +0 -0
  178. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/macro.njk +0 -0
  179. data/node_modules/govuk-frontend/{components → govuk/components}/error-summary/template.njk +1 -1
  180. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/README.md +0 -0
  181. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/_fieldset.scss +0 -0
  182. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro-options.json +1 -1
  183. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/macro.njk +0 -0
  184. data/node_modules/govuk-frontend/{components → govuk/components}/fieldset/template.njk +0 -0
  185. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/README.md +0 -0
  186. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +81 -0
  187. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro-options.json +6 -0
  188. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/macro.njk +0 -0
  189. data/node_modules/govuk-frontend/{components → govuk/components}/file-upload/template.njk +1 -1
  190. data/node_modules/govuk-frontend/{components → govuk/components}/footer/README.md +0 -0
  191. data/node_modules/govuk-frontend/{components → govuk/components}/footer/_footer.scss +47 -16
  192. data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro-options.json +5 -0
  193. data/node_modules/govuk-frontend/{components → govuk/components}/footer/macro.njk +0 -0
  194. data/node_modules/govuk-frontend/{components → govuk/components}/footer/template.njk +1 -1
  195. data/node_modules/govuk-frontend/{components → govuk/components}/header/README.md +0 -0
  196. data/node_modules/govuk-frontend/{components → govuk/components}/header/_header.scss +34 -21
  197. data/node_modules/govuk-frontend/{components → govuk/components}/header/header.js +1 -1
  198. data/node_modules/govuk-frontend/{components → govuk/components}/header/macro-options.json +2 -2
  199. data/node_modules/govuk-frontend/{components → govuk/components}/header/macro.njk +0 -0
  200. data/node_modules/govuk-frontend/{components → govuk/components}/header/template.njk +6 -9
  201. data/node_modules/govuk-frontend/{components → govuk/components}/hint/README.md +0 -0
  202. data/node_modules/govuk-frontend/{components → govuk/components}/hint/_hint.scss +0 -0
  203. data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro-options.json +0 -0
  204. data/node_modules/govuk-frontend/{components → govuk/components}/hint/macro.njk +0 -0
  205. data/node_modules/govuk-frontend/{components → govuk/components}/hint/template.njk +0 -0
  206. data/node_modules/govuk-frontend/{components → govuk/components}/input/README.md +0 -0
  207. data/node_modules/govuk-frontend/{components → govuk/components}/input/_input.scss +24 -1
  208. data/node_modules/govuk-frontend/{components → govuk/components}/input/macro-options.json +6 -0
  209. data/node_modules/govuk-frontend/{components → govuk/components}/input/macro.njk +0 -0
  210. data/node_modules/govuk-frontend/{components → govuk/components}/input/template.njk +1 -1
  211. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/README.md +0 -0
  212. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/_inset-text.scss +0 -0
  213. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro-options.json +0 -0
  214. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/macro.njk +0 -0
  215. data/node_modules/govuk-frontend/{components → govuk/components}/inset-text/template.njk +0 -0
  216. data/node_modules/govuk-frontend/{components → govuk/components}/label/README.md +0 -0
  217. data/node_modules/govuk-frontend/{components → govuk/components}/label/_label.scss +0 -0
  218. data/node_modules/govuk-frontend/{components → govuk/components}/label/macro-options.json +0 -0
  219. data/node_modules/govuk-frontend/{components → govuk/components}/label/macro.njk +0 -0
  220. data/node_modules/govuk-frontend/{components → govuk/components}/label/template.njk +0 -0
  221. data/node_modules/govuk-frontend/{components → govuk/components}/panel/README.md +0 -0
  222. data/node_modules/govuk-frontend/{components → govuk/components}/panel/_panel.scss +1 -1
  223. data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro-options.json +0 -0
  224. data/node_modules/govuk-frontend/{components → govuk/components}/panel/macro.njk +0 -0
  225. data/node_modules/govuk-frontend/{components → govuk/components}/panel/template.njk +0 -0
  226. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/README.md +0 -0
  227. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/_phase-banner.scss +0 -0
  228. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro-options.json +0 -0
  229. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/macro.njk +0 -0
  230. data/node_modules/govuk-frontend/{components → govuk/components}/phase-banner/template.njk +5 -7
  231. data/node_modules/govuk-frontend/{components → govuk/components}/radios/README.md +0 -0
  232. data/node_modules/govuk-frontend/{components → govuk/components}/radios/_radios.scss +7 -9
  233. data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro-options.json +0 -0
  234. data/node_modules/govuk-frontend/{components → govuk/components}/radios/macro.njk +0 -0
  235. data/node_modules/govuk-frontend/{components → govuk/components}/radios/radios.js +24 -11
  236. data/node_modules/govuk-frontend/{components → govuk/components}/radios/template.njk +15 -5
  237. data/node_modules/govuk-frontend/{components → govuk/components}/select/README.md +0 -0
  238. data/node_modules/govuk-frontend/{components → govuk/components}/select/_select.scss +23 -1
  239. data/node_modules/govuk-frontend/{components → govuk/components}/select/macro-options.json +6 -0
  240. data/node_modules/govuk-frontend/{components → govuk/components}/select/macro.njk +0 -0
  241. data/node_modules/govuk-frontend/{components → govuk/components}/select/template.njk +1 -1
  242. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/README.md +0 -0
  243. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/_skip-link.scss +6 -1
  244. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro-options.json +0 -0
  245. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/macro.njk +0 -0
  246. data/node_modules/govuk-frontend/{components → govuk/components}/skip-link/template.njk +0 -0
  247. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/README.md +0 -0
  248. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/_summary-list.scss +0 -0
  249. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro-options.json +7 -1
  250. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/macro.njk +0 -0
  251. data/node_modules/govuk-frontend/{components → govuk/components}/summary-list/template.njk +1 -1
  252. data/node_modules/govuk-frontend/{components → govuk/components}/table/README.md +0 -0
  253. data/node_modules/govuk-frontend/{components → govuk/components}/table/_table.scss +1 -0
  254. data/node_modules/govuk-frontend/{components → govuk/components}/table/macro-options.json +0 -0
  255. data/node_modules/govuk-frontend/{components → govuk/components}/table/macro.njk +0 -0
  256. data/node_modules/govuk-frontend/{components → govuk/components}/table/template.njk +14 -14
  257. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/README.md +0 -0
  258. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +142 -0
  259. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro-options.json +0 -0
  260. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/macro.njk +0 -0
  261. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/tabs.js +59 -5
  262. data/node_modules/govuk-frontend/{components → govuk/components}/tabs/template.njk +4 -6
  263. data/node_modules/govuk-frontend/{components → govuk/components}/tag/README.md +0 -0
  264. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +44 -0
  265. data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro-options.json +0 -0
  266. data/node_modules/govuk-frontend/{components → govuk/components}/tag/macro.njk +0 -0
  267. data/node_modules/govuk-frontend/{components → govuk/components}/tag/template.njk +0 -0
  268. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/README.md +0 -0
  269. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +55 -0
  270. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro-options.json +6 -0
  271. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/macro.njk +0 -0
  272. data/node_modules/govuk-frontend/{components → govuk/components}/textarea/template.njk +1 -1
  273. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/README.md +0 -0
  274. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/_warning-text.scss +0 -0
  275. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro-options.json +0 -0
  276. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/macro.njk +0 -0
  277. data/node_modules/govuk-frontend/{components → govuk/components}/warning-text/template.njk +0 -0
  278. data/node_modules/govuk-frontend/{core → govuk/core}/_all.scss +0 -0
  279. data/node_modules/govuk-frontend/{core → govuk/core}/_global-styles.scss +0 -0
  280. data/node_modules/govuk-frontend/{core → govuk/core}/_links.scss +0 -0
  281. data/node_modules/govuk-frontend/{core → govuk/core}/_lists.scss +0 -0
  282. data/node_modules/govuk-frontend/{core → govuk/core}/_section-break.scss +0 -0
  283. data/node_modules/govuk-frontend/{core → govuk/core}/_template.scss +0 -0
  284. data/node_modules/govuk-frontend/{core → govuk/core}/_typography.scss +0 -0
  285. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_all.scss +1 -1
  286. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_clearfix.scss +0 -0
  287. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_colour.scss +23 -1
  288. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_device-pixels.scss +0 -0
  289. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
  290. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  291. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +60 -0
  292. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_links.scss +15 -1
  293. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_media-queries.scss +0 -0
  294. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_shape-arrow.scss +0 -0
  295. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_spacing.scss +0 -0
  296. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_typography.scss +23 -5
  297. data/node_modules/govuk-frontend/{helpers → govuk/helpers}/_visually-hidden.scss +4 -2
  298. data/node_modules/govuk-frontend/{objects → govuk/objects}/_all.scss +0 -0
  299. data/node_modules/govuk-frontend/{objects → govuk/objects}/_form-group.scss +0 -0
  300. data/node_modules/govuk-frontend/{objects → govuk/objects}/_grid.scss +2 -2
  301. data/node_modules/govuk-frontend/{objects → govuk/objects}/_main-wrapper.scss +15 -1
  302. data/node_modules/govuk-frontend/{objects → govuk/objects}/_width-container.scss +0 -0
  303. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_all.scss +0 -0
  304. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_display.scss +0 -0
  305. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_spacing.scss +0 -0
  306. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_typography.scss +0 -0
  307. data/node_modules/govuk-frontend/{overrides → govuk/overrides}/_width.scss +0 -0
  308. data/node_modules/govuk-frontend/{settings → govuk/settings}/_all.scss +0 -0
  309. data/node_modules/govuk-frontend/{settings → govuk/settings}/_assets.scss +0 -0
  310. data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-applied.scss +9 -8
  311. data/node_modules/govuk-frontend/{settings → govuk/settings}/_colours-organisations.scss +1 -1
  312. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +101 -0
  313. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +75 -0
  314. data/node_modules/govuk-frontend/{settings → govuk/settings}/_global-styles.scss +0 -0
  315. data/node_modules/govuk-frontend/{settings → govuk/settings}/_ie8.scss +0 -0
  316. data/node_modules/govuk-frontend/{settings → govuk/settings}/_measurements.scss +2 -2
  317. data/node_modules/govuk-frontend/{settings → govuk/settings}/_media-queries.scss +0 -0
  318. data/node_modules/govuk-frontend/{settings → govuk/settings}/_spacing.scss +0 -0
  319. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font-families.scss +11 -1
  320. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-font.scss +27 -7
  321. data/node_modules/govuk-frontend/{settings → govuk/settings}/_typography-responsive.scss +9 -10
  322. data/node_modules/govuk-frontend/{template.njk → govuk/template.njk} +0 -0
  323. data/node_modules/govuk-frontend/{tools → govuk/tools}/_all.scss +0 -0
  324. data/node_modules/govuk-frontend/{tools → govuk/tools}/_compatibility.scss +0 -0
  325. data/node_modules/govuk-frontend/{tools → govuk/tools}/_exports.scss +0 -0
  326. data/node_modules/govuk-frontend/{tools → govuk/tools}/_font-url.scss +0 -0
  327. data/node_modules/govuk-frontend/{tools → govuk/tools}/_ie8.scss +0 -0
  328. data/node_modules/govuk-frontend/{tools → govuk/tools}/_iff.scss +0 -0
  329. data/node_modules/govuk-frontend/{tools → govuk/tools}/_image-url.scss +0 -0
  330. data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-em.scss +0 -0
  331. data/node_modules/govuk-frontend/{tools → govuk/tools}/_px-to-rem.scss +0 -0
  332. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_all.scss +0 -0
  333. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_clearfix.scss +0 -0
  334. data/node_modules/govuk-frontend/{utilities → govuk/utilities}/_visually-hidden.scss +0 -0
  335. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/_sass-mq.scss +0 -0
  336. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/DOMTokenList.js +0 -0
  337. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Document.js +0 -0
  338. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element.js +0 -0
  339. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/classList.js +0 -0
  340. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/closest.js +0 -0
  341. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Element/prototype/matches.js +0 -0
  342. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +259 -0
  343. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +257 -0
  344. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Event.js +0 -0
  345. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Function/prototype/bind.js +0 -0
  346. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Object/defineProperty.js +0 -0
  347. data/node_modules/govuk-frontend/{vendor → govuk/vendor}/polyfills/Window.js +0 -0
  348. data/node_modules/govuk-frontend/package.json +21 -21
  349. data/node_modules/react-is/README.md +2 -12
  350. data/node_modules/react-is/build-info.json +5 -5
  351. data/node_modules/react-is/cjs/react-is.development.js +7 -2
  352. data/node_modules/react-is/cjs/react-is.production.min.js +6 -6
  353. data/node_modules/react-is/package.json +13 -13
  354. data/node_modules/react-is/umd/react-is.development.js +7 -2
  355. data/node_modules/react-is/umd/react-is.production.min.js +5 -5
  356. data/node_modules/type/CHANGELOG.md +62 -50
  357. data/node_modules/type/LICENSE +15 -0
  358. data/node_modules/type/README.md +19 -19
  359. data/node_modules/type/error/is.js +28 -7
  360. data/node_modules/type/package.json +36 -22
  361. data/node_modules/type/test/error/is.js +13 -5
  362. metadata +247 -344
  363. data/app/assets/javascripts/govuk_publishing_components/components/accessible-autocomplete.js +0 -79
  364. data/app/assets/stylesheets/govuk_publishing_components/components/_accessible-autocomplete.scss +0 -41
  365. data/app/views/govuk_publishing_components/components/_accessible_autocomplete.html.erb +0 -35
  366. data/app/views/govuk_publishing_components/components/docs/accessible_autocomplete.yml +0 -49
  367. data/node_modules/accessible-autocomplete/CHANGELOG.md +0 -269
  368. data/node_modules/accessible-autocomplete/CONTRIBUTING.md +0 -150
  369. data/node_modules/accessible-autocomplete/LICENSE.txt +0 -20
  370. data/node_modules/accessible-autocomplete/Procfile +0 -1
  371. data/node_modules/accessible-autocomplete/README.md +0 -416
  372. data/node_modules/accessible-autocomplete/accessibility-criteria.md +0 -42
  373. data/node_modules/accessible-autocomplete/app.json +0 -15
  374. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.css +0 -1
  375. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +0 -2
  376. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +0 -1
  377. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +0 -2
  378. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +0 -1
  379. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +0 -2
  380. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +0 -1
  381. data/node_modules/accessible-autocomplete/examples/form.html +0 -671
  382. data/node_modules/accessible-autocomplete/examples/index.html +0 -665
  383. data/node_modules/accessible-autocomplete/examples/multiselect.html +0 -134
  384. data/node_modules/accessible-autocomplete/examples/preact/index.html +0 -346
  385. data/node_modules/accessible-autocomplete/examples/react/index.html +0 -347
  386. data/node_modules/accessible-autocomplete/package-lock.json +0 -14491
  387. data/node_modules/accessible-autocomplete/package.json +0 -173
  388. data/node_modules/accessible-autocomplete/preact.js +0 -1
  389. data/node_modules/accessible-autocomplete/react.js +0 -1
  390. data/node_modules/accessible-autocomplete/scripts/check-staged.js +0 -14
  391. data/node_modules/accessible-autocomplete/src/autocomplete.css +0 -192
  392. data/node_modules/accessible-autocomplete/src/autocomplete.js +0 -618
  393. data/node_modules/accessible-autocomplete/src/dropdown-arrow-down.js +0 -11
  394. data/node_modules/accessible-autocomplete/src/status.js +0 -80
  395. data/node_modules/accessible-autocomplete/src/wrapper.js +0 -76
  396. data/node_modules/accessible-autocomplete/test/functional/dropdown-arrow-down.js +0 -44
  397. data/node_modules/accessible-autocomplete/test/functional/index.js +0 -485
  398. data/node_modules/accessible-autocomplete/test/functional/wrapper.js +0 -318
  399. data/node_modules/accessible-autocomplete/test/integration/index.js +0 -188
  400. data/node_modules/accessible-autocomplete/test/karma.config.js +0 -42
  401. data/node_modules/accessible-autocomplete/test/wdio.config.js +0 -80
  402. data/node_modules/accessible-autocomplete/webpack.config.babel.js +0 -193
  403. data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
  404. data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
  405. data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
  406. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
  407. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
  408. data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
  409. data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
  410. data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
  411. data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
  412. data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
  413. data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
  414. data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
  415. data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
  416. data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
  417. data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
  418. data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
  419. data/node_modules/govuk-frontend/components/button/template.njk +0 -35
  420. data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +0 -19
  421. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +0 -130
  422. data/node_modules/govuk-frontend/components/tag/_tag.scss +0 -33
  423. data/node_modules/govuk-frontend/components/textarea/_textarea.scss +0 -32
  424. data/node_modules/govuk-frontend/helpers/_focusable.scss +0 -34
  425. data/node_modules/govuk-frontend/helpers/_font-faces.scss +0 -67
  426. data/node_modules/govuk-frontend/helpers/_grid.scss +0 -107
  427. data/node_modules/govuk-frontend/settings/_colours-palette.scss +0 -37
  428. data/node_modules/govuk-frontend/settings/_compatibility.scss +0 -51
  429. data/node_modules/preact/LICENSE +0 -21
  430. data/node_modules/preact/README.md +0 -592
  431. data/node_modules/preact/debug.js +0 -740
  432. data/node_modules/preact/debug.js.map +0 -1
  433. data/node_modules/preact/debug/dist/debug.js +0 -2
  434. data/node_modules/preact/debug/dist/debug.js.map +0 -1
  435. data/node_modules/preact/debug/dist/debug.mjs +0 -681
  436. data/node_modules/preact/debug/dist/debug.mjs.map +0 -1
  437. data/node_modules/preact/debug/dist/debug.module.js +0 -2
  438. data/node_modules/preact/debug/dist/debug.module.js.map +0 -1
  439. data/node_modules/preact/debug/dist/debug.umd.js +0 -2
  440. data/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
  441. data/node_modules/preact/debug/index.js +0 -122
  442. data/node_modules/preact/devtools.js +0 -403
  443. data/node_modules/preact/devtools.js.map +0 -1
  444. data/node_modules/preact/devtools/devtools.js +0 -395
  445. data/node_modules/preact/devtools/index.js +0 -4
  446. data/node_modules/preact/dist/preact.d.ts +0 -1712
  447. data/node_modules/preact/dist/preact.dev.js +0 -727
  448. data/node_modules/preact/dist/preact.dev.js.map +0 -1
  449. data/node_modules/preact/dist/preact.js +0 -414
  450. data/node_modules/preact/dist/preact.js.flow +0 -25
  451. data/node_modules/preact/dist/preact.js.map +0 -1
  452. data/node_modules/preact/dist/preact.min.js +0 -2
  453. data/node_modules/preact/dist/preact.min.js.map +0 -1
  454. data/node_modules/preact/dist/preact.mjs +0 -724
  455. data/node_modules/preact/dist/preact.mjs.map +0 -1
  456. data/node_modules/preact/dist/preact.umd.js +0 -751
  457. data/node_modules/preact/dist/preact.umd.js.map +0 -1
  458. data/node_modules/preact/package.json +0 -226
  459. data/node_modules/preact/src/clone-element.js +0 -18
  460. data/node_modules/preact/src/component.js +0 -90
  461. data/node_modules/preact/src/constants.js +0 -17
  462. data/node_modules/preact/src/dom/index.js +0 -139
  463. data/node_modules/preact/src/h.js +0 -86
  464. data/node_modules/preact/src/options.js +0 -22
  465. data/node_modules/preact/src/preact.d.ts +0 -1712
  466. data/node_modules/preact/src/preact.js +0 -32
  467. data/node_modules/preact/src/preact.js.flow +0 -25
  468. data/node_modules/preact/src/render-queue.js +0 -27
  469. data/node_modules/preact/src/render.js +0 -22
  470. data/node_modules/preact/src/util.js +0 -30
  471. data/node_modules/preact/src/vdom/component-recycler.js +0 -48
  472. data/node_modules/preact/src/vdom/component.js +0 -296
  473. data/node_modules/preact/src/vdom/diff.js +0 -337
  474. data/node_modules/preact/src/vdom/index.js +0 -54
  475. data/node_modules/preact/src/vnode.js +0 -9
  476. data/node_modules/preact/typings.json +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.mjs","sources":["../src/devtools/custom.js","../src/debug.js","../src/devtools/renderer.js","../src/devtools/index.js","../src/index.js"],"sourcesContent":["import { Fragment } from 'preact';\n\n/**\n * Get the type/category of a vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').NodeType}\n */\nexport function getNodeType(vnode) {\n\tif (vnode.type===Fragment) return 'Wrapper';\n\telse if (typeof vnode.type==='function') return 'Composite';\n\telse if (typeof vnode.type==='string') return 'Native';\n\treturn 'Text';\n}\n\n/**\n * Get human readable name of the component/dom element\n * @param {import('../internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type===Fragment) return 'Fragment';\n\telse if (typeof vnode.type==='function') return vnode.type.displayName || vnode.type.name;\n\telse if (typeof vnode.type==='string') return vnode.type;\n\treturn '#text';\n}\n\n/**\n * Deeply mutate a property by walking down an array of property keys\n * @param {object} obj\n * @param {Array<string | number>} path\n * @param {any} value\n */\nexport function setIn(obj, path, value) {\n\tlet last = path.pop();\n\tlet parent = path.reduce((acc, attr) => acc ? acc[attr] : null, obj);\n\tif (parent) {\n\t\tparent[last] = value;\n\t}\n}\n\n/**\n * Get devtools compatible data from vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').DevtoolData}\n */\nexport function getData(vnode) {\n\tlet c = vnode._component;\n\n\t/** @type {import('../internal').DevtoolsUpdater | null} */\n\tlet updater = null;\n\n\tif (c!=null) {\n\t\t// These functions will be called when the user changes state, props or\n\t\t// context values via the devtools ui panel\n\t\tupdater = {\n\t\t\tsetState: c.setState.bind(c),\n\t\t\tforceUpdate: c.forceUpdate.bind(c),\n\t\t\tsetInState(path, value) {\n\t\t\t\tc.setState(prev => {\n\t\t\t\t\tsetIn(prev, path, value);\n\t\t\t\t\treturn prev;\n\t\t\t\t});\n\t\t\t},\n\t\t\tsetInProps(path, value) {\n\t\t\t\tsetIn(vnode.props, path, value);\n\t\t\t\tc.setState({});\n\t\t\t},\n\t\t\tsetInContext(path, value) {\n\t\t\t\tsetIn(c.context, path, value);\n\t\t\t\tc.setState({});\n\t\t\t}\n\t\t};\n\t}\n\n\tlet children = getChildren(vnode);\n\n\tlet duration = vnode.endTime - vnode.startTime;\n\treturn {\n\t\tnodeType: getNodeType(vnode),\n\t\ttype: vnode.type,\n\t\tname: getDisplayName(vnode),\n\t\tref: vnode.ref || null,\n\t\tkey: vnode.key || null,\n\t\tupdater,\n\t\ttext: vnode.text,\n\t\tstate: c!=null ? c.state : null,\n\t\tprops: vnode.props,\n\t\t// The devtools inline text children if they are the only child\n\t\tchildren: vnode.text==null\n\t\t\t? children!=null && children.length==1 && children[0].text!=null\n\t\t\t\t? children[0].text\n\t\t\t\t: children\n\t\t\t: null,\n\t\tpublicInstance: getInstance(vnode),\n\t\tmemoizedInteractions: [],\n\n\t\t// Profiler data\n\t\tactualDuration: duration,\n\t\tactualStartTime: vnode.startTime,\n\t\ttreeBaseDuration: duration\n\t};\n}\n\n/**\n * Get all rendered vnode children as an array. Moreover we need to filter\n * out `null` or other falsy children.\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').VNode[]}\n */\nexport function getChildren(vnode) {\n\tlet c = vnode._component;\n\n\tif (c==null) {\n\t\treturn vnode._children!=null ? vnode._children.filter(Boolean) : [];\n\t}\n\n\treturn !Array.isArray(c._prevVNode) && c._prevVNode!=null\n\t\t? [c._prevVNode]\n\t\t: null;\n}\n\n/**\n * Check if a vnode is a root node\n * @param {import('../internal').VNode} vnode\n * @returns {boolean}\n */\nexport function isRoot(vnode) {\n\t// Timings of root vnodes will never be set\n\treturn vnode.type===Fragment && vnode.endTime==-1;\n}\n\n/**\n * Cache a vnode by its instance and retrieve previous vnodes by the next\n * instance.\n *\n * We need this to be able to identify the previous vnode of a given instance.\n * For components we want to check if we already rendered it and use the class\n * instance as key. For html elements we use the dom node as key.\n *\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').Component | import('../internal').PreactElement | Text | null}\n */\nexport function getInstance(vnode) {\n\t// Use the parent element as instance for root nodes\n\tif (isRoot(vnode)) {\n\t\t// Edge case: When the tree only consists of components that have not rendered\n\t\t// anything into the DOM we revert to using the vnode as instance.\n\t\treturn vnode._children.length > 0 && vnode._children[0]._dom!=null\n\t\t\t? /** @type {import('../internal').PreactElement | null} */\n\t\t\t(vnode._children[0]._dom.parentNode)\n\t\t\t: vnode;\n\t}\n\tif (vnode._component!=null) return vnode._component;\n\tif (vnode.type===Fragment) return vnode.props;\n\treturn vnode._dom;\n}\n\n/**\n * Compare two objects\n * @param {object} a\n * @param {object} b\n * @param {boolean} [isProps]\n * @returns {boolean}\n */\nexport function shallowEqual(a, b, isProps) {\n\tif (a==null || b==null) return false;\n\n\tfor (let key in a) {\n\t\tif (isProps && key=='children' && b[key]!=null) continue;\n\t\tif (a[key]!==b[key]) return false;\n\t}\n\n\tif (Object.keys(a).length!==Object.keys(b).length) return false;\n\treturn true;\n}\n\n/**\n * Check if a vnode was actually updated\n * @param {import('../internal').VNode} next\n * @param {import('../internal').VNode} prev\n * @returns {boolean}\n */\nexport function hasDataChanged(prev, next) {\n\treturn (prev.props !== next.props && !shallowEqual(prev.props, next.props, true))\n\t\t|| (prev._component!=null &&\n\t\t\t!shallowEqual(next._component._prevState, next._component.state))\n\t\t|| prev._dom !== next._dom\n\t\t|| prev.ref !== next.ref;\n}\n\n/**\n * Check if a the profiling data ahs changed between vnodes\n * @param {import('../internal').VNode} next\n * @param {import('../internal').VNode} prev\n * @returns {boolean}\n */\nexport function hasProfileDataChanged(prev, next) {\n\treturn prev.startTime!==next.startTime || prev.endTime!==next.endTime;\n}\n","import { checkPropTypes } from 'prop-types';\nimport { getDisplayName } from './devtools/custom';\nimport { options, toChildArray } from 'preact';\n\nexport function initDebug() {\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options.diff;\n\n\toptions.diff = vnode => {\n\t\tlet { type, props } = vnode;\n\t\tlet children = props && props.children;\n\n\t\tif (type===undefined) {\n\t\t\tthrow new Error('Undefined component passed to createElement()\\n'+serializeVNode(vnode));\n\t\t}\n\n\t\tif (\n\t\t\tvnode.ref!==undefined &&\n\t\t\ttypeof vnode.ref!=='function' &&\n\t\t\ttypeof vnode.ref!=='object' &&\n\t\t\t!('$$typeof' in vnode) // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t`by createRef(), but got [${typeof vnode.ref}] instead\\n` +\n\t\t\t\tserializeVNode(vnode)\n\t\t\t);\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof vnode.type==='function' && vnode.type.propTypes) {\n\t\t\tcheckPropTypes(vnode.type.propTypes, vnode.props, getDisplayName(vnode), serializeVNode(vnode));\n\t\t}\n\n\t\tlet keys = [];\n\t\tfor (let deepChild of toChildArray(children)) {\n\t\t\tif (!deepChild || deepChild.key==null) continue;\n\n\t\t\tlet key = deepChild.key;\n\n\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\tserializeVNode(vnode)\n\t\t\t\t);\n\n\t\t\t\t// Break early to not spam the console\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tkeys.push(key);\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n\t};\n}\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tif (props) {\n\t\tfor (let prop in props) {\n\t\t\tif (props.hasOwnProperty(prop) && prop!=='children') {\n\t\t\t\tlet value = props[prop];\n\n\t\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\t\tif (typeof value==='function') {\n\t\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t\t}\n\n\t\t\t\tvalue = Object(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${children && children.length\n\t\t? '>..</'+name+'>'\n\t\t: ' />'}`;\n}\n","import { getData, getChildren, getInstance, hasProfileDataChanged, hasDataChanged, isRoot } from './custom';\n\n/**\n * Custom renderer tailored for Preact. It converts updated vnode trees\n * to events the devtools can understand.\n * @class Renderer\n */\nexport class Renderer {\n\tconstructor(hook, rid) {\n\n\t\t/** @type {string} */\n\t\tthis.rid = rid;\n\t\tthis.hook = hook;\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tthis.pending = [];\n\n\t\t/**\n\t\t * Store the instance of a vnode. This will be later used to decide if a\n\t\t * vnode needs to be mounted or updated. For components the instance refers\n\t\t * to the actuall class instance whereas for dom nodes it refers to the\n\t\t * underlying dom element.\n\t\t * @type {WeakMap<import('../internal').Component | import('../internal').PreactElement | HTMLElement | Text, import('../internal').VNode>}\n\t\t */\n\t\tthis.inst2vnode = new WeakMap();\n\t\tthis.connected = false;\n\t}\n\n\t/**\n\t * Mark the connection status as ready so that we can proceed\n\t * to actually flush events.\n\t */\n\tmarkConnected() {\n\t\tthis.connected = true;\n\t\tthis.flushPendingEvents();\n\t}\n\n\t/**\n\t * Flush all queued events\n\t */\n\tflushPendingEvents() {\n\t\tif (!this.connected) return;\n\n\t\tlet events = this.pending;\n\t\tthis.pending = [];\n\t\tfor (let i = 0; i < events.length; i++) {\n\t\t\tlet event = events[i];\n\t\t\tthis.hook.emit(event.type, event);\n\t\t}\n\t}\n\n\t/**\n\t * Recursively mount a vnode tree. Note that the devtools expectes the tree to\n\t * be mounted from the bottom up, otherwise the order will be messed up.\n\t * Therefore we mount children prior to mounting the vnode itself.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tmount(vnode) {\n\t\tthis.inst2vnode.set(getInstance(vnode), vnode);\n\t\tlet data = getData(vnode);\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tlet work = [{\n\t\t\tinternalInstance: vnode,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'mount'\n\t\t}];\n\n\t\t// Children must be mounted first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tlet stack = data.children.slice();\n\t\t\tlet item;\n\t\t\twhile ((item = stack.pop())!=null) {\n\t\t\t\tlet children = getChildren(item);\n\t\t\t\tstack.push(...children);\n\n\t\t\t\tthis.inst2vnode.set(getInstance(item), item);\n\n\t\t\t\tlet data = getData(item);\n\n\t\t\t\twork.push({\n\t\t\t\t\tinternalInstance: item,\n\t\t\t\t\tdata,\n\t\t\t\t\trenderer: this.rid,\n\t\t\t\t\ttype: 'mount'\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = work.length; --i>=0;) {\n\t\t\tthis.pending.push(work[i]);\n\t\t}\n\n\t\t// Special event if we have a root\n\t\tif (isRoot(vnode)) {\n\t\t\tthis.pending.push({\n\t\t\t\tinternalInstance: vnode,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'root'\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Update a vnode tree\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tupdate(vnode) {\n\t\tlet data = getData(vnode);\n\n\t\t// Children must be updated first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tfor (let i = 0; i < data.children.length; i++) {\n\t\t\t\tlet child = data.children[i];\n\t\t\t\tlet inst = getInstance(child);\n\n\t\t\t\tlet prevChild = this.inst2vnode.get(inst);\n\t\t\t\tif (prevChild==null) this.mount(child);\n\t\t\t\telse this.update(child);\n\n\t\t\t\t// Mutate child to keep referential equality intact\n\t\t\t\tdata.children[i] = this.inst2vnode.get(inst);\n\t\t\t}\n\t\t}\n\n\t\tlet prev = this.inst2vnode.get(data.publicInstance);\n\n\t\t// The `updateProfileTimes` event is a faster version of `updated` and\n\t\t// is processed much quicker inside the devtools extension.\n\t\tif (!hasDataChanged(prev, vnode) && hasProfileDataChanged(prev, vnode)) {\n\t\t\tthis.pending.push({\n\t\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t\t// vnode/fiber shape.\n\t\t\t\tinternalInstance: prev,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'updateProfileTimes'\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t// vnode/fiber shape.\n\t\t\tinternalInstance: prev,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'update'\n\t\t});\n\t}\n\n\t/**\n\t * Pass a rendered tree to the devtools. At this point elements have already\n\t * unmounted, so we don't need to check for removals and only update vs mount\n\t * instead.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberRoot(vnode) {\n\t\tlet inst = getInstance(vnode);\n\n\t\tif (this.inst2vnode.has(inst)) this.update(vnode);\n\t\telse this.mount(vnode);\n\n\t\t// The devtools checks via the existance of this property if the devtools\n\t\t// profiler should be enabled or not. If it is missing from the first root\n\t\t// node the \"Profiler\" tab won't show up.\n\t\t/** @type {import('../internal').VNode} */\n\t\tlet root = null;\n\t\tif (isRoot(vnode)) {\n\n\t\t\t/** @type {*} */\n\t\t\t(vnode).treeBaseDuration = 0;\n\t\t\troot = vnode;\n\t\t}\n\t\telse {\n\t\t\t// \"rootCommitted\" always needs the actual root node for the profiler\n\t\t\t// to be able to collect timings. The `_ancestorComponent` property will\n\t\t\t// point to a vnode for a root node.\n\t\t\troot = vnode._component;\n\t\t\twhile (root._ancestorComponent!=null) {\n\t\t\t\troot = root._ancestorComponent;\n\t\t\t}\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: root,\n\t\t\trenderer: this.rid,\n\t\t\tdata: getData(root),\n\t\t\ttype: 'rootCommitted'\n\t\t});\n\n\t\tthis.flushPendingEvents();\n\t\treturn vnode;\n\t}\n\n\t/**\n\t * Unmount a vnode recursively. Contrary to mounting or updating unmounting needs\n\t * to push the events in parent-first order. Because `options.unmount` is\n\t * already fired in parent-first order we don't need to traverse anything here.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberUnmount(vnode) {\n\t\tlet inst = getInstance(vnode);\n\t\tthis.inst2vnode.delete(inst);\n\n\t\t// Special case when unmounting a root (most prominently caused by webpack's\n\t\t// `hot-module-reloading`). If this happens we need to unmount the virtual\n\t\t// `Fragment` we're wrapping around each root just for the devtools.\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: vnode,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'unmount'\n\t\t});\n\t}\n\n\t/**\n\t * Get the dom element by a vnode\n\t * @param {import('../internal').VNode} vnode\n\t * @returns {import('../internal').PreactElement | Text}\n\t */\n\tgetNativeFromReactElement(vnode) {\n\t\treturn vnode._dom;\n\t}\n\n\t/**\n\t * Get a vnode by a dom element\n\t * @param {import('../internal').PreactElement | Text} dom\n\t * @returns {import('../internal').VNode | null}\n\t */\n\tgetReactElementFromNative(dom) {\n\t\treturn this.inst2vnode.get(dom) || null;\n\t}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\twalkTree() {}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\tcleanup() {}\n}\n","import { options, Component, Fragment } from 'preact';\nimport { Renderer } from './renderer';\n\n/**\n * Wrap function with generic error logging\n *\n * @param {*} fn\n * @returns\n */\nfunction catchErrors(fn) {\n\treturn function(arg) {\n\t\ttry {\n\t\t\treturn fn(arg);\n\t\t}\n\t\tcatch (e) {\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error('The react devtools encountered an error');\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error(e); // eslint-disable-line no-console\n\t\t}\n\t};\n}\n\n/* istanbul ignore next */\nlet noop = () => undefined;\n\nexport function initDevTools() {\n\t// This global variable is injected by the devtools\n\t/** @type {import('../internal').DevtoolsWindow} */\n\tlet hook = (window).__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\tif (hook==null) return;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitRoot = noop;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitUnmount = noop;\n\n\t// Initialize our custom renderer\n\tlet rid = Math.random().toString(16).slice(2);\n\tlet preactRenderer = new Renderer(hook, rid);\n\n\tcatchErrors(() => {\n\t\tlet isDev = false;\n\t\ttry {\n\t\t\tisDev = process.env.NODE_ENV!=='production';\n\t\t}\n\t\tcatch (e) {}\n\n\t\t// Tell devtools which bundle type we run in\n\t\twindow.parent.postMessage({\n\t\t\tsource: 'react-devtools-detector',\n\t\t\treactBuildType: /* istanbul ignore next */ isDev\n\t\t\t\t? 'development'\n\t\t\t\t: 'production'\n\t\t}, '*');\n\n\t\tlet renderer = {\n\t\t\tbundleType: /* istanbul ignore next */ isDev ? 1 : 0,\n\t\t\tversion: '16.5.2',\n\t\t\trendererPackageName: 'preact',\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindHostInstanceByFiber(vnode) {\n\t\t\t\treturn vnode._dom;\n\t\t\t},\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindFiberByHostInstance(instance) {\n\t\t\t\treturn preactRenderer.inst2vnode.get(instance) || null;\n\t\t\t}\n\t\t};\n\n\t\thook._renderers[rid] = renderer;\n\n\t\t// We can't bring our own `attachRenderer` function therefore we simply\n\t\t// prevent the devtools from overwriting our custom renderer by creating\n\t\t// a noop setter.\n\t\tObject.defineProperty(hook.helpers, rid, {\n\t\t\tget: () => preactRenderer,\n\t\t\tset: () => {\n\t\t\t\tif (!preactRenderer.connected) {\n\t\t\t\t\thelpers.markConnected();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet helpers = hook.helpers[rid];\n\n\t\t// Tell the devtools that we are ready to start\n\t\thook.emit('renderer-attached', {\n\t\t\tid: rid,\n\t\t\trenderer,\n\t\t\thelpers\n\t\t});\n\n\t\tonCommitRoot = catchErrors(root => {\n\t\t\t// Empty root\n\t\t\tif (root.type===Fragment && root._children.length==0) return;\n\n\t\t\tlet roots = hook.getFiberRoots(rid);\n\t\t\troot = helpers.handleCommitFiberRoot(root);\n\t\t\tif (!roots.has(root)) roots.add(root);\n\t\t});\n\n\t\tonCommitUnmount = catchErrors(vnode => {\n\t\t\thook.onCommitFiberUnmount(rid, vnode);\n\t\t});\n\t})();\n\n\t// Store (possible) previous hooks so that we don't overwrite them\n\tlet prevVNodeHook = options.vnode;\n\tlet prevCommitRoot = options.commit;\n\tlet prevBeforeUnmount = options.unmount;\n\tlet prevBeforeDiff = options.diff;\n\tlet prevAfterDiff = options.diffed;\n\n\toptions.vnode = (vnode) => {\n\t\t// Tiny performance improvement by initializing fields as doubles\n\t\t// from the start. `performance.now()` will always return a double.\n\t\t// See https://github.com/facebook/react/issues/14365\n\t\t// and https://slidr.io/bmeurer/javascript-engine-fundamentals-the-good-the-bad-and-the-ugly\n\t\tvnode.startTime = NaN;\n\t\tvnode.endTime = NaN;\n\n\t\tvnode.startTime = 0;\n\t\tvnode.endTime = -1;\n\t\tif (prevVNodeHook) prevVNodeHook(vnode);\n\t};\n\n\toptions.diff = (vnode) => {\n\t\tvnode.startTime = now();\n\t\tif (prevBeforeDiff!=null) prevBeforeDiff(vnode);\n\t};\n\n\toptions.diffed = (vnode) => {\n\t\tvnode.endTime = now();\n\t\tif (prevAfterDiff!=null) prevAfterDiff(vnode);\n\t};\n\n\toptions.commit = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevCommitRoot!=null) prevCommitRoot(vnode);\n\n\t\t// These cases are already handled by `unmount`\n\t\tif (vnode==null) return;\n\t\tonCommitRoot(vnode);\n\t});\n\n\toptions.unmount = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevBeforeUnmount!=null) prevBeforeUnmount(vnode);\n\t\tonCommitUnmount(vnode);\n\t});\n\n\t// Inject tracking into setState\n\tconst setState = Component.prototype.setState;\n\tComponent.prototype.setState = function(update, callback) {\n\t\t// Duplicated in setState() but doesn't matter due to the guard.\n\t\tlet s = (this._nextState!==this.state && this._nextState) || (this._nextState = Object.assign({}, this.state));\n\n\t\t// Needed in order to check if state has changed after the tree has been committed:\n\t\tthis._prevState = Object.assign({}, s);\n\n\t\treturn setState.call(this, update, callback);\n\t};\n}\n\n/**\n * Get current timestamp in ms. Used for profiling.\n * @returns {number}\n */\nexport let now = Date.now;\n\ntry {\n\t/* istanbul ignore else */\n\tnow = performance.now.bind(performance);\n}\ncatch (e) {}\n","import { initDebug } from './debug';\nimport { initDevTools } from './devtools';\n\nif (process.env.NODE_ENV==='development') {\n\tinitDebug();\n\tinitDevTools();\n}\n"],"names":["getNodeType","vnode","type","Fragment","getDisplayName","displayName","name","setIn","obj","path","value","last","pop","parent","reduce","acc","attr","getData","c","_component","updater","setState","bind","forceUpdate","setInState","prev","setInProps","props","setInContext","context","children","getChildren","duration","endTime","startTime","nodeType","ref","key","text","state","length","publicInstance","getInstance","memoizedInteractions","actualDuration","actualStartTime","treeBaseDuration","_children","filter","Boolean","Array","isArray","_prevVNode","isRoot","_dom","parentNode","shallowEqual","a","b","isProps","let","Object","keys","hasDataChanged","next","_prevState","hasProfileDataChanged","initDebug","oldBeforeDiff","options","diff","undefined","Error","serializeVNode","propTypes","checkPropTypes","toChildArray","deepChild","indexOf","console","error","push","attrs","prop","hasOwnProperty","toString","prototype","call","JSON","stringify","Renderer","constructor","hook","rid","pending","inst2vnode","WeakMap","connected","markConnected","flushPendingEvents","events","i","event","emit","mount","set","data","work","renderer","stack","slice","item","update","child","inst","prevChild","get","handleCommitFiberRoot","has","root","_ancestorComponent","handleCommitFiberUnmount","delete","getNativeFromReactElement","getReactElementFromNative","dom","walkTree","cleanup","catchErrors","fn","arg","e","noop","initDevTools","window","__REACT_DEVTOOLS_GLOBAL_HOOK__","onCommitRoot","onCommitUnmount","Math","random","preactRenderer","isDev","process","env","NODE_ENV","postMessage","source","reactBuildType","bundleType","version","rendererPackageName","findHostInstanceByFiber","findFiberByHostInstance","instance","_renderers","defineProperty","helpers","id","roots","getFiberRoots","add","onCommitFiberUnmount","prevVNodeHook","prevCommitRoot","commit","prevBeforeUnmount","unmount","prevBeforeDiff","prevAfterDiff","diffed","NaN","now","Component","callback","s","_nextState","assign","Date","performance"],"mappings":";;;;;;;;;AAOA,AAAO,SAASA,WAAT,CAAqBC,KAArB,EAA4B;MAC9BA,KAAK,CAACC,IAAN,KAAaC,QAAjB,IAA2B,OAAO,SAAP,GAA3B,KACK,IAAI,OAAOF,KAAK,CAACC,IAAb,KAAoB,UAAxB,IAAoC,OAAO,WAAP,GAApC,KACA,IAAI,OAAOD,KAAK,CAACC,IAAb,KAAoB,QAAxB,IAAkC,OAAO,QAAP;SAChC,MAAP;;;;;;;;AAQD,AAAO,SAASE,cAAT,CAAwBH,KAAxB,EAA+B;MACjCA,KAAK,CAACC,IAAN,KAAaC,QAAjB,IAA2B,OAAO,UAAP,GAA3B,KACK,IAAI,OAAOF,KAAK,CAACC,IAAb,KAAoB,UAAxB,IAAoC,OAAOD,KAAK,CAACC,IAAN,CAAWG,WAAX,IAA0BJ,KAAK,CAACC,IAAN,CAAWI,IAA5C,GAApC,KACA,IAAI,OAAOL,KAAK,CAACC,IAAb,KAAoB,QAAxB,IAAkC,OAAOD,KAAK,CAACC,IAAb;SAChC,OAAP;;;;;;;;;AASD,AAAO,SAASK,KAAT,CAAeC,GAAf,EAAoBC,IAApB,EAA0BC,KAA1B,EAAiC;MACnCC,IAAI,GAAGF,IAAI,CAACG,GAAL,EAAX;MACIC,MAAM,GAAGJ,IAAI,CAACK,MAAL,WAAaC,GAAD,EAAMC,IAAN,WAAeD,GAAG,GAAGA,GAAG,CAACC,IAAD,CAAN,GAAe,OAA7C,EAAmDR,GAAnD,CAAb;;MACIK,MAAJ,EAAY;IACXA,MAAM,CAACF,IAAD,CAAN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C,QAAZ,KAAuB,aAA3B,EAA0C;EACzC7E,SAAS;EACTkE,YAAY;"}
@@ -1,2 +0,0 @@
1
- import{Component as n,Fragment as e,options as t}from"preact";var r={};function o(n){return n.type===e?"Wrapper":"function"==typeof n.type?"Composite":"string"==typeof n.type?"Native":"Text"}function i(n){return n.type===e?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}function a(n,e,t){var r=e.pop(),o=e.reduce(function(n,e){return n?n[e]:null},n);o&&(o[r]=t)}function u(e){var t=e.__c,r=null;null!=t&&t instanceof n&&(r={setState:t.setState.bind(t),forceUpdate:t.forceUpdate.bind(t),setInState:function(n,e){t.setState(function(t){return a(t,n,e),t})},setInProps:function(n,r){a(e.props,n,r),t.setState({})},setInContext:function(n,e){a(t.context,n,e),t.setState({})}});var u=l(e),s=e.endTime-e.startTime;return{nodeType:o(e),type:e.type,name:i(e),ref:e.ref||null,key:e.key||null,updater:r,text:null===e.type?e.props:null,state:null!=t&&t instanceof n?t.state:null,props:e.props,children:null!==e.type?null!=u&&1==u.length&&null===u[0].type?u[0].props:u:null,publicInstance:c(e),memoizedInteractions:[],actualDuration:s,actualStartTime:e.startTime,treeBaseDuration:s}}function l(n){return null==n.__c?null!=n.__k?n.__k.filter(Boolean):[]:null!=n.__k?n.__k.filter(Boolean):null}function s(n){return n.type===e&&null===n.__p}function c(n){return s(n)?n.__k.length>0&&null!=n.__k[0]&&null!=n.__k[0].__e?n.__k[0].__e.parentNode:n:null!=n.__c?n.__c:n.type===e?n.props:n.__e}function f(n,e,t){if(null==n||null==e)return!1;for(var r in n)if((!t||"children"!=r||null==e[r])&&n[r]!==e[r])return!1;return Object.keys(n).length===Object.keys(e).length}function d(n){var e=n.props,t=i(n),r="";if(e)for(var o in e)if(e.hasOwnProperty(o)&&"children"!==o){var a=e[o];"function"==typeof a&&(a="function "+(a.displayName||a.name)+"() {}"),a=Object(a)!==a||a.toString?a+"":Object.prototype.toString.call(a),r+=" "+o+"="+JSON.stringify(a)}var u=e.children;return"<"+t+r+(u&&u.length?">..</"+t+">":" />")}var h=function(n,e){this.rid=e,this.hook=n,this.pending=[],this.inst2vnode=new WeakMap,this.connected=!1};function p(n){return function(e){try{return n(e)}catch(n){console.error("The react devtools encountered an error"),console.error(n)}}}h.prototype.markConnected=function(){this.connected=!0,this.flushPendingEvents()},h.prototype.flushPendingEvents=function(){if(this.connected){var n=this.pending;this.pending=[];for(var e=0;e<n.length;e++){var t=n[e];this.hook.emit(t.type,t)}}},h.prototype.mount=function(n){this.inst2vnode.set(c(n),n);var e=u(n),t=[{internalInstance:n,data:e,renderer:this.rid,type:"mount"}];if(Array.isArray(e.children))for(var r,o=e.children.slice();null!=(r=o.pop());){var i=l(r);o.push.apply(o,i),this.inst2vnode.set(c(r),r);var a=u(r);t.push({internalInstance:r,data:a,renderer:this.rid,type:"mount"})}for(var f=t.length;--f>=0;)this.pending.push(t[f]);s(n)&&this.pending.push({internalInstance:n,data:e,renderer:this.rid,type:"root"})},h.prototype.update=function(n){var e=u(n);if(Array.isArray(e.children))for(var t=0;t<e.children.length;t++){var r=e.children[t],o=c(r);null==this.inst2vnode.get(o)?this.mount(r):this.update(r),e.children[t]=this.inst2vnode.get(o)}var i=this.inst2vnode.get(e.publicInstance);!function(n,e){return n.props!==e.props&&!f(n.props,e.props,!0)||null!=n.__c&&!f(e.__c.__u,e.__c.state)||n.__e!==e.__e||n.ref!==e.ref}(i,n)?this.pending.push({internalInstance:i,data:e,renderer:this.rid,type:"updateProfileTimes"}):this.pending.push({internalInstance:i,data:e,renderer:this.rid,type:"update"})},h.prototype.handleCommitFiberRoot=function(n){var e=c(n);this.inst2vnode.has(e)?this.update(n):this.mount(n);var t=null;if(s(n))n.treeBaseDuration=0,t=n;else for(t=n;null!=t.__p;)t=t.__p;return this.pending.push({internalInstance:t,renderer:this.rid,data:u(t),type:"rootCommitted"}),this.flushPendingEvents(),n},h.prototype.handleCommitFiberUnmount=function(n){var e=c(n);this.inst2vnode.delete(e),this.pending.push({internalInstance:n,renderer:this.rid,type:"unmount"})},h.prototype.getNativeFromReactElement=function(n){return n.__e},h.prototype.getReactElementFromNative=function(n){return this.inst2vnode.get(n)||null},h.prototype.walkTree=function(){},h.prototype.cleanup=function(){};var v=function(){},y=Date.now;try{y=performance.now.bind(performance)}catch(n){}"development"===process.env.NODE_ENV&&(function(){var n=t.__b,e=t.diffed,o=t.vnode,a=t.__e,u={useEffect:{},useLayoutEffect:{},lazyPropTypes:{}};t.__e=function(n,e,t){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+i(e));for(var o=e;o;o=o.__p)if(o.__c&&o.__c.t){n=r;break}}a(n,e,t)},t.__p=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(e.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t)throw new Error("\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived "+e+" instead: render(<"+(n.type.name||n.type)+" />, "+e+");\n\t\t")},t.__b=function(e){if(null!=e){var t,o,a,l,s=e.type,c=function n(e){return e?"function"==typeof e.type?n(e.__p):e:{}}(e.__p);if(void 0===s)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+d(e));if(null!=s&&"object"==typeof s){if(void 0!==s.o&&void 0!==s.__e){var f="Did you accidentally pass a JSX literal as JSX twice?\n\n let My"+i(s)+" = "+d(s)+";\n let vnode = <My"+i(s)+" />;\n\nThis usually happens when you export a JSX literal and not the component.";throw new Error("Invalid type passed to createElement(): "+s+"\n\n"+f+"\n")}throw new Error("Invalid type passed to createElement(): "+(Array.isArray(s)?"array":s))}if("thead"!==s&&"tfoot"!==s&&"thead"!==s||"table"===c.type?"tr"===s&&"thead"!==c.type&&"tfoot"!==c.type&&"tbody"!==c.type&&"table"!==c.type?console.error("Improper nesting of table.Your <tr> should have a <thead/tbody/tfoot/table> parent."+d(e)):"td"===s&&"tr"!==c.type?console.error("Improper nesting of table.Your <td> should have a <tr> parent."+d(e)):"th"===s&&"tr"!==c.type&&console.error("Improper nesting of table.Your <th> should have a <tr>."+d(e)):console.error("Improper nesting of table.Your <thead/tbody/tfoot> should have a <table> parent."+d(e)),void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+d(e));if("string"==typeof e.type)for(var h in e.props)if("o"===h[0]&&"n"===h[1]&&"function"!=typeof e.props[h]&&null!=e.props[h])throw new Error("Component's \""+h+'" property should be a function, but got ['+typeof e.props[h]+"] instead\n"+d(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&!u.lazyPropTypes[e.type]){var p="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var v=e.type();u.lazyPropTypes[e.type]=!0,console.warn(p+"Component wrapped in lazy() is "+(v.type.displayName||v.type.name))}catch(n){console.warn(p+"We will log the wrapped component's name once it is loaded.")}}t=e.type.propTypes,o=e.props,a=i(e),l=d(e),Object.keys(t).forEach(function(n){var e;try{e=t[n](o,n,l,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){e=n}!e||e.message in r||(r[e.message]=!0,console.error("Failed "+a+" type: "+e.message))})}n&&n(e)}},t.__h=function(n){if(!n)throw new Error("Hook can only be invoked from render methods.")};var l=function(n,e){return{get:function(){throw new Error("getting vnode."+n+" is deprecated, "+e)},set:function(){throw new Error("setting vnode."+n+" is not allowed, "+e)}}},s={nodeName:l("nodeName","use vnode.type"),attributes:l("attributes","use vnode.props"),children:l("children","use vnode.props.children")};t.vnode=function(n){var e,t;n.props&&n.props.i&&(e=n.props.i,delete n.props.i),n.props&&n.props.u&&(t=n.props.u,delete n.props.u),n.u=t,n.i=e,Object.defineProperties(n,s),o&&o(n)},t.diffed=function(n){if(null!=n){if(n.__c&&n.__c.l){var t=n.__c.l;t.s.forEach(function(e){!e.h||e.p&&Array.isArray(e.p)||console.warn("In "+(n.type.name||n.type)+" you are calling useMemo/useCallback without passing arguments.\nThis is a noop since it will not be able to memoize, it will execute it every render.")}),t.v.length>0&&t.v.forEach(function(e){e.p&&Array.isArray(e.p)||u.useEffect[n.type]||(u.useEffect[n.type]=!0,console.warn('You should provide an array of arguments as the second argument to the "useEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of '+(n.type.name||n.type)+"."))}),t.m.length>0&&t.m.forEach(function(e){e.p&&Array.isArray(e.p)||u.useLayoutEffect[n.type]||(u.useLayoutEffect[n.type]=!0,console.warn('You should provide an array of arguments as the second argument to the "useLayoutEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of '+(n.type.name||n.type)+"."))})}if(null!=n.__k)for(var r=[],o=0;o<n.__k.length;o++){var i=n.__k[o];if(i&&null!=i.key){var a=i.key;if(-1!==r.indexOf(a)){console.error('Following component has two or more children with the same key attribute: "'+a+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+d(n));break}r.push(a)}}e&&e(n)}}}(),function(){var r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(null!=r){var o=v,i=v,a=Math.random().toString(16).slice(2),u=new h(r,a);p(function(){var n=!1;try{n="production"!==process.env.NODE_ENV}catch(n){}window.parent.postMessage({source:"react-devtools-detector",reactBuildType:n?"development":"production"},"*");var t={bundleType:n?1:0,version:"16.5.2",rendererPackageName:"preact",findHostInstanceByFiber:function(n){return n.__e},findFiberByHostInstance:function(n){return u.inst2vnode.get(n)||null}};r._renderers[a]=t,Object.defineProperty(r.helpers,a,{get:function(){return u},set:function(){u.connected||l.markConnected()}});var l=r.helpers[a];r.emit("renderer-attached",{id:a,renderer:t,helpers:l}),o=p(function(n){if(n.type!==e||0!=n.__k.length){var t=r.getFiberRoots(a);n=l.handleCommitFiberRoot(n),t.has(n)||t.add(n)}}),i=p(function(n){r.onCommitFiberUnmount(a,n)})})();var l=t.vnode,s=t.__c,c=t.unmount,f=t.__b,d=t.diffed;t.vnode=function(n){n.startTime=NaN,n.endTime=NaN,n.startTime=0,n.endTime=-1,l&&l(n)},t.__b=function(n){n.startTime=y(),null!=f&&f(n)},t.diffed=function(n){n.endTime=y(),null!=d&&d(n)},t.__c=p(function(n){null!=s&&s(n),null!=n&&o(n)}),t.unmount=p(function(n){null!=c&&c(n),i(n)});var m=n.prototype.setState;n.prototype.setState=function(n,e){var t=this.__s!==this.state&&this.__s||(this.__s=Object.assign({},this.state));return this.__u=Object.assign({},t),m.call(this,n,e)}}}());
2
- //# sourceMappingURL=debug.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.module.js","sources":["../src/check-props.js","../src/devtools/custom.js","../src/debug.js","../src/devtools/renderer.js","../src/devtools/index.js","../src/index.js","../src/constants.js"],"sourcesContent":["const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nlet loggedTypeFailures = {};\n\nexport function checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n\tObject.keys(typeSpecs).forEach((typeSpecName) => {\n\t\tlet error;\n\t\ttry {\n\t\t\terror = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n\t\t}\n\t\tcatch (e) {\n\t\t\terror = e;\n\t\t}\n\t\tif (error && !(error.message in loggedTypeFailures)) {\n\t\t\tloggedTypeFailures[error.message] = true;\n\t\t\tconsole.error(`Failed ${location} type: ${error.message}${getStack && getStack() || ''}`);\n\t\t}\n\t});\n}\n","import { Component, Fragment } from 'preact';\n\n/**\n * Get the type/category of a vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').NodeType}\n */\nexport function getNodeType(vnode) {\n\tif (vnode.type===Fragment) return 'Wrapper';\n\telse if (typeof vnode.type==='function') return 'Composite';\n\telse if (typeof vnode.type==='string') return 'Native';\n\treturn 'Text';\n}\n\n/**\n * Get human readable name of the component/dom element\n * @param {import('../internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type===Fragment) return 'Fragment';\n\telse if (typeof vnode.type==='function') return vnode.type.displayName || vnode.type.name;\n\telse if (typeof vnode.type==='string') return vnode.type;\n\treturn '#text';\n}\n\n/**\n * Deeply mutate a property by walking down an array of property keys\n * @param {object} obj\n * @param {Array<string | number>} path\n * @param {any} value\n */\nexport function setIn(obj, path, value) {\n\tlet last = path.pop();\n\tlet parent = path.reduce((acc, attr) => acc ? acc[attr] : null, obj);\n\tif (parent) {\n\t\tparent[last] = value;\n\t}\n}\n\n/**\n * Get devtools compatible data from vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').DevtoolData}\n */\nexport function getData(vnode) {\n\tlet c = vnode._component;\n\n\t/** @type {import('../internal').DevtoolsUpdater | null} */\n\tlet updater = null;\n\n\tif (c!=null && c instanceof Component) {\n\t\t// These functions will be called when the user changes state, props or\n\t\t// context values via the devtools ui panel\n\t\tupdater = {\n\t\t\tsetState: c.setState.bind(c),\n\t\t\tforceUpdate: c.forceUpdate.bind(c),\n\t\t\tsetInState(path, value) {\n\t\t\t\tc.setState(prev => {\n\t\t\t\t\tsetIn(prev, path, value);\n\t\t\t\t\treturn prev;\n\t\t\t\t});\n\t\t\t},\n\t\t\tsetInProps(path, value) {\n\t\t\t\tsetIn(vnode.props, path, value);\n\t\t\t\tc.setState({});\n\t\t\t},\n\t\t\tsetInContext(path, value) {\n\t\t\t\tsetIn(c.context, path, value);\n\t\t\t\tc.setState({});\n\t\t\t}\n\t\t};\n\t}\n\n\tlet children = getChildren(vnode);\n\n\tlet duration = vnode.endTime - vnode.startTime;\n\treturn {\n\t\tnodeType: getNodeType(vnode),\n\t\ttype: vnode.type,\n\t\tname: getDisplayName(vnode),\n\t\tref: vnode.ref || null,\n\t\tkey: vnode.key || null,\n\t\tupdater,\n\t\ttext: vnode.type===null ? vnode.props : null,\n\t\tstate: c!=null && c instanceof Component ? c.state : null,\n\t\tprops: vnode.props,\n\t\t// The devtools inline text children if they are the only child\n\t\tchildren: vnode.type!==null\n\t\t\t? children!=null && children.length==1 && children[0].type===null\n\t\t\t\t? children[0].props\n\t\t\t\t: children\n\t\t\t: null,\n\t\tpublicInstance: getInstance(vnode),\n\t\tmemoizedInteractions: [],\n\n\t\t// Profiler data\n\t\tactualDuration: duration,\n\t\tactualStartTime: vnode.startTime,\n\t\ttreeBaseDuration: duration\n\t};\n}\n\n/**\n * Get all rendered vnode children as an array. Moreover we need to filter\n * out `null` or other falsy children.\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').VNode[]}\n */\nexport function getChildren(vnode) {\n\tif (vnode._component==null) {\n\t\treturn vnode._children!=null ? vnode._children.filter(Boolean) : [];\n\t}\n\n\treturn vnode._children != null ? vnode._children.filter(Boolean) : null;\n}\n\n/**\n * Check if a vnode is a root node\n * @param {import('../internal').VNode} vnode\n * @returns {boolean}\n */\nexport function isRoot(vnode) {\n\t// Timings of root vnodes will never be set\n\treturn vnode.type===Fragment && vnode._parent === null;\n}\n\n/**\n * Cache a vnode by its instance and retrieve previous vnodes by the next\n * instance.\n *\n * We need this to be able to identify the previous vnode of a given instance.\n * For components we want to check if we already rendered it and use the class\n * instance as key. For html elements we use the dom node as key.\n *\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').Component | import('../internal').PreactElement | Text | null}\n */\nexport function getInstance(vnode) {\n\t// Use the parent element as instance for root nodes\n\tif (isRoot(vnode)) {\n\t\t// Edge case: When the tree only consists of components that have not rendered\n\t\t// anything into the DOM we revert to using the vnode as instance.\n\t\treturn vnode._children.length > 0 && vnode._children[0]!=null && vnode._children[0]._dom!=null\n\t\t\t? /** @type {import('../internal').PreactElement | null} */\n\t\t\t(vnode._children[0]._dom.parentNode)\n\t\t\t: vnode;\n\t}\n\tif (vnode._component!=null) return vnode._component;\n\tif (vnode.type===Fragment) return vnode.props;\n\treturn vnode._dom;\n}\n\n/**\n * Compare two objects\n * @param {object} a\n * @param {object} b\n * @param {boolean} [isProps]\n * @returns {boolean}\n */\nexport function shallowEqual(a, b, isProps) {\n\tif (a==null || b==null) return false;\n\n\tfor (let key in a) {\n\t\tif (isProps && key=='children' && b[key]!=null) continue;\n\t\tif (a[key]!==b[key]) return false;\n\t}\n\n\tif (Object.keys(a).length!==Object.keys(b).length) return false;\n\treturn true;\n}\n\n/**\n * Check if a vnode was actually updated\n * @param {import('../internal').VNode} next\n * @param {import('../internal').VNode} prev\n * @returns {boolean}\n */\nexport function hasDataChanged(prev, next) {\n\treturn (prev.props !== next.props && !shallowEqual(prev.props, next.props, true))\n\t\t|| (prev._component!=null &&\n\t\t\t!shallowEqual(next._component._prevState, next._component.state))\n\t\t|| prev._dom !== next._dom\n\t\t|| prev.ref !== next.ref;\n}\n","import { checkPropTypes } from './check-props';\nimport { getDisplayName } from './devtools/custom';\nimport { options } from 'preact';\nimport { ELEMENT_NODE, DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE } from './constants';\n\nfunction getClosestDomNodeParent(parent) {\n\tif (!parent) return {};\n\tif (typeof parent.type === 'function') {\n\t\treturn getClosestDomNodeParent(parent._parent);\n\t}\n\treturn parent;\n}\n\nexport function initDebug() {\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldVnode = options.vnode;\n\tlet oldCatchError = options._catchError;\n\tconst warnedComponents = { useEffect: {}, useLayoutEffect: {}, lazyPropTypes: {} };\n\n\toptions._catchError = (error, vnode, oldVNode) => {\n\t\tlet component = vnode && vnode._component;\n\t\tif (component && typeof error.then === 'function') {\n\t\t\tconst promise = error;\n\t\t\terror = new Error('Missing Suspense. The throwing component was: ' + getDisplayName(vnode));\n\n\t\t\tlet parent = vnode;\n\t\t\tfor (; parent; parent = parent._parent) {\n\t\t\t\tif (parent._component && parent._component._childDidSuspend) {\n\t\t\t\t\terror = promise;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\toldCatchError(error, vnode, oldVNode);\n\t};\n\n\toptions._root = (vnode, parentNode) => {\n\t\tif (!parentNode) {\n\t\t\tthrow new Error('Undefined parent passed to render(), this is the second argument.\\nCheck if the element is available in the DOM/has the correct id.');\n\t\t}\n\t\tlet isValid;\n\t\tswitch (parentNode.nodeType) {\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\tcase DOCUMENT_NODE: isValid = true; break;\n\t\t\tdefault: isValid = false;\n\t\t}\n\t\tif (!isValid) throw new Error(`\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived ${parentNode} instead: render(<${vnode.type.name || vnode.type} />, ${parentNode});\n\t\t`);\n\t};\n\n\toptions._diff = vnode => {\n\t\tif (vnode == null) { return; }\n\n\t\tlet { type, _parent: parent } = vnode;\n\t\tlet parentVNode = getClosestDomNodeParent(parent);\n\n\t\tif (type===undefined) {\n\t\t\tthrow new Error('Undefined component passed to createElement()\\n\\n'+\n\t\t\t'You likely forgot to export your component or might have mixed up default and named imports'+\n\t\t\tserializeVNode(vnode));\n\t\t}\n\t\telse if (type!=null && typeof type==='object') {\n\t\t\tif (type._lastDomChild!==undefined && type._dom!==undefined) {\n\t\t\t\tlet info = 'Did you accidentally pass a JSX literal as JSX twice?\\n\\n'+\n\t\t\t\t' let My'+getDisplayName(type)+' = '+serializeVNode(type)+';\\n'+\n\t\t\t\t' let vnode = <My'+getDisplayName(type)+' />;\\n\\n'+\n\t\t\t\t'This usually happens when you export a JSX literal and not the component.';\n\t\t\t\tthrow new Error('Invalid type passed to createElement(): '+type+'\\n\\n'+info+'\\n');\n\t\t\t}\n\n\t\t\tthrow new Error('Invalid type passed to createElement(): '+(Array.isArray(type) ? 'array' : type));\n\t\t}\n\n\t\tif ((type==='thead' || type==='tfoot' || type==='thead') && parentVNode.type!=='table') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <thead/tbody/tfoot> should have a <table> parent.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (\n\t\t\ttype==='tr' && (\n\t\t\t\tparentVNode.type!=='thead' &&\n\t\t\t\tparentVNode.type!=='tfoot' &&\n\t\t\t\tparentVNode.type!=='tbody' &&\n\t\t\t\tparentVNode.type!=='table'\n\t\t\t)) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <tr> should have a <thead/tbody/tfoot/table> parent.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (type==='td' && parentVNode.type!=='tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t\t'Your <td> should have a <tr> parent.'\n\t\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (type==='th' && parentVNode.type!=='tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <th> should have a <tr>.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvnode.ref!==undefined &&\n\t\t\ttypeof vnode.ref!=='function' &&\n\t\t\ttypeof vnode.ref!=='object' &&\n\t\t\t!('$$typeof' in vnode) // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t`by createRef(), but got [${typeof vnode.ref}] instead\\n` +\n\t\t\t\tserializeVNode(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (typeof vnode.type==='string') {\n\t\t\tfor (const key in vnode.props) {\n\t\t\t\tif (key[0]==='o' && key[1]==='n' && typeof vnode.props[key]!=='function' && vnode.props[key]!=null) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Component's \"${key}\" property should be a function, ` +\n\t\t\t\t\t\t`but got [${typeof vnode.props[key]}] instead\\n` +\n\t\t\t\t\t\tserializeVNode(vnode)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof vnode.type==='function' && vnode.type.propTypes) {\n\t\t\tif (vnode.type.displayName === 'Lazy' && !warnedComponents.lazyPropTypes[vnode.type]) {\n\t\t\t\tconst m = 'PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ';\n\t\t\t\ttry {\n\t\t\t\t\tconst lazyVNode = vnode.type();\n\t\t\t\t\twarnedComponents.lazyPropTypes[vnode.type] = true;\n\t\t\t\t\tconsole.warn(m + 'Component wrapped in lazy() is ' + (lazyVNode.type.displayName || lazyVNode.type.name));\n\t\t\t\t}\n\t\t\t\tcatch (promise) {\n\t\t\t\t\tconsole.warn(m + 'We will log the wrapped component\\'s name once it is loaded.');\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckPropTypes(vnode.type.propTypes, vnode.props, getDisplayName(vnode), serializeVNode(vnode));\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n\t};\n\n\toptions._hook = (comp) => {\n\t\tif (!comp) {\n\t\t\tthrow new Error('Hook can only be invoked from render methods.');\n\t\t}\n\t};\n\n\tconst warn = (property, err) => ({\n\t\tget() {\n\t\t\tthrow new Error(`getting vnode.${property} is deprecated, ${err}`);\n\t\t},\n\t\tset() {\n\t\t\tthrow new Error(`setting vnode.${property} is not allowed, ${err}`);\n\t\t}\n\t});\n\n\tconst deprecatedAttributes = {\n\t\tnodeName: warn('nodeName', 'use vnode.type'),\n\t\tattributes: warn('attributes', 'use vnode.props'),\n\t\tchildren: warn('children', 'use vnode.props.children')\n\t};\n\n\toptions.vnode = (vnode) => {\n\t\tlet source, self;\n\t\tif (vnode.props && vnode.props.__source) {\n\t\t\tsource = vnode.props.__source;\n\t\t\tdelete vnode.props.__source;\n\t\t}\n\t\tif (vnode.props && vnode.props.__self) {\n\t\t\tself = vnode.props.__self;\n\t\t\tdelete vnode.props.__self;\n\t\t}\n\t\tvnode.__self = self;\n\t\tvnode.__source = source;\n\t\tObject.defineProperties(vnode, deprecatedAttributes);\n\t\tif (oldVnode) oldVnode(vnode);\n\t};\n\n\toptions.diffed = (vnode) => {\n\t\tif (vnode == null) { return; }\n\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tlet hooks = vnode._component.__hooks;\n\t\t\thooks._list.forEach(hook => {\n\t\t\t\tif (hook._callback && (!hook._args || !Array.isArray(hook._args))) {\n\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`In ${vnode.type.name || vnode.type} you are calling useMemo/useCallback without passing arguments.\\n` +\n\t\t\t\t\t\t`This is a noop since it will not be able to memoize, it will execute it every render.`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (hooks._pendingEffects.length > 0) {\n\t\t\t\thooks._pendingEffects.forEach((effect) => {\n\t\t\t\t\tif ((!effect._args || !Array.isArray(effect._args)) && !warnedComponents.useEffect[vnode.type]) {\n\t\t\t\t\t\twarnedComponents.useEffect[vnode.type] = true;\n\t\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\t\tconsole.warn('You should provide an array of arguments as the second argument to the \"useEffect\" hook.\\n\\n' +\n\t\t\t\t\t\t\t'Not doing so will invoke this effect on every render.\\n\\n' +\n\t\t\t\t\t\t\t'This effect can be found in the render of ' + (vnode.type.name || vnode.type) + '.');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (hooks._pendingLayoutEffects.length > 0) {\n\t\t\t\thooks._pendingLayoutEffects.forEach((layoutEffect) => {\n\t\t\t\t\tif ((!layoutEffect._args || !Array.isArray(layoutEffect._args)) && !warnedComponents.useLayoutEffect[vnode.type]) {\n\t\t\t\t\t\twarnedComponents.useLayoutEffect[vnode.type] = true;\n\t\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\t\tconsole.warn('You should provide an array of arguments as the second argument to the \"useLayoutEffect\" hook.\\n\\n' +\n\t\t\t\t\t\t\t'Not doing so will invoke this effect on every render.\\n\\n' +\n\t\t\t\t\t\t\t'This effect can be found in the render of ' + (vnode.type.name || vnode.type) + '.');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (vnode._children != null) {\n\t\t\tconst keys = [];\n\t\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\t\tconst child = vnode._children[i];\n\t\t\t\tif (!child || child.key==null) continue;\n\n\t\t\t\tconst key = child.key;\n\t\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\t\tserializeVNode(vnode)\n\t\t\t\t\t);\n\n\t\t\t\t\t// Break early to not spam the console\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\t\t}\n\n\t\tif (oldDiffed) oldDiffed(vnode);\n\t};\n}\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tif (props) {\n\t\tfor (let prop in props) {\n\t\t\tif (props.hasOwnProperty(prop) && prop!=='children') {\n\t\t\t\tlet value = props[prop];\n\n\t\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\t\tif (typeof value==='function') {\n\t\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t\t}\n\n\t\t\t\tvalue = Object(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${children && children.length\n\t\t? '>..</'+name+'>'\n\t\t: ' />'}`;\n}\n","import { getData, getChildren, getInstance, hasDataChanged, isRoot } from './custom';\n\n/**\n * Custom renderer tailored for Preact. It converts updated vnode trees\n * to events the devtools can understand.\n * @class Renderer\n */\nexport class Renderer {\n\tconstructor(hook, rid) {\n\n\t\t/** @type {string} */\n\t\tthis.rid = rid;\n\t\tthis.hook = hook;\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tthis.pending = [];\n\n\t\t/**\n\t\t * Store the instance of a vnode. This will be later used to decide if a\n\t\t * vnode needs to be mounted or updated. For components the instance refers\n\t\t * to the actuall class instance whereas for dom nodes it refers to the\n\t\t * underlying dom element.\n\t\t * @type {WeakMap<import('../internal').Component | import('../internal').PreactElement | HTMLElement | Text, import('../internal').VNode>}\n\t\t */\n\t\tthis.inst2vnode = new WeakMap();\n\t\tthis.connected = false;\n\t}\n\n\t/**\n\t * Mark the connection status as ready so that we can proceed\n\t * to actually flush events.\n\t */\n\tmarkConnected() {\n\t\tthis.connected = true;\n\t\tthis.flushPendingEvents();\n\t}\n\n\t/**\n\t * Flush all queued events\n\t */\n\tflushPendingEvents() {\n\t\tif (!this.connected) return;\n\n\t\tlet events = this.pending;\n\t\tthis.pending = [];\n\t\tfor (let i = 0; i < events.length; i++) {\n\t\t\tlet event = events[i];\n\t\t\tthis.hook.emit(event.type, event);\n\t\t}\n\t}\n\n\t/**\n\t * Recursively mount a vnode tree. Note that the devtools expectes the tree to\n\t * be mounted from the bottom up, otherwise the order will be messed up.\n\t * Therefore we mount children prior to mounting the vnode itself.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tmount(vnode) {\n\t\tthis.inst2vnode.set(getInstance(vnode), vnode);\n\t\tlet data = getData(vnode);\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tlet work = [{\n\t\t\tinternalInstance: vnode,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'mount'\n\t\t}];\n\n\t\t// Children must be mounted first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tlet stack = data.children.slice();\n\t\t\tlet item;\n\t\t\twhile ((item = stack.pop())!=null) {\n\t\t\t\tlet children = getChildren(item);\n\t\t\t\tstack.push(...children);\n\n\t\t\t\tthis.inst2vnode.set(getInstance(item), item);\n\n\t\t\t\tlet data = getData(item);\n\n\t\t\t\twork.push({\n\t\t\t\t\tinternalInstance: item,\n\t\t\t\t\tdata,\n\t\t\t\t\trenderer: this.rid,\n\t\t\t\t\ttype: 'mount'\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = work.length; --i>=0;) {\n\t\t\tthis.pending.push(work[i]);\n\t\t}\n\n\t\t// Special event if we have a root\n\t\tif (isRoot(vnode)) {\n\t\t\tthis.pending.push({\n\t\t\t\tinternalInstance: vnode,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'root'\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Update a vnode tree\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tupdate(vnode) {\n\t\tlet data = getData(vnode);\n\n\t\t// Children must be updated first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tfor (let i = 0; i < data.children.length; i++) {\n\t\t\t\tlet child = data.children[i];\n\t\t\t\tlet inst = getInstance(child);\n\n\t\t\t\tlet prevChild = this.inst2vnode.get(inst);\n\t\t\t\tif (prevChild==null) this.mount(child);\n\t\t\t\telse this.update(child);\n\n\t\t\t\t// Mutate child to keep referential equality intact\n\t\t\t\tdata.children[i] = this.inst2vnode.get(inst);\n\t\t\t}\n\t\t}\n\n\t\tlet prev = this.inst2vnode.get(data.publicInstance);\n\n\t\t// The `updateProfileTimes` event is a faster version of `updated` and\n\t\t// is processed much quicker inside the devtools extension.\n\t\tif (!hasDataChanged(prev, vnode)) {\n\t\t\t// Always assume profiling data has changed. When we skip an event here\n\t\t\t// the devtools element picker will somehow break.\n\t\t\tthis.pending.push({\n\t\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t\t// vnode/fiber shape.\n\t\t\t\tinternalInstance: prev,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'updateProfileTimes'\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t// vnode/fiber shape.\n\t\t\tinternalInstance: prev,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'update'\n\t\t});\n\t}\n\n\t/**\n\t * Pass a rendered tree to the devtools. At this point elements have already\n\t * unmounted, so we don't need to check for removals and only update vs mount\n\t * instead.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberRoot(vnode) {\n\t\tlet inst = getInstance(vnode);\n\n\t\tif (this.inst2vnode.has(inst)) this.update(vnode);\n\t\telse this.mount(vnode);\n\n\t\t// The devtools checks via the existance of this property if the devtools\n\t\t// profiler should be enabled or not. If it is missing from the first root\n\t\t// node the \"Profiler\" tab won't show up.\n\t\t/** @type {import('../internal').VNode} */\n\t\tlet root = null;\n\t\tif (isRoot(vnode)) {\n\n\t\t\t/** @type {*} */\n\t\t\t(vnode).treeBaseDuration = 0;\n\t\t\troot = vnode;\n\t\t}\n\t\telse {\n\t\t\t// \"rootCommitted\" always needs the actual root node for the profiler\n\t\t\t// to be able to collect timings. The `_parent` property will\n\t\t\t// point to a vnode for a root node.\n\t\t\troot = vnode;\n\t\t\twhile (root._parent!=null) {\n\t\t\t\troot = root._parent;\n\t\t\t}\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: root,\n\t\t\trenderer: this.rid,\n\t\t\tdata: getData(root),\n\t\t\ttype: 'rootCommitted'\n\t\t});\n\n\t\tthis.flushPendingEvents();\n\t\treturn vnode;\n\t}\n\n\t/**\n\t * Unmount a vnode recursively. Contrary to mounting or updating unmounting needs\n\t * to push the events in parent-first order. Because `options.unmount` is\n\t * already fired in parent-first order we don't need to traverse anything here.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberUnmount(vnode) {\n\t\tlet inst = getInstance(vnode);\n\t\tthis.inst2vnode.delete(inst);\n\n\t\t// Special case when unmounting a root (most prominently caused by webpack's\n\t\t// `hot-module-reloading`). If this happens we need to unmount the virtual\n\t\t// `Fragment` we're wrapping around each root just for the devtools.\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: vnode,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'unmount'\n\t\t});\n\t}\n\n\t/**\n\t * Get the dom element by a vnode\n\t * @param {import('../internal').VNode} vnode\n\t * @returns {import('../internal').PreactElement | Text}\n\t */\n\tgetNativeFromReactElement(vnode) {\n\t\treturn vnode._dom;\n\t}\n\n\t/**\n\t * Get a vnode by a dom element\n\t * @param {import('../internal').PreactElement | Text} dom\n\t * @returns {import('../internal').VNode | null}\n\t */\n\tgetReactElementFromNative(dom) {\n\t\treturn this.inst2vnode.get(dom) || null;\n\t}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\twalkTree() {}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\tcleanup() {}\n}\n","import { options, Component, Fragment } from 'preact';\nimport { Renderer } from './renderer';\n\n/**\n * Wrap function with generic error logging\n *\n * @param {*} fn\n * @returns\n */\nfunction catchErrors(fn) {\n\treturn function(arg) {\n\t\ttry {\n\t\t\treturn fn(arg);\n\t\t}\n\t\tcatch (e) {\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error('The react devtools encountered an error');\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error(e); // eslint-disable-line no-console\n\t\t}\n\t};\n}\n\n/* istanbul ignore next */\nlet noop = () => undefined;\n\nexport function initDevTools() {\n\t// This global variable is injected by the devtools\n\t/** @type {import('../internal').DevtoolsWindow} */\n\tlet hook = (window).__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\tif (hook==null) return;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitRoot = noop;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitUnmount = noop;\n\n\t// Initialize our custom renderer\n\tlet rid = Math.random().toString(16).slice(2);\n\tlet preactRenderer = new Renderer(hook, rid);\n\n\tcatchErrors(() => {\n\t\tlet isDev = false;\n\t\ttry {\n\t\t\tisDev = process.env.NODE_ENV!=='production';\n\t\t}\n\t\tcatch (e) {}\n\n\t\t// Tell devtools which bundle type we run in\n\t\twindow.parent.postMessage({\n\t\t\tsource: 'react-devtools-detector',\n\t\t\treactBuildType: /* istanbul ignore next */ isDev\n\t\t\t\t? 'development'\n\t\t\t\t: 'production'\n\t\t}, '*');\n\n\t\tlet renderer = {\n\t\t\tbundleType: /* istanbul ignore next */ isDev ? 1 : 0,\n\t\t\tversion: '16.5.2',\n\t\t\trendererPackageName: 'preact',\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindHostInstanceByFiber(vnode) {\n\t\t\t\treturn vnode._dom;\n\t\t\t},\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindFiberByHostInstance(instance) {\n\t\t\t\treturn preactRenderer.inst2vnode.get(instance) || null;\n\t\t\t}\n\t\t};\n\n\t\thook._renderers[rid] = renderer;\n\n\t\t// We can't bring our own `attachRenderer` function therefore we simply\n\t\t// prevent the devtools from overwriting our custom renderer by creating\n\t\t// a noop setter.\n\t\tObject.defineProperty(hook.helpers, rid, {\n\t\t\tget: () => preactRenderer,\n\t\t\tset: () => {\n\t\t\t\tif (!preactRenderer.connected) {\n\t\t\t\t\thelpers.markConnected();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet helpers = hook.helpers[rid];\n\n\t\t// Tell the devtools that we are ready to start\n\t\thook.emit('renderer-attached', {\n\t\t\tid: rid,\n\t\t\trenderer,\n\t\t\thelpers\n\t\t});\n\n\t\tonCommitRoot = catchErrors(root => {\n\t\t\t// Empty root\n\t\t\tif (root.type===Fragment && root._children.length==0) return;\n\n\t\t\tlet roots = hook.getFiberRoots(rid);\n\t\t\troot = helpers.handleCommitFiberRoot(root);\n\t\t\tif (!roots.has(root)) roots.add(root);\n\t\t});\n\n\t\tonCommitUnmount = catchErrors(vnode => {\n\t\t\thook.onCommitFiberUnmount(rid, vnode);\n\t\t});\n\t})();\n\n\t// Store (possible) previous hooks so that we don't overwrite them\n\tlet prevVNodeHook = options.vnode;\n\tlet prevCommitRoot = options._commit;\n\tlet prevBeforeUnmount = options.unmount;\n\tlet prevBeforeDiff = options._diff;\n\tlet prevAfterDiff = options.diffed;\n\n\toptions.vnode = (vnode) => {\n\t\t// Tiny performance improvement by initializing fields as doubles\n\t\t// from the start. `performance.now()` will always return a double.\n\t\t// See https://github.com/facebook/react/issues/14365\n\t\t// and https://slidr.io/bmeurer/javascript-engine-fundamentals-the-good-the-bad-and-the-ugly\n\t\tvnode.startTime = NaN;\n\t\tvnode.endTime = NaN;\n\n\t\tvnode.startTime = 0;\n\t\tvnode.endTime = -1;\n\t\tif (prevVNodeHook) prevVNodeHook(vnode);\n\t};\n\n\toptions._diff = (vnode) => {\n\t\tvnode.startTime = now();\n\t\tif (prevBeforeDiff!=null) prevBeforeDiff(vnode);\n\t};\n\n\toptions.diffed = (vnode) => {\n\t\tvnode.endTime = now();\n\t\tif (prevAfterDiff!=null) prevAfterDiff(vnode);\n\t};\n\n\toptions._commit = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevCommitRoot!=null) prevCommitRoot(vnode);\n\n\t\t// These cases are already handled by `unmount`\n\t\tif (vnode==null) return;\n\t\tonCommitRoot(vnode);\n\t});\n\n\toptions.unmount = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevBeforeUnmount!=null) prevBeforeUnmount(vnode);\n\t\tonCommitUnmount(vnode);\n\t});\n\n\t// Inject tracking into setState\n\tconst setState = Component.prototype.setState;\n\tComponent.prototype.setState = function(update, callback) {\n\t\t// Duplicated in setState() but doesn't matter due to the guard.\n\t\tlet s = (this._nextState!==this.state && this._nextState) || (this._nextState = Object.assign({}, this.state));\n\n\t\t// Needed in order to check if state has changed after the tree has been committed:\n\t\tthis._prevState = Object.assign({}, s);\n\n\t\treturn setState.call(this, update, callback);\n\t};\n}\n\n/**\n * Get current timestamp in ms. Used for profiling.\n * @returns {number}\n */\nexport let now = Date.now;\n\ntry {\n\t/* istanbul ignore else */\n\tnow = performance.now.bind(performance);\n}\ncatch (e) {}\n","import { initDebug } from './debug';\nimport { initDevTools } from './devtools';\n\nif (process.env.NODE_ENV==='development') {\n\tinitDebug();\n\tinitDevTools();\n}\n","export const ELEMENT_NODE = 1;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n"],"names":["const","loggedTypeFailures","getNodeType","vnode","type","Fragment","getDisplayName","displayName","name","setIn","obj","path","value","last","pop","parent","reduce","acc","attr","getData","c","_component","updater","Component","setState","bind","forceUpdate","setInState","prev","setInProps","props","setInContext","context","children","getChildren","duration","endTime","startTime","nodeType","ref","key","text","state","length","publicInstance","getInstance","memoizedInteractions","actualDuration","actualStartTime","treeBaseDuration","_children","filter","Boolean","isRoot","_parent","_dom","parentNode","shallowEqual","a","b","isProps","let","Object","keys","serializeVNode","attrs","prop","hasOwnProperty","toString","prototype","call","JSON","stringify","Renderer","constructor","hook","rid","pending","inst2vnode","WeakMap","connected","catchErrors","fn","arg","e","console","error","markConnected","flushPendingEvents","this","events","i","event","emit","mount","set","data","work","renderer","Array","isArray","item","stack","slice","push","update","child","inst","get","next","_prevState","hasDataChanged","handleCommitFiberRoot","has","root","handleCommitFiberUnmount","delete","getNativeFromReactElement","getReactElementFromNative","dom","walkTree","cleanup","noop","now","Date","performance","process","env","NODE_ENV","oldBeforeDiff","options","_diff","oldDiffed","diffed","oldVnode","oldCatchError","_catchError","warnedComponents","useEffect","useLayoutEffect","lazyPropTypes","oldVNode","then","promise","Error","_childDidSuspend","_root","isValid","typeSpecs","values","location","componentName","parentVNode","getClosestDomNodeParent","undefined","_lastDomChild","info","propTypes","m","lazyVNode","warn","forEach","typeSpecName","message","_hook","comp","property","err","deprecatedAttributes","nodeName","attributes","source","self","__source","__self","defineProperties","__hooks","hooks","_list","_callback","_args","_pendingEffects","effect","_pendingLayoutEffects","layoutEffect","indexOf","initDebug","window","__REACT_DEVTOOLS_GLOBAL_HOOK__","onCommitRoot","onCommitUnmount","Math","random","preactRenderer","isDev","postMessage","reactBuildType","bundleType","version","rendererPackageName","findHostInstanceByFiber","findFiberByHostInstance","instance","_renderers","defineProperty","helpers","id","roots","getFiberRoots","add","onCommitFiberUnmount","prevVNodeHook","prevCommitRoot","_commit","prevBeforeUnmount","unmount","prevBeforeDiff","prevAfterDiff","NaN","callback","s","_nextState","assign","initDevTools"],"mappings":"8DAAAA,IAEIC,EAAqB,GCKlB,SAASC,EAAYC,UACvBA,EAAMC,OAAOC,EAAiB,UACL,mBAAbF,EAAMC,KAA0B,YACnB,iBAAbD,EAAMC,KAAwB,SACvC,OAQD,SAASE,EAAeH,UAC1BA,EAAMC,OAAOC,EAAiB,WACL,mBAAbF,EAAMC,KAA0BD,EAAMC,KAAKG,aAAeJ,EAAMC,KAAKI,KACxD,iBAAbL,EAAMC,KAAwBD,EAAMC,KAC7C,QASR,SAAgBK,EAAMC,EAAKC,EAAMC,OAC5BC,EAAOF,EAAKG,MACZC,EAASJ,EAAKK,gBAAQC,EAAKC,UAASD,EAAMA,EAAIC,GAAQ,MAAMR,GAC5DK,IACHA,EAAOF,GAAQD,GASV,SAASO,EAAQhB,OACn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oE,IAAahD,OAAOgK,OAAO,GAAIF,GAE7BpM,EAAS8C,KAAKmB,KAAMgB,EAAQkH,KC/JpCI"}
@@ -1,2 +0,0 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("preact")):"function"==typeof define&&define.amd?define(["preact"],n):n(e.preact)}(this,function(e){var n={};function t(n){return n.type===e.Fragment?"Wrapper":"function"==typeof n.type?"Composite":"string"==typeof n.type?"Native":"Text"}function r(n){return n.type===e.Fragment?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}function o(e,n,t){var r=n.pop(),o=n.reduce(function(e,n){return e?e[n]:null},e);o&&(o[r]=t)}function i(n){var i=n.__c,u=null;null!=i&&i instanceof e.Component&&(u={setState:i.setState.bind(i),forceUpdate:i.forceUpdate.bind(i),setInState:function(e,n){i.setState(function(t){return o(t,e,n),t})},setInProps:function(e,t){o(n.props,e,t),i.setState({})},setInContext:function(e,n){o(i.context,e,n),i.setState({})}});var s=a(n),c=n.endTime-n.startTime;return{nodeType:t(n),type:n.type,name:r(n),ref:n.ref||null,key:n.key||null,updater:u,text:null===n.type?n.props:null,state:null!=i&&i instanceof e.Component?i.state:null,props:n.props,children:null!==n.type?null!=s&&1==s.length&&null===s[0].type?s[0].props:s:null,publicInstance:l(n),memoizedInteractions:[],actualDuration:c,actualStartTime:n.startTime,treeBaseDuration:c}}function a(e){return null==e.__c?null!=e.__k?e.__k.filter(Boolean):[]:null!=e.__k?e.__k.filter(Boolean):null}function u(n){return n.type===e.Fragment&&null===n.__p}function l(n){return u(n)?n.__k.length>0&&null!=n.__k[0]&&null!=n.__k[0].__e?n.__k[0].__e.parentNode:n:null!=n.__c?n.__c:n.type===e.Fragment?n.props:n.__e}function s(e,n,t){if(null==e||null==n)return!1;for(var r in e)if((!t||"children"!=r||null==n[r])&&e[r]!==n[r])return!1;return Object.keys(e).length===Object.keys(n).length}function c(e){var n=e.props,t=r(e),o="";if(n)for(var i in n)if(n.hasOwnProperty(i)&&"children"!==i){var a=n[i];"function"==typeof a&&(a="function "+(a.displayName||a.name)+"() {}"),a=Object(a)!==a||a.toString?a+"":Object.prototype.toString.call(a),o+=" "+i+"="+JSON.stringify(a)}var u=n.children;return"<"+t+o+(u&&u.length?">..</"+t+">":" />")}var f=function(e,n){this.rid=n,this.hook=e,this.pending=[],this.inst2vnode=new WeakMap,this.connected=!1};function d(e){return function(n){try{return e(n)}catch(e){console.error("The react devtools encountered an error"),console.error(e)}}}f.prototype.markConnected=function(){this.connected=!0,this.flushPendingEvents()},f.prototype.flushPendingEvents=function(){if(this.connected){var e=this.pending;this.pending=[];for(var n=0;n<e.length;n++){var t=e[n];this.hook.emit(t.type,t)}}},f.prototype.mount=function(e){this.inst2vnode.set(l(e),e);var n=i(e),t=[{internalInstance:e,data:n,renderer:this.rid,type:"mount"}];if(Array.isArray(n.children))for(var r,o=n.children.slice();null!=(r=o.pop());){var s=a(r);o.push.apply(o,s),this.inst2vnode.set(l(r),r);var c=i(r);t.push({internalInstance:r,data:c,renderer:this.rid,type:"mount"})}for(var f=t.length;--f>=0;)this.pending.push(t[f]);u(e)&&this.pending.push({internalInstance:e,data:n,renderer:this.rid,type:"root"})},f.prototype.update=function(e){var n=i(e);if(Array.isArray(n.children))for(var t=0;t<n.children.length;t++){var r=n.children[t],o=l(r);null==this.inst2vnode.get(o)?this.mount(r):this.update(r),n.children[t]=this.inst2vnode.get(o)}var a=this.inst2vnode.get(n.publicInstance);!function(e,n){return e.props!==n.props&&!s(e.props,n.props,!0)||null!=e.__c&&!s(n.__c.__u,n.__c.state)||e.__e!==n.__e||e.ref!==n.ref}(a,e)?this.pending.push({internalInstance:a,data:n,renderer:this.rid,type:"updateProfileTimes"}):this.pending.push({internalInstance:a,data:n,renderer:this.rid,type:"update"})},f.prototype.handleCommitFiberRoot=function(e){var n=l(e);this.inst2vnode.has(n)?this.update(e):this.mount(e);var t=null;if(u(e))e.treeBaseDuration=0,t=e;else for(t=e;null!=t.__p;)t=t.__p;return this.pending.push({internalInstance:t,renderer:this.rid,data:i(t),type:"rootCommitted"}),this.flushPendingEvents(),e},f.prototype.handleCommitFiberUnmount=function(e){var n=l(e);this.inst2vnode.delete(n),this.pending.push({internalInstance:e,renderer:this.rid,type:"unmount"})},f.prototype.getNativeFromReactElement=function(e){return e.__e},f.prototype.getReactElementFromNative=function(e){return this.inst2vnode.get(e)||null},f.prototype.walkTree=function(){},f.prototype.cleanup=function(){};var h=function(){},p=Date.now;try{p=performance.now.bind(performance)}catch(e){}"development"===process.env.NODE_ENV&&(function(){var t=e.options.__b,o=e.options.diffed,i=e.options.vnode,a=e.options.__e,u={useEffect:{},useLayoutEffect:{},lazyPropTypes:{}};e.options.__e=function(e,n,t){if(n&&n.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+r(n));for(var i=n;i;i=i.__p)if(i.__c&&i.__c.t){e=o;break}}a(e,n,t)},e.options.__p=function(e,n){if(!n)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(n.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t)throw new Error("\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived "+n+" instead: render(<"+(e.type.name||e.type)+" />, "+n+");\n\t\t")},e.options.__b=function(e){if(null!=e){var o,i,a,l,s=e.type,f=function e(n){return n?"function"==typeof n.type?e(n.__p):n:{}}(e.__p);if(void 0===s)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+c(e));if(null!=s&&"object"==typeof s){if(void 0!==s.o&&void 0!==s.__e){var d="Did you accidentally pass a JSX literal as JSX twice?\n\n let My"+r(s)+" = "+c(s)+";\n let vnode = <My"+r(s)+" />;\n\nThis usually happens when you export a JSX literal and not the component.";throw new Error("Invalid type passed to createElement(): "+s+"\n\n"+d+"\n")}throw new Error("Invalid type passed to createElement(): "+(Array.isArray(s)?"array":s))}if("thead"!==s&&"tfoot"!==s&&"thead"!==s||"table"===f.type?"tr"===s&&"thead"!==f.type&&"tfoot"!==f.type&&"tbody"!==f.type&&"table"!==f.type?console.error("Improper nesting of table.Your <tr> should have a <thead/tbody/tfoot/table> parent."+c(e)):"td"===s&&"tr"!==f.type?console.error("Improper nesting of table.Your <td> should have a <tr> parent."+c(e)):"th"===s&&"tr"!==f.type&&console.error("Improper nesting of table.Your <th> should have a <tr>."+c(e)):console.error("Improper nesting of table.Your <thead/tbody/tfoot> should have a <table> parent."+c(e)),void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+c(e));if("string"==typeof e.type)for(var h in e.props)if("o"===h[0]&&"n"===h[1]&&"function"!=typeof e.props[h]&&null!=e.props[h])throw new Error("Component's \""+h+'" property should be a function, but got ['+typeof e.props[h]+"] instead\n"+c(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&!u.lazyPropTypes[e.type]){var p="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var v=e.type();u.lazyPropTypes[e.type]=!0,console.warn(p+"Component wrapped in lazy() is "+(v.type.displayName||v.type.name))}catch(e){console.warn(p+"We will log the wrapped component's name once it is loaded.")}}o=e.type.propTypes,i=e.props,a=r(e),l=c(e),Object.keys(o).forEach(function(e){var t;try{t=o[e](i,e,l,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){t=e}!t||t.message in n||(n[t.message]=!0,console.error("Failed "+a+" type: "+t.message))})}t&&t(e)}},e.options.__h=function(e){if(!e)throw new Error("Hook can only be invoked from render methods.")};var l=function(e,n){return{get:function(){throw new Error("getting vnode."+e+" is deprecated, "+n)},set:function(){throw new Error("setting vnode."+e+" is not allowed, "+n)}}},s={nodeName:l("nodeName","use vnode.type"),attributes:l("attributes","use vnode.props"),children:l("children","use vnode.props.children")};e.options.vnode=function(e){var n,t;e.props&&e.props.i&&(n=e.props.i,delete e.props.i),e.props&&e.props.u&&(t=e.props.u,delete e.props.u),e.u=t,e.i=n,Object.defineProperties(e,s),i&&i(e)},e.options.diffed=function(e){if(null!=e){if(e.__c&&e.__c.l){var n=e.__c.l;n.s.forEach(function(n){!n.h||n.p&&Array.isArray(n.p)||console.warn("In "+(e.type.name||e.type)+" you are calling useMemo/useCallback without passing arguments.\nThis is a noop since it will not be able to memoize, it will execute it every render.")}),n.v.length>0&&n.v.forEach(function(n){n.p&&Array.isArray(n.p)||u.useEffect[e.type]||(u.useEffect[e.type]=!0,console.warn('You should provide an array of arguments as the second argument to the "useEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of '+(e.type.name||e.type)+"."))}),n.m.length>0&&n.m.forEach(function(n){n.p&&Array.isArray(n.p)||u.useLayoutEffect[e.type]||(u.useLayoutEffect[e.type]=!0,console.warn('You should provide an array of arguments as the second argument to the "useLayoutEffect" hook.\n\nNot doing so will invoke this effect on every render.\n\nThis effect can be found in the render of '+(e.type.name||e.type)+"."))})}if(null!=e.__k)for(var t=[],r=0;r<e.__k.length;r++){var i=e.__k[r];if(i&&null!=i.key){var a=i.key;if(-1!==t.indexOf(a)){console.error('Following component has two or more children with the same key attribute: "'+a+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+c(e));break}t.push(a)}}o&&o(e)}}}(),function(){var n=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(null!=n){var t=h,r=h,o=Math.random().toString(16).slice(2),i=new f(n,o);d(function(){var a=!1;try{a="production"!==process.env.NODE_ENV}catch(e){}window.parent.postMessage({source:"react-devtools-detector",reactBuildType:a?"development":"production"},"*");var u={bundleType:a?1:0,version:"16.5.2",rendererPackageName:"preact",findHostInstanceByFiber:function(e){return e.__e},findFiberByHostInstance:function(e){return i.inst2vnode.get(e)||null}};n._renderers[o]=u,Object.defineProperty(n.helpers,o,{get:function(){return i},set:function(){i.connected||l.markConnected()}});var l=n.helpers[o];n.emit("renderer-attached",{id:o,renderer:u,helpers:l}),t=d(function(t){if(t.type!==e.Fragment||0!=t.__k.length){var r=n.getFiberRoots(o);t=l.handleCommitFiberRoot(t),r.has(t)||r.add(t)}}),r=d(function(e){n.onCommitFiberUnmount(o,e)})})();var a=e.options.vnode,u=e.options.__c,l=e.options.unmount,s=e.options.__b,c=e.options.diffed;e.options.vnode=function(e){e.startTime=NaN,e.endTime=NaN,e.startTime=0,e.endTime=-1,a&&a(e)},e.options.__b=function(e){e.startTime=p(),null!=s&&s(e)},e.options.diffed=function(e){e.endTime=p(),null!=c&&c(e)},e.options.__c=d(function(e){null!=u&&u(e),null!=e&&t(e)}),e.options.unmount=d(function(e){null!=l&&l(e),r(e)});var v=e.Component.prototype.setState;e.Component.prototype.setState=function(e,n){var t=this.__s!==this.state&&this.__s||(this.__s=Object.assign({},this.state));return this.__u=Object.assign({},t),v.call(this,e,n)}}}())});
2
- //# sourceMappingURL=debug.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.umd.js","sources":["../src/check-props.js","../src/devtools/custom.js","../src/debug.js","../src/devtools/renderer.js","../src/devtools/index.js","../src/index.js","../src/constants.js"],"sourcesContent":["const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nlet loggedTypeFailures = {};\n\nexport function checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n\tObject.keys(typeSpecs).forEach((typeSpecName) => {\n\t\tlet error;\n\t\ttry {\n\t\t\terror = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n\t\t}\n\t\tcatch (e) {\n\t\t\terror = e;\n\t\t}\n\t\tif (error && !(error.message in loggedTypeFailures)) {\n\t\t\tloggedTypeFailures[error.message] = true;\n\t\t\tconsole.error(`Failed ${location} type: ${error.message}${getStack && getStack() || ''}`);\n\t\t}\n\t});\n}\n","import { Component, Fragment } from 'preact';\n\n/**\n * Get the type/category of a vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').NodeType}\n */\nexport function getNodeType(vnode) {\n\tif (vnode.type===Fragment) return 'Wrapper';\n\telse if (typeof vnode.type==='function') return 'Composite';\n\telse if (typeof vnode.type==='string') return 'Native';\n\treturn 'Text';\n}\n\n/**\n * Get human readable name of the component/dom element\n * @param {import('../internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type===Fragment) return 'Fragment';\n\telse if (typeof vnode.type==='function') return vnode.type.displayName || vnode.type.name;\n\telse if (typeof vnode.type==='string') return vnode.type;\n\treturn '#text';\n}\n\n/**\n * Deeply mutate a property by walking down an array of property keys\n * @param {object} obj\n * @param {Array<string | number>} path\n * @param {any} value\n */\nexport function setIn(obj, path, value) {\n\tlet last = path.pop();\n\tlet parent = path.reduce((acc, attr) => acc ? acc[attr] : null, obj);\n\tif (parent) {\n\t\tparent[last] = value;\n\t}\n}\n\n/**\n * Get devtools compatible data from vnode\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').DevtoolData}\n */\nexport function getData(vnode) {\n\tlet c = vnode._component;\n\n\t/** @type {import('../internal').DevtoolsUpdater | null} */\n\tlet updater = null;\n\n\tif (c!=null && c instanceof Component) {\n\t\t// These functions will be called when the user changes state, props or\n\t\t// context values via the devtools ui panel\n\t\tupdater = {\n\t\t\tsetState: c.setState.bind(c),\n\t\t\tforceUpdate: c.forceUpdate.bind(c),\n\t\t\tsetInState(path, value) {\n\t\t\t\tc.setState(prev => {\n\t\t\t\t\tsetIn(prev, path, value);\n\t\t\t\t\treturn prev;\n\t\t\t\t});\n\t\t\t},\n\t\t\tsetInProps(path, value) {\n\t\t\t\tsetIn(vnode.props, path, value);\n\t\t\t\tc.setState({});\n\t\t\t},\n\t\t\tsetInContext(path, value) {\n\t\t\t\tsetIn(c.context, path, value);\n\t\t\t\tc.setState({});\n\t\t\t}\n\t\t};\n\t}\n\n\tlet children = getChildren(vnode);\n\n\tlet duration = vnode.endTime - vnode.startTime;\n\treturn {\n\t\tnodeType: getNodeType(vnode),\n\t\ttype: vnode.type,\n\t\tname: getDisplayName(vnode),\n\t\tref: vnode.ref || null,\n\t\tkey: vnode.key || null,\n\t\tupdater,\n\t\ttext: vnode.type===null ? vnode.props : null,\n\t\tstate: c!=null && c instanceof Component ? c.state : null,\n\t\tprops: vnode.props,\n\t\t// The devtools inline text children if they are the only child\n\t\tchildren: vnode.type!==null\n\t\t\t? children!=null && children.length==1 && children[0].type===null\n\t\t\t\t? children[0].props\n\t\t\t\t: children\n\t\t\t: null,\n\t\tpublicInstance: getInstance(vnode),\n\t\tmemoizedInteractions: [],\n\n\t\t// Profiler data\n\t\tactualDuration: duration,\n\t\tactualStartTime: vnode.startTime,\n\t\ttreeBaseDuration: duration\n\t};\n}\n\n/**\n * Get all rendered vnode children as an array. Moreover we need to filter\n * out `null` or other falsy children.\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').VNode[]}\n */\nexport function getChildren(vnode) {\n\tif (vnode._component==null) {\n\t\treturn vnode._children!=null ? vnode._children.filter(Boolean) : [];\n\t}\n\n\treturn vnode._children != null ? vnode._children.filter(Boolean) : null;\n}\n\n/**\n * Check if a vnode is a root node\n * @param {import('../internal').VNode} vnode\n * @returns {boolean}\n */\nexport function isRoot(vnode) {\n\t// Timings of root vnodes will never be set\n\treturn vnode.type===Fragment && vnode._parent === null;\n}\n\n/**\n * Cache a vnode by its instance and retrieve previous vnodes by the next\n * instance.\n *\n * We need this to be able to identify the previous vnode of a given instance.\n * For components we want to check if we already rendered it and use the class\n * instance as key. For html elements we use the dom node as key.\n *\n * @param {import('../internal').VNode} vnode\n * @returns {import('../internal').Component | import('../internal').PreactElement | Text | null}\n */\nexport function getInstance(vnode) {\n\t// Use the parent element as instance for root nodes\n\tif (isRoot(vnode)) {\n\t\t// Edge case: When the tree only consists of components that have not rendered\n\t\t// anything into the DOM we revert to using the vnode as instance.\n\t\treturn vnode._children.length > 0 && vnode._children[0]!=null && vnode._children[0]._dom!=null\n\t\t\t? /** @type {import('../internal').PreactElement | null} */\n\t\t\t(vnode._children[0]._dom.parentNode)\n\t\t\t: vnode;\n\t}\n\tif (vnode._component!=null) return vnode._component;\n\tif (vnode.type===Fragment) return vnode.props;\n\treturn vnode._dom;\n}\n\n/**\n * Compare two objects\n * @param {object} a\n * @param {object} b\n * @param {boolean} [isProps]\n * @returns {boolean}\n */\nexport function shallowEqual(a, b, isProps) {\n\tif (a==null || b==null) return false;\n\n\tfor (let key in a) {\n\t\tif (isProps && key=='children' && b[key]!=null) continue;\n\t\tif (a[key]!==b[key]) return false;\n\t}\n\n\tif (Object.keys(a).length!==Object.keys(b).length) return false;\n\treturn true;\n}\n\n/**\n * Check if a vnode was actually updated\n * @param {import('../internal').VNode} next\n * @param {import('../internal').VNode} prev\n * @returns {boolean}\n */\nexport function hasDataChanged(prev, next) {\n\treturn (prev.props !== next.props && !shallowEqual(prev.props, next.props, true))\n\t\t|| (prev._component!=null &&\n\t\t\t!shallowEqual(next._component._prevState, next._component.state))\n\t\t|| prev._dom !== next._dom\n\t\t|| prev.ref !== next.ref;\n}\n","import { checkPropTypes } from './check-props';\nimport { getDisplayName } from './devtools/custom';\nimport { options } from 'preact';\nimport { ELEMENT_NODE, DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE } from './constants';\n\nfunction getClosestDomNodeParent(parent) {\n\tif (!parent) return {};\n\tif (typeof parent.type === 'function') {\n\t\treturn getClosestDomNodeParent(parent._parent);\n\t}\n\treturn parent;\n}\n\nexport function initDebug() {\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldVnode = options.vnode;\n\tlet oldCatchError = options._catchError;\n\tconst warnedComponents = { useEffect: {}, useLayoutEffect: {}, lazyPropTypes: {} };\n\n\toptions._catchError = (error, vnode, oldVNode) => {\n\t\tlet component = vnode && vnode._component;\n\t\tif (component && typeof error.then === 'function') {\n\t\t\tconst promise = error;\n\t\t\terror = new Error('Missing Suspense. The throwing component was: ' + getDisplayName(vnode));\n\n\t\t\tlet parent = vnode;\n\t\t\tfor (; parent; parent = parent._parent) {\n\t\t\t\tif (parent._component && parent._component._childDidSuspend) {\n\t\t\t\t\terror = promise;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\toldCatchError(error, vnode, oldVNode);\n\t};\n\n\toptions._root = (vnode, parentNode) => {\n\t\tif (!parentNode) {\n\t\t\tthrow new Error('Undefined parent passed to render(), this is the second argument.\\nCheck if the element is available in the DOM/has the correct id.');\n\t\t}\n\t\tlet isValid;\n\t\tswitch (parentNode.nodeType) {\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\tcase DOCUMENT_NODE: isValid = true; break;\n\t\t\tdefault: isValid = false;\n\t\t}\n\t\tif (!isValid) throw new Error(`\n\t\t\tExpected a valid HTML node as a second argument to render.\n\t\t\tReceived ${parentNode} instead: render(<${vnode.type.name || vnode.type} />, ${parentNode});\n\t\t`);\n\t};\n\n\toptions._diff = vnode => {\n\t\tif (vnode == null) { return; }\n\n\t\tlet { type, _parent: parent } = vnode;\n\t\tlet parentVNode = getClosestDomNodeParent(parent);\n\n\t\tif (type===undefined) {\n\t\t\tthrow new Error('Undefined component passed to createElement()\\n\\n'+\n\t\t\t'You likely forgot to export your component or might have mixed up default and named imports'+\n\t\t\tserializeVNode(vnode));\n\t\t}\n\t\telse if (type!=null && typeof type==='object') {\n\t\t\tif (type._lastDomChild!==undefined && type._dom!==undefined) {\n\t\t\t\tlet info = 'Did you accidentally pass a JSX literal as JSX twice?\\n\\n'+\n\t\t\t\t' let My'+getDisplayName(type)+' = '+serializeVNode(type)+';\\n'+\n\t\t\t\t' let vnode = <My'+getDisplayName(type)+' />;\\n\\n'+\n\t\t\t\t'This usually happens when you export a JSX literal and not the component.';\n\t\t\t\tthrow new Error('Invalid type passed to createElement(): '+type+'\\n\\n'+info+'\\n');\n\t\t\t}\n\n\t\t\tthrow new Error('Invalid type passed to createElement(): '+(Array.isArray(type) ? 'array' : type));\n\t\t}\n\n\t\tif ((type==='thead' || type==='tfoot' || type==='thead') && parentVNode.type!=='table') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <thead/tbody/tfoot> should have a <table> parent.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (\n\t\t\ttype==='tr' && (\n\t\t\t\tparentVNode.type!=='thead' &&\n\t\t\t\tparentVNode.type!=='tfoot' &&\n\t\t\t\tparentVNode.type!=='tbody' &&\n\t\t\t\tparentVNode.type!=='table'\n\t\t\t)) {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <tr> should have a <thead/tbody/tfoot/table> parent.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (type==='td' && parentVNode.type!=='tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t\t'Your <td> should have a <tr> parent.'\n\t\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\t\telse if (type==='th' && parentVNode.type!=='tr') {\n\t\t\tconsole.error(\n\t\t\t\t'Improper nesting of table.' +\n\t\t\t\t'Your <th> should have a <tr>.'\n\t\t\t\t+ serializeVNode(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvnode.ref!==undefined &&\n\t\t\ttypeof vnode.ref!=='function' &&\n\t\t\ttypeof vnode.ref!=='object' &&\n\t\t\t!('$$typeof' in vnode) // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t`by createRef(), but got [${typeof vnode.ref}] instead\\n` +\n\t\t\t\tserializeVNode(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (typeof vnode.type==='string') {\n\t\t\tfor (const key in vnode.props) {\n\t\t\t\tif (key[0]==='o' && key[1]==='n' && typeof vnode.props[key]!=='function' && vnode.props[key]!=null) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Component's \"${key}\" property should be a function, ` +\n\t\t\t\t\t\t`but got [${typeof vnode.props[key]}] instead\\n` +\n\t\t\t\t\t\tserializeVNode(vnode)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof vnode.type==='function' && vnode.type.propTypes) {\n\t\t\tif (vnode.type.displayName === 'Lazy' && !warnedComponents.lazyPropTypes[vnode.type]) {\n\t\t\t\tconst m = 'PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ';\n\t\t\t\ttry {\n\t\t\t\t\tconst lazyVNode = vnode.type();\n\t\t\t\t\twarnedComponents.lazyPropTypes[vnode.type] = true;\n\t\t\t\t\tconsole.warn(m + 'Component wrapped in lazy() is ' + (lazyVNode.type.displayName || lazyVNode.type.name));\n\t\t\t\t}\n\t\t\t\tcatch (promise) {\n\t\t\t\t\tconsole.warn(m + 'We will log the wrapped component\\'s name once it is loaded.');\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckPropTypes(vnode.type.propTypes, vnode.props, getDisplayName(vnode), serializeVNode(vnode));\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n\t};\n\n\toptions._hook = (comp) => {\n\t\tif (!comp) {\n\t\t\tthrow new Error('Hook can only be invoked from render methods.');\n\t\t}\n\t};\n\n\tconst warn = (property, err) => ({\n\t\tget() {\n\t\t\tthrow new Error(`getting vnode.${property} is deprecated, ${err}`);\n\t\t},\n\t\tset() {\n\t\t\tthrow new Error(`setting vnode.${property} is not allowed, ${err}`);\n\t\t}\n\t});\n\n\tconst deprecatedAttributes = {\n\t\tnodeName: warn('nodeName', 'use vnode.type'),\n\t\tattributes: warn('attributes', 'use vnode.props'),\n\t\tchildren: warn('children', 'use vnode.props.children')\n\t};\n\n\toptions.vnode = (vnode) => {\n\t\tlet source, self;\n\t\tif (vnode.props && vnode.props.__source) {\n\t\t\tsource = vnode.props.__source;\n\t\t\tdelete vnode.props.__source;\n\t\t}\n\t\tif (vnode.props && vnode.props.__self) {\n\t\t\tself = vnode.props.__self;\n\t\t\tdelete vnode.props.__self;\n\t\t}\n\t\tvnode.__self = self;\n\t\tvnode.__source = source;\n\t\tObject.defineProperties(vnode, deprecatedAttributes);\n\t\tif (oldVnode) oldVnode(vnode);\n\t};\n\n\toptions.diffed = (vnode) => {\n\t\tif (vnode == null) { return; }\n\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tlet hooks = vnode._component.__hooks;\n\t\t\thooks._list.forEach(hook => {\n\t\t\t\tif (hook._callback && (!hook._args || !Array.isArray(hook._args))) {\n\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`In ${vnode.type.name || vnode.type} you are calling useMemo/useCallback without passing arguments.\\n` +\n\t\t\t\t\t\t`This is a noop since it will not be able to memoize, it will execute it every render.`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (hooks._pendingEffects.length > 0) {\n\t\t\t\thooks._pendingEffects.forEach((effect) => {\n\t\t\t\t\tif ((!effect._args || !Array.isArray(effect._args)) && !warnedComponents.useEffect[vnode.type]) {\n\t\t\t\t\t\twarnedComponents.useEffect[vnode.type] = true;\n\t\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\t\tconsole.warn('You should provide an array of arguments as the second argument to the \"useEffect\" hook.\\n\\n' +\n\t\t\t\t\t\t\t'Not doing so will invoke this effect on every render.\\n\\n' +\n\t\t\t\t\t\t\t'This effect can be found in the render of ' + (vnode.type.name || vnode.type) + '.');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (hooks._pendingLayoutEffects.length > 0) {\n\t\t\t\thooks._pendingLayoutEffects.forEach((layoutEffect) => {\n\t\t\t\t\tif ((!layoutEffect._args || !Array.isArray(layoutEffect._args)) && !warnedComponents.useLayoutEffect[vnode.type]) {\n\t\t\t\t\t\twarnedComponents.useLayoutEffect[vnode.type] = true;\n\t\t\t\t\t\t/* istanbul ignore next */\n\t\t\t\t\t\tconsole.warn('You should provide an array of arguments as the second argument to the \"useLayoutEffect\" hook.\\n\\n' +\n\t\t\t\t\t\t\t'Not doing so will invoke this effect on every render.\\n\\n' +\n\t\t\t\t\t\t\t'This effect can be found in the render of ' + (vnode.type.name || vnode.type) + '.');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (vnode._children != null) {\n\t\t\tconst keys = [];\n\t\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\t\tconst child = vnode._children[i];\n\t\t\t\tif (!child || child.key==null) continue;\n\n\t\t\t\tconst key = child.key;\n\t\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\t\tserializeVNode(vnode)\n\t\t\t\t\t);\n\n\t\t\t\t\t// Break early to not spam the console\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\t\t}\n\n\t\tif (oldDiffed) oldDiffed(vnode);\n\t};\n}\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tif (props) {\n\t\tfor (let prop in props) {\n\t\t\tif (props.hasOwnProperty(prop) && prop!=='children') {\n\t\t\t\tlet value = props[prop];\n\n\t\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\t\tif (typeof value==='function') {\n\t\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t\t}\n\n\t\t\t\tvalue = Object(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${children && children.length\n\t\t? '>..</'+name+'>'\n\t\t: ' />'}`;\n}\n","import { getData, getChildren, getInstance, hasDataChanged, isRoot } from './custom';\n\n/**\n * Custom renderer tailored for Preact. It converts updated vnode trees\n * to events the devtools can understand.\n * @class Renderer\n */\nexport class Renderer {\n\tconstructor(hook, rid) {\n\n\t\t/** @type {string} */\n\t\tthis.rid = rid;\n\t\tthis.hook = hook;\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tthis.pending = [];\n\n\t\t/**\n\t\t * Store the instance of a vnode. This will be later used to decide if a\n\t\t * vnode needs to be mounted or updated. For components the instance refers\n\t\t * to the actuall class instance whereas for dom nodes it refers to the\n\t\t * underlying dom element.\n\t\t * @type {WeakMap<import('../internal').Component | import('../internal').PreactElement | HTMLElement | Text, import('../internal').VNode>}\n\t\t */\n\t\tthis.inst2vnode = new WeakMap();\n\t\tthis.connected = false;\n\t}\n\n\t/**\n\t * Mark the connection status as ready so that we can proceed\n\t * to actually flush events.\n\t */\n\tmarkConnected() {\n\t\tthis.connected = true;\n\t\tthis.flushPendingEvents();\n\t}\n\n\t/**\n\t * Flush all queued events\n\t */\n\tflushPendingEvents() {\n\t\tif (!this.connected) return;\n\n\t\tlet events = this.pending;\n\t\tthis.pending = [];\n\t\tfor (let i = 0; i < events.length; i++) {\n\t\t\tlet event = events[i];\n\t\t\tthis.hook.emit(event.type, event);\n\t\t}\n\t}\n\n\t/**\n\t * Recursively mount a vnode tree. Note that the devtools expectes the tree to\n\t * be mounted from the bottom up, otherwise the order will be messed up.\n\t * Therefore we mount children prior to mounting the vnode itself.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tmount(vnode) {\n\t\tthis.inst2vnode.set(getInstance(vnode), vnode);\n\t\tlet data = getData(vnode);\n\n\t\t/** @type {Array<import('../internal').DevtoolsEvent>} */\n\t\tlet work = [{\n\t\t\tinternalInstance: vnode,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'mount'\n\t\t}];\n\n\t\t// Children must be mounted first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tlet stack = data.children.slice();\n\t\t\tlet item;\n\t\t\twhile ((item = stack.pop())!=null) {\n\t\t\t\tlet children = getChildren(item);\n\t\t\t\tstack.push(...children);\n\n\t\t\t\tthis.inst2vnode.set(getInstance(item), item);\n\n\t\t\t\tlet data = getData(item);\n\n\t\t\t\twork.push({\n\t\t\t\t\tinternalInstance: item,\n\t\t\t\t\tdata,\n\t\t\t\t\trenderer: this.rid,\n\t\t\t\t\ttype: 'mount'\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = work.length; --i>=0;) {\n\t\t\tthis.pending.push(work[i]);\n\t\t}\n\n\t\t// Special event if we have a root\n\t\tif (isRoot(vnode)) {\n\t\t\tthis.pending.push({\n\t\t\t\tinternalInstance: vnode,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'root'\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Update a vnode tree\n\t * @param {import('../internal').VNode} vnode\n\t */\n\tupdate(vnode) {\n\t\tlet data = getData(vnode);\n\n\t\t// Children must be updated first\n\t\tif (Array.isArray(data.children)) {\n\t\t\tfor (let i = 0; i < data.children.length; i++) {\n\t\t\t\tlet child = data.children[i];\n\t\t\t\tlet inst = getInstance(child);\n\n\t\t\t\tlet prevChild = this.inst2vnode.get(inst);\n\t\t\t\tif (prevChild==null) this.mount(child);\n\t\t\t\telse this.update(child);\n\n\t\t\t\t// Mutate child to keep referential equality intact\n\t\t\t\tdata.children[i] = this.inst2vnode.get(inst);\n\t\t\t}\n\t\t}\n\n\t\tlet prev = this.inst2vnode.get(data.publicInstance);\n\n\t\t// The `updateProfileTimes` event is a faster version of `updated` and\n\t\t// is processed much quicker inside the devtools extension.\n\t\tif (!hasDataChanged(prev, vnode)) {\n\t\t\t// Always assume profiling data has changed. When we skip an event here\n\t\t\t// the devtools element picker will somehow break.\n\t\t\tthis.pending.push({\n\t\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t\t// vnode/fiber shape.\n\t\t\t\tinternalInstance: prev,\n\t\t\t\tdata,\n\t\t\t\trenderer: this.rid,\n\t\t\t\ttype: 'updateProfileTimes'\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\t// This property is only used as an id inside the devtools. The\n\t\t\t// relevant data will be read from `.data` instead which is a\n\t\t\t// normalized structure that every react release adheres to. This\n\t\t\t// makes backwards-compatibility easier instead of relying on internal\n\t\t\t// vnode/fiber shape.\n\t\t\tinternalInstance: prev,\n\t\t\tdata,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'update'\n\t\t});\n\t}\n\n\t/**\n\t * Pass a rendered tree to the devtools. At this point elements have already\n\t * unmounted, so we don't need to check for removals and only update vs mount\n\t * instead.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberRoot(vnode) {\n\t\tlet inst = getInstance(vnode);\n\n\t\tif (this.inst2vnode.has(inst)) this.update(vnode);\n\t\telse this.mount(vnode);\n\n\t\t// The devtools checks via the existance of this property if the devtools\n\t\t// profiler should be enabled or not. If it is missing from the first root\n\t\t// node the \"Profiler\" tab won't show up.\n\t\t/** @type {import('../internal').VNode} */\n\t\tlet root = null;\n\t\tif (isRoot(vnode)) {\n\n\t\t\t/** @type {*} */\n\t\t\t(vnode).treeBaseDuration = 0;\n\t\t\troot = vnode;\n\t\t}\n\t\telse {\n\t\t\t// \"rootCommitted\" always needs the actual root node for the profiler\n\t\t\t// to be able to collect timings. The `_parent` property will\n\t\t\t// point to a vnode for a root node.\n\t\t\troot = vnode;\n\t\t\twhile (root._parent!=null) {\n\t\t\t\troot = root._parent;\n\t\t\t}\n\t\t}\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: root,\n\t\t\trenderer: this.rid,\n\t\t\tdata: getData(root),\n\t\t\ttype: 'rootCommitted'\n\t\t});\n\n\t\tthis.flushPendingEvents();\n\t\treturn vnode;\n\t}\n\n\t/**\n\t * Unmount a vnode recursively. Contrary to mounting or updating unmounting needs\n\t * to push the events in parent-first order. Because `options.unmount` is\n\t * already fired in parent-first order we don't need to traverse anything here.\n\t * @param {import('../internal').VNode} vnode\n\t */\n\thandleCommitFiberUnmount(vnode) {\n\t\tlet inst = getInstance(vnode);\n\t\tthis.inst2vnode.delete(inst);\n\n\t\t// Special case when unmounting a root (most prominently caused by webpack's\n\t\t// `hot-module-reloading`). If this happens we need to unmount the virtual\n\t\t// `Fragment` we're wrapping around each root just for the devtools.\n\n\t\tthis.pending.push({\n\t\t\tinternalInstance: vnode,\n\t\t\trenderer: this.rid,\n\t\t\ttype: 'unmount'\n\t\t});\n\t}\n\n\t/**\n\t * Get the dom element by a vnode\n\t * @param {import('../internal').VNode} vnode\n\t * @returns {import('../internal').PreactElement | Text}\n\t */\n\tgetNativeFromReactElement(vnode) {\n\t\treturn vnode._dom;\n\t}\n\n\t/**\n\t * Get a vnode by a dom element\n\t * @param {import('../internal').PreactElement | Text} dom\n\t * @returns {import('../internal').VNode | null}\n\t */\n\tgetReactElementFromNative(dom) {\n\t\treturn this.inst2vnode.get(dom) || null;\n\t}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\twalkTree() {}\n\n\t// Unused, but devtools expects it to be there\n\t/* istanbul ignore next */\n\tcleanup() {}\n}\n","import { options, Component, Fragment } from 'preact';\nimport { Renderer } from './renderer';\n\n/**\n * Wrap function with generic error logging\n *\n * @param {*} fn\n * @returns\n */\nfunction catchErrors(fn) {\n\treturn function(arg) {\n\t\ttry {\n\t\t\treturn fn(arg);\n\t\t}\n\t\tcatch (e) {\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error('The react devtools encountered an error');\n\t\t\t/* istanbul ignore next */\n\t\t\tconsole.error(e); // eslint-disable-line no-console\n\t\t}\n\t};\n}\n\n/* istanbul ignore next */\nlet noop = () => undefined;\n\nexport function initDevTools() {\n\t// This global variable is injected by the devtools\n\t/** @type {import('../internal').DevtoolsWindow} */\n\tlet hook = (window).__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\tif (hook==null) return;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitRoot = noop;\n\n\t/** @type {(vnode: import('../internal').VNode) => void} */\n\tlet onCommitUnmount = noop;\n\n\t// Initialize our custom renderer\n\tlet rid = Math.random().toString(16).slice(2);\n\tlet preactRenderer = new Renderer(hook, rid);\n\n\tcatchErrors(() => {\n\t\tlet isDev = false;\n\t\ttry {\n\t\t\tisDev = process.env.NODE_ENV!=='production';\n\t\t}\n\t\tcatch (e) {}\n\n\t\t// Tell devtools which bundle type we run in\n\t\twindow.parent.postMessage({\n\t\t\tsource: 'react-devtools-detector',\n\t\t\treactBuildType: /* istanbul ignore next */ isDev\n\t\t\t\t? 'development'\n\t\t\t\t: 'production'\n\t\t}, '*');\n\n\t\tlet renderer = {\n\t\t\tbundleType: /* istanbul ignore next */ isDev ? 1 : 0,\n\t\t\tversion: '16.5.2',\n\t\t\trendererPackageName: 'preact',\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindHostInstanceByFiber(vnode) {\n\t\t\t\treturn vnode._dom;\n\t\t\t},\n\t\t\t// We don't need this, but the devtools `attachRenderer` function relys\n\t\t\t// it being there.\n\t\t\tfindFiberByHostInstance(instance) {\n\t\t\t\treturn preactRenderer.inst2vnode.get(instance) || null;\n\t\t\t}\n\t\t};\n\n\t\thook._renderers[rid] = renderer;\n\n\t\t// We can't bring our own `attachRenderer` function therefore we simply\n\t\t// prevent the devtools from overwriting our custom renderer by creating\n\t\t// a noop setter.\n\t\tObject.defineProperty(hook.helpers, rid, {\n\t\t\tget: () => preactRenderer,\n\t\t\tset: () => {\n\t\t\t\tif (!preactRenderer.connected) {\n\t\t\t\t\thelpers.markConnected();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet helpers = hook.helpers[rid];\n\n\t\t// Tell the devtools that we are ready to start\n\t\thook.emit('renderer-attached', {\n\t\t\tid: rid,\n\t\t\trenderer,\n\t\t\thelpers\n\t\t});\n\n\t\tonCommitRoot = catchErrors(root => {\n\t\t\t// Empty root\n\t\t\tif (root.type===Fragment && root._children.length==0) return;\n\n\t\t\tlet roots = hook.getFiberRoots(rid);\n\t\t\troot = helpers.handleCommitFiberRoot(root);\n\t\t\tif (!roots.has(root)) roots.add(root);\n\t\t});\n\n\t\tonCommitUnmount = catchErrors(vnode => {\n\t\t\thook.onCommitFiberUnmount(rid, vnode);\n\t\t});\n\t})();\n\n\t// Store (possible) previous hooks so that we don't overwrite them\n\tlet prevVNodeHook = options.vnode;\n\tlet prevCommitRoot = options._commit;\n\tlet prevBeforeUnmount = options.unmount;\n\tlet prevBeforeDiff = options._diff;\n\tlet prevAfterDiff = options.diffed;\n\n\toptions.vnode = (vnode) => {\n\t\t// Tiny performance improvement by initializing fields as doubles\n\t\t// from the start. `performance.now()` will always return a double.\n\t\t// See https://github.com/facebook/react/issues/14365\n\t\t// and https://slidr.io/bmeurer/javascript-engine-fundamentals-the-good-the-bad-and-the-ugly\n\t\tvnode.startTime = NaN;\n\t\tvnode.endTime = NaN;\n\n\t\tvnode.startTime = 0;\n\t\tvnode.endTime = -1;\n\t\tif (prevVNodeHook) prevVNodeHook(vnode);\n\t};\n\n\toptions._diff = (vnode) => {\n\t\tvnode.startTime = now();\n\t\tif (prevBeforeDiff!=null) prevBeforeDiff(vnode);\n\t};\n\n\toptions.diffed = (vnode) => {\n\t\tvnode.endTime = now();\n\t\tif (prevAfterDiff!=null) prevAfterDiff(vnode);\n\t};\n\n\toptions._commit = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevCommitRoot!=null) prevCommitRoot(vnode);\n\n\t\t// These cases are already handled by `unmount`\n\t\tif (vnode==null) return;\n\t\tonCommitRoot(vnode);\n\t});\n\n\toptions.unmount = catchErrors((vnode) => {\n\t\t// Call previously defined hook\n\t\tif (prevBeforeUnmount!=null) prevBeforeUnmount(vnode);\n\t\tonCommitUnmount(vnode);\n\t});\n\n\t// Inject tracking into setState\n\tconst setState = Component.prototype.setState;\n\tComponent.prototype.setState = function(update, callback) {\n\t\t// Duplicated in setState() but doesn't matter due to the guard.\n\t\tlet s = (this._nextState!==this.state && this._nextState) || (this._nextState = Object.assign({}, this.state));\n\n\t\t// Needed in order to check if state has changed after the tree has been committed:\n\t\tthis._prevState = Object.assign({}, s);\n\n\t\treturn setState.call(this, update, callback);\n\t};\n}\n\n/**\n * Get current timestamp in ms. Used for profiling.\n * @returns {number}\n */\nexport let now = Date.now;\n\ntry {\n\t/* istanbul ignore else */\n\tnow = performance.now.bind(performance);\n}\ncatch (e) {}\n","import { initDebug } from './debug';\nimport { initDevTools } from './devtools';\n\nif (process.env.NODE_ENV==='development') {\n\tinitDebug();\n\tinitDevTools();\n}\n","export const ELEMENT_NODE = 1;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n"],"names":["const","loggedTypeFailures","getNodeType","vnode","type","Fragment","getDisplayName","displayName","name","setIn","obj","path","value","last","pop","parent","reduce","acc","attr","getData","c","_component","updater","Component","setState","bind","forceUpdate","setInState","prev","setInProps","props","setInContext","context","children","getChildren","duration","endTime","startTime","nodeType","ref","key","text","state","length","publicInstance","getInstance","memoizedInteractions","actualDuration","actualStartTime","treeBaseDuration","_children","filter","Boolean","isRoot","_parent","_dom","parentNode","shallowEqual","a","b","isProps","let","Object","keys","serializeVNode","attrs","prop","hasOwnProperty","toString","prototype","call","JSON","stringify","Renderer","constructor","hook","rid","pending","inst2vnode","WeakMap","connected","catchErrors","fn","arg","e","console","error","markConnected","flushPendingEvents","this","events","i","event","emit","mount","set","data","work","renderer","Array","isArray","item","stack","slice","push","update","child","inst","get","next","_prevState","hasDataChanged","handleCommitFiberRoot","has","root","handleCommitFiberUnmount","delete","getNativeFromReactElement","getReactElementFromNative","dom","walkTree","cleanup","noop","now","Date","performance","process","env","NODE_ENV","oldBeforeDiff","options","_diff","oldDiffed","diffed","oldVnode","oldCatchError","_catchError","warnedComponents","useEffect","useLayoutEffect","lazyPropTypes","oldVNode","then","promise","Error","_childDidSuspend","_root","isValid","typeSpecs","values","location","componentName","parentVNode","getClosestDomNodeParent","undefined","_lastDomChild","info","propTypes","m","lazyVNode","warn","forEach","typeSpecName","message","_hook","comp","property","err","deprecatedAttributes","nodeName","attributes","source","self","__source","__self","defineProperties","__hooks","hooks","_list","_callback","_args","_pendingEffects","effect","_pendingLayoutEffects","layoutEffect","indexOf","initDebug","window","__REACT_DEVTOOLS_GLOBAL_HOOK__","onCommitRoot","onCommitUnmount","Math","random","preactRenderer","isDev","postMessage","reactBuildType","bundleType","version","rendererPackageName","findHostInstanceByFiber","findFiberByHostInstance","instance","_renderers","defineProperty","helpers","id","roots","getFiberRoots","add","onCommitFiberUnmount","prevVNodeHook","prevCommitRoot","_commit","prevBeforeUnmount","unmount","prevBeforeDiff","prevAfterDiff","NaN","callback","s","_nextState","assign","initDevTools"],"mappings":"kLAAAA,IAEIC,EAAqB,GCKlB,SAASC,EAAYC,UACvBA,EAAMC,OAAOC,WAAiB,UACL,mBAAbF,EAAMC,KAA0B,YACnB,iBAAbD,EAAMC,KAAwB,SACvC,OAQD,SAASE,EAAeH,UAC1BA,EAAMC,OAAOC,WAAiB,WACL,mBAAbF,EAAMC,KAA0BD,EAAMC,KAAKG,aAAeJ,EAAMC,KAAKI,KACxD,iBAAbL,EAAMC,KAAwBD,EAAMC,K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C,UAAU7C,SACrCD,YAAU8C,UAAU7C,SAAW,SAASiF,EAAQkH,OAE3CC,EAAKnI,KAAKoI,MAAapI,KAAK/C,OAAS+C,KAAKoI,MAAgBpI,KAAKoI,IAAa/J,OAAOgK,OAAO,GAAIrI,KAAK/C,oBAGlGoE,IAAahD,OAAOgK,OAAO,GAAIF,GAE7BpM,EAAS8C,KAAKmB,KAAMgB,EAAQkH,KC/JpCI"}
@@ -1,122 +0,0 @@
1
- /* eslint-disable no-console */
2
-
3
- if (process.env.NODE_ENV === 'development') {
4
- const preact = require('preact');
5
- const options = preact.options;
6
- const oldVnodeOption = options.vnode;
7
-
8
- options.vnode = function(vnode) {
9
- const { nodeName, attributes, children } = vnode;
10
-
11
- if (nodeName === void 0) {
12
- console.error('Undefined component passed to preact.h()\n'+serializeVNode(vnode));
13
- }
14
-
15
- if (
16
- attributes && attributes.ref !== void 0 &&
17
- typeof attributes.ref !== 'function' &&
18
- typeof attributes.ref !== 'object' &&
19
- !('$$typeof' in vnode) // allow string refs when preact-compat is installed
20
- ) {
21
- throw new Error(
22
- `Component's "ref" property should be a function or createRef() object,` +
23
- ` but [${typeof attributes.ref}] passed\n` + serializeVNode(vnode)
24
- );
25
- }
26
-
27
- {
28
- const keys = {};
29
-
30
- inspectChildren(children, (deepChild) => {
31
- if (!deepChild || deepChild.key==null) return;
32
-
33
- // In Preact, all keys are stored as object values, i.e. being strings
34
- const key = deepChild.key + '';
35
-
36
- if (keys.hasOwnProperty(key)) {
37
- console.error(
38
- 'Following component has two or more children with the ' +
39
- 'same "key" attribute. This may cause glitches and misbehavior ' +
40
- 'in rendering process. Component: \n\n' +
41
- serializeVNode(vnode)
42
- );
43
-
44
- // Return early to not spam the console
45
- return true;
46
- }
47
-
48
- keys[key] = true;
49
- });
50
- }
51
-
52
- if (oldVnodeOption) oldVnodeOption.call(this, vnode);
53
- };
54
-
55
- try {
56
- const oldRender = preact.render;
57
- preact.render = function (vnode, parent, merge) {
58
- if (parent == null && merge == null) {
59
- // render(vnode, parent, merge) can't have both parent and merge be undefined
60
- console.error('The "containerNode" or "replaceNode" is not defined in the render method. ' +
61
- 'Component: \n\n' + serializeVNode(vnode));
62
- }
63
- else if (parent == merge) {
64
- // if parent == merge, it doesn't reason well and would cause trouble when preact
65
- // tries to update or replace that 'replaceNode' element
66
- console.error(
67
- 'The "containerNode" and "replaceNode" are the same in render method, ' +
68
- 'when the "replaceNode" DOM node is expected to be a child of "containerNode". ' +
69
- 'docs-ref: https://preactjs.com/guide/api-reference#-preact-render-. Component: \n\n' +
70
- serializeVNode(vnode)
71
- );
72
- }
73
- return oldRender(vnode, parent, merge);
74
- };
75
- }
76
- catch (e) {}
77
-
78
- const inspectChildren = (children, inspect) => {
79
- if (!Array.isArray(children)) {
80
- children = [children];
81
- }
82
- return children.some((child, i) => {
83
- if (Array.isArray(child)) {
84
- return inspectChildren(child, inspect);
85
- }
86
-
87
- return inspect(child, i);
88
- });
89
- };
90
-
91
- const serializeVNode = ({ nodeName, attributes, children }) => {
92
- if (typeof nodeName==='function') {
93
- nodeName = nodeName.name || nodeName.displayName;
94
- }
95
-
96
- let props = '';
97
- if (attributes) {
98
- for (let attr in attributes) {
99
- if (attributes.hasOwnProperty(attr) && attr!=='children') {
100
- let value = attributes[attr];
101
-
102
- // If it is an object but doesn't have toString(), use Object.toString
103
- if (typeof value==='function') {
104
- value = `function ${value.displayName || value.name}() {}`;
105
- }
106
- if (Object(value) === value && !value.toString) {
107
- value = Object.prototype.toString.call(value);
108
- }
109
- else {
110
- value = value + '';
111
- }
112
-
113
- props += ` ${attr}=${JSON.stringify(value)}`;
114
- }
115
- }
116
- }
117
-
118
- return `<${nodeName}${props}${children && children.length ? ('>..</'+nodeName+'>') : ' />'}`;
119
- };
120
-
121
- require('preact/devtools');
122
- }
@@ -1,403 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('preact')) :
3
- typeof define === 'function' && define.amd ? define(['preact'], factory) :
4
- (factory(global.preact));
5
- }(this, (function (preact) { 'use strict';
6
-
7
- // render modes
8
-
9
- var ATTR_KEY = '__preactattr_';
10
-
11
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
12
-
13
- /**
14
- * Return a ReactElement-compatible object for the current state of a preact
15
- * component.
16
- */
17
- function createReactElement(component) {
18
- return {
19
- type: component.constructor,
20
- key: component.key,
21
- ref: null, // Unsupported
22
- props: component.props
23
- };
24
- }
25
-
26
- /**
27
- * Create a ReactDOMComponent-compatible object for a given DOM node rendered
28
- * by preact.
29
- *
30
- * This implements the subset of the ReactDOMComponent interface that
31
- * React DevTools requires in order to display DOM nodes in the inspector with
32
- * the correct type and properties.
33
- *
34
- * @param {Node} node
35
- */
36
- function createReactDOMComponent(node) {
37
- var childNodes = node.nodeType === Node.ELEMENT_NODE ? Array.from(node.childNodes) : [];
38
-
39
- var isText = node.nodeType === Node.TEXT_NODE;
40
-
41
- return {
42
- // --- ReactDOMComponent interface
43
- _currentElement: isText ? node.textContent : {
44
- type: node.nodeName.toLowerCase(),
45
- props: node[ATTR_KEY]
46
- },
47
- _renderedChildren: childNodes.map(function (child) {
48
- if (child._component) {
49
- return updateReactComponent(child._component);
50
- }
51
- return updateReactComponent(child);
52
- }),
53
- _stringText: isText ? node.textContent : null,
54
-
55
- // --- Additional properties used by preact devtools
56
-
57
- // A flag indicating whether the devtools have been notified about the
58
- // existence of this component instance yet.
59
- // This is used to send the appropriate notifications when DOM components
60
- // are added or updated between composite component updates.
61
- _inDevTools: false,
62
- node: node
63
- };
64
- }
65
-
66
- /**
67
- * Return the name of a component created by a `ReactElement`-like object.
68
- *
69
- * @param {ReactElement} element
70
- */
71
- function typeName(element) {
72
- if (typeof element.type === 'function') {
73
- return element.type.displayName || element.type.name;
74
- }
75
- return element.type;
76
- }
77
-
78
- /**
79
- * Return a ReactCompositeComponent-compatible object for a given preact
80
- * component instance.
81
- *
82
- * This implements the subset of the ReactCompositeComponent interface that
83
- * the DevTools requires in order to walk the component tree and inspect the
84
- * component's properties.
85
- *
86
- * See https://github.com/facebook/react-devtools/blob/e31ec5825342eda570acfc9bcb43a44258fceb28/backend/getData.js
87
- */
88
- function createReactCompositeComponent(component) {
89
- var _currentElement = createReactElement(component);
90
- var node = component.base;
91
-
92
- var instance = {
93
- // --- ReactDOMComponent properties
94
- getName: function getName() {
95
- return typeName(_currentElement);
96
- },
97
-
98
- _currentElement: createReactElement(component),
99
- props: component.props,
100
- state: component.state,
101
- forceUpdate: component.forceUpdate && component.forceUpdate.bind(component),
102
- setState: component.setState && component.setState.bind(component),
103
-
104
- // --- Additional properties used by preact devtools
105
- node: node
106
- };
107
-
108
- // React DevTools exposes the `_instance` field of the selected item in the
109
- // component tree as `$r` in the console. `_instance` must refer to a
110
- // React Component (or compatible) class instance with `props` and `state`
111
- // fields and `setState()`, `forceUpdate()` methods.
112
- instance._instance = component;
113
-
114
- // If the root node returned by this component instance's render function
115
- // was itself a composite component, there will be a `_component` property
116
- // containing the child component instance.
117
- if (component._component) {
118
- instance._renderedComponent = updateReactComponent(component._component);
119
- } else {
120
- // Otherwise, if the render() function returned an HTML/SVG element,
121
- // create a ReactDOMComponent-like object for the DOM node itself.
122
- instance._renderedComponent = updateReactComponent(node);
123
- }
124
-
125
- return instance;
126
- }
127
-
128
- /**
129
- * Map of Component|Node to ReactDOMComponent|ReactCompositeComponent-like
130
- * object.
131
- *
132
- * The same React*Component instance must be used when notifying devtools
133
- * about the initial mount of a component and subsequent updates.
134
- */
135
- var instanceMap = typeof Map === 'function' && new Map();
136
-
137
- /**
138
- * Update (and create if necessary) the ReactDOMComponent|ReactCompositeComponent-like
139
- * instance for a given preact component instance or DOM Node.
140
- *
141
- * @param {Component|Node} componentOrNode
142
- */
143
- function updateReactComponent(componentOrNode) {
144
- var newInstance = componentOrNode instanceof Node ? createReactDOMComponent(componentOrNode) : createReactCompositeComponent(componentOrNode);
145
- if (instanceMap.has(componentOrNode)) {
146
- var inst = instanceMap.get(componentOrNode);
147
- Object.assign(inst, newInstance);
148
- return inst;
149
- }
150
- instanceMap.set(componentOrNode, newInstance);
151
- return newInstance;
152
- }
153
-
154
- function nextRootKey(roots) {
155
- return '.' + Object.keys(roots).length;
156
- }
157
-
158
- /**
159
- * Find all root component instances rendered by preact in `node`'s children
160
- * and add them to the `roots` map.
161
- *
162
- * @param {DOMElement} node
163
- * @param {[key: string] => ReactDOMComponent|ReactCompositeComponent}
164
- */
165
- function findRoots(node, roots) {
166
- Array.from(node.childNodes).forEach(function (child) {
167
- if (child._component) {
168
- roots[nextRootKey(roots)] = updateReactComponent(child._component);
169
- } else {
170
- findRoots(child, roots);
171
- }
172
- });
173
- }
174
-
175
- /**
176
- * Create a bridge for exposing preact's component tree to React DevTools.
177
- *
178
- * It creates implementations of the interfaces that ReactDOM passes to
179
- * devtools to enable it to query the component tree and hook into component
180
- * updates.
181
- *
182
- * See https://github.com/facebook/react/blob/59ff7749eda0cd858d5ee568315bcba1be75a1ca/src/renderers/dom/ReactDOM.js
183
- * for how ReactDOM exports its internals for use by the devtools and
184
- * the `attachRenderer()` function in
185
- * https://github.com/facebook/react-devtools/blob/e31ec5825342eda570acfc9bcb43a44258fceb28/backend/attachRenderer.js
186
- * for how the devtools consumes the resulting objects.
187
- */
188
- function createDevToolsBridge() {
189
- // The devtools has different paths for interacting with the renderers from
190
- // React Native, legacy React DOM and current React DOM.
191
- //
192
- // Here we emulate the interface for the current React DOM (v15+) lib.
193
-
194
- // ReactDOMComponentTree-like object
195
- var ComponentTree = {
196
- getNodeFromInstance: function getNodeFromInstance(instance) {
197
- return instance.node;
198
- },
199
- getClosestInstanceFromNode: function getClosestInstanceFromNode(node) {
200
- while (node && !node._component) {
201
- node = node.parentNode;
202
- }
203
- return node ? updateReactComponent(node._component) : null;
204
- }
205
- };
206
-
207
- // Map of root ID (the ID is unimportant) to component instance.
208
- var roots = {};
209
- findRoots(document.body, roots);
210
-
211
- // ReactMount-like object
212
- //
213
- // Used by devtools to discover the list of root component instances and get
214
- // notified when new root components are rendered.
215
- var Mount = {
216
- _instancesByReactRootID: roots,
217
-
218
- // Stub - React DevTools expects to find this method and replace it
219
- // with a wrapper in order to observe new root components being added
220
- _renderNewRootComponent: function _renderNewRootComponent() /* instance, ... */{}
221
- };
222
-
223
- // ReactReconciler-like object
224
- var Reconciler = {
225
- // Stubs - React DevTools expects to find these methods and replace them
226
- // with wrappers in order to observe components being mounted, updated and
227
- // unmounted
228
- mountComponent: function mountComponent() /* instance, ... */{},
229
- performUpdateIfNecessary: function performUpdateIfNecessary() /* instance, ... */{},
230
- receiveComponent: function receiveComponent() /* instance, ... */{},
231
- unmountComponent: function unmountComponent() /* instance, ... */{}
232
- };
233
-
234
- /** Notify devtools that a new component instance has been mounted into the DOM. */
235
- var componentAdded = function componentAdded(component) {
236
- var instance = updateReactComponent(component);
237
- if (isRootComponent(component)) {
238
- instance._rootID = nextRootKey(roots);
239
- roots[instance._rootID] = instance;
240
- Mount._renderNewRootComponent(instance);
241
- }
242
- visitNonCompositeChildren(instance, function (childInst) {
243
- childInst._inDevTools = true;
244
- Reconciler.mountComponent(childInst);
245
- });
246
- Reconciler.mountComponent(instance);
247
- };
248
-
249
- /** Notify devtools that a component has been updated with new props/state. */
250
- var componentUpdated = function componentUpdated(component) {
251
- var prevRenderedChildren = [];
252
- var instance = instanceMap.get(component);
253
- if (instance) {
254
- visitNonCompositeChildren(instance, function (childInst) {
255
- prevRenderedChildren.push(childInst);
256
- });
257
- }
258
- // Notify devtools about updates to this component and any non-composite
259
- // children
260
- instance = updateReactComponent(component);
261
-
262
- Reconciler.receiveComponent(instance);
263
- visitNonCompositeChildren(instance, function (childInst) {
264
- if (!childInst._inDevTools) {
265
- // New DOM child component
266
- childInst._inDevTools = true;
267
- Reconciler.mountComponent(childInst);
268
- } else {
269
- // Updated DOM child component
270
- Reconciler.receiveComponent(childInst);
271
- }
272
- });
273
-
274
- // For any non-composite children that were removed by the latest render,
275
- // remove the corresponding ReactDOMComponent-like instances and notify
276
- // the devtools
277
- prevRenderedChildren.forEach(function (childInst) {
278
- if (!document.body.contains(childInst.node)) {
279
- instanceMap.delete(childInst.node);
280
- Reconciler.unmountComponent(childInst);
281
- }
282
- });
283
- };
284
-
285
- /** Notify devtools that a component has been unmounted from the DOM. */
286
- var componentRemoved = function componentRemoved(component) {
287
- var instance = updateReactComponent(component);
288
- visitNonCompositeChildren(function (childInst) {
289
- instanceMap.delete(childInst.node);
290
- Reconciler.unmountComponent(childInst);
291
- });
292
- Reconciler.unmountComponent(instance);
293
- instanceMap.delete(component);
294
- if (instance._rootID) {
295
- delete roots[instance._rootID];
296
- }
297
- };
298
-
299
- return {
300
- componentAdded: componentAdded,
301
- componentUpdated: componentUpdated,
302
- componentRemoved: componentRemoved,
303
-
304
- // Interfaces passed to devtools via __REACT_DEVTOOLS_GLOBAL_HOOK__.inject()
305
- ComponentTree: ComponentTree,
306
- Mount: Mount,
307
- Reconciler: Reconciler
308
- };
309
- }
310
-
311
- /**
312
- * Return `true` if a preact component is a top level component rendered by
313
- * `render()` into a container Element.
314
- */
315
- function isRootComponent(component) {
316
- // `_parentComponent` is actually `__u` after minification
317
- if (component._parentComponent || component.__u) {
318
- // Component with a composite parent
319
- return false;
320
- }
321
- if (component.base.parentElement && component.base.parentElement[ATTR_KEY]) {
322
- // Component with a parent DOM element rendered by Preact
323
- return false;
324
- }
325
- return true;
326
- }
327
-
328
- /**
329
- * Visit all child instances of a ReactCompositeComponent-like object that are
330
- * not composite components (ie. they represent DOM elements or text)
331
- *
332
- * @param {Component} component
333
- * @param {(Component) => void} visitor
334
- */
335
- function visitNonCompositeChildren(component, visitor) {
336
- if (!component) return;
337
- if (component._renderedComponent) {
338
- if (!component._renderedComponent._component) {
339
- visitor(component._renderedComponent);
340
- visitNonCompositeChildren(component._renderedComponent, visitor);
341
- }
342
- } else if (component._renderedChildren) {
343
- component._renderedChildren.forEach(function (child) {
344
- visitor(child);
345
- if (!child._component) visitNonCompositeChildren(child, visitor);
346
- });
347
- }
348
- }
349
-
350
- /**
351
- * Create a bridge between the preact component tree and React's dev tools
352
- * and register it.
353
- *
354
- * After this function is called, the React Dev Tools should be able to detect
355
- * "React" on the page and show the component tree.
356
- *
357
- * This function hooks into preact VNode creation in order to expose functional
358
- * components correctly, so it should be called before the root component(s)
359
- * are rendered.
360
- *
361
- * Returns a cleanup function which unregisters the hooks.
362
- */
363
- function initDevTools() {
364
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
365
- // React DevTools are not installed
366
- return;
367
- }
368
-
369
- // Notify devtools when preact components are mounted, updated or unmounted
370
- var bridge = createDevToolsBridge();
371
-
372
- var nextAfterMount = preact.options.afterMount;
373
- preact.options.afterMount = function (component) {
374
- bridge.componentAdded(component);
375
- if (nextAfterMount) nextAfterMount(component);
376
- };
377
-
378
- var nextAfterUpdate = preact.options.afterUpdate;
379
- preact.options.afterUpdate = function (component) {
380
- bridge.componentUpdated(component);
381
- if (nextAfterUpdate) nextAfterUpdate(component);
382
- };
383
-
384
- var nextBeforeUnmount = preact.options.beforeUnmount;
385
- preact.options.beforeUnmount = function (component) {
386
- bridge.componentRemoved(component);
387
- if (nextBeforeUnmount) nextBeforeUnmount(component);
388
- };
389
-
390
- // Notify devtools about this instance of "React"
391
- __REACT_DEVTOOLS_GLOBAL_HOOK__.inject(bridge);
392
-
393
- return function () {
394
- preact.options.afterMount = nextAfterMount;
395
- preact.options.afterUpdate = nextAfterUpdate;
396
- preact.options.beforeUnmount = nextBeforeUnmount;
397
- };
398
- }
399
-
400
- initDevTools();
401
-
402
- })));
403
- //# sourceMappingURL=devtools.js.map