@sitecore/sc-contenthub-blok 0.0.90 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (895) hide show
  1. package/dist/Components/BlokBadge/BlokBadge.spec.js +1 -1
  2. package/dist/Components/BlokBadge/BlokBadge.spec.js.map +1 -1
  3. package/dist/Components/BlokButton/BlokButton.d.ts +3 -4
  4. package/dist/Components/BlokButton/BlokButton.js +3 -3
  5. package/dist/Components/BlokButton/BlokButton.js.map +1 -1
  6. package/dist/Components/BlokButtonGroup/BlokButtonGroup.d.ts +1 -2
  7. package/dist/Components/BlokButtonGroup/BlokButtonGroup.js +2 -1
  8. package/dist/Components/BlokButtonGroup/BlokButtonGroup.js.map +1 -1
  9. package/dist/Components/BlokButtonGroup/BlokButtonGroup.spec.js +8 -11
  10. package/dist/Components/BlokButtonGroup/BlokButtonGroup.spec.js.map +1 -1
  11. package/dist/Components/BlokButtonGroup/BlokButtonGroup.stories.js +3 -6
  12. package/dist/Components/BlokButtonGroup/BlokButtonGroup.stories.js.map +1 -1
  13. package/dist/Components/BlokIcon/BlokIcon.d.ts +2 -1
  14. package/dist/Components/BlokIcon/BlokIcon.js +3 -3
  15. package/dist/Components/BlokIcon/BlokIcon.js.map +1 -1
  16. package/dist/Components/BlokIconButton/BlokIconButton.d.ts +2 -4
  17. package/dist/Components/BlokIconButton/BlokIconButton.js +3 -3
  18. package/dist/Components/BlokIconButton/BlokIconButton.js.map +1 -1
  19. package/dist/Components/BlokSearchBox/BlokSearchBox.d.ts +3 -2
  20. package/dist/Components/BlokSearchBox/BlokSearchBox.js +3 -2
  21. package/dist/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
  22. package/dist/Components/BlokTooltip/BlokTooltip.js +0 -4
  23. package/dist/Components/BlokTooltip/BlokTooltip.js.map +1 -1
  24. package/esm/Components/BlokButton/BlokButton.js +2 -3
  25. package/esm/Components/BlokButton/BlokButton.js.map +1 -1
  26. package/esm/Components/BlokButtonGroup/BlokButtonGroup.js +1 -2
  27. package/esm/Components/BlokButtonGroup/BlokButtonGroup.js.map +1 -1
  28. package/esm/Components/BlokIcon/BlokIcon.js +2 -3
  29. package/esm/Components/BlokIcon/BlokIcon.js.map +1 -1
  30. package/esm/Components/BlokIconButton/BlokIconButton.js +2 -3
  31. package/esm/Components/BlokIconButton/BlokIconButton.js.map +1 -1
  32. package/esm/Components/BlokSearchBox/BlokSearchBox.js +3 -3
  33. package/esm/Components/BlokSearchBox/BlokSearchBox.js.map +1 -1
  34. package/esm/Components/BlokTooltip/BlokTooltip.js +0 -4
  35. package/esm/Components/BlokTooltip/BlokTooltip.js.map +1 -1
  36. package/node_modules/@babel/code-frame/package.json +3 -3
  37. package/node_modules/@babel/generator/lib/generators/classes.js +7 -4
  38. package/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
  39. package/node_modules/@babel/generator/lib/generators/deprecated.js +28 -0
  40. package/node_modules/@babel/generator/lib/generators/deprecated.js.map +1 -0
  41. package/node_modules/@babel/generator/lib/generators/expressions.js +17 -12
  42. package/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
  43. package/node_modules/@babel/generator/lib/generators/jsx.js +6 -1
  44. package/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
  45. package/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  46. package/node_modules/@babel/generator/lib/generators/modules.js +8 -3
  47. package/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
  48. package/node_modules/@babel/generator/lib/generators/statements.js +1 -4
  49. package/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
  50. package/node_modules/@babel/generator/lib/generators/template-literals.js +16 -11
  51. package/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
  52. package/node_modules/@babel/generator/lib/generators/types.js +4 -9
  53. package/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
  54. package/node_modules/@babel/generator/lib/generators/typescript.js +40 -18
  55. package/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
  56. package/node_modules/@babel/generator/lib/index.js +3 -1
  57. package/node_modules/@babel/generator/lib/index.js.map +1 -1
  58. package/node_modules/@babel/generator/lib/node/index.js +11 -8
  59. package/node_modules/@babel/generator/lib/node/index.js.map +1 -1
  60. package/node_modules/@babel/generator/lib/node/parentheses.js +44 -7
  61. package/node_modules/@babel/generator/lib/node/parentheses.js.map +1 -1
  62. package/node_modules/@babel/generator/lib/printer.js +31 -24
  63. package/node_modules/@babel/generator/lib/printer.js.map +1 -1
  64. package/node_modules/@babel/generator/package.json +9 -9
  65. package/node_modules/@babel/helper-globals/LICENSE +22 -0
  66. package/node_modules/@babel/helper-globals/README.md +19 -0
  67. package/node_modules/@babel/helper-globals/data/browser-upper.json +911 -0
  68. package/node_modules/@babel/helper-globals/data/builtin-lower.json +15 -0
  69. package/node_modules/@babel/helper-globals/data/builtin-upper.json +51 -0
  70. package/node_modules/@babel/helper-globals/package.json +32 -0
  71. package/node_modules/@babel/helper-module-imports/lib/import-builder.js.map +1 -1
  72. package/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
  73. package/node_modules/@babel/helper-module-imports/package.json +4 -4
  74. package/node_modules/@babel/helper-string-parser/package.json +1 -1
  75. package/node_modules/@babel/helper-validator-identifier/package.json +1 -1
  76. package/node_modules/@babel/parser/bin/babel-parser.js +1 -1
  77. package/node_modules/@babel/parser/lib/index.js +5814 -5255
  78. package/node_modules/@babel/parser/lib/index.js.map +1 -1
  79. package/node_modules/@babel/parser/package.json +7 -7
  80. package/node_modules/@babel/parser/typings/babel-parser.d.ts +137 -165
  81. package/node_modules/@babel/template/lib/options.js +1 -1
  82. package/node_modules/@babel/template/lib/options.js.map +1 -1
  83. package/node_modules/@babel/template/lib/parse.js +3 -0
  84. package/node_modules/@babel/template/lib/parse.js.map +1 -1
  85. package/node_modules/@babel/template/lib/populate.js +2 -1
  86. package/node_modules/@babel/template/lib/populate.js.map +1 -1
  87. package/node_modules/@babel/template/package.json +4 -4
  88. package/node_modules/@babel/traverse/lib/cache.js +10 -16
  89. package/node_modules/@babel/traverse/lib/cache.js.map +1 -1
  90. package/node_modules/@babel/traverse/lib/index.js +8 -16
  91. package/node_modules/@babel/traverse/lib/index.js.map +1 -1
  92. package/node_modules/@babel/traverse/lib/path/ancestry.js +1 -3
  93. package/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
  94. package/node_modules/@babel/traverse/lib/path/context.js +0 -15
  95. package/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
  96. package/node_modules/@babel/traverse/lib/path/conversion.js +7 -4
  97. package/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
  98. package/node_modules/@babel/traverse/lib/path/evaluation.js +23 -2
  99. package/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
  100. package/node_modules/@babel/traverse/lib/path/family.js +13 -7
  101. package/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
  102. package/node_modules/@babel/traverse/lib/path/index.js +2 -1
  103. package/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
  104. package/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
  105. package/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
  106. package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +1 -1
  107. package/node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map +1 -1
  108. package/node_modules/@babel/traverse/lib/path/modification.js +3 -2
  109. package/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
  110. package/node_modules/@babel/traverse/lib/path/removal.js +2 -1
  111. package/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
  112. package/node_modules/@babel/traverse/lib/path/replacement.js +2 -2
  113. package/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
  114. package/node_modules/@babel/traverse/lib/scope/binding.js +4 -3
  115. package/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
  116. package/node_modules/@babel/traverse/lib/scope/index.js +99 -39
  117. package/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
  118. package/node_modules/@babel/traverse/lib/traverse-node.js +109 -0
  119. package/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
  120. package/node_modules/@babel/traverse/lib/types.js +1 -1
  121. package/node_modules/@babel/traverse/lib/visitors.js +6 -4
  122. package/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
  123. package/node_modules/@babel/traverse/package.json +10 -10
  124. package/node_modules/@babel/types/lib/asserts/generated/index.js +19 -3
  125. package/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
  126. package/node_modules/@babel/types/lib/ast-types/generated/index.js +1 -1
  127. package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
  128. package/node_modules/@babel/types/lib/builders/generated/index.js +22 -2858
  129. package/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
  130. package/node_modules/@babel/types/lib/builders/generated/lowercase.js +2896 -0
  131. package/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
  132. package/node_modules/@babel/types/lib/builders/generated/uppercase.js +267 -1525
  133. package/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
  134. package/node_modules/@babel/types/lib/constants/generated/index.js +2 -1
  135. package/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
  136. package/node_modules/@babel/types/lib/constants/index.js +5 -3
  137. package/node_modules/@babel/types/lib/constants/index.js.map +1 -1
  138. package/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
  139. package/node_modules/@babel/types/lib/converters/toExpression.js +1 -0
  140. package/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
  141. package/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
  142. package/node_modules/@babel/types/lib/converters/valueToNode.js +16 -3
  143. package/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
  144. package/node_modules/@babel/types/lib/definitions/core.js +73 -44
  145. package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
  146. package/node_modules/@babel/types/lib/definitions/experimental.js +3 -11
  147. package/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
  148. package/node_modules/@babel/types/lib/definitions/flow.js +6 -3
  149. package/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
  150. package/node_modules/@babel/types/lib/definitions/index.js +13 -0
  151. package/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
  152. package/node_modules/@babel/types/lib/definitions/jsx.js +9 -4
  153. package/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
  154. package/node_modules/@babel/types/lib/definitions/typescript.js +56 -28
  155. package/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
  156. package/node_modules/@babel/types/lib/definitions/utils.js +37 -15
  157. package/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
  158. package/node_modules/@babel/types/lib/index-legacy.d.ts +72 -41
  159. package/node_modules/@babel/types/lib/index.d.ts +1699 -1655
  160. package/node_modules/@babel/types/lib/index.js +10 -21
  161. package/node_modules/@babel/types/lib/index.js.flow +72 -42
  162. package/node_modules/@babel/types/lib/index.js.map +1 -1
  163. package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +9 -8
  164. package/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
  165. package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +1 -0
  166. package/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
  167. package/node_modules/@babel/types/lib/traverse/traverseFast.js +19 -5
  168. package/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
  169. package/node_modules/@babel/types/lib/utils/deprecationWarning.js +3 -3
  170. package/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -1
  171. package/node_modules/@babel/types/lib/validators/generated/index.js +50 -5
  172. package/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
  173. package/node_modules/@babel/types/lib/validators/isLet.js +6 -2
  174. package/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
  175. package/node_modules/@babel/types/lib/validators/isPlaceholderType.js +1 -5
  176. package/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
  177. package/node_modules/@babel/types/lib/validators/isType.js +1 -6
  178. package/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
  179. package/node_modules/@babel/types/lib/validators/isVar.js +8 -4
  180. package/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
  181. package/node_modules/@babel/types/lib/validators/matchesPattern.js +10 -2
  182. package/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
  183. package/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
  184. package/node_modules/@babel/types/package.json +14 -14
  185. package/node_modules/@emotion/cache/dist/declarations/src/index.d.ts +16 -2
  186. package/node_modules/@emotion/cache/dist/declarations/src/types.d.ts +14 -0
  187. package/node_modules/@emotion/cache/dist/emotion-cache.browser.cjs.js +7 -36
  188. package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.cjs.js +10 -43
  189. package/node_modules/@emotion/cache/dist/emotion-cache.browser.development.esm.js +10 -43
  190. package/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +7 -36
  191. package/node_modules/@emotion/cache/dist/emotion-cache.cjs.js +11 -73
  192. package/node_modules/@emotion/cache/dist/emotion-cache.development.cjs.js +15 -81
  193. package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.cjs.js +50 -60
  194. package/node_modules/@emotion/cache/dist/emotion-cache.development.edge-light.esm.js +51 -61
  195. package/node_modules/@emotion/cache/dist/emotion-cache.development.esm.js +15 -81
  196. package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.cjs.js +28 -56
  197. package/node_modules/@emotion/cache/dist/emotion-cache.edge-light.esm.js +29 -57
  198. package/node_modules/@emotion/cache/dist/emotion-cache.esm.js +11 -73
  199. package/node_modules/@emotion/cache/package.json +11 -11
  200. package/node_modules/@emotion/cache/src/{index.js → index.ts} +39 -55
  201. package/node_modules/@emotion/cache/src/{prefixer.js → prefixer.ts} +11 -4
  202. package/node_modules/@emotion/cache/src/{stylis-plugins.js → stylis-plugins.ts} +91 -83
  203. package/node_modules/@emotion/cache/src/{types.js → types.ts} +4 -5
  204. package/node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.umd.min.js.map +1 -1
  205. package/node_modules/@emotion/react/_isolated-hnrs/package.json +1 -0
  206. package/node_modules/@emotion/react/dist/declarations/src/_isolated-hnrs.d.ts +3 -3
  207. package/node_modules/@emotion/react/dist/declarations/src/class-names.d.ts +18 -0
  208. package/node_modules/@emotion/react/dist/declarations/src/context.d.ts +6 -0
  209. package/node_modules/@emotion/react/dist/declarations/src/css.d.ts +5 -0
  210. package/node_modules/@emotion/react/dist/declarations/src/global.d.ts +7 -0
  211. package/node_modules/@emotion/react/dist/declarations/src/index.d.ts +14 -1
  212. package/node_modules/@emotion/react/dist/declarations/src/jsx-dev-runtime.d.ts +6 -1
  213. package/node_modules/@emotion/react/dist/declarations/src/jsx-namespace.d.ts +64 -0
  214. package/node_modules/@emotion/react/dist/declarations/src/jsx-runtime.d.ts +7 -1
  215. package/node_modules/@emotion/react/dist/declarations/src/jsx.d.ts +22 -0
  216. package/node_modules/@emotion/react/dist/declarations/src/keyframes.d.ts +10 -0
  217. package/node_modules/@emotion/react/dist/declarations/src/theming.d.ts +28 -0
  218. package/node_modules/@emotion/react/dist/declarations/src/types.d.ts +7 -0
  219. package/node_modules/@emotion/react/dist/{emotion-element-f66136f5.development.edge-light.cjs.js → emotion-element-010f37fa.development.edge-light.cjs.js} +23 -84
  220. package/node_modules/@emotion/react/dist/{emotion-element-832b737b.browser.cjs.js → emotion-element-25f9958c.browser.cjs.js} +20 -65
  221. package/node_modules/@emotion/react/dist/{emotion-element-7447be04.browser.development.cjs.js → emotion-element-4787f564.browser.development.cjs.js} +21 -74
  222. package/node_modules/@emotion/react/dist/{emotion-element-7a1343fa.browser.development.esm.js → emotion-element-489459f2.browser.development.esm.js} +21 -74
  223. package/node_modules/@emotion/react/dist/{emotion-element-efb2998a.development.edge-light.esm.js → emotion-element-516430c7.development.edge-light.esm.js} +23 -84
  224. package/node_modules/@emotion/react/dist/{emotion-element-ba80abe0.development.esm.js → emotion-element-782f682d.development.esm.js} +23 -84
  225. package/node_modules/@emotion/react/dist/{emotion-element-657efc1f.edge-light.esm.js → emotion-element-8113875a.edge-light.esm.js} +22 -75
  226. package/node_modules/@emotion/react/dist/{emotion-element-b1930563.cjs.js → emotion-element-a1829a1e.cjs.js} +22 -75
  227. package/node_modules/@emotion/react/dist/{emotion-element-60389d2b.edge-light.cjs.js → emotion-element-af3dc15b.edge-light.cjs.js} +22 -75
  228. package/node_modules/@emotion/react/dist/{emotion-element-b4c8b265.esm.js → emotion-element-d59e098f.esm.js} +22 -75
  229. package/node_modules/@emotion/react/dist/{emotion-element-9150ebbd.development.cjs.js → emotion-element-e8f4cc37.development.cjs.js} +23 -84
  230. package/node_modules/@emotion/react/dist/{emotion-element-5486c51c.browser.esm.js → emotion-element-f0de968e.browser.esm.js} +20 -65
  231. package/node_modules/@emotion/react/dist/emotion-react.browser.cjs.js +19 -75
  232. package/node_modules/@emotion/react/dist/emotion-react.browser.development.cjs.js +38 -102
  233. package/node_modules/@emotion/react/dist/emotion-react.browser.development.esm.js +38 -101
  234. package/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +19 -74
  235. package/node_modules/@emotion/react/dist/emotion-react.cjs.js +19 -75
  236. package/node_modules/@emotion/react/dist/emotion-react.development.cjs.js +38 -102
  237. package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.cjs.js +37 -99
  238. package/node_modules/@emotion/react/dist/emotion-react.development.edge-light.esm.js +37 -98
  239. package/node_modules/@emotion/react/dist/emotion-react.development.esm.js +38 -101
  240. package/node_modules/@emotion/react/dist/emotion-react.edge-light.cjs.js +18 -72
  241. package/node_modules/@emotion/react/dist/emotion-react.edge-light.esm.js +18 -71
  242. package/node_modules/@emotion/react/dist/emotion-react.esm.js +19 -74
  243. package/node_modules/@emotion/react/dist/emotion-react.umd.min.js +1 -1
  244. package/node_modules/@emotion/react/dist/emotion-react.umd.min.js.map +1 -1
  245. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js +3 -3
  246. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.js +3 -3
  247. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js +3 -3
  248. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js +3 -3
  249. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js +3 -3
  250. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js +3 -3
  251. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js +3 -3
  252. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js +3 -3
  253. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.esm.js +3 -3
  254. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js +3 -3
  255. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js +3 -3
  256. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js +3 -3
  257. package/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.umd.min.js.map +1 -1
  258. package/node_modules/@emotion/react/jsx-dev-runtime/package.json +1 -1
  259. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.js +5 -5
  260. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.js +5 -5
  261. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js +5 -5
  262. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js +5 -5
  263. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js +5 -5
  264. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js +5 -5
  265. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js +5 -5
  266. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js +5 -5
  267. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.development.esm.js +5 -5
  268. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js +5 -5
  269. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js +5 -5
  270. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js +5 -5
  271. package/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.umd.min.js.map +1 -1
  272. package/node_modules/@emotion/react/jsx-runtime/package.json +1 -1
  273. package/node_modules/@emotion/react/package.json +19 -18
  274. package/node_modules/@emotion/react/src/{_isolated-hnrs.js → _isolated-hnrs.ts} +7 -2
  275. package/node_modules/@emotion/react/src/{class-names.js → class-names.tsx} +43 -32
  276. package/node_modules/@emotion/react/src/{context.js → context.tsx} +25 -22
  277. package/node_modules/@emotion/react/src/css.ts +14 -0
  278. package/node_modules/@emotion/react/src/{emotion-element.js → emotion-element.tsx} +37 -17
  279. package/node_modules/@emotion/react/src/{get-label-from-stack-trace.js → get-label-from-stack-trace.ts} +7 -4
  280. package/node_modules/@emotion/react/src/global.tsx +147 -0
  281. package/node_modules/@emotion/react/src/{index.js → index.ts} +24 -3
  282. package/node_modules/@emotion/react/src/{jsx-dev-runtime.js → jsx-dev-runtime.ts} +12 -2
  283. package/node_modules/@emotion/react/src/jsx-namespace.ts +107 -0
  284. package/node_modules/@emotion/react/src/jsx-runtime.ts +32 -0
  285. package/node_modules/@emotion/react/src/jsx.ts +45 -0
  286. package/node_modules/@emotion/react/src/keyframes.ts +27 -0
  287. package/node_modules/@emotion/react/src/{theming.js → theming.tsx} +40 -18
  288. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.cjs.js +19 -92
  289. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.cjs.js +22 -94
  290. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.development.esm.js +22 -94
  291. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js +19 -92
  292. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.cjs.js +20 -93
  293. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.cjs.js +23 -95
  294. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.cjs.js +22 -94
  295. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.edge-light.esm.js +22 -94
  296. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.development.esm.js +24 -96
  297. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.cjs.js +19 -92
  298. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.edge-light.esm.js +19 -92
  299. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js +21 -94
  300. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js +1 -1
  301. package/node_modules/@emotion/styled/base/dist/emotion-styled-base.umd.min.js.map +1 -1
  302. package/node_modules/@emotion/styled/base/package.json +1 -1
  303. package/node_modules/@emotion/styled/dist/declarations/src/base.d.ts +4 -2
  304. package/node_modules/@emotion/styled/dist/declarations/src/index.d.ts +15 -2
  305. package/node_modules/@emotion/styled/dist/declarations/src/jsx-namespace.d.ts +5 -0
  306. package/node_modules/@emotion/styled/dist/declarations/src/types.d.ts +88 -0
  307. package/node_modules/@emotion/styled/dist/emotion-styled.browser.cjs.js +7 -6
  308. package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.cjs.js +7 -6
  309. package/node_modules/@emotion/styled/dist/emotion-styled.browser.development.esm.js +7 -6
  310. package/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js +7 -6
  311. package/node_modules/@emotion/styled/dist/emotion-styled.cjs.js +7 -6
  312. package/node_modules/@emotion/styled/dist/emotion-styled.development.cjs.js +7 -6
  313. package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.cjs.js +7 -6
  314. package/node_modules/@emotion/styled/dist/emotion-styled.development.edge-light.esm.js +7 -6
  315. package/node_modules/@emotion/styled/dist/emotion-styled.development.esm.js +7 -6
  316. package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.cjs.js +7 -6
  317. package/node_modules/@emotion/styled/dist/emotion-styled.edge-light.esm.js +7 -6
  318. package/node_modules/@emotion/styled/dist/emotion-styled.esm.js +7 -6
  319. package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js +1 -1
  320. package/node_modules/@emotion/styled/dist/emotion-styled.umd.min.js.map +1 -1
  321. package/node_modules/@emotion/styled/package.json +13 -14
  322. package/node_modules/@emotion/styled/src/{base.js → base.tsx} +56 -42
  323. package/node_modules/@emotion/styled/{types/index.d.ts → src/index.ts} +21 -12
  324. package/node_modules/@emotion/styled/{dist/declarations/types/jsx-namespace.d.ts → src/jsx-namespace.ts} +3 -5
  325. package/node_modules/@emotion/styled/src/{tags.js → tags.ts} +1 -1
  326. package/node_modules/@emotion/styled/{types/base.d.ts → src/types.ts} +8 -15
  327. package/node_modules/@emotion/styled/src/utils.ts +38 -0
  328. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/declarations/src/index.d.ts +3 -0
  329. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.mts +2 -0
  330. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.ts +2 -0
  331. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/package.json +7 -6
  332. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.ts +21 -0
  333. package/node_modules/@jridgewell/gen-mapping/LICENSE +1 -1
  334. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +256 -194
  335. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +6 -1
  336. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +339 -239
  337. package/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +6 -1
  338. package/node_modules/@jridgewell/gen-mapping/package.json +46 -51
  339. package/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts +614 -0
  340. package/node_modules/@jridgewell/gen-mapping/src/set-array.ts +82 -0
  341. package/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts +16 -0
  342. package/node_modules/@jridgewell/gen-mapping/src/types.ts +61 -0
  343. package/node_modules/@jridgewell/gen-mapping/{dist/types/gen-mapping.d.ts → types/gen-mapping.d.cts} +3 -2
  344. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map +1 -0
  345. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
  346. package/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map +1 -0
  347. package/node_modules/@jridgewell/{set-array/dist/types/set-array.d.ts → gen-mapping/types/set-array.d.cts} +2 -1
  348. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map +1 -0
  349. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
  350. package/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map +1 -0
  351. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts +13 -0
  352. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map +1 -0
  353. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
  354. package/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map +1 -0
  355. package/node_modules/@jridgewell/gen-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
  356. package/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map +1 -0
  357. package/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
  358. package/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map +1 -0
  359. package/node_modules/@jridgewell/trace-mapping/LICENSE +1 -1
  360. package/node_modules/@jridgewell/trace-mapping/README.md +160 -69
  361. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +417 -493
  362. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +6 -1
  363. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +546 -588
  364. package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +6 -1
  365. package/node_modules/@jridgewell/trace-mapping/package.json +43 -49
  366. package/node_modules/@jridgewell/trace-mapping/src/binary-search.ts +115 -0
  367. package/node_modules/@jridgewell/trace-mapping/src/by-source.ts +65 -0
  368. package/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts +192 -0
  369. package/node_modules/@jridgewell/trace-mapping/src/resolve.ts +16 -0
  370. package/node_modules/@jridgewell/trace-mapping/src/sort.ts +45 -0
  371. package/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +23 -0
  372. package/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +8 -0
  373. package/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +504 -0
  374. package/node_modules/@jridgewell/trace-mapping/src/types.ts +114 -0
  375. package/node_modules/@jridgewell/trace-mapping/{dist/types/binary-search.d.ts → types/binary-search.d.cts} +2 -1
  376. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map +1 -0
  377. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
  378. package/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map +1 -0
  379. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts +8 -0
  380. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map +1 -0
  381. package/node_modules/@jridgewell/trace-mapping/{dist/types/by-source.d.ts → types/by-source.d.mts} +3 -2
  382. package/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map +1 -0
  383. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts +9 -0
  384. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map +1 -0
  385. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
  386. package/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map +1 -0
  387. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts +4 -0
  388. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map +1 -0
  389. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
  390. package/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map +1 -0
  391. package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts +3 -0
  392. package/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map +1 -0
  393. package/node_modules/@jridgewell/trace-mapping/{dist/types/sort.d.ts → types/sort.d.mts} +2 -1
  394. package/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map +1 -0
  395. package/node_modules/@jridgewell/trace-mapping/{dist/types/sourcemap-segment.d.ts → types/sourcemap-segment.d.cts} +1 -0
  396. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map +1 -0
  397. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
  398. package/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map +1 -0
  399. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts +5 -0
  400. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map +1 -0
  401. package/node_modules/@jridgewell/trace-mapping/{dist/types/strip-filename.d.ts → types/strip-filename.d.mts} +1 -0
  402. package/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map +1 -0
  403. package/node_modules/@jridgewell/trace-mapping/{dist/types/trace-mapping.d.ts → types/trace-mapping.d.cts} +7 -6
  404. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map +1 -0
  405. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
  406. package/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map +1 -0
  407. package/node_modules/@jridgewell/trace-mapping/{dist/types/types.d.ts → types/types.d.cts} +10 -2
  408. package/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map +1 -0
  409. package/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
  410. package/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map +1 -0
  411. package/node_modules/@mui/core-downloads-tracker/package.json +1 -1
  412. package/node_modules/@mui/material/Accordion/Accordion.d.ts +32 -15
  413. package/node_modules/@mui/material/Accordion/Accordion.js +18 -6
  414. package/node_modules/@mui/material/AccordionActions/AccordionActions.d.ts +2 -2
  415. package/node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts +2 -2
  416. package/node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts +62 -7
  417. package/node_modules/@mui/material/AccordionSummary/AccordionSummary.js +67 -16
  418. package/node_modules/@mui/material/Alert/Alert.d.ts +6 -18
  419. package/node_modules/@mui/material/AlertTitle/AlertTitle.d.ts +3 -3
  420. package/node_modules/@mui/material/AppBar/AppBar.d.ts +4 -4
  421. package/node_modules/@mui/material/Autocomplete/Autocomplete.d.ts +2 -2
  422. package/node_modules/@mui/material/Autocomplete/Autocomplete.js +1 -1
  423. package/node_modules/@mui/material/Avatar/Avatar.d.ts +2 -2
  424. package/node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts +2 -2
  425. package/node_modules/@mui/material/AvatarGroup/AvatarGroup.js +10 -2
  426. package/node_modules/@mui/material/Backdrop/Backdrop.d.ts +17 -15
  427. package/node_modules/@mui/material/Badge/Badge.d.ts +35 -31
  428. package/node_modules/@mui/material/Badge/Badge.js +27 -20
  429. package/node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts +2 -2
  430. package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts +43 -6
  431. package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.js +53 -9
  432. package/node_modules/@mui/material/Box/Box.d.ts +2 -2
  433. package/node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  434. package/node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  435. package/node_modules/@mui/material/Button/Button.d.ts +4 -4
  436. package/node_modules/@mui/material/Button/Button.js +3 -3
  437. package/node_modules/@mui/material/ButtonBase/ButtonBase.d.ts +2 -2
  438. package/node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts +2 -2
  439. package/node_modules/@mui/material/CHANGELOG.md +345 -0
  440. package/node_modules/@mui/material/Card/Card.d.ts +4 -4
  441. package/node_modules/@mui/material/CardActionArea/CardActionArea.d.ts +43 -6
  442. package/node_modules/@mui/material/CardActionArea/CardActionArea.js +47 -8
  443. package/node_modules/@mui/material/CardActions/CardActions.d.ts +2 -2
  444. package/node_modules/@mui/material/CardContent/CardContent.d.ts +2 -2
  445. package/node_modules/@mui/material/CardHeader/CardHeader.d.ts +6 -22
  446. package/node_modules/@mui/material/CardMedia/CardMedia.d.ts +2 -2
  447. package/node_modules/@mui/material/Checkbox/Checkbox.d.ts +49 -13
  448. package/node_modules/@mui/material/Checkbox/Checkbox.js +51 -21
  449. package/node_modules/@mui/material/Chip/Chip.d.ts +2 -2
  450. package/node_modules/@mui/material/CircularProgress/CircularProgress.d.ts +7 -3
  451. package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  452. package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js +3 -3
  453. package/node_modules/@mui/material/Collapse/Collapse.d.ts +5 -5
  454. package/node_modules/@mui/material/Container/Container.d.ts +2 -2
  455. package/node_modules/@mui/material/CssBaseline/CssBaseline.d.ts +2 -2
  456. package/node_modules/@mui/material/Dialog/Dialog.d.ts +7 -7
  457. package/node_modules/@mui/material/Dialog/dialogClasses.d.ts +6 -2
  458. package/node_modules/@mui/material/DialogActions/DialogActions.d.ts +2 -2
  459. package/node_modules/@mui/material/DialogContent/DialogContent.d.ts +2 -2
  460. package/node_modules/@mui/material/DialogContentText/DialogContentText.d.ts +3 -3
  461. package/node_modules/@mui/material/DialogTitle/DialogTitle.d.ts +3 -3
  462. package/node_modules/@mui/material/Divider/Divider.d.ts +3 -3
  463. package/node_modules/@mui/material/Drawer/Drawer.d.ts +95 -4
  464. package/node_modules/@mui/material/Drawer/Drawer.js +108 -36
  465. package/node_modules/@mui/material/Fab/Fab.d.ts +3 -3
  466. package/node_modules/@mui/material/Fade/Fade.d.ts +3 -3
  467. package/node_modules/@mui/material/FilledInput/FilledInput.d.ts +3 -3
  468. package/node_modules/@mui/material/FormControl/FormControl.d.ts +6 -6
  469. package/node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts +4 -4
  470. package/node_modules/@mui/material/FormGroup/FormGroup.d.ts +3 -3
  471. package/node_modules/@mui/material/FormHelperText/FormHelperText.d.ts +2 -2
  472. package/node_modules/@mui/material/FormLabel/FormLabel.d.ts +4 -4
  473. package/node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts +2 -2
  474. package/node_modules/@mui/material/Grid/Grid.d.ts +2 -2
  475. package/node_modules/@mui/material/Grid2/Grid2.d.ts +2 -2
  476. package/node_modules/@mui/material/Grid2/Grid2.js +2 -2
  477. package/node_modules/@mui/material/Grow/Grow.d.ts +5 -5
  478. package/node_modules/@mui/material/Hidden/Hidden.d.ts +2 -2
  479. package/node_modules/@mui/material/Icon/Icon.d.ts +3 -3
  480. package/node_modules/@mui/material/IconButton/IconButton.d.ts +4 -4
  481. package/node_modules/@mui/material/IconButton/IconButton.js +3 -3
  482. package/node_modules/@mui/material/ImageList/ImageList.d.ts +2 -2
  483. package/node_modules/@mui/material/ImageListItem/ImageListItem.d.ts +2 -2
  484. package/node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  485. package/node_modules/@mui/material/Input/Input.d.ts +3 -3
  486. package/node_modules/@mui/material/InputAdornment/InputAdornment.d.ts +2 -2
  487. package/node_modules/@mui/material/InputBase/InputBase.d.ts +2 -2
  488. package/node_modules/@mui/material/InputBase/inputBaseClasses.d.ts +15 -6
  489. package/node_modules/@mui/material/InputLabel/InputLabel.d.ts +3 -3
  490. package/node_modules/@mui/material/LinearProgress/LinearProgress.d.ts +7 -3
  491. package/node_modules/@mui/material/Link/Link.d.ts +4 -4
  492. package/node_modules/@mui/material/List/List.d.ts +3 -3
  493. package/node_modules/@mui/material/ListItem/ListItem.d.ts +3 -3
  494. package/node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  495. package/node_modules/@mui/material/ListItemButton/ListItemButton.d.ts +3 -3
  496. package/node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts +2 -2
  497. package/node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  498. package/node_modules/@mui/material/ListItemText/ListItemText.d.ts +12 -2
  499. package/node_modules/@mui/material/ListItemText/ListItemText.js +14 -5
  500. package/node_modules/@mui/material/ListSubheader/ListSubheader.d.ts +2 -2
  501. package/node_modules/@mui/material/Menu/Menu.d.ts +92 -5
  502. package/node_modules/@mui/material/Menu/Menu.js +58 -19
  503. package/node_modules/@mui/material/MenuItem/MenuItem.d.ts +3 -3
  504. package/node_modules/@mui/material/MenuList/MenuList.d.ts +4 -4
  505. package/node_modules/@mui/material/MobileStepper/MobileStepper.d.ts +72 -4
  506. package/node_modules/@mui/material/MobileStepper/MobileStepper.js +76 -18
  507. package/node_modules/@mui/material/Modal/Modal.d.ts +7 -7
  508. package/node_modules/@mui/material/Modal/Modal.js +9 -10
  509. package/node_modules/@mui/material/NativeSelect/NativeSelect.d.ts +3 -3
  510. package/node_modules/@mui/material/NativeSelect/NativeSelectInput.js +6 -2
  511. package/node_modules/@mui/material/NoSsr/NoSsr.d.ts +2 -2
  512. package/node_modules/@mui/material/NoSsr/NoSsr.js +2 -2
  513. package/node_modules/@mui/material/OutlinedInput/NotchedOutline.js +2 -0
  514. package/node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts +32 -5
  515. package/node_modules/@mui/material/OutlinedInput/OutlinedInput.js +30 -10
  516. package/node_modules/@mui/material/OverridableComponent/index.d.ts +41 -0
  517. package/node_modules/@mui/material/OverridableComponent/index.js +1 -0
  518. package/node_modules/@mui/material/OverridableComponent/package.json +6 -0
  519. package/node_modules/@mui/material/Pagination/Pagination.d.ts +2 -2
  520. package/node_modules/@mui/material/PaginationItem/PaginationItem.d.ts +3 -3
  521. package/node_modules/@mui/material/Paper/Paper.d.ts +3 -3
  522. package/node_modules/@mui/material/PigmentContainer/PigmentContainer.d.ts +2 -2
  523. package/node_modules/@mui/material/PigmentContainer/PigmentContainer.js +2 -2
  524. package/node_modules/@mui/material/PigmentGrid/PigmentGrid.d.ts +2 -2
  525. package/node_modules/@mui/material/PigmentGrid/PigmentGrid.js +2 -2
  526. package/node_modules/@mui/material/PigmentHidden/PigmentHidden.d.ts +2 -2
  527. package/node_modules/@mui/material/PigmentHidden/PigmentHidden.js +2 -2
  528. package/node_modules/@mui/material/PigmentStack/PigmentStack.d.ts +2 -2
  529. package/node_modules/@mui/material/PigmentStack/PigmentStack.js +2 -2
  530. package/node_modules/@mui/material/Popover/Popover.d.ts +65 -12
  531. package/node_modules/@mui/material/Popover/Popover.js +79 -52
  532. package/node_modules/@mui/material/Popper/Popper.d.ts +4 -4
  533. package/node_modules/@mui/material/Popper/Popper.js +4 -4
  534. package/node_modules/@mui/material/Portal/Portal.d.ts +2 -2
  535. package/node_modules/@mui/material/Portal/Portal.js +2 -2
  536. package/node_modules/@mui/material/README.md +4 -2
  537. package/node_modules/@mui/material/Radio/Radio.d.ts +48 -4
  538. package/node_modules/@mui/material/Radio/Radio.js +61 -16
  539. package/node_modules/@mui/material/Radio/RadioButtonIcon.js +7 -2
  540. package/node_modules/@mui/material/RadioGroup/RadioGroup.d.ts +3 -3
  541. package/node_modules/@mui/material/Rating/Rating.d.ts +61 -3
  542. package/node_modules/@mui/material/Rating/Rating.js +131 -45
  543. package/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  544. package/node_modules/@mui/material/Select/Select.d.ts +3 -3
  545. package/node_modules/@mui/material/Select/SelectInput.js +8 -8
  546. package/node_modules/@mui/material/Skeleton/Skeleton.d.ts +2 -2
  547. package/node_modules/@mui/material/Slide/Slide.d.ts +4 -4
  548. package/node_modules/@mui/material/Slider/Slider.d.ts +2 -2
  549. package/node_modules/@mui/material/Slider/sliderClasses.d.ts +21 -7
  550. package/node_modules/@mui/material/Slider/useSlider.js +2 -2
  551. package/node_modules/@mui/material/Snackbar/Snackbar.d.ts +81 -4
  552. package/node_modules/@mui/material/Snackbar/Snackbar.js +116 -32
  553. package/node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts +3 -3
  554. package/node_modules/@mui/material/SpeedDial/SpeedDial.d.ts +20 -8
  555. package/node_modules/@mui/material/SpeedDial/SpeedDial.js +40 -11
  556. package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts +85 -4
  557. package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.js +109 -31
  558. package/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  559. package/node_modules/@mui/material/Stack/Stack.d.ts +2 -2
  560. package/node_modules/@mui/material/Step/Step.d.ts +2 -2
  561. package/node_modules/@mui/material/StepButton/StepButton.d.ts +3 -3
  562. package/node_modules/@mui/material/StepConnector/StepConnector.d.ts +2 -2
  563. package/node_modules/@mui/material/StepContent/StepContent.d.ts +4 -4
  564. package/node_modules/@mui/material/StepIcon/StepIcon.d.ts +3 -3
  565. package/node_modules/@mui/material/StepLabel/StepLabel.d.ts +21 -3
  566. package/node_modules/@mui/material/StepLabel/StepLabel.js +14 -5
  567. package/node_modules/@mui/material/Stepper/Stepper.d.ts +2 -2
  568. package/node_modules/@mui/material/SvgIcon/SvgIcon.d.ts +3 -3
  569. package/node_modules/@mui/material/SwipeableDrawer/SwipeArea.js +1 -0
  570. package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts +31 -5
  571. package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.js +60 -13
  572. package/node_modules/@mui/material/Switch/Switch.d.ts +78 -5
  573. package/node_modules/@mui/material/Switch/Switch.js +73 -9
  574. package/node_modules/@mui/material/Tab/Tab.d.ts +3 -3
  575. package/node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts +2 -2
  576. package/node_modules/@mui/material/Table/Table.d.ts +2 -2
  577. package/node_modules/@mui/material/TableBody/TableBody.d.ts +2 -2
  578. package/node_modules/@mui/material/TableCell/TableCell.d.ts +2 -2
  579. package/node_modules/@mui/material/TableContainer/TableContainer.d.ts +2 -2
  580. package/node_modules/@mui/material/TableFooter/TableFooter.d.ts +2 -2
  581. package/node_modules/@mui/material/TableHead/TableHead.d.ts +2 -2
  582. package/node_modules/@mui/material/TablePagination/TablePagination.d.ts +4 -4
  583. package/node_modules/@mui/material/TableRow/TableRow.d.ts +2 -2
  584. package/node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts +3 -3
  585. package/node_modules/@mui/material/Tabs/Tabs.d.ts +131 -31
  586. package/node_modules/@mui/material/Tabs/Tabs.js +124 -52
  587. package/node_modules/@mui/material/Tabs/tabsClasses.d.ts +4 -0
  588. package/node_modules/@mui/material/Tabs/tabsClasses.js +1 -1
  589. package/node_modules/@mui/material/TextField/TextField.d.ts +40 -10
  590. package/node_modules/@mui/material/TextField/TextField.js +22 -11
  591. package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  592. package/node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js +68 -47
  593. package/node_modules/@mui/material/ToggleButton/ToggleButton.d.ts +3 -3
  594. package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  595. package/node_modules/@mui/material/Toolbar/Toolbar.d.ts +2 -2
  596. package/node_modules/@mui/material/Tooltip/Tooltip.d.ts +23 -27
  597. package/node_modules/@mui/material/Tooltip/Tooltip.js +1 -1
  598. package/node_modules/@mui/material/Typography/Typography.d.ts +3 -3
  599. package/node_modules/@mui/material/Zoom/Zoom.d.ts +3 -3
  600. package/node_modules/@mui/material/index.js +1 -1
  601. package/node_modules/@mui/material/internal/SwitchBase.d.ts +35 -1
  602. package/node_modules/@mui/material/internal/SwitchBase.js +88 -31
  603. package/node_modules/@mui/material/modern/Accordion/Accordion.js +18 -6
  604. package/node_modules/@mui/material/modern/AccordionSummary/AccordionSummary.js +67 -16
  605. package/node_modules/@mui/material/modern/Autocomplete/Autocomplete.js +1 -1
  606. package/node_modules/@mui/material/modern/AvatarGroup/AvatarGroup.js +10 -2
  607. package/node_modules/@mui/material/modern/Badge/Badge.js +27 -20
  608. package/node_modules/@mui/material/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
  609. package/node_modules/@mui/material/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  610. package/node_modules/@mui/material/modern/Button/Button.js +3 -3
  611. package/node_modules/@mui/material/modern/CardActionArea/CardActionArea.js +47 -8
  612. package/node_modules/@mui/material/modern/Checkbox/Checkbox.js +51 -21
  613. package/node_modules/@mui/material/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  614. package/node_modules/@mui/material/modern/Drawer/Drawer.js +108 -36
  615. package/node_modules/@mui/material/modern/Grid2/Grid2.js +2 -2
  616. package/node_modules/@mui/material/modern/IconButton/IconButton.js +3 -3
  617. package/node_modules/@mui/material/modern/ListItemText/ListItemText.js +14 -5
  618. package/node_modules/@mui/material/modern/Menu/Menu.js +58 -19
  619. package/node_modules/@mui/material/modern/MobileStepper/MobileStepper.js +76 -18
  620. package/node_modules/@mui/material/modern/Modal/Modal.js +9 -10
  621. package/node_modules/@mui/material/modern/NativeSelect/NativeSelectInput.js +6 -2
  622. package/node_modules/@mui/material/modern/NoSsr/NoSsr.js +2 -2
  623. package/node_modules/@mui/material/modern/OutlinedInput/NotchedOutline.js +2 -0
  624. package/node_modules/@mui/material/modern/OutlinedInput/OutlinedInput.js +30 -10
  625. package/node_modules/@mui/material/modern/OverridableComponent/index.js +1 -0
  626. package/node_modules/@mui/material/modern/PigmentContainer/PigmentContainer.js +2 -2
  627. package/node_modules/@mui/material/modern/PigmentGrid/PigmentGrid.js +2 -2
  628. package/node_modules/@mui/material/modern/PigmentHidden/PigmentHidden.js +2 -2
  629. package/node_modules/@mui/material/modern/PigmentStack/PigmentStack.js +2 -2
  630. package/node_modules/@mui/material/modern/Popover/Popover.js +79 -52
  631. package/node_modules/@mui/material/modern/Popper/Popper.js +4 -4
  632. package/node_modules/@mui/material/modern/Portal/Portal.js +2 -2
  633. package/node_modules/@mui/material/modern/Radio/Radio.js +61 -16
  634. package/node_modules/@mui/material/modern/Radio/RadioButtonIcon.js +7 -2
  635. package/node_modules/@mui/material/modern/Rating/Rating.js +131 -45
  636. package/node_modules/@mui/material/modern/Select/SelectInput.js +8 -8
  637. package/node_modules/@mui/material/modern/Slider/useSlider.js +2 -2
  638. package/node_modules/@mui/material/modern/Snackbar/Snackbar.js +116 -32
  639. package/node_modules/@mui/material/modern/SpeedDial/SpeedDial.js +40 -11
  640. package/node_modules/@mui/material/modern/SpeedDialAction/SpeedDialAction.js +109 -31
  641. package/node_modules/@mui/material/modern/StepLabel/StepLabel.js +14 -5
  642. package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeArea.js +1 -0
  643. package/node_modules/@mui/material/modern/SwipeableDrawer/SwipeableDrawer.js +60 -13
  644. package/node_modules/@mui/material/modern/Switch/Switch.js +73 -9
  645. package/node_modules/@mui/material/modern/Tabs/Tabs.js +124 -52
  646. package/node_modules/@mui/material/modern/Tabs/tabsClasses.js +1 -1
  647. package/node_modules/@mui/material/modern/TextField/TextField.js +22 -11
  648. package/node_modules/@mui/material/modern/TextareaAutosize/TextareaAutosize.js +68 -47
  649. package/node_modules/@mui/material/modern/Tooltip/Tooltip.js +1 -1
  650. package/node_modules/@mui/material/modern/index.js +1 -1
  651. package/node_modules/@mui/material/modern/internal/SwitchBase.js +88 -31
  652. package/node_modules/@mui/material/modern/styles/ThemeProvider.js +20 -9
  653. package/node_modules/@mui/material/modern/styles/components.js +1 -0
  654. package/node_modules/@mui/material/modern/styles/createThemeNoVars.js +5 -2
  655. package/node_modules/@mui/material/modern/styles/overrides.js +1 -0
  656. package/node_modules/@mui/material/modern/styles/props.js +1 -0
  657. package/node_modules/@mui/material/modern/styles/shouldSkipGeneratingVar.js +1 -1
  658. package/node_modules/@mui/material/modern/styles/variants.js +1 -0
  659. package/node_modules/@mui/material/modern/useAutocomplete/useAutocomplete.js +16 -14
  660. package/node_modules/@mui/material/modern/useScrollTrigger/useScrollTrigger.js +3 -0
  661. package/node_modules/@mui/material/modern/utils/mergeSlotProps.js +10 -3
  662. package/node_modules/@mui/material/modern/version/index.js +3 -3
  663. package/node_modules/@mui/material/node/Accordion/Accordion.js +18 -6
  664. package/node_modules/@mui/material/node/AccordionSummary/AccordionSummary.js +67 -16
  665. package/node_modules/@mui/material/node/Autocomplete/Autocomplete.js +1 -1
  666. package/node_modules/@mui/material/node/AvatarGroup/AvatarGroup.js +10 -2
  667. package/node_modules/@mui/material/node/Badge/Badge.js +27 -20
  668. package/node_modules/@mui/material/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
  669. package/node_modules/@mui/material/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  670. package/node_modules/@mui/material/node/Button/Button.js +3 -3
  671. package/node_modules/@mui/material/node/CardActionArea/CardActionArea.js +47 -8
  672. package/node_modules/@mui/material/node/Checkbox/Checkbox.js +51 -21
  673. package/node_modules/@mui/material/node/ClickAwayListener/ClickAwayListener.js +3 -3
  674. package/node_modules/@mui/material/node/Drawer/Drawer.js +108 -36
  675. package/node_modules/@mui/material/node/Grid2/Grid2.js +2 -2
  676. package/node_modules/@mui/material/node/IconButton/IconButton.js +3 -3
  677. package/node_modules/@mui/material/node/ListItemText/ListItemText.js +14 -5
  678. package/node_modules/@mui/material/node/Menu/Menu.js +58 -19
  679. package/node_modules/@mui/material/node/MobileStepper/MobileStepper.js +76 -18
  680. package/node_modules/@mui/material/node/Modal/Modal.js +9 -10
  681. package/node_modules/@mui/material/node/NativeSelect/NativeSelectInput.js +6 -2
  682. package/node_modules/@mui/material/node/NoSsr/NoSsr.js +2 -2
  683. package/node_modules/@mui/material/node/OutlinedInput/NotchedOutline.js +2 -0
  684. package/node_modules/@mui/material/node/OutlinedInput/OutlinedInput.js +30 -10
  685. package/node_modules/@mui/material/node/OverridableComponent/index.js +5 -0
  686. package/node_modules/@mui/material/node/PigmentContainer/PigmentContainer.js +2 -2
  687. package/node_modules/@mui/material/node/PigmentGrid/PigmentGrid.js +2 -2
  688. package/node_modules/@mui/material/node/PigmentHidden/PigmentHidden.js +2 -2
  689. package/node_modules/@mui/material/node/PigmentStack/PigmentStack.js +2 -2
  690. package/node_modules/@mui/material/node/Popover/Popover.js +79 -52
  691. package/node_modules/@mui/material/node/Popper/Popper.js +4 -4
  692. package/node_modules/@mui/material/node/Portal/Portal.js +2 -2
  693. package/node_modules/@mui/material/node/Radio/Radio.js +61 -16
  694. package/node_modules/@mui/material/node/Radio/RadioButtonIcon.js +7 -2
  695. package/node_modules/@mui/material/node/Rating/Rating.js +132 -46
  696. package/node_modules/@mui/material/node/Select/SelectInput.js +8 -8
  697. package/node_modules/@mui/material/node/Slider/useSlider.js +2 -2
  698. package/node_modules/@mui/material/node/Snackbar/Snackbar.js +116 -32
  699. package/node_modules/@mui/material/node/SpeedDial/SpeedDial.js +40 -11
  700. package/node_modules/@mui/material/node/SpeedDialAction/SpeedDialAction.js +109 -31
  701. package/node_modules/@mui/material/node/StepLabel/StepLabel.js +14 -5
  702. package/node_modules/@mui/material/node/SwipeableDrawer/SwipeArea.js +1 -0
  703. package/node_modules/@mui/material/node/SwipeableDrawer/SwipeableDrawer.js +60 -13
  704. package/node_modules/@mui/material/node/Switch/Switch.js +73 -9
  705. package/node_modules/@mui/material/node/Tabs/Tabs.js +124 -52
  706. package/node_modules/@mui/material/node/Tabs/tabsClasses.js +1 -1
  707. package/node_modules/@mui/material/node/TextField/TextField.js +22 -11
  708. package/node_modules/@mui/material/node/TextareaAutosize/TextareaAutosize.js +67 -46
  709. package/node_modules/@mui/material/node/Tooltip/Tooltip.js +1 -1
  710. package/node_modules/@mui/material/node/index.js +1 -1
  711. package/node_modules/@mui/material/node/internal/SwitchBase.js +88 -31
  712. package/node_modules/@mui/material/node/styles/ThemeProvider.js +20 -9
  713. package/node_modules/@mui/material/node/styles/components.js +5 -0
  714. package/node_modules/@mui/material/node/styles/createThemeNoVars.js +5 -2
  715. package/node_modules/@mui/material/node/styles/overrides.js +5 -0
  716. package/node_modules/@mui/material/node/styles/props.js +5 -0
  717. package/node_modules/@mui/material/node/styles/shouldSkipGeneratingVar.js +1 -1
  718. package/node_modules/@mui/material/node/styles/variants.js +5 -0
  719. package/node_modules/@mui/material/node/useAutocomplete/useAutocomplete.js +16 -14
  720. package/node_modules/@mui/material/node/useScrollTrigger/useScrollTrigger.js +3 -0
  721. package/node_modules/@mui/material/node/utils/mergeSlotProps.js +10 -3
  722. package/node_modules/@mui/material/node/version/index.js +3 -3
  723. package/node_modules/@mui/material/package.json +6 -6
  724. package/node_modules/@mui/material/styles/ThemeProvider.d.ts +6 -0
  725. package/node_modules/@mui/material/styles/ThemeProvider.js +20 -9
  726. package/node_modules/@mui/material/styles/ThemeProviderWithVars.d.ts +1 -0
  727. package/node_modules/@mui/material/styles/components.d.ts +590 -591
  728. package/node_modules/@mui/material/styles/components.js +1 -0
  729. package/node_modules/@mui/material/styles/createThemeNoVars.d.ts +2 -1
  730. package/node_modules/@mui/material/styles/createThemeNoVars.js +5 -2
  731. package/node_modules/@mui/material/styles/index.d.ts +1 -0
  732. package/node_modules/@mui/material/styles/overrides.d.ts +123 -142
  733. package/node_modules/@mui/material/styles/overrides.js +1 -0
  734. package/node_modules/@mui/material/styles/props.d.ts +120 -122
  735. package/node_modules/@mui/material/styles/props.js +1 -0
  736. package/node_modules/@mui/material/styles/shouldSkipGeneratingVar.js +1 -1
  737. package/node_modules/@mui/material/styles/variants.d.ts +7 -10
  738. package/node_modules/@mui/material/styles/variants.js +1 -0
  739. package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts +2 -2
  740. package/node_modules/@mui/material/useAutocomplete/useAutocomplete.js +16 -14
  741. package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts +1 -1
  742. package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.js +3 -0
  743. package/node_modules/@mui/material/utils/mergeSlotProps.js +10 -3
  744. package/node_modules/@mui/material/version/index.js +3 -3
  745. package/node_modules/@mui/private-theming/CHANGELOG.md +256 -0
  746. package/node_modules/@mui/private-theming/index.js +1 -1
  747. package/node_modules/@mui/private-theming/modern/index.js +1 -1
  748. package/node_modules/@mui/private-theming/node/index.js +1 -1
  749. package/node_modules/@mui/private-theming/package.json +2 -2
  750. package/node_modules/@mui/styled-engine/CHANGELOG.md +387 -0
  751. package/node_modules/@mui/styled-engine/README.md +2 -2
  752. package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts +1 -0
  753. package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +72 -18
  754. package/node_modules/@mui/styled-engine/index.js +1 -1
  755. package/node_modules/@mui/styled-engine/modern/StyledEngineProvider/StyledEngineProvider.js +72 -18
  756. package/node_modules/@mui/styled-engine/modern/index.js +1 -1
  757. package/node_modules/@mui/styled-engine/node/StyledEngineProvider/StyledEngineProvider.js +72 -17
  758. package/node_modules/@mui/styled-engine/node/index.js +1 -1
  759. package/node_modules/@mui/styled-engine/package.json +1 -1
  760. package/node_modules/@mui/system/CHANGELOG.md +345 -0
  761. package/node_modules/@mui/system/GlobalStyles/GlobalStyles.js +25 -1
  762. package/node_modules/@mui/system/Grid/createGrid.js +4 -0
  763. package/node_modules/@mui/system/Grid/deleteLegacyGridProps.d.ts +11 -0
  764. package/node_modules/@mui/system/Grid/deleteLegacyGridProps.js +47 -0
  765. package/node_modules/@mui/system/README.md +6 -4
  766. package/node_modules/@mui/system/ThemeProvider/ThemeProvider.js +4 -2
  767. package/node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts +8 -0
  768. package/node_modules/@mui/system/ThemeProvider/useLayerOrder.js +58 -0
  769. package/node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts +5 -5
  770. package/node_modules/@mui/system/createStyled/createStyled.js +34 -21
  771. package/node_modules/@mui/system/cssContainerQueries/cssContainerQueries.d.ts +1 -2
  772. package/node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts +6 -0
  773. package/node_modules/@mui/system/cssVars/createCssVarsProvider.js +7 -0
  774. package/node_modules/@mui/system/cssVars/index.d.ts +1 -0
  775. package/node_modules/@mui/system/cssVars/localStorageManager.d.ts +34 -0
  776. package/node_modules/@mui/system/cssVars/localStorageManager.js +57 -0
  777. package/node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts +2 -0
  778. package/node_modules/@mui/system/cssVars/useCurrentColorScheme.js +50 -69
  779. package/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +26 -2
  780. package/node_modules/@mui/system/esm/Grid/createGrid.js +4 -0
  781. package/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js +41 -0
  782. package/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +5 -3
  783. package/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js +52 -0
  784. package/node_modules/@mui/system/esm/createStyled/createStyled.js +35 -22
  785. package/node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js +7 -0
  786. package/node_modules/@mui/system/esm/cssVars/localStorageManager.js +51 -0
  787. package/node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js +49 -69
  788. package/node_modules/@mui/system/esm/styleFunctionSx/AliasesCSSProperties.js +1 -0
  789. package/node_modules/@mui/system/esm/styleFunctionSx/OverwriteCSSProperties.js +1 -0
  790. package/node_modules/@mui/system/esm/styleFunctionSx/StandardCssProperties.js +1 -0
  791. package/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +9 -2
  792. package/node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js +3 -0
  793. package/node_modules/@mui/system/esm/version/index.js +3 -3
  794. package/node_modules/@mui/system/index.js +1 -1
  795. package/node_modules/@mui/system/modern/GlobalStyles/GlobalStyles.js +26 -2
  796. package/node_modules/@mui/system/modern/Grid/createGrid.js +4 -0
  797. package/node_modules/@mui/system/modern/Grid/deleteLegacyGridProps.js +41 -0
  798. package/node_modules/@mui/system/modern/ThemeProvider/ThemeProvider.js +5 -3
  799. package/node_modules/@mui/system/modern/ThemeProvider/useLayerOrder.js +52 -0
  800. package/node_modules/@mui/system/modern/createStyled/createStyled.js +35 -22
  801. package/node_modules/@mui/system/modern/cssVars/createCssVarsProvider.js +7 -0
  802. package/node_modules/@mui/system/modern/cssVars/localStorageManager.js +51 -0
  803. package/node_modules/@mui/system/modern/cssVars/useCurrentColorScheme.js +49 -69
  804. package/node_modules/@mui/system/modern/index.js +1 -1
  805. package/node_modules/@mui/system/modern/styleFunctionSx/AliasesCSSProperties.js +1 -0
  806. package/node_modules/@mui/system/modern/styleFunctionSx/OverwriteCSSProperties.js +1 -0
  807. package/node_modules/@mui/system/modern/styleFunctionSx/StandardCssProperties.js +1 -0
  808. package/node_modules/@mui/system/modern/styleFunctionSx/styleFunctionSx.js +9 -2
  809. package/node_modules/@mui/system/modern/useMediaQuery/useMediaQuery.js +3 -0
  810. package/node_modules/@mui/system/modern/version/index.js +3 -3
  811. package/node_modules/@mui/system/package.json +5 -5
  812. package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts +266 -267
  813. package/node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.js +5 -0
  814. package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts +51 -52
  815. package/node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.js +5 -0
  816. package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts +0 -1
  817. package/node_modules/@mui/system/styleFunctionSx/StandardCssProperties.js +5 -0
  818. package/node_modules/@mui/system/styleFunctionSx/styleFunctionSx.js +9 -2
  819. package/node_modules/@mui/system/useMediaQuery/useMediaQuery.js +3 -0
  820. package/node_modules/@mui/system/version/index.js +3 -3
  821. package/node_modules/@mui/types/package.json +1 -1
  822. package/node_modules/@mui/utils/CHANGELOG.md +256 -0
  823. package/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +32 -12
  824. package/node_modules/@mui/utils/index.js +1 -1
  825. package/node_modules/@mui/utils/modern/index.js +1 -1
  826. package/node_modules/@mui/utils/modern/useForkRef/useForkRef.js +32 -12
  827. package/node_modules/@mui/utils/package.json +3 -3
  828. package/node_modules/@mui/utils/useForkRef/useForkRef.d.ts +1 -2
  829. package/node_modules/@mui/utils/useForkRef/useForkRef.js +32 -13
  830. package/package.json +24 -24
  831. package/node_modules/@babel/parser/index.cjs +0 -5
  832. package/node_modules/@babel/traverse/lib/scope/traverseForScope.js +0 -68
  833. package/node_modules/@babel/traverse/lib/scope/traverseForScope.js.map +0 -1
  834. package/node_modules/@babel/traverse/node_modules/globals/globals.json +0 -1563
  835. package/node_modules/@babel/traverse/node_modules/globals/index.js +0 -2
  836. package/node_modules/@babel/traverse/node_modules/globals/license +0 -9
  837. package/node_modules/@babel/traverse/node_modules/globals/package.json +0 -41
  838. package/node_modules/@babel/traverse/node_modules/globals/readme.md +0 -41
  839. package/node_modules/@emotion/cache/dist/declarations/types/index.d.ts +0 -45
  840. package/node_modules/@emotion/cache/src/index.d.ts +0 -2
  841. package/node_modules/@emotion/cache/types/index.d.ts +0 -45
  842. package/node_modules/@emotion/react/dist/declarations/dist/emotion-react.cjs.d.ts +0 -2
  843. package/node_modules/@emotion/react/dist/declarations/types/helper.d.ts +0 -14
  844. package/node_modules/@emotion/react/dist/declarations/types/index.d.ts +0 -115
  845. package/node_modules/@emotion/react/dist/declarations/types/jsx-dev-runtime.d.ts +0 -1
  846. package/node_modules/@emotion/react/dist/declarations/types/jsx-namespace.d.ts +0 -102
  847. package/node_modules/@emotion/react/dist/declarations/types/jsx-runtime.d.ts +0 -1
  848. package/node_modules/@emotion/react/dist/declarations/types/theming.d.ts +0 -31
  849. package/node_modules/@emotion/react/src/_isolated-hnrs.d.ts +0 -3
  850. package/node_modules/@emotion/react/src/css.js +0 -8
  851. package/node_modules/@emotion/react/src/global.js +0 -145
  852. package/node_modules/@emotion/react/src/index.d.ts +0 -1
  853. package/node_modules/@emotion/react/src/jsx-dev-runtime.d.ts +0 -1
  854. package/node_modules/@emotion/react/src/jsx-runtime.d.ts +0 -1
  855. package/node_modules/@emotion/react/src/jsx-runtime.js +0 -21
  856. package/node_modules/@emotion/react/src/jsx.js +0 -25
  857. package/node_modules/@emotion/react/src/keyframes.js +0 -23
  858. package/node_modules/@emotion/react/types/index.d.ts +0 -115
  859. package/node_modules/@emotion/react/types/jsx-dev-runtime.d.ts +0 -1
  860. package/node_modules/@emotion/react/types/jsx-namespace.d.ts +0 -102
  861. package/node_modules/@emotion/react/types/jsx-runtime.d.ts +0 -1
  862. package/node_modules/@emotion/react/types/theming.d.ts +0 -31
  863. package/node_modules/@emotion/styled/dist/declarations/types/base.d.ts +0 -197
  864. package/node_modules/@emotion/styled/dist/declarations/types/index.d.ts +0 -33
  865. package/node_modules/@emotion/styled/src/base.d.ts +0 -2
  866. package/node_modules/@emotion/styled/src/index.d.ts +0 -2
  867. package/node_modules/@emotion/styled/src/index.js +0 -11
  868. package/node_modules/@emotion/styled/src/utils.js +0 -86
  869. package/node_modules/@emotion/styled/types/jsx-namespace.d.ts +0 -14
  870. package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/index.js +0 -15
  871. package/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +0 -12
  872. package/node_modules/@jridgewell/set-array/LICENSE +0 -19
  873. package/node_modules/@jridgewell/set-array/README.md +0 -37
  874. package/node_modules/@jridgewell/set-array/dist/set-array.mjs +0 -69
  875. package/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +0 -1
  876. package/node_modules/@jridgewell/set-array/dist/set-array.umd.js +0 -83
  877. package/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +0 -1
  878. package/node_modules/@jridgewell/set-array/package.json +0 -65
  879. package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +0 -8
  880. package/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +0 -1
  881. package/node_modules/@mui/material/OverridableComponent.d.ts +0 -67
  882. /package/node_modules/@emotion/cache/src/conditions/{false.js → false.ts} +0 -0
  883. /package/node_modules/@emotion/cache/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  884. /package/node_modules/@emotion/cache/src/conditions/{true.js → true.ts} +0 -0
  885. /package/node_modules/@emotion/react/src/conditions/{false.js → false.ts} +0 -0
  886. /package/node_modules/@emotion/react/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  887. /package/node_modules/@emotion/react/src/conditions/{true.js → true.ts} +0 -0
  888. /package/node_modules/@emotion/react/{types/helper.d.ts → src/types.ts} +0 -0
  889. /package/node_modules/@emotion/react/src/{utils.js → utils.ts} +0 -0
  890. /package/node_modules/@emotion/styled/src/conditions/{false.js → false.ts} +0 -0
  891. /package/node_modules/@emotion/styled/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  892. /package/node_modules/@emotion/styled/src/conditions/{true.js → true.ts} +0 -0
  893. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{false.js → false.ts} +0 -0
  894. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{is-browser.js → is-browser.ts} +0 -0
  895. /package/node_modules/@emotion/use-insertion-effect-with-fallbacks/src/conditions/{true.js → true.ts} +0 -0
@@ -121,6 +121,23 @@ function _evaluate(path, state) {
121
121
  deopt(binding.path, state);
122
122
  return;
123
123
  }
124
+ const bindingPathScope = binding.path.scope;
125
+ if (binding.kind === "var" && bindingPathScope !== binding.scope) {
126
+ let hasUnsafeBlock = !bindingPathScope.path.parentPath.isBlockStatement();
127
+ for (let scope = bindingPathScope.parent; scope; scope = scope.parent) {
128
+ var _scope$path$parentPat;
129
+ if (scope === path.scope) {
130
+ if (hasUnsafeBlock) {
131
+ deopt(binding.path, state);
132
+ return;
133
+ }
134
+ break;
135
+ }
136
+ if ((_scope$path$parentPat = scope.path.parentPath) != null && _scope$path$parentPat.isBlockStatement()) {
137
+ hasUnsafeBlock = true;
138
+ }
139
+ }
140
+ }
124
141
  if (binding.hasValue) {
125
142
  return binding.value;
126
143
  }
@@ -137,9 +154,13 @@ function _evaluate(path, state) {
137
154
  if (resolved === path) {
138
155
  deopt(path, state);
139
156
  return;
140
- } else {
141
- return evaluateCached(resolved, state);
142
157
  }
158
+ const value = evaluateCached(resolved, state);
159
+ if (typeof value === "object" && value !== null && binding.references > 1) {
160
+ deopt(resolved, state);
161
+ return;
162
+ }
163
+ return value;
143
164
  }
144
165
  if (path.isUnaryExpression({
145
166
  prefix: true
@@ -1 +1 @@
1
- {"version":3,"names":["VALID_OBJECT_CALLEES","VALID_IDENTIFIER_CALLEES","INVALID_METHODS","isValidObjectCallee","val","includes","isValidIdentifierCallee","isInvalidMethod","evaluateTruthy","res","evaluate","confident","value","deopt","path","state","deoptPath","Globals","Map","undefined","Infinity","NaN","evaluateCached","node","seen","has","existing","get","resolved","item","set","_evaluate","isSequenceExpression","exprs","length","isStringLiteral","isNumericLiteral","isBooleanLiteral","isNullLiteral","isTemplateLiteral","evaluateQuasis","quasis","isTaggedTemplateExpression","isMemberExpression","object","name","property","isIdentifier","scope","getBinding","quasi","isConditionalExpression","testResult","isExpressionWrapper","parentPath","isCallExpression","callee","isLiteral","type","key","computed","isReferencedIdentifier","binding","constantViolations","start","end","hasValue","resolve","isUnaryExpression","prefix","operator","argument","isFunction","isClass","arg","isArrayExpression","arr","elems","elem","elemValue","push","isObjectExpression","obj","props","prop","isObjectMethod","isSpreadElement","keyPath","valuePath","isLogicalExpression","wasConfident","left","leftConfident","right","rightConfident","isBinaryExpression","Math","pow","context","func","global","hasOwnProperty","call","args","map","apply","raw","str","i","cooked","expr","String"],"sources":["../../src/path/evaluation.ts"],"sourcesContent":["import type NodePath from \"./index.ts\";\nimport type * as t from \"@babel/types\";\n\n// This file contains Babels metainterpreter that can evaluate static code.\n\nconst VALID_OBJECT_CALLEES = [\"Number\", \"String\", \"Math\"] as const;\nconst VALID_IDENTIFIER_CALLEES = [\n \"isFinite\",\n \"isNaN\",\n \"parseFloat\",\n \"parseInt\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n process.env.BABEL_8_BREAKING ? \"btoa\" : null,\n process.env.BABEL_8_BREAKING ? \"atob\" : null,\n] as const;\n\nconst INVALID_METHODS = [\"random\"] as const;\n\nfunction isValidObjectCallee(\n val: string,\n): val is (typeof VALID_OBJECT_CALLEES)[number] {\n return VALID_OBJECT_CALLEES.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\nfunction isValidIdentifierCallee(\n val: string,\n): val is (typeof VALID_IDENTIFIER_CALLEES)[number] {\n return VALID_IDENTIFIER_CALLEES.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\nfunction isInvalidMethod(val: string): val is (typeof INVALID_METHODS)[number] {\n return INVALID_METHODS.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\n/**\n * Walk the input `node` and statically evaluate if it's truthy.\n *\n * Returning `true` when we're sure that the expression will evaluate to a\n * truthy value, `false` if we're sure that it will evaluate to a falsy\n * value and `undefined` if we aren't sure. Because of this please do not\n * rely on coercion when using this method and check with === if it's false.\n *\n * For example do:\n *\n * if (t.evaluateTruthy(node) === false) falsyLogic();\n *\n * **AND NOT**\n *\n * if (!t.evaluateTruthy(node)) falsyLogic();\n *\n */\n\nexport function evaluateTruthy(this: NodePath): boolean {\n const res = this.evaluate();\n if (res.confident) return !!res.value;\n}\n\ntype State = {\n confident: boolean;\n deoptPath: NodePath | null;\n seen: Map<t.Node, Result>;\n};\n\ntype Result = {\n resolved: boolean;\n value?: any;\n};\n/**\n * Deopts the evaluation\n */\nfunction deopt(path: NodePath, state: State) {\n if (!state.confident) return;\n state.deoptPath = path;\n state.confident = false;\n}\n\nconst Globals = new Map([\n [\"undefined\", undefined],\n [\"Infinity\", Infinity],\n [\"NaN\", NaN],\n]);\n\n/**\n * We wrap the _evaluate method so we can track `seen` nodes, we push an item\n * to the map before we actually evaluate it so we can deopt on self recursive\n * nodes such as:\n *\n * var g = a ? 1 : 2,\n * a = g * this.foo\n */\nfunction evaluateCached(path: NodePath, state: State): any {\n const { node } = path;\n const { seen } = state;\n\n if (seen.has(node)) {\n const existing = seen.get(node);\n if (existing.resolved) {\n return existing.value;\n } else {\n deopt(path, state);\n return;\n }\n } else {\n const item: Result = { resolved: false };\n seen.set(node, item);\n\n const val = _evaluate(path, state);\n if (state.confident) {\n item.resolved = true;\n item.value = val;\n }\n return val;\n }\n}\n\nfunction _evaluate(path: NodePath, state: State): any {\n if (!state.confident) return;\n\n if (path.isSequenceExpression()) {\n const exprs = path.get(\"expressions\");\n return evaluateCached(exprs[exprs.length - 1], state);\n }\n\n if (\n path.isStringLiteral() ||\n path.isNumericLiteral() ||\n path.isBooleanLiteral()\n ) {\n return path.node.value;\n }\n\n if (path.isNullLiteral()) {\n return null;\n }\n\n if (path.isTemplateLiteral()) {\n return evaluateQuasis(path, path.node.quasis, state);\n }\n\n if (\n path.isTaggedTemplateExpression() &&\n path.get(\"tag\").isMemberExpression()\n ) {\n const object = path.get(\"tag.object\") as NodePath;\n const {\n // @ts-expect-error todo(flow->ts): possible bug, object is can be any expression and so name might be undefined\n node: { name },\n } = object;\n const property = path.get(\"tag.property\") as NodePath;\n\n if (\n object.isIdentifier() &&\n name === \"String\" &&\n // todo(flow->ts): was changed from getBinding(name, true)\n // should this be hasBinding(name, true) as the binding is never used later?\n !path.scope.getBinding(name) &&\n property.isIdentifier() &&\n property.node.name === \"raw\"\n ) {\n return evaluateQuasis(path, path.node.quasi.quasis, state, true);\n }\n }\n\n if (path.isConditionalExpression()) {\n const testResult = evaluateCached(path.get(\"test\"), state);\n if (!state.confident) return;\n if (testResult) {\n return evaluateCached(path.get(\"consequent\"), state);\n } else {\n return evaluateCached(path.get(\"alternate\"), state);\n }\n }\n\n if (path.isExpressionWrapper()) {\n // TypeCastExpression, ExpressionStatement etc\n return evaluateCached(path.get(\"expression\"), state);\n }\n\n // \"foo\".length, \"foo\"[0]\n if (\n path.isMemberExpression() &&\n !path.parentPath.isCallExpression({ callee: path.node })\n ) {\n const property = path.get(\"property\");\n const object = path.get(\"object\");\n\n if (object.isLiteral()) {\n // @ts-expect-error todo(flow->ts): instead of typeof - would it be better to check type of ast node?\n const value = object.node.value;\n const type = typeof value;\n\n let key = null;\n if (path.node.computed) {\n key = evaluateCached(property, state);\n if (!state.confident) return;\n } else if (property.isIdentifier()) {\n key = property.node.name;\n }\n if (\n (type === \"number\" || type === \"string\") &&\n key != null &&\n (typeof key === \"number\" || typeof key === \"string\")\n ) {\n return value[key];\n }\n }\n }\n\n if (path.isReferencedIdentifier()) {\n const binding = path.scope.getBinding(path.node.name);\n\n if (binding) {\n if (\n binding.constantViolations.length > 0 ||\n path.node.start < binding.path.node.end\n ) {\n deopt(binding.path, state);\n return;\n }\n if (binding.hasValue) {\n return binding.value;\n }\n }\n\n const name = path.node.name;\n if (Globals.has(name)) {\n if (!binding) {\n return Globals.get(name);\n }\n deopt(binding.path, state);\n return;\n }\n\n const resolved = path.resolve();\n if (resolved === path) {\n deopt(path, state);\n return;\n } else {\n return evaluateCached(resolved, state);\n }\n }\n\n if (path.isUnaryExpression({ prefix: true })) {\n if (path.node.operator === \"void\") {\n // we don't need to evaluate the argument to know what this will return\n return undefined;\n }\n\n const argument = path.get(\"argument\");\n if (\n path.node.operator === \"typeof\" &&\n (argument.isFunction() || argument.isClass())\n ) {\n return \"function\";\n }\n\n const arg = evaluateCached(argument, state);\n if (!state.confident) return;\n switch (path.node.operator) {\n case \"!\":\n return !arg;\n case \"+\":\n return +arg;\n case \"-\":\n return -arg;\n case \"~\":\n return ~arg;\n case \"typeof\":\n return typeof arg;\n }\n }\n\n if (path.isArrayExpression()) {\n const arr = [];\n const elems: Array<NodePath> = path.get(\"elements\");\n for (const elem of elems) {\n const elemValue = elem.evaluate();\n\n if (elemValue.confident) {\n arr.push(elemValue.value);\n } else {\n deopt(elemValue.deopt, state);\n return;\n }\n }\n return arr;\n }\n\n if (path.isObjectExpression()) {\n const obj = {};\n const props = path.get(\"properties\");\n for (const prop of props) {\n if (prop.isObjectMethod() || prop.isSpreadElement()) {\n deopt(prop, state);\n return;\n }\n const keyPath = prop.get(\"key\");\n let key;\n if (prop.node.computed) {\n key = keyPath.evaluate();\n if (!key.confident) {\n deopt(key.deopt, state);\n return;\n }\n key = key.value;\n } else if (keyPath.isIdentifier()) {\n key = keyPath.node.name;\n } else {\n key = (\n keyPath.node as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral\n ).value;\n }\n const valuePath = prop.get(\"value\");\n let value = valuePath.evaluate();\n if (!value.confident) {\n deopt(value.deopt, state);\n return;\n }\n value = value.value;\n // @ts-expect-error key is any type\n obj[key] = value;\n }\n return obj;\n }\n\n if (path.isLogicalExpression()) {\n // If we are confident that the left side of an && is false, or the left\n // side of an || is true, we can be confident about the entire expression\n const wasConfident = state.confident;\n const left = evaluateCached(path.get(\"left\"), state);\n const leftConfident = state.confident;\n state.confident = wasConfident;\n const right = evaluateCached(path.get(\"right\"), state);\n const rightConfident = state.confident;\n\n switch (path.node.operator) {\n case \"||\":\n // TODO consider having a \"truthy type\" that doesn't bail on\n // left uncertainty but can still evaluate to truthy.\n state.confident = leftConfident && (!!left || rightConfident);\n if (!state.confident) return;\n\n return left || right;\n case \"&&\":\n state.confident = leftConfident && (!left || rightConfident);\n if (!state.confident) return;\n\n return left && right;\n case \"??\":\n state.confident = leftConfident && (left != null || rightConfident);\n if (!state.confident) return;\n\n return left ?? right;\n }\n }\n\n if (path.isBinaryExpression()) {\n const left = evaluateCached(path.get(\"left\"), state);\n if (!state.confident) return;\n const right = evaluateCached(path.get(\"right\"), state);\n if (!state.confident) return;\n\n switch (path.node.operator) {\n case \"-\":\n return left - right;\n case \"+\":\n return left + right;\n case \"/\":\n return left / right;\n case \"*\":\n return left * right;\n case \"%\":\n return left % right;\n case \"**\":\n return left ** right;\n case \"<\":\n return left < right;\n case \">\":\n return left > right;\n case \"<=\":\n return left <= right;\n case \">=\":\n return left >= right;\n case \"==\":\n return left == right; // eslint-disable-line eqeqeq\n case \"!=\":\n return left != right; // eslint-disable-line eqeqeq\n case \"===\":\n return left === right;\n case \"!==\":\n return left !== right;\n case \"|\":\n return left | right;\n case \"&\":\n return left & right;\n case \"^\":\n return left ^ right;\n case \"<<\":\n return left << right;\n case \">>\":\n return left >> right;\n case \">>>\":\n return left >>> right;\n }\n }\n\n if (path.isCallExpression()) {\n const callee = path.get(\"callee\");\n let context;\n let func;\n\n // Number(1);\n if (\n callee.isIdentifier() &&\n !path.scope.getBinding(callee.node.name) &&\n (isValidObjectCallee(callee.node.name) ||\n isValidIdentifierCallee(callee.node.name))\n ) {\n func = global[callee.node.name];\n }\n\n if (callee.isMemberExpression()) {\n const object = callee.get(\"object\");\n const property = callee.get(\"property\");\n\n // Math.min(1, 2)\n if (\n object.isIdentifier() &&\n property.isIdentifier() &&\n isValidObjectCallee(object.node.name) &&\n !isInvalidMethod(property.node.name)\n ) {\n context = global[object.node.name];\n const key = property.node.name;\n if (Object.hasOwn(context, key)) {\n func = context[key as keyof typeof context];\n }\n }\n\n // \"abc\".charCodeAt(4)\n if (object.isLiteral() && property.isIdentifier()) {\n // @ts-expect-error todo(flow->ts): consider checking ast node type instead of value type (StringLiteral and NumberLiteral)\n const type = typeof object.node.value;\n if (type === \"string\" || type === \"number\") {\n // @ts-expect-error todo(flow->ts): consider checking ast node type instead of value type\n context = object.node.value;\n func = context[property.node.name];\n }\n }\n }\n\n if (func) {\n const args = path.get(\"arguments\").map(arg => evaluateCached(arg, state));\n if (!state.confident) return;\n\n return func.apply(context, args);\n }\n }\n\n deopt(path, state);\n}\n\nfunction evaluateQuasis(\n path: NodePath<t.TaggedTemplateExpression | t.TemplateLiteral>,\n quasis: Array<any>,\n state: State,\n raw = false,\n) {\n let str = \"\";\n\n let i = 0;\n const exprs: Array<NodePath<t.Node>> = path.isTemplateLiteral()\n ? path.get(\"expressions\")\n : path.get(\"quasi.expressions\");\n\n for (const elem of quasis) {\n // not confident, evaluated an expression we don't like\n if (!state.confident) break;\n\n // add on element\n str += raw ? elem.value.raw : elem.value.cooked;\n\n // add on interpolated expression if it's present\n const expr = exprs[i++];\n if (expr) str += String(evaluateCached(expr, state));\n }\n\n if (!state.confident) return;\n return str;\n}\n\n/**\n * Walk the input `node` and statically evaluate it.\n *\n * Returns an object in the form `{ confident, value, deopt }`. `confident`\n * indicates whether or not we had to drop out of evaluating the expression\n * because of hitting an unknown node that we couldn't confidently find the\n * value of, in which case `deopt` is the path of said node.\n *\n * Example:\n *\n * t.evaluate(parse(\"5 + 5\")) // { confident: true, value: 10 }\n * t.evaluate(parse(\"!true\")) // { confident: true, value: false }\n * t.evaluate(parse(\"foo + foo\")) // { confident: false, value: undefined, deopt: NodePath }\n *\n */\n\nexport function evaluate(this: NodePath): {\n confident: boolean;\n value: any;\n deopt?: NodePath;\n} {\n const state: State = {\n confident: true,\n deoptPath: null,\n seen: new Map(),\n };\n let value = evaluateCached(this, state);\n if (!state.confident) value = undefined;\n\n return {\n confident: state.confident,\n deopt: state.deoptPath,\n value: value,\n };\n}\n"],"mappings":";;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;EAChB,CAAC;EACD,IAAIN,KAAK,GAAGU,cAAc,CAAC,IAAI,EAAEP,KAAK,CAAC;EACvC,IAAI,CAACA,KAAK,CAACJ,SAAS,EAAEC,KAAK,GAAGO,SAAS;EAEvC,OAAO;IACLR,SAAS,EAAEI,KAAK,CAACJ,SAAS;IAC1BE,KAAK,EAAEE,KAAK,CAACC,SAAS;IACtBJ,KAAK,EAAEA;EACT,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["VALID_OBJECT_CALLEES","VALID_IDENTIFIER_CALLEES","INVALID_METHODS","isValidObjectCallee","val","includes","isValidIdentifierCallee","isInvalidMethod","evaluateTruthy","res","evaluate","confident","value","deopt","path","state","deoptPath","Globals","Map","undefined","Infinity","NaN","evaluateCached","node","seen","has","existing","get","resolved","item","set","_evaluate","isSequenceExpression","exprs","length","isStringLiteral","isNumericLiteral","isBooleanLiteral","isNullLiteral","isTemplateLiteral","evaluateQuasis","quasis","isTaggedTemplateExpression","isMemberExpression","object","name","property","isIdentifier","scope","getBinding","quasi","isConditionalExpression","testResult","isExpressionWrapper","parentPath","isCallExpression","callee","isLiteral","type","key","computed","isReferencedIdentifier","binding","constantViolations","start","end","bindingPathScope","kind","hasUnsafeBlock","isBlockStatement","parent","_scope$path$parentPat","hasValue","resolve","references","isUnaryExpression","prefix","operator","argument","isFunction","isClass","arg","isArrayExpression","arr","elems","elem","elemValue","push","isObjectExpression","obj","props","prop","isObjectMethod","isSpreadElement","keyPath","valuePath","isLogicalExpression","wasConfident","left","leftConfident","right","rightConfident","isBinaryExpression","Math","pow","context","func","global","hasOwnProperty","call","args","map","apply","raw","str","i","cooked","expr","String"],"sources":["../../src/path/evaluation.ts"],"sourcesContent":["import type NodePath from \"./index.ts\";\nimport type * as t from \"@babel/types\";\n\n// This file contains Babels metainterpreter that can evaluate static code.\n\nconst VALID_OBJECT_CALLEES = [\"Number\", \"String\", \"Math\"] as const;\nconst VALID_IDENTIFIER_CALLEES = [\n \"isFinite\",\n \"isNaN\",\n \"parseFloat\",\n \"parseInt\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n process.env.BABEL_8_BREAKING ? \"btoa\" : null,\n process.env.BABEL_8_BREAKING ? \"atob\" : null,\n] as const;\n\nconst INVALID_METHODS = [\"random\"] as const;\n\nfunction isValidObjectCallee(\n val: string,\n): val is (typeof VALID_OBJECT_CALLEES)[number] {\n return VALID_OBJECT_CALLEES.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\nfunction isValidIdentifierCallee(\n val: string,\n): val is (typeof VALID_IDENTIFIER_CALLEES)[number] {\n return VALID_IDENTIFIER_CALLEES.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\nfunction isInvalidMethod(val: string): val is (typeof INVALID_METHODS)[number] {\n return INVALID_METHODS.includes(\n // @ts-expect-error val is a string\n val,\n );\n}\n\n/**\n * Walk the input `node` and statically evaluate if it's truthy.\n *\n * Returning `true` when we're sure that the expression will evaluate to a\n * truthy value, `false` if we're sure that it will evaluate to a falsy\n * value and `undefined` if we aren't sure. Because of this please do not\n * rely on coercion when using this method and check with === if it's false.\n *\n * For example do:\n *\n * if (t.evaluateTruthy(node) === false) falsyLogic();\n *\n * **AND NOT**\n *\n * if (!t.evaluateTruthy(node)) falsyLogic();\n *\n */\n\nexport function evaluateTruthy(this: NodePath): boolean {\n const res = this.evaluate();\n if (res.confident) return !!res.value;\n}\n\ntype State = {\n confident: boolean;\n deoptPath: NodePath | null;\n seen: Map<t.Node, Result>;\n};\n\ntype Result = {\n resolved: boolean;\n value?: any;\n};\n/**\n * Deopts the evaluation\n */\nfunction deopt(path: NodePath, state: State) {\n if (!state.confident) return;\n state.deoptPath = path;\n state.confident = false;\n}\n\nconst Globals = new Map([\n [\"undefined\", undefined],\n [\"Infinity\", Infinity],\n [\"NaN\", NaN],\n]);\n\n/**\n * We wrap the _evaluate method so we can track `seen` nodes, we push an item\n * to the map before we actually evaluate it so we can deopt on self recursive\n * nodes such as:\n *\n * var g = a ? 1 : 2,\n * a = g * this.foo\n */\nfunction evaluateCached(path: NodePath, state: State): any {\n const { node } = path;\n const { seen } = state;\n\n if (seen.has(node)) {\n const existing = seen.get(node);\n if (existing.resolved) {\n return existing.value;\n } else {\n deopt(path, state);\n return;\n }\n } else {\n const item: Result = { resolved: false };\n seen.set(node, item);\n\n const val = _evaluate(path, state);\n if (state.confident) {\n item.resolved = true;\n item.value = val;\n }\n return val;\n }\n}\n\nfunction _evaluate(path: NodePath, state: State): any {\n if (!state.confident) return;\n\n if (path.isSequenceExpression()) {\n const exprs = path.get(\"expressions\");\n return evaluateCached(exprs[exprs.length - 1], state);\n }\n\n if (\n path.isStringLiteral() ||\n path.isNumericLiteral() ||\n path.isBooleanLiteral()\n ) {\n return path.node.value;\n }\n\n if (path.isNullLiteral()) {\n return null;\n }\n\n if (path.isTemplateLiteral()) {\n return evaluateQuasis(path, path.node.quasis, state);\n }\n\n if (\n path.isTaggedTemplateExpression() &&\n path.get(\"tag\").isMemberExpression()\n ) {\n const object = path.get(\"tag.object\") as NodePath;\n const {\n // @ts-expect-error todo(flow->ts): possible bug, object is can be any expression and so name might be undefined\n node: { name },\n } = object;\n const property = path.get(\"tag.property\") as NodePath;\n\n if (\n object.isIdentifier() &&\n name === \"String\" &&\n // todo(flow->ts): was changed from getBinding(name, true)\n // should this be hasBinding(name, true) as the binding is never used later?\n !path.scope.getBinding(name) &&\n property.isIdentifier() &&\n property.node.name === \"raw\"\n ) {\n return evaluateQuasis(path, path.node.quasi.quasis, state, true);\n }\n }\n\n if (path.isConditionalExpression()) {\n const testResult = evaluateCached(path.get(\"test\"), state);\n if (!state.confident) return;\n if (testResult) {\n return evaluateCached(path.get(\"consequent\"), state);\n } else {\n return evaluateCached(path.get(\"alternate\"), state);\n }\n }\n\n if (path.isExpressionWrapper()) {\n // TypeCastExpression, ExpressionStatement etc\n return evaluateCached(path.get(\"expression\"), state);\n }\n\n // \"foo\".length, \"foo\"[0]\n if (\n path.isMemberExpression() &&\n !path.parentPath.isCallExpression({ callee: path.node })\n ) {\n const property = path.get(\"property\");\n const object = path.get(\"object\");\n\n if (object.isLiteral()) {\n // @ts-expect-error todo(flow->ts): instead of typeof - would it be better to check type of ast node?\n const value = object.node.value;\n const type = typeof value;\n\n let key = null;\n if (path.node.computed) {\n key = evaluateCached(property, state);\n if (!state.confident) return;\n } else if (property.isIdentifier()) {\n key = property.node.name;\n }\n if (\n (type === \"number\" || type === \"string\") &&\n key != null &&\n (typeof key === \"number\" || typeof key === \"string\")\n ) {\n return value[key];\n }\n }\n }\n\n if (path.isReferencedIdentifier()) {\n const binding = path.scope.getBinding(path.node.name);\n\n if (binding) {\n if (\n binding.constantViolations.length > 0 ||\n path.node.start < binding.path.node.end\n ) {\n deopt(binding.path, state);\n return;\n }\n const bindingPathScope = binding.path.scope;\n if (binding.kind === \"var\" && bindingPathScope !== binding.scope) {\n let hasUnsafeBlock =\n !bindingPathScope.path.parentPath.isBlockStatement();\n for (let scope = bindingPathScope.parent; scope; scope = scope.parent) {\n if (scope === path.scope) {\n if (hasUnsafeBlock) {\n deopt(binding.path, state);\n return;\n }\n break;\n }\n if (scope.path.parentPath?.isBlockStatement()) {\n hasUnsafeBlock = true;\n }\n }\n }\n if (binding.hasValue) {\n return binding.value;\n }\n }\n\n const name = path.node.name;\n if (Globals.has(name)) {\n if (!binding) {\n return Globals.get(name);\n }\n deopt(binding.path, state);\n return;\n }\n\n const resolved = path.resolve();\n if (resolved === path) {\n deopt(path, state);\n return;\n }\n const value = evaluateCached(resolved, state);\n if (typeof value === \"object\" && value !== null && binding.references > 1) {\n deopt(resolved, state);\n return;\n }\n return value;\n }\n\n if (path.isUnaryExpression({ prefix: true })) {\n if (path.node.operator === \"void\") {\n // we don't need to evaluate the argument to know what this will return\n return undefined;\n }\n\n const argument = path.get(\"argument\");\n if (\n path.node.operator === \"typeof\" &&\n (argument.isFunction() || argument.isClass())\n ) {\n return \"function\";\n }\n\n const arg = evaluateCached(argument, state);\n if (!state.confident) return;\n switch (path.node.operator) {\n case \"!\":\n return !arg;\n case \"+\":\n return +arg;\n case \"-\":\n return -arg;\n case \"~\":\n return ~arg;\n case \"typeof\":\n return typeof arg;\n }\n }\n\n if (path.isArrayExpression()) {\n const arr = [];\n const elems: Array<NodePath> = path.get(\"elements\");\n for (const elem of elems) {\n const elemValue = elem.evaluate();\n\n if (elemValue.confident) {\n arr.push(elemValue.value);\n } else {\n deopt(elemValue.deopt, state);\n return;\n }\n }\n return arr;\n }\n\n if (path.isObjectExpression()) {\n const obj = {};\n const props = path.get(\"properties\");\n for (const prop of props) {\n if (prop.isObjectMethod() || prop.isSpreadElement()) {\n deopt(prop, state);\n return;\n }\n const keyPath = prop.get(\"key\");\n let key;\n if (prop.node.computed) {\n key = keyPath.evaluate();\n if (!key.confident) {\n deopt(key.deopt, state);\n return;\n }\n key = key.value;\n } else if (keyPath.isIdentifier()) {\n key = keyPath.node.name;\n } else {\n key = (\n keyPath.node as t.StringLiteral | t.NumericLiteral | t.BigIntLiteral\n ).value;\n }\n const valuePath = prop.get(\"value\");\n let value = valuePath.evaluate();\n if (!value.confident) {\n deopt(value.deopt, state);\n return;\n }\n value = value.value;\n // @ts-expect-error key is any type\n obj[key] = value;\n }\n return obj;\n }\n\n if (path.isLogicalExpression()) {\n // If we are confident that the left side of an && is false, or the left\n // side of an || is true, we can be confident about the entire expression\n const wasConfident = state.confident;\n const left = evaluateCached(path.get(\"left\"), state);\n const leftConfident = state.confident;\n state.confident = wasConfident;\n const right = evaluateCached(path.get(\"right\"), state);\n const rightConfident = state.confident;\n\n switch (path.node.operator) {\n case \"||\":\n // TODO consider having a \"truthy type\" that doesn't bail on\n // left uncertainty but can still evaluate to truthy.\n state.confident = leftConfident && (!!left || rightConfident);\n if (!state.confident) return;\n\n return left || right;\n case \"&&\":\n state.confident = leftConfident && (!left || rightConfident);\n if (!state.confident) return;\n\n return left && right;\n case \"??\":\n state.confident = leftConfident && (left != null || rightConfident);\n if (!state.confident) return;\n\n return left ?? right;\n }\n }\n\n if (path.isBinaryExpression()) {\n const left = evaluateCached(path.get(\"left\"), state);\n if (!state.confident) return;\n const right = evaluateCached(path.get(\"right\"), state);\n if (!state.confident) return;\n\n switch (path.node.operator) {\n case \"-\":\n return left - right;\n case \"+\":\n return left + right;\n case \"/\":\n return left / right;\n case \"*\":\n return left * right;\n case \"%\":\n return left % right;\n case \"**\":\n return left ** right;\n case \"<\":\n return left < right;\n case \">\":\n return left > right;\n case \"<=\":\n return left <= right;\n case \">=\":\n return left >= right;\n case \"==\":\n return left == right; // eslint-disable-line eqeqeq\n case \"!=\":\n return left != right; // eslint-disable-line eqeqeq\n case \"===\":\n return left === right;\n case \"!==\":\n return left !== right;\n case \"|\":\n return left | right;\n case \"&\":\n return left & right;\n case \"^\":\n return left ^ right;\n case \"<<\":\n return left << right;\n case \">>\":\n return left >> right;\n case \">>>\":\n return left >>> right;\n }\n }\n\n if (path.isCallExpression()) {\n const callee = path.get(\"callee\");\n let context;\n let func;\n\n // Number(1);\n if (\n callee.isIdentifier() &&\n !path.scope.getBinding(callee.node.name) &&\n (isValidObjectCallee(callee.node.name) ||\n isValidIdentifierCallee(callee.node.name))\n ) {\n func = global[callee.node.name];\n }\n\n if (callee.isMemberExpression()) {\n const object = callee.get(\"object\");\n const property = callee.get(\"property\");\n\n // Math.min(1, 2)\n if (\n object.isIdentifier() &&\n property.isIdentifier() &&\n isValidObjectCallee(object.node.name) &&\n !isInvalidMethod(property.node.name)\n ) {\n context = global[object.node.name];\n const key = property.node.name;\n if (Object.hasOwn(context, key)) {\n func = context[key as keyof typeof context];\n }\n }\n\n // \"abc\".charCodeAt(4)\n if (object.isLiteral() && property.isIdentifier()) {\n // @ts-expect-error todo(flow->ts): consider checking ast node type instead of value type (StringLiteral and NumberLiteral)\n const type = typeof object.node.value;\n if (type === \"string\" || type === \"number\") {\n // @ts-expect-error todo(flow->ts): consider checking ast node type instead of value type\n context = object.node.value;\n func = context[property.node.name];\n }\n }\n }\n\n if (func) {\n const args = path.get(\"arguments\").map(arg => evaluateCached(arg, state));\n if (!state.confident) return;\n\n return func.apply(context, args);\n }\n }\n\n deopt(path, state);\n}\n\nfunction evaluateQuasis(\n path: NodePath<t.TaggedTemplateExpression | t.TemplateLiteral>,\n quasis: Array<any>,\n state: State,\n raw = false,\n) {\n let str = \"\";\n\n let i = 0;\n const exprs: Array<NodePath<t.Node>> = path.isTemplateLiteral()\n ? path.get(\"expressions\")\n : path.get(\"quasi.expressions\");\n\n for (const elem of quasis) {\n // not confident, evaluated an expression we don't like\n if (!state.confident) break;\n\n // add on element\n str += raw ? elem.value.raw : elem.value.cooked;\n\n // add on interpolated expression if it's present\n const expr = exprs[i++];\n if (expr) str += String(evaluateCached(expr, state));\n }\n\n if (!state.confident) return;\n return str;\n}\n\n/**\n * Walk the input `node` and statically evaluate it.\n *\n * Returns an object in the form `{ confident, value, deopt }`. `confident`\n * indicates whether or not we had to drop out of evaluating the expression\n * because of hitting an unknown node that we couldn't confidently find the\n * value of, in which case `deopt` is the path of said node.\n *\n * Example:\n *\n * t.evaluate(parse(\"5 + 5\")) // { confident: true, value: 10 }\n * t.evaluate(parse(\"!true\")) // { confident: true, value: false }\n * t.evaluate(parse(\"foo + foo\")) // { confident: false, value: undefined, deopt: NodePath }\n *\n */\n\nexport function evaluate(this: NodePath): {\n confident: boolean;\n value: any;\n deopt?: NodePath;\n} {\n const state: State = {\n confident: true,\n deoptPath: null,\n seen: new Map(),\n };\n let value = evaluateCached(this, state);\n if (!state.confident) value = undefined;\n\n return {\n confident: state.confident,\n deopt: state.deoptPath,\n value: value,\n };\n}\n"],"mappings":";;;;;;;AAKA,MAAMA,oBAAoB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU;AAClE,MAAMC,wBAAwB,GAAG,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACoB,IAAI,EACJ,IA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CAAC,aAAa,CAAC,GACvBb,IAAI,CAACa,GAAG,CAAC,mBAAmB,CAAC;EAEjC,KAAK,MAAM0D,IAAI,IAAI5C,MAAM,EAAE;IAEzB,IAAI,CAAC1B,KAAK,CAACJ,SAAS,EAAE;IAGtBuG,GAAG,IAAID,GAAG,GAAG5B,IAAI,CAACzE,KAAK,CAACqG,GAAG,GAAG5B,IAAI,CAACzE,KAAK,CAACwG,MAAM;IAG/C,MAAMC,IAAI,GAAGpF,KAAK,CAACkF,CAAC,EAAE,CAAC;IACvB,IAAIE,IAAI,EAAEH,GAAG,IAAII,MAAM,CAAChG,cAAc,CAAC+F,IAAI,EAAEtG,KAAK,CAAC,CAAC;EACtD;EAEA,IAAI,CAACA,KAAK,CAACJ,SAAS,EAAE;EACtB,OAAOuG,GAAG;AACZ;AAkBO,SAASxG,QAAQA,CAAA,EAItB;EACA,MAAMK,KAAY,GAAG;IACnBJ,SAAS,EAAE,IAAI;IACfK,SAAS,EAAE,IAAI;IACfQ,IAAI,EAAE,IAAIN,GAAG,CAAC;EAChB,CAAC;EACD,IAAIN,KAAK,GAAGU,cAAc,CAAC,IAAI,EAAEP,KAAK,CAAC;EACvC,IAAI,CAACA,KAAK,CAACJ,SAAS,EAAEC,KAAK,GAAGO,SAAS;EAEvC,OAAO;IACLR,SAAS,EAAEI,KAAK,CAACJ,SAAS;IAC1BE,KAAK,EAAEE,KAAK,CAACC,SAAS;IACtBJ,KAAK,EAAEA;EACT,CAAC;AACH","ignoreList":[]}
@@ -119,12 +119,16 @@ function getStatementListCompletion(paths, context) {
119
119
  completions.push(...lastNormalCompletions);
120
120
  if (lastNormalCompletions.some(c => c.path.isDeclaration())) {
121
121
  completions.push(...statementCompletions);
122
- replaceBreakStatementInBreakCompletion(statementCompletions, true);
122
+ if (!context.shouldPreserveBreak) {
123
+ replaceBreakStatementInBreakCompletion(statementCompletions, true);
124
+ }
125
+ }
126
+ if (!context.shouldPreserveBreak) {
127
+ replaceBreakStatementInBreakCompletion(statementCompletions, false);
123
128
  }
124
- replaceBreakStatementInBreakCompletion(statementCompletions, false);
125
129
  } else {
126
130
  completions.push(...statementCompletions);
127
- if (!context.shouldPopulateBreak) {
131
+ if (!context.shouldPopulateBreak && !context.shouldPreserveBreak) {
128
132
  replaceBreakStatementInBreakCompletion(statementCompletions, true);
129
133
  }
130
134
  }
@@ -148,7 +152,7 @@ function getStatementListCompletion(paths, context) {
148
152
  } else if (paths.length) {
149
153
  for (let i = paths.length - 1; i >= 0; i--) {
150
154
  const pathCompletions = _getCompletionRecords(paths[i], context);
151
- if (pathCompletions.length > 1 || pathCompletions.length === 1 && !pathCompletions[0].path.isVariableDeclaration()) {
155
+ if (pathCompletions.length > 1 || pathCompletions.length === 1 && !pathCompletions[0].path.isVariableDeclaration() && !pathCompletions[0].path.isEmptyStatement()) {
152
156
  completions.push(...pathCompletions);
153
157
  break;
154
158
  }
@@ -178,7 +182,8 @@ function _getCompletionRecords(path, context) {
178
182
  return getStatementListCompletion(path.get("consequent"), {
179
183
  canHaveBreak: true,
180
184
  shouldPopulateBreak: false,
181
- inCaseClause: true
185
+ inCaseClause: true,
186
+ shouldPreserveBreak: context.shouldPreserveBreak
182
187
  });
183
188
  } else if (path.isBreakStatement()) {
184
189
  records.push(BreakCompletion(path));
@@ -187,11 +192,12 @@ function _getCompletionRecords(path, context) {
187
192
  }
188
193
  return records;
189
194
  }
190
- function getCompletionRecords() {
195
+ function getCompletionRecords(shouldPreserveBreak = false) {
191
196
  const records = _getCompletionRecords(this, {
192
197
  canHaveBreak: false,
193
198
  shouldPopulateBreak: false,
194
- inCaseClause: false
199
+ inCaseClause: false,
200
+ shouldPreserveBreak
195
201
  });
196
202
  return records.map(r => r.path);
197
203
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_index","require","_t","getAssignmentIdentifiers","_getAssignmentIdentifiers","getBindingIdentifiers","_getBindingIdentifiers","getOuterBindingIdentifiers","_getOuterBindingIdentifiers","numericLiteral","unaryExpression","NORMAL_COMPLETION","BREAK_COMPLETION","NormalCompletion","path","type","BreakCompletion","getOpposite","key","getSibling","addCompletionRecords","records","context","push","_getCompletionRecords","completionRecordForSwitch","cases","lastNormalCompletions","i","length","casePath","caseCompletions","normalCompletions","breakCompletions","c","normalCompletionToBreak","completions","forEach","replaceBreakStatementInBreakCompletion","reachable","isBreakStatement","label","replaceWith","remove","getStatementListCompletion","paths","canHaveBreak","newContext","Object","assign","inCaseClause","isBlockStatement","shouldPopulateBreak","statementCompletions","every","some","isDeclaration","pathCompletions","isVariableDeclaration","isIfStatement","get","isDoExpression","isFor","isWhile","isLabeledStatement","isProgram","isFunction","isTryStatement","isCatchClause","isSwitchStatement","isSwitchCase","getCompletionRecords","map","r","NodePath","parentPath","parent","container","listKey","setContext","getPrevSibling","getNextSibling","getAllNextSiblings","_key","sibling","siblings","node","getAllPrevSiblings","parts","split","_getKey","call","_getPattern","Array","isArray","_","part","duplicates","getBindingIdentifierPaths","outerOnly","search","ids","create","id","shift","keys","isIdentifier","_ids","name","isExportDeclaration","declaration","isFunctionDeclaration","isFunctionExpression","child","getOuterBindingIdentifierPaths"],"sources":["../../src/path/family.ts"],"sourcesContent":["// This file contains methods responsible for dealing with/retrieving children or siblings.\n\nimport type TraversalContext from \"../context.ts\";\nimport NodePath from \"./index.ts\";\nimport {\n getAssignmentIdentifiers as _getAssignmentIdentifiers,\n getBindingIdentifiers as _getBindingIdentifiers,\n getOuterBindingIdentifiers as _getOuterBindingIdentifiers,\n numericLiteral,\n unaryExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nconst NORMAL_COMPLETION = 0;\nconst BREAK_COMPLETION = 1;\n\ntype Completion = {\n path: NodePath;\n type: 0 | 1;\n};\n\ntype CompletionContext = {\n // whether the current context allows `break` statement. When it allows, we have\n // to search all the statements for potential `break`\n canHaveBreak: boolean;\n // whether the statement is an immediate descendant of a switch case clause\n inCaseClause: boolean;\n // whether the `break` statement record should be populated to upper level\n // when a `break` statement is an immediate descendant of a block statement, e.g.\n // `{ break }`, it can influence the control flow in the upper levels.\n shouldPopulateBreak: boolean;\n};\n\nfunction NormalCompletion(path: NodePath): Completion {\n return { type: NORMAL_COMPLETION, path };\n}\n\nfunction BreakCompletion(path: NodePath): Completion {\n return { type: BREAK_COMPLETION, path };\n}\n\nexport function getOpposite(this: NodePath): NodePath | null {\n if (this.key === \"left\") {\n return this.getSibling(\"right\");\n } else if (this.key === \"right\") {\n return this.getSibling(\"left\");\n }\n return null;\n}\n\nfunction addCompletionRecords(\n path: NodePath | null | undefined,\n records: Completion[],\n context: CompletionContext,\n): Completion[] {\n if (path) {\n records.push(..._getCompletionRecords(path, context));\n }\n return records;\n}\n\nfunction completionRecordForSwitch(\n cases: NodePath<t.SwitchCase>[],\n records: Completion[],\n context: CompletionContext,\n): Completion[] {\n // https://tc39.es/ecma262/#sec-runtime-semantics-caseblockevaluation\n let lastNormalCompletions: Completion[] = [];\n for (let i = 0; i < cases.length; i++) {\n const casePath = cases[i];\n const caseCompletions = _getCompletionRecords(casePath, context);\n const normalCompletions = [];\n const breakCompletions = [];\n for (const c of caseCompletions) {\n if (c.type === NORMAL_COMPLETION) {\n normalCompletions.push(c);\n }\n if (c.type === BREAK_COMPLETION) {\n breakCompletions.push(c);\n }\n }\n if (normalCompletions.length) {\n lastNormalCompletions = normalCompletions;\n }\n records.push(...breakCompletions);\n }\n records.push(...lastNormalCompletions);\n return records;\n}\n\nfunction normalCompletionToBreak(completions: Completion[]) {\n completions.forEach(c => {\n c.type = BREAK_COMPLETION;\n });\n}\n\n/**\n * Determine how we should handle the break statement for break completions\n *\n * @param {Completion[]} completions\n * @param {boolean} reachable Whether the break statement is reachable after\n we mark the normal completions _before_ the given break completions as the final\n completions. For example,\n `{ 0 }; break;` is transformed to `{ return 0 }; break;`, the `break` here is unreachable\n and thus can be removed without consequences. We may in the future reserve them instead since\n we do not consistently remove unreachable statements _after_ break\n `{ var x = 0 }; break;` is transformed to `{ var x = 0 }; return void 0;`, the `break` is reachable\n because we can not wrap variable declaration under a return statement\n */\nfunction replaceBreakStatementInBreakCompletion(\n completions: Completion[],\n reachable: boolean,\n) {\n completions.forEach(c => {\n if (c.path.isBreakStatement({ label: null })) {\n if (reachable) {\n c.path.replaceWith(unaryExpression(\"void\", numericLiteral(0)));\n } else {\n c.path.remove();\n }\n }\n });\n}\n\nfunction getStatementListCompletion(\n paths: NodePath[],\n context: CompletionContext,\n): Completion[] {\n const completions = [];\n if (context.canHaveBreak) {\n let lastNormalCompletions = [];\n for (let i = 0; i < paths.length; i++) {\n const path = paths[i];\n const newContext = { ...context, inCaseClause: false };\n if (\n path.isBlockStatement() &&\n (context.inCaseClause || // case test: { break }\n context.shouldPopulateBreak) // case test: { { break } }\n ) {\n newContext.shouldPopulateBreak = true;\n } else {\n newContext.shouldPopulateBreak = false;\n }\n const statementCompletions = _getCompletionRecords(path, newContext);\n if (\n statementCompletions.length > 0 &&\n // we can stop search `paths` when we have seen a `path` that is\n // effectively a `break` statement. Examples are\n // - `break`\n // - `if (true) { 1; break } else { 2; break }`\n // - `{ break }```\n // In other words, the paths after this `path` are unreachable\n statementCompletions.every(c => c.type === BREAK_COMPLETION)\n ) {\n if (\n lastNormalCompletions.length > 0 &&\n statementCompletions.every(c =>\n c.path.isBreakStatement({ label: null }),\n )\n ) {\n // when a break completion has a path as BreakStatement, it must be `{ break }`\n // whose completion value we can not determine, otherwise it would have been\n // replaced by `replaceBreakStatementInBreakCompletion`\n // When we have seen normal completions from the last statement\n // it is safe to stop populating break and mark normal completions as break\n normalCompletionToBreak(lastNormalCompletions);\n completions.push(...lastNormalCompletions);\n // Declarations have empty completion record, however they can not be nested\n // directly in return statement, i.e. `return (var a = 1)` is invalid.\n if (lastNormalCompletions.some(c => c.path.isDeclaration())) {\n completions.push(...statementCompletions);\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ true,\n );\n }\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ false,\n );\n } else {\n completions.push(...statementCompletions);\n if (!context.shouldPopulateBreak) {\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ true,\n );\n }\n }\n break;\n }\n if (i === paths.length - 1) {\n completions.push(...statementCompletions);\n } else {\n lastNormalCompletions = [];\n for (let i = 0; i < statementCompletions.length; i++) {\n const c = statementCompletions[i];\n if (c.type === BREAK_COMPLETION) {\n completions.push(c);\n }\n if (c.type === NORMAL_COMPLETION) {\n lastNormalCompletions.push(c);\n }\n }\n }\n }\n } else if (paths.length) {\n // When we are in a context where `break` must not exist, we can skip linear\n // search on statement lists and assume that the last\n // non-variable-declaration statement determines the completion.\n for (let i = paths.length - 1; i >= 0; i--) {\n const pathCompletions = _getCompletionRecords(paths[i], context);\n if (\n pathCompletions.length > 1 ||\n (pathCompletions.length === 1 &&\n !pathCompletions[0].path.isVariableDeclaration())\n ) {\n completions.push(...pathCompletions);\n break;\n }\n }\n }\n return completions;\n}\n\nfunction _getCompletionRecords(\n path: NodePath,\n context: CompletionContext,\n): Completion[] {\n let records: Completion[] = [];\n if (path.isIfStatement()) {\n records = addCompletionRecords(path.get(\"consequent\"), records, context);\n records = addCompletionRecords(path.get(\"alternate\"), records, context);\n } else if (\n path.isDoExpression() ||\n path.isFor() ||\n path.isWhile() ||\n path.isLabeledStatement()\n ) {\n return addCompletionRecords(path.get(\"body\"), records, context);\n } else if (path.isProgram() || path.isBlockStatement()) {\n return getStatementListCompletion(path.get(\"body\"), context);\n } else if (path.isFunction()) {\n return _getCompletionRecords(path.get(\"body\"), context);\n } else if (path.isTryStatement()) {\n records = addCompletionRecords(path.get(\"block\"), records, context);\n records = addCompletionRecords(path.get(\"handler\"), records, context);\n } else if (path.isCatchClause()) {\n return addCompletionRecords(path.get(\"body\"), records, context);\n } else if (path.isSwitchStatement()) {\n return completionRecordForSwitch(path.get(\"cases\"), records, context);\n } else if (path.isSwitchCase()) {\n return getStatementListCompletion(path.get(\"consequent\"), {\n canHaveBreak: true,\n shouldPopulateBreak: false,\n inCaseClause: true,\n });\n } else if (path.isBreakStatement()) {\n records.push(BreakCompletion(path));\n } else {\n records.push(NormalCompletion(path));\n }\n\n return records;\n}\n\n/**\n * Retrieve the completion records of a given path.\n * Note: to ensure proper support on `break` statement, this method\n * will manipulate the AST around the break statement. Do not call the method\n * twice for the same path.\n *\n * @export\n * @param {NodePath} this\n * @returns {NodePath[]} Completion records\n */\nexport function getCompletionRecords(this: NodePath): NodePath[] {\n const records = _getCompletionRecords(this, {\n canHaveBreak: false,\n shouldPopulateBreak: false,\n inCaseClause: false,\n });\n return records.map(r => r.path);\n}\n\nexport function getSibling(this: NodePath, key: string | number): NodePath {\n return NodePath.get({\n parentPath: this.parentPath,\n parent: this.parent,\n container: this.container,\n listKey: this.listKey,\n key: key,\n }).setContext(this.context);\n}\n\nexport function getPrevSibling(this: NodePath): NodePath {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n return this.getSibling(this.key - 1);\n}\n\nexport function getNextSibling(this: NodePath): NodePath {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n return this.getSibling(this.key + 1);\n}\n\nexport function getAllNextSiblings(this: NodePath): NodePath[] {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n let _key: number = this.key;\n let sibling = this.getSibling(++_key);\n const siblings = [];\n while (sibling.node) {\n siblings.push(sibling);\n sibling = this.getSibling(++_key);\n }\n return siblings;\n}\n\nexport function getAllPrevSiblings(this: NodePath): NodePath[] {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n let _key: number = this.key;\n let sibling = this.getSibling(--_key);\n const siblings = [];\n while (sibling.node) {\n siblings.push(sibling);\n sibling = this.getSibling(--_key);\n }\n return siblings;\n}\n\n// convert \"1\" to 1 (string index to number index)\ntype MaybeToIndex<T extends string> = T extends `${bigint}` ? number : T;\n\ntype Pattern<Obj extends string, Prop extends string> = `${Obj}.${Prop}`;\n\n// split \"body.body.1\" to [\"body\", \"body\", 1]\ntype Split<P extends string> =\n P extends Pattern<infer O, infer U>\n ? [MaybeToIndex<O>, ...Split<U>]\n : [MaybeToIndex<P>];\n\n// traverse the Node with tuple path [\"body\", \"body\", 1]\n// Path should be created with Split\ntype Trav<\n Node extends t.Node | t.Node[],\n Path extends unknown[],\n> = Path extends [infer K, ...infer R]\n ? K extends keyof Node\n ? Node[K] extends t.Node | t.Node[]\n ? R extends []\n ? Node[K]\n : Trav<Node[K], R>\n : never\n : never\n : never;\n\ntype ToNodePath<T> =\n T extends Array<t.Node | null | undefined>\n ? Array<NodePath<T[number]>>\n : T extends t.Node | null | undefined\n ? NodePath<T>\n : never;\n\nfunction get<T extends NodePath, K extends keyof T[\"node\"]>(\n this: T,\n key: K,\n context?: boolean | TraversalContext,\n): T extends any\n ? T[\"node\"][K] extends Array<t.Node | null | undefined>\n ? Array<NodePath<T[\"node\"][K][number]>>\n : T[\"node\"][K] extends t.Node | null | undefined\n ? NodePath<T[\"node\"][K]>\n : never\n : never;\n\nfunction get<T extends NodePath, K extends string>(\n this: T,\n key: K,\n context?: boolean | TraversalContext,\n): T extends any ? ToNodePath<Trav<T[\"node\"], Split<K>>> : never;\n\nfunction get(\n this: NodePath,\n key: string,\n context?: true | TraversalContext,\n): NodePath | NodePath[];\n\nfunction get(\n this: NodePath,\n key: string,\n context: true | TraversalContext = true,\n): NodePath | NodePath[] {\n if (context === true) context = this.context;\n const parts = key.split(\".\");\n if (parts.length === 1) {\n // \"foo\"\n // @ts-expect-error key may not index T\n return _getKey.call(this, key, context);\n } else {\n // \"foo.bar\"\n return _getPattern.call(this, parts, context);\n }\n}\n\nexport { get };\n\nexport function _getKey<T extends t.Node>(\n this: NodePath<T>,\n key: keyof T & string,\n context?: TraversalContext,\n): NodePath | NodePath[] {\n const node = this.node as T;\n const container = node[key];\n\n if (Array.isArray(container)) {\n // requested a container so give them all the paths\n return container.map((_, i) => {\n return NodePath.get({\n listKey: key,\n parentPath: this,\n parent: node,\n container: container,\n key: i,\n }).setContext(context);\n });\n } else {\n return NodePath.get({\n parentPath: this,\n parent: node,\n container: node,\n key: key,\n }).setContext(context);\n }\n}\n\nexport function _getPattern(\n this: NodePath,\n parts: string[],\n context?: TraversalContext,\n): NodePath | NodePath[] {\n let path: NodePath | NodePath[] = this;\n for (const part of parts) {\n if (part === \".\") {\n // @ts-expect-error todo(flow-ts): Can path be an array here?\n path = path.parentPath;\n } else {\n if (Array.isArray(path)) {\n // @ts-expect-error part may not index path\n path = path[part];\n } else {\n path = path.get(part, context);\n }\n }\n }\n return path;\n}\n\nexport function getAssignmentIdentifiers(this: NodePath) {\n return _getAssignmentIdentifiers(this.node);\n}\n\nfunction getBindingIdentifiers(\n duplicates: true,\n): Record<string, t.Identifier[]>;\nfunction getBindingIdentifiers(\n duplicates?: false,\n): Record<string, t.Identifier>;\nfunction getBindingIdentifiers(\n duplicates: boolean,\n): Record<string, t.Identifier[] | t.Identifier>;\n\nfunction getBindingIdentifiers(\n this: NodePath,\n duplicates?: boolean,\n): Record<string, t.Identifier[] | t.Identifier> {\n return _getBindingIdentifiers(this.node, duplicates);\n}\n\nexport { getBindingIdentifiers };\n\nfunction getOuterBindingIdentifiers(\n duplicates: true,\n): Record<string, t.Identifier[]>;\nfunction getOuterBindingIdentifiers(\n duplicates?: false,\n): Record<string, t.Identifier>;\nfunction getOuterBindingIdentifiers(\n duplicates: boolean,\n): Record<string, t.Identifier[] | t.Identifier>;\n\nfunction getOuterBindingIdentifiers(\n this: NodePath,\n duplicates?: boolean,\n): Record<string, t.Identifier[] | t.Identifier> {\n return _getOuterBindingIdentifiers(this.node, duplicates);\n}\n\nexport { getOuterBindingIdentifiers };\n\nfunction getBindingIdentifierPaths(\n duplicates: true,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier>[]>;\nfunction getBindingIdentifierPaths(\n duplicates: false,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier>>;\nfunction getBindingIdentifierPaths(\n duplicates?: boolean,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]>;\n\n// original source - https://github.com/babel/babel/blob/main/packages/babel-types/src/retrievers/getBindingIdentifiers.js\n// path.getBindingIdentifiers returns nodes where the following re-implementation returns paths\nfunction getBindingIdentifierPaths(\n this: NodePath,\n duplicates: boolean = false,\n outerOnly: boolean = false,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]> {\n const path = this;\n const search = [path];\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.shift();\n if (!id) continue;\n if (!id.node) continue;\n\n const keys = _getBindingIdentifiers.keys[id.node.type];\n\n if (id.isIdentifier()) {\n if (duplicates) {\n const _ids = (ids[id.node.name] = ids[id.node.name] || []);\n _ids.push(id);\n } else {\n ids[id.node.name] = id;\n }\n continue;\n }\n\n if (id.isExportDeclaration()) {\n const declaration = id.get(\"declaration\");\n if (declaration.isDeclaration()) {\n search.push(declaration);\n }\n continue;\n }\n\n if (outerOnly) {\n if (id.isFunctionDeclaration()) {\n search.push(id.get(\"id\"));\n continue;\n }\n if (id.isFunctionExpression()) {\n continue;\n }\n }\n\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const child = id.get(key);\n if (Array.isArray(child)) {\n search.push(...child);\n } else if (child.node) {\n search.push(child);\n }\n }\n }\n }\n\n return ids;\n}\n\nexport { getBindingIdentifierPaths };\n\nfunction getOuterBindingIdentifierPaths(\n duplicates: true,\n): Record<string, NodePath<t.Identifier>[]>;\nfunction getOuterBindingIdentifierPaths(\n duplicates?: false,\n): Record<string, NodePath<t.Identifier>>;\nfunction getOuterBindingIdentifierPaths(\n duplicates?: boolean,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]>;\n\nfunction getOuterBindingIdentifierPaths(\n this: NodePath,\n duplicates: boolean = false,\n) {\n return this.getBindingIdentifierPaths(duplicates, true);\n}\n\nexport { getOuterBindingIdentifierPaths };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAMsB;EALpBE,wBAA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AK,CAAC;QACvB,CAAC,MAAM,IAAIA,KAAK,CAAC3B,IAAI,EAAE;UACrBc,MAAM,CAAC7E,IAAI,CAAC0F,KAAK,CAAC;QACpB;MACF;IACF;EACF;EAEA,OAAOZ,GAAG;AACZ;AAcA,SAASa,8BAA8BA,CAErCjB,UAAmB,GAAG,KAAK,EAC3B;EACA,OAAO,IAAI,CAACC,yBAAyB,CAACD,UAAU,EAAE,IAAI,CAAC;AACzD","ignoreList":[]}
1
+ {"version":3,"names":["_index","require","_t","getAssignmentIdentifiers","_getAssignmentIdentifiers","getBindingIdentifiers","_getBindingIdentifiers","getOuterBindingIdentifiers","_getOuterBindingIdentifiers","numericLiteral","unaryExpression","NORMAL_COMPLETION","BREAK_COMPLETION","NormalCompletion","path","type","BreakCompletion","getOpposite","key","getSibling","addCompletionRecords","records","context","push","_getCompletionRecords","completionRecordForSwitch","cases","lastNormalCompletions","i","length","casePath","caseCompletions","normalCompletions","breakCompletions","c","normalCompletionToBreak","completions","forEach","replaceBreakStatementInBreakCompletion","reachable","isBreakStatement","label","replaceWith","remove","getStatementListCompletion","paths","canHaveBreak","newContext","Object","assign","inCaseClause","isBlockStatement","shouldPopulateBreak","statementCompletions","every","some","isDeclaration","shouldPreserveBreak","pathCompletions","isVariableDeclaration","isEmptyStatement","isIfStatement","get","isDoExpression","isFor","isWhile","isLabeledStatement","isProgram","isFunction","isTryStatement","isCatchClause","isSwitchStatement","isSwitchCase","getCompletionRecords","map","r","NodePath","parentPath","parent","container","listKey","setContext","getPrevSibling","getNextSibling","getAllNextSiblings","_key","sibling","siblings","node","getAllPrevSiblings","parts","split","_getKey","call","_getPattern","Array","isArray","_","part","duplicates","getBindingIdentifierPaths","outerOnly","search","ids","create","id","shift","keys","isIdentifier","_ids","name","isExportDeclaration","declaration","isFunctionDeclaration","isFunctionExpression","child","getOuterBindingIdentifierPaths"],"sources":["../../src/path/family.ts"],"sourcesContent":["// This file contains methods responsible for dealing with/retrieving children or siblings.\n\nimport type TraversalContext from \"../context.ts\";\nimport NodePath from \"./index.ts\";\nimport {\n getAssignmentIdentifiers as _getAssignmentIdentifiers,\n getBindingIdentifiers as _getBindingIdentifiers,\n getOuterBindingIdentifiers as _getOuterBindingIdentifiers,\n numericLiteral,\n unaryExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nconst NORMAL_COMPLETION = 0;\nconst BREAK_COMPLETION = 1;\n\ntype Completion = {\n path: NodePath;\n type: 0 | 1;\n};\n\ntype CompletionContext = {\n // whether the current context allows `break` statement. When it allows, we have\n // to search all the statements for potential `break`\n canHaveBreak: boolean;\n // whether the statement is an immediate descendant of a switch case clause\n inCaseClause: boolean;\n // whether the `break` statement record should be populated to upper level\n // when a `break` statement is an immediate descendant of a block statement, e.g.\n // `{ break }`, it can influence the control flow in the upper levels.\n shouldPopulateBreak: boolean;\n // Whether the `break` statement should be preserved.\n shouldPreserveBreak: boolean;\n};\n\nfunction NormalCompletion(path: NodePath): Completion {\n return { type: NORMAL_COMPLETION, path };\n}\n\nfunction BreakCompletion(path: NodePath): Completion {\n return { type: BREAK_COMPLETION, path };\n}\n\nexport function getOpposite(this: NodePath): NodePath | null {\n if (this.key === \"left\") {\n return this.getSibling(\"right\");\n } else if (this.key === \"right\") {\n return this.getSibling(\"left\");\n }\n return null;\n}\n\nfunction addCompletionRecords(\n path: NodePath | null | undefined,\n records: Completion[],\n context: CompletionContext,\n): Completion[] {\n if (path) {\n records.push(..._getCompletionRecords(path, context));\n }\n return records;\n}\n\nfunction completionRecordForSwitch(\n cases: NodePath<t.SwitchCase>[],\n records: Completion[],\n context: CompletionContext,\n): Completion[] {\n // https://tc39.es/ecma262/#sec-runtime-semantics-caseblockevaluation\n let lastNormalCompletions: Completion[] = [];\n for (let i = 0; i < cases.length; i++) {\n const casePath = cases[i];\n const caseCompletions = _getCompletionRecords(casePath, context);\n const normalCompletions = [];\n const breakCompletions = [];\n for (const c of caseCompletions) {\n if (c.type === NORMAL_COMPLETION) {\n normalCompletions.push(c);\n }\n if (c.type === BREAK_COMPLETION) {\n breakCompletions.push(c);\n }\n }\n if (normalCompletions.length) {\n lastNormalCompletions = normalCompletions;\n }\n records.push(...breakCompletions);\n }\n records.push(...lastNormalCompletions);\n return records;\n}\n\nfunction normalCompletionToBreak(completions: Completion[]) {\n completions.forEach(c => {\n c.type = BREAK_COMPLETION;\n });\n}\n\n/**\n * Determine how we should handle the break statement for break completions\n *\n * @param {Completion[]} completions\n * @param {boolean} reachable Whether the break statement is reachable after\n we mark the normal completions _before_ the given break completions as the final\n completions. For example,\n `{ 0 }; break;` is transformed to `{ return 0 }; break;`, the `break` here is unreachable\n and thus can be removed without consequences. We may in the future reserve them instead since\n we do not consistently remove unreachable statements _after_ break\n `{ var x = 0 }; break;` is transformed to `{ var x = 0 }; return void 0;`, the `break` is reachable\n because we can not wrap variable declaration under a return statement\n */\nfunction replaceBreakStatementInBreakCompletion(\n completions: Completion[],\n reachable: boolean,\n) {\n completions.forEach(c => {\n if (c.path.isBreakStatement({ label: null })) {\n if (reachable) {\n c.path.replaceWith(unaryExpression(\"void\", numericLiteral(0)));\n } else {\n c.path.remove();\n }\n }\n });\n}\n\nfunction getStatementListCompletion(\n paths: NodePath[],\n context: CompletionContext,\n): Completion[] {\n const completions = [];\n if (context.canHaveBreak) {\n let lastNormalCompletions = [];\n for (let i = 0; i < paths.length; i++) {\n const path = paths[i];\n const newContext = { ...context, inCaseClause: false };\n if (\n path.isBlockStatement() &&\n (context.inCaseClause || // case test: { break }\n context.shouldPopulateBreak) // case test: { { break } }\n ) {\n newContext.shouldPopulateBreak = true;\n } else {\n newContext.shouldPopulateBreak = false;\n }\n const statementCompletions = _getCompletionRecords(path, newContext);\n if (\n statementCompletions.length > 0 &&\n // we can stop search `paths` when we have seen a `path` that is\n // effectively a `break` statement. Examples are\n // - `break`\n // - `if (true) { 1; break } else { 2; break }`\n // - `{ break }```\n // In other words, the paths after this `path` are unreachable\n statementCompletions.every(c => c.type === BREAK_COMPLETION)\n ) {\n if (\n lastNormalCompletions.length > 0 &&\n statementCompletions.every(c =>\n c.path.isBreakStatement({ label: null }),\n )\n ) {\n // when a break completion has a path as BreakStatement, it must be `{ break }`\n // whose completion value we can not determine, otherwise it would have been\n // replaced by `replaceBreakStatementInBreakCompletion`\n // When we have seen normal completions from the last statement\n // it is safe to stop populating break and mark normal completions as break\n normalCompletionToBreak(lastNormalCompletions);\n completions.push(...lastNormalCompletions);\n // Declarations have empty completion record, however they can not be nested\n // directly in return statement, i.e. `return (var a = 1)` is invalid.\n if (lastNormalCompletions.some(c => c.path.isDeclaration())) {\n completions.push(...statementCompletions);\n if (!context.shouldPreserveBreak) {\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ true,\n );\n }\n }\n if (!context.shouldPreserveBreak) {\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ false,\n );\n }\n } else {\n completions.push(...statementCompletions);\n if (!context.shouldPopulateBreak && !context.shouldPreserveBreak) {\n replaceBreakStatementInBreakCompletion(\n statementCompletions,\n /* reachable */ true,\n );\n }\n }\n break;\n }\n if (i === paths.length - 1) {\n completions.push(...statementCompletions);\n } else {\n lastNormalCompletions = [];\n for (let i = 0; i < statementCompletions.length; i++) {\n const c = statementCompletions[i];\n if (c.type === BREAK_COMPLETION) {\n completions.push(c);\n }\n if (c.type === NORMAL_COMPLETION) {\n lastNormalCompletions.push(c);\n }\n }\n }\n }\n } else if (paths.length) {\n // When we are in a context where `break` must not exist, we can skip linear\n // search on statement lists and assume that the last\n // non-variable-declaration statement determines the completion.\n for (let i = paths.length - 1; i >= 0; i--) {\n const pathCompletions = _getCompletionRecords(paths[i], context);\n if (\n pathCompletions.length > 1 ||\n (pathCompletions.length === 1 &&\n !pathCompletions[0].path.isVariableDeclaration() &&\n !pathCompletions[0].path.isEmptyStatement())\n ) {\n completions.push(...pathCompletions);\n break;\n }\n }\n }\n return completions;\n}\n\nfunction _getCompletionRecords(\n path: NodePath,\n context: CompletionContext,\n): Completion[] {\n let records: Completion[] = [];\n if (path.isIfStatement()) {\n records = addCompletionRecords(path.get(\"consequent\"), records, context);\n records = addCompletionRecords(path.get(\"alternate\"), records, context);\n } else if (\n path.isDoExpression() ||\n path.isFor() ||\n path.isWhile() ||\n path.isLabeledStatement()\n ) {\n return addCompletionRecords(path.get(\"body\"), records, context);\n } else if (path.isProgram() || path.isBlockStatement()) {\n return getStatementListCompletion(path.get(\"body\"), context);\n } else if (path.isFunction()) {\n return _getCompletionRecords(path.get(\"body\"), context);\n } else if (path.isTryStatement()) {\n records = addCompletionRecords(path.get(\"block\"), records, context);\n records = addCompletionRecords(path.get(\"handler\"), records, context);\n } else if (path.isCatchClause()) {\n return addCompletionRecords(path.get(\"body\"), records, context);\n } else if (path.isSwitchStatement()) {\n return completionRecordForSwitch(path.get(\"cases\"), records, context);\n } else if (path.isSwitchCase()) {\n return getStatementListCompletion(path.get(\"consequent\"), {\n canHaveBreak: true,\n shouldPopulateBreak: false,\n inCaseClause: true,\n shouldPreserveBreak: context.shouldPreserveBreak,\n });\n } else if (path.isBreakStatement()) {\n records.push(BreakCompletion(path));\n } else {\n records.push(NormalCompletion(path));\n }\n\n return records;\n}\n\n/**\n * Retrieve the completion records of a given path.\n * Note: to ensure proper support on `break` statement, this method\n * will manipulate the AST around the break statement. Do not call the method\n * twice for the same path.\n *\n * @export\n * @param {NodePath} this\n * @param {boolean} [shouldPreserveBreak=false] Whether the `break` statement should be preserved.\n * @returns {NodePath[]} Completion records\n */\nexport function getCompletionRecords(\n this: NodePath,\n shouldPreserveBreak = false,\n): NodePath[] {\n const records = _getCompletionRecords(this, {\n canHaveBreak: false,\n shouldPopulateBreak: false,\n inCaseClause: false,\n shouldPreserveBreak,\n });\n return records.map(r => r.path);\n}\n\nexport function getSibling(this: NodePath, key: string | number): NodePath {\n return NodePath.get({\n parentPath: this.parentPath,\n parent: this.parent,\n container: this.container,\n listKey: this.listKey,\n key: key,\n }).setContext(this.context);\n}\n\nexport function getPrevSibling(this: NodePath): NodePath {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n return this.getSibling(this.key - 1);\n}\n\nexport function getNextSibling(this: NodePath): NodePath {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n return this.getSibling(this.key + 1);\n}\n\nexport function getAllNextSiblings(this: NodePath): NodePath[] {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n let _key: number = this.key;\n let sibling = this.getSibling(++_key);\n const siblings = [];\n while (sibling.node) {\n siblings.push(sibling);\n sibling = this.getSibling(++_key);\n }\n return siblings;\n}\n\nexport function getAllPrevSiblings(this: NodePath): NodePath[] {\n // @ts-expect-error todo(flow->ts) this.key could be a string\n let _key: number = this.key;\n let sibling = this.getSibling(--_key);\n const siblings = [];\n while (sibling.node) {\n siblings.push(sibling);\n sibling = this.getSibling(--_key);\n }\n return siblings;\n}\n\n// convert \"1\" to 1 (string index to number index)\ntype MaybeToIndex<T extends string> = T extends `${bigint}` ? number : T;\n\ntype Pattern<Obj extends string, Prop extends string> = `${Obj}.${Prop}`;\n\n// split \"body.body.1\" to [\"body\", \"body\", 1]\ntype Split<P extends string> =\n P extends Pattern<infer O, infer U>\n ? [MaybeToIndex<O>, ...Split<U>]\n : [MaybeToIndex<P>];\n\n// traverse the Node with tuple path [\"body\", \"body\", 1]\n// Path should be created with Split\ntype Trav<\n Node extends t.Node | t.Node[],\n Path extends unknown[],\n> = Path extends [infer K, ...infer R]\n ? K extends keyof Node\n ? Node[K] extends t.Node | t.Node[]\n ? R extends []\n ? Node[K]\n : Trav<Node[K], R>\n : never\n : never\n : never;\n\ntype ToNodePath<T> =\n T extends Array<t.Node | null | undefined>\n ? Array<NodePath<T[number]>>\n : T extends t.Node | null | undefined\n ? NodePath<T>\n : never;\n\nfunction get<T extends NodePath, K extends keyof T[\"node\"]>(\n this: T,\n key: K,\n context?: boolean | TraversalContext,\n): T extends any\n ? T[\"node\"][K] extends Array<t.Node | null | undefined>\n ? Array<NodePath<T[\"node\"][K][number]>>\n : T[\"node\"][K] extends t.Node | null | undefined\n ? NodePath<T[\"node\"][K]>\n : never\n : never;\n\nfunction get<T extends NodePath, K extends string>(\n this: T,\n key: K,\n context?: boolean | TraversalContext,\n): T extends any ? ToNodePath<Trav<T[\"node\"], Split<K>>> : never;\n\nfunction get(\n this: NodePath,\n key: string,\n context?: true | TraversalContext,\n): NodePath | NodePath[];\n\nfunction get(\n this: NodePath,\n key: string,\n context: true | TraversalContext = true,\n): NodePath | NodePath[] {\n if (context === true) context = this.context;\n const parts = key.split(\".\");\n if (parts.length === 1) {\n // \"foo\"\n // @ts-expect-error key may not index T\n return _getKey.call(this, key, context);\n } else {\n // \"foo.bar\"\n return _getPattern.call(this, parts, context);\n }\n}\n\nexport { get };\n\nexport function _getKey<T extends t.Node>(\n this: NodePath<T>,\n key: keyof T & string,\n context?: TraversalContext,\n): NodePath | NodePath[] {\n const node = this.node as T;\n const container = node[key];\n\n if (Array.isArray(container)) {\n // requested a container so give them all the paths\n return container.map((_, i) => {\n return NodePath.get({\n listKey: key,\n parentPath: this,\n parent: node,\n container: container,\n key: i,\n }).setContext(context);\n });\n } else {\n return NodePath.get({\n parentPath: this,\n parent: node,\n container: node,\n key: key,\n }).setContext(context);\n }\n}\n\nexport function _getPattern(\n this: NodePath,\n parts: string[],\n context?: TraversalContext,\n): NodePath | NodePath[] {\n let path: NodePath | NodePath[] = this;\n for (const part of parts) {\n if (part === \".\") {\n // @ts-expect-error todo(flow-ts): Can path be an array here?\n path = path.parentPath;\n } else {\n if (Array.isArray(path)) {\n // @ts-expect-error part may not index path\n path = path[part];\n } else {\n path = path.get(part, context);\n }\n }\n }\n return path;\n}\n\nexport function getAssignmentIdentifiers(this: NodePath) {\n return _getAssignmentIdentifiers(this.node);\n}\n\nfunction getBindingIdentifiers(\n duplicates: true,\n): Record<string, t.Identifier[]>;\nfunction getBindingIdentifiers(\n duplicates?: false,\n): Record<string, t.Identifier>;\nfunction getBindingIdentifiers(\n duplicates: boolean,\n): Record<string, t.Identifier[] | t.Identifier>;\n\nfunction getBindingIdentifiers(\n this: NodePath,\n duplicates?: boolean,\n): Record<string, t.Identifier[] | t.Identifier> {\n return _getBindingIdentifiers(this.node, duplicates);\n}\n\nexport { getBindingIdentifiers };\n\nfunction getOuterBindingIdentifiers(\n duplicates: true,\n): Record<string, t.Identifier[]>;\nfunction getOuterBindingIdentifiers(\n duplicates?: false,\n): Record<string, t.Identifier>;\nfunction getOuterBindingIdentifiers(\n duplicates: boolean,\n): Record<string, t.Identifier[] | t.Identifier>;\n\nfunction getOuterBindingIdentifiers(\n this: NodePath,\n duplicates?: boolean,\n): Record<string, t.Identifier[] | t.Identifier> {\n return _getOuterBindingIdentifiers(this.node, duplicates);\n}\n\nexport { getOuterBindingIdentifiers };\n\nfunction getBindingIdentifierPaths(\n duplicates: true,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier>[]>;\nfunction getBindingIdentifierPaths(\n duplicates: false,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier>>;\nfunction getBindingIdentifierPaths(\n duplicates?: boolean,\n outerOnly?: boolean,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]>;\n\n// original source - https://github.com/babel/babel/blob/main/packages/babel-types/src/retrievers/getBindingIdentifiers.js\n// path.getBindingIdentifiers returns nodes where the following re-implementation returns paths\nfunction getBindingIdentifierPaths(\n this: NodePath,\n duplicates: boolean = false,\n outerOnly: boolean = false,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]> {\n const path = this;\n const search = [path];\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.shift();\n if (!id) continue;\n if (!id.node) continue;\n\n const keys = _getBindingIdentifiers.keys[id.node.type];\n\n if (id.isIdentifier()) {\n if (duplicates) {\n const _ids = (ids[id.node.name] = ids[id.node.name] || []);\n _ids.push(id);\n } else {\n ids[id.node.name] = id;\n }\n continue;\n }\n\n if (id.isExportDeclaration()) {\n const declaration = id.get(\"declaration\");\n if (declaration.isDeclaration()) {\n search.push(declaration);\n }\n continue;\n }\n\n if (outerOnly) {\n if (id.isFunctionDeclaration()) {\n search.push(id.get(\"id\"));\n continue;\n }\n if (id.isFunctionExpression()) {\n continue;\n }\n }\n\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const child = id.get(key);\n if (Array.isArray(child)) {\n search.push(...child);\n } else if (child.node) {\n search.push(child);\n }\n }\n }\n }\n\n return ids;\n}\n\nexport { getBindingIdentifierPaths };\n\nfunction getOuterBindingIdentifierPaths(\n duplicates: true,\n): Record<string, NodePath<t.Identifier>[]>;\nfunction getOuterBindingIdentifierPaths(\n duplicates?: false,\n): Record<string, NodePath<t.Identifier>>;\nfunction getOuterBindingIdentifierPaths(\n duplicates?: boolean,\n): Record<string, NodePath<t.Identifier> | NodePath<t.Identifier>[]>;\n\nfunction getOuterBindingIdentifierPaths(\n this: NodePath,\n duplicates: boolean = false,\n) {\n return this.getBindingIdentifierPaths(duplicates, true);\n}\n\nexport { getOuterBindingIdentifierPaths };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAMsB;EALpBE,wBAAwB,EAAIC,yBAAyB;EACrDC,qBAAqB,EAAIC,sBAAsB;EAC/CC,0BAA0B,EAAIC,2BAA2B;EACzDC,cAAc;EACdC;AAAe,IAAAR,EAAA;AAIjB,MAAMS,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,gBAAgB,GAAG,CAAC;AAqB1B,SAASC,gBAAgBA,CAACC,IAAc,EAAc;EACpD,OAAO;IAAEC,IAAI,EAAEJ,iBAAiB;IAAEG;EAAK,CAAC;AAC1C;AAEA,SAASE,eAAeA,CAACF,IAAc,EAAc;EACnD,OAAO;IAAEC,IAAI,EAAEH,gBAAgB;IAAEE;EAAK,CAAC;AACzC;AAEO,SAASG,WAAWA,CAAA,EAAkC;EAC3D,IAAI,IAAI,CAACC,GAAG,KAAK,MAAM,EAAE;IACvB,OAAO,IA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,OAAO,IAAI,CAACC,yBAAyB,CAACD,UAAU,EAAE,IAAI,CAAC;AACzD","ignoreList":[]}
@@ -45,6 +45,7 @@ const NodePath_Final = exports.default = class NodePath {
45
45
  this.key = null;
46
46
  this.node = null;
47
47
  this.type = null;
48
+ this._store = null;
48
49
  this.parent = parent;
49
50
  this.hub = hub;
50
51
  this.data = null;
@@ -84,7 +85,7 @@ const NodePath_Final = exports.default = class NodePath {
84
85
  throw new Error("To get a node path the parent needs to exist");
85
86
  }
86
87
  const targetNode = container[key];
87
- const paths = cache.getOrCreateCachedPaths(hub, parent);
88
+ const paths = cache.getOrCreateCachedPaths(parent, parentPath);
88
89
  let path = paths.get(targetNode);
89
90
  if (!path) {
90
91
  path = new NodePath(hub, parent);
@@ -1 +1 @@
1
- {"version":3,"names":["virtualTypes","require","_debug","_index","_index2","_t","t","cache","_generator","NodePath_ancestry","NodePath_inference","NodePath_replacement","NodePath_evaluation","NodePath_conversion","NodePath_introspection","_context","NodePath_context","NodePath_removal","NodePath_modification","NodePath_family","NodePath_comments","NodePath_virtual_types_validator","validate","debug","buildDebug","REMOVED","exports","SHOULD_STOP","SHOULD_SKIP","NodePath_Final","default","NodePath","constructor","hub","parent","contexts","state","opts","_traverseFlags","skipKeys","parentPath","container","listKey","key","node","type","data","context","scope","removed","v","shouldStop","shouldSkip","get","Error","targetNode","paths","getOrCreateCachedPaths","path","set","setup","call","getScope","isScope","Scope","setData","val","Object","create","getData","def","undefined","hasNode","buildCodeFrameError","msg","SyntaxError","buildError","traverse","visitor","getPathLocation","parts","inList","unshift","join","message","enabled","toString","generator","code","parentKey","methods","findParent","find","getFunctionParent","getStatementParent","getEarliestCommonAncestorFrom","getDeepestCommonAncestorFrom","getAncestry","isAncestor","isDescendant","inType","getTypeAnnotation","isBaseType","couldBeBaseType","baseTypeStrictlyMatches","isGenericType","replaceWithMultiple","replaceWithSourceString","replaceWith","replaceExpressionWithStatements","replaceInline","evaluateTruthy","evaluate","toComputedKey","ensureBlock","unwrapFunctionEnvironment","arrowFunctionToExpression","splitExportDeclaration","ensureFunctionName","matchesPattern","isStatic","isNodeType","canHaveVariableDeclarationOrExpression","canSwapBetweenExpressionAndStatement","isCompletionRecord","isStatementOrBlock","referencesImport","getSource","willIMaybeExecuteBefore","_guessExecutionStatusRelativeTo","resolve","isConstantExpression","isInStrictMode","isDenylisted","visit","skip","skipKey","stop","setContext","requeue","requeueComputedKeyAndDecorators","remove","insertBefore","insertAfter","unshiftContainer","pushContainer","getOpposite","getCompletionRecords","getSibling","getPrevSibling","getNextSibling","getAllNextSiblings","getAllPrevSiblings","getAssignmentIdentifiers","getBindingIdentifiers","getOuterBindingIdentifiers","getBindingIdentifierPaths","getOuterBindingIdentifierPaths","shareCommentsWithSiblings","addComment","addComments","assign","prototype","arrowFunctionToShadowed","String","has","is","isnt","equals","hoist","updateSiblingKeys","isBlacklisted","setScope","resync","popContext","pushContext","setKey","_guessExecutionStatusRelativeToDifferentFunctions","_getTypeAnnotation","_replaceWith","_resolve","_call","_resyncParent","_resyncKey","_resyncList","_resyncRemoved","_getQueueContexts","_removeFromScope","_callRemovalHooks","_remove","_markRemoved","_assertUnremoved","_containerInsert","_containerInsertBefore","_containerInsertAfter","_verifyNodeList","_getKey","_getPattern","TYPES","typeKey","fn","TypeError","keys","includes","push"],"sources":["../../src/path/index.ts"],"sourcesContent":["import type { HubInterface } from \"../hub.ts\";\nimport type TraversalContext from \"../context.ts\";\nimport type { ExplodedTraverseOptions } from \"../index.ts\";\nimport * as virtualTypes from \"./lib/virtual-types.ts\";\nimport buildDebug from \"debug\";\nimport traverse from \"../index.ts\";\nimport type { Visitor } from \"../types.ts\";\nimport Scope from \"../scope/index.ts\";\nimport { validate } from \"@babel/types\";\nimport * as t from \"@babel/types\";\nimport * as cache from \"../cache.ts\";\nimport generator from \"@babel/generator\";\n\n// NodePath is split across many files.\nimport * as NodePath_ancestry from \"./ancestry.ts\";\nimport * as NodePath_inference from \"./inference/index.ts\";\nimport * as NodePath_replacement from \"./replacement.ts\";\nimport * as NodePath_evaluation from \"./evaluation.ts\";\nimport * as NodePath_conversion from \"./conversion.ts\";\nimport * as NodePath_introspection from \"./introspection.ts\";\nimport * as NodePath_context from \"./context.ts\";\nimport * as NodePath_removal from \"./removal.ts\";\nimport * as NodePath_modification from \"./modification.ts\";\nimport * as NodePath_family from \"./family.ts\";\nimport * as NodePath_comments from \"./comments.ts\";\nimport * as NodePath_virtual_types_validator from \"./lib/virtual-types-validator.ts\";\nimport type { NodePathAssertions } from \"./generated/asserts.ts\";\nimport type { NodePathValidators } from \"./generated/validators.ts\";\nimport { setup } from \"./context.ts\";\n\nconst debug = buildDebug(\"babel\");\n\nexport const REMOVED = 1 << 0;\nexport const SHOULD_STOP = 1 << 1;\nexport const SHOULD_SKIP = 1 << 2;\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator<any>;\n\nconst NodePath_Final = class NodePath {\n constructor(hub: HubInterface, parent: t.Node | null) {\n this.parent = parent;\n this.hub = hub;\n this.data = null;\n\n this.context = null;\n this.scope = null;\n }\n\n declare parent: t.Node;\n declare hub: HubInterface;\n declare data: Record<string | symbol, unknown>;\n // TraversalContext is configured by setContext\n declare context: TraversalContext;\n declare scope: Scope;\n\n contexts: Array<TraversalContext> = [];\n state: any = null;\n opts: ExplodedTraverseOptions | null = null;\n\n @bit.storage _traverseFlags: number;\n @bit(REMOVED) accessor removed = false;\n @bit(SHOULD_STOP) accessor shouldStop = false;\n @bit(SHOULD_SKIP) accessor shouldSkip = false;\n\n skipKeys: Record<string, boolean> | null = null;\n parentPath: NodePath_Final | null = null;\n container: t.Node | Array<t.Node> | null = null;\n listKey: string | null = null;\n key: string | number | null = null;\n node: t.Node | null = null;\n type: t.Node[\"type\"] | null = null;\n\n static get({\n hub,\n parentPath,\n parent,\n container,\n listKey,\n key,\n }: {\n hub?: HubInterface;\n parentPath: NodePath_Final | null;\n parent: t.Node;\n container: t.Node | t.Node[];\n listKey?: string;\n key: string | number;\n }): NodePath_Final {\n if (!hub && parentPath) {\n hub = parentPath.hub;\n }\n\n if (!parent) {\n throw new Error(\"To get a node path the parent needs to exist\");\n }\n\n const targetNode =\n // @ts-expect-error key must present in container\n container[key];\n\n const paths = cache.getOrCreateCachedPaths(hub, parent);\n\n let path = paths.get(targetNode);\n if (!path) {\n path = new NodePath(hub, parent) as NodePath_Final;\n if (targetNode) paths.set(targetNode, path);\n }\n\n setup.call(path, parentPath, container, listKey, key);\n\n return path;\n }\n\n getScope(this: NodePath_Final, scope: Scope): Scope {\n return this.isScope() ? new Scope(this) : scope;\n }\n\n setData(key: string | symbol, val: any): any {\n if (this.data == null) {\n this.data = Object.create(null);\n }\n return (this.data[key] = val);\n }\n\n getData(key: string | symbol, def?: any): any {\n if (this.data == null) {\n this.data = Object.create(null);\n }\n let val = this.data[key];\n if (val === undefined && def !== undefined) val = this.data[key] = def;\n return val;\n }\n\n hasNode(): boolean {\n return this.node != null;\n }\n\n buildCodeFrameError(\n msg: string,\n Error: new () => Error = SyntaxError,\n ): Error {\n return this.hub.buildError(this.node, msg, Error);\n }\n\n traverse<T>(this: NodePath_Final, visitor: Visitor<T>, state: T): void;\n traverse(this: NodePath_Final, visitor: Visitor): void;\n traverse(this: NodePath_Final, visitor: any, state?: any) {\n traverse(this.node, visitor, this.scope, state, this);\n }\n\n set(key: string, node: any) {\n validate(this.node, key, node);\n // @ts-expect-error key must present in this.node\n this.node[key] = node;\n }\n\n getPathLocation(this: NodePath_Final): string {\n const parts = [];\n let path: NodePath_Final = this;\n do {\n let key = path.key;\n if (path.inList) key = `${path.listKey}[${key}]`;\n parts.unshift(key);\n } while ((path = path.parentPath));\n return parts.join(\".\");\n }\n\n debug(this: NodePath_Final, message: string) {\n if (!debug.enabled) return;\n debug(`${this.getPathLocation()} ${this.type}: ${message}`);\n }\n\n toString() {\n return generator(this.node).code;\n }\n\n get inList() {\n return !!this.listKey;\n }\n\n set inList(inList) {\n if (!inList) {\n this.listKey = null;\n }\n // ignore inList = true as it should depend on `listKey`\n }\n\n get parentKey(): string {\n return (this.listKey || this.key) as string;\n }\n};\n\nconst methods = {\n // NodePath_ancestry\n findParent: NodePath_ancestry.findParent,\n find: NodePath_ancestry.find,\n getFunctionParent: NodePath_ancestry.getFunctionParent,\n getStatementParent: NodePath_ancestry.getStatementParent,\n getEarliestCommonAncestorFrom:\n NodePath_ancestry.getEarliestCommonAncestorFrom,\n getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom,\n getAncestry: NodePath_ancestry.getAncestry,\n isAncestor: NodePath_ancestry.isAncestor,\n isDescendant: NodePath_ancestry.isDescendant,\n inType: NodePath_ancestry.inType,\n\n // NodePath_inference\n getTypeAnnotation: NodePath_inference.getTypeAnnotation,\n isBaseType: NodePath_inference.isBaseType,\n couldBeBaseType: NodePath_inference.couldBeBaseType,\n baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches,\n isGenericType: NodePath_inference.isGenericType,\n\n // NodePath_replacement\n replaceWithMultiple: NodePath_replacement.replaceWithMultiple,\n replaceWithSourceString: NodePath_replacement.replaceWithSourceString,\n replaceWith: NodePath_replacement.replaceWith,\n replaceExpressionWithStatements:\n NodePath_replacement.replaceExpressionWithStatements,\n replaceInline: NodePath_replacement.replaceInline,\n\n // NodePath_evaluation\n evaluateTruthy: NodePath_evaluation.evaluateTruthy,\n evaluate: NodePath_evaluation.evaluate,\n\n // NodePath_conversion\n toComputedKey: NodePath_conversion.toComputedKey,\n ensureBlock: NodePath_conversion.ensureBlock,\n unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment,\n arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression,\n splitExportDeclaration: NodePath_conversion.splitExportDeclaration,\n ensureFunctionName: NodePath_conversion.ensureFunctionName,\n\n // NodePath_introspection\n matchesPattern: NodePath_introspection.matchesPattern,\n isStatic: NodePath_introspection.isStatic,\n isNodeType: NodePath_introspection.isNodeType,\n canHaveVariableDeclarationOrExpression:\n NodePath_introspection.canHaveVariableDeclarationOrExpression,\n canSwapBetweenExpressionAndStatement:\n NodePath_introspection.canSwapBetweenExpressionAndStatement,\n isCompletionRecord: NodePath_introspection.isCompletionRecord,\n isStatementOrBlock: NodePath_introspection.isStatementOrBlock,\n referencesImport: NodePath_introspection.referencesImport,\n getSource: NodePath_introspection.getSource,\n willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore,\n _guessExecutionStatusRelativeTo:\n NodePath_introspection._guessExecutionStatusRelativeTo,\n resolve: NodePath_introspection.resolve,\n isConstantExpression: NodePath_introspection.isConstantExpression,\n isInStrictMode: NodePath_introspection.isInStrictMode,\n\n // NodePath_context\n isDenylisted: NodePath_context.isDenylisted,\n visit: NodePath_context.visit,\n skip: NodePath_context.skip,\n skipKey: NodePath_context.skipKey,\n stop: NodePath_context.stop,\n setContext: NodePath_context.setContext,\n requeue: NodePath_context.requeue,\n requeueComputedKeyAndDecorators:\n NodePath_context.requeueComputedKeyAndDecorators,\n\n // NodePath_removal\n remove: NodePath_removal.remove,\n\n // NodePath_modification\n insertBefore: NodePath_modification.insertBefore,\n insertAfter: NodePath_modification.insertAfter,\n unshiftContainer: NodePath_modification.unshiftContainer,\n pushContainer: NodePath_modification.pushContainer,\n\n // NodePath_family\n getOpposite: NodePath_family.getOpposite,\n getCompletionRecords: NodePath_family.getCompletionRecords,\n getSibling: NodePath_family.getSibling,\n getPrevSibling: NodePath_family.getPrevSibling,\n getNextSibling: NodePath_family.getNextSibling,\n getAllNextSiblings: NodePath_family.getAllNextSiblings,\n getAllPrevSiblings: NodePath_family.getAllPrevSiblings,\n get: NodePath_family.get,\n getAssignmentIdentifiers: NodePath_family.getAssignmentIdentifiers,\n getBindingIdentifiers: NodePath_family.getBindingIdentifiers,\n getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers,\n getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths,\n getOuterBindingIdentifierPaths:\n NodePath_family.getOuterBindingIdentifierPaths,\n\n // NodePath_comments\n shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings,\n addComment: NodePath_comments.addComment,\n addComments: NodePath_comments.addComments,\n};\n\nObject.assign(NodePath_Final.prototype, methods);\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // String(x) is workaround for rollup\n\n // @ts-expect-error babel 7 only\n NodePath_Final.prototype.arrowFunctionToShadowed =\n // @ts-expect-error babel 7 only\n NodePath_conversion[String(\"arrowFunctionToShadowed\")];\n\n Object.assign(NodePath_Final.prototype, {\n // @ts-expect-error Babel 7 only\n has: NodePath_introspection[String(\"has\")],\n // @ts-expect-error Babel 7 only\n is: NodePath_introspection[String(\"is\")],\n // @ts-expect-error Babel 7 only\n isnt: NodePath_introspection[String(\"isnt\")],\n // @ts-expect-error Babel 7 only\n equals: NodePath_introspection[String(\"equals\")],\n // @ts-expect-error Babel 7 only\n hoist: NodePath_modification[String(\"hoist\")],\n updateSiblingKeys: NodePath_modification.updateSiblingKeys,\n call: NodePath_context.call,\n // @ts-expect-error Babel 7 only\n isBlacklisted: NodePath_context[String(\"isBlacklisted\")],\n setScope: NodePath_context.setScope,\n resync: NodePath_context.resync,\n popContext: NodePath_context.popContext,\n pushContext: NodePath_context.pushContext,\n setup: NodePath_context.setup,\n setKey: NodePath_context.setKey,\n });\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error The original _guessExecutionStatusRelativeToDifferentFunctions only worked for paths in\n // different functions, but _guessExecutionStatusRelativeTo works as a replacement in those cases.\n NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions =\n NodePath_introspection._guessExecutionStatusRelativeTo;\n\n // @ts-expect-error The original _guessExecutionStatusRelativeToDifferentFunctions only worked for paths in\n // different functions, but _guessExecutionStatusRelativeTo works as a replacement in those cases.\n NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions =\n NodePath_introspection._guessExecutionStatusRelativeTo;\n\n Object.assign(NodePath_Final.prototype, {\n // NodePath_inference\n _getTypeAnnotation: NodePath_inference._getTypeAnnotation,\n\n // NodePath_replacement\n _replaceWith: NodePath_replacement._replaceWith,\n\n // NodePath_introspection\n _resolve: NodePath_introspection._resolve,\n\n // NodePath_context\n _call: NodePath_context._call,\n _resyncParent: NodePath_context._resyncParent,\n _resyncKey: NodePath_context._resyncKey,\n _resyncList: NodePath_context._resyncList,\n _resyncRemoved: NodePath_context._resyncRemoved,\n _getQueueContexts: NodePath_context._getQueueContexts,\n\n // NodePath_removal\n _removeFromScope: NodePath_removal._removeFromScope,\n _callRemovalHooks: NodePath_removal._callRemovalHooks,\n _remove: NodePath_removal._remove,\n _markRemoved: NodePath_removal._markRemoved,\n _assertUnremoved: NodePath_removal._assertUnremoved,\n\n // NodePath_modification\n _containerInsert: NodePath_modification._containerInsert,\n _containerInsertBefore: NodePath_modification._containerInsertBefore,\n _containerInsertAfter: NodePath_modification._containerInsertAfter,\n _verifyNodeList: NodePath_modification._verifyNodeList,\n\n // NodePath_family\n _getKey: NodePath_family._getKey,\n _getPattern: NodePath_family._getPattern,\n });\n}\n\n// we can not use `import { TYPES } from \"@babel/types\"` here\n// because the transformNamedBabelTypesImportToDestructuring plugin in babel.config.js\n// does not offer live bindings for `TYPES`\n// we can change to `import { TYPES }` when we are publishing ES modules only\nfor (const type of t.TYPES) {\n const typeKey = `is${type}`;\n // @ts-expect-error typeKey must present in t\n const fn = t[typeKey];\n // @ts-expect-error augmenting NodePath prototype\n NodePath_Final.prototype[typeKey] = function (opts: any) {\n return fn(this.node, opts);\n };\n\n // @ts-expect-error augmenting NodePath prototype\n NodePath_Final.prototype[`assert${type}`] = function (opts: any) {\n if (!fn(this.node, opts)) {\n throw new TypeError(`Expected node path of type ${type}`);\n }\n };\n}\n\n// Register virtual types validators after base types validators\nObject.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);\n\nfor (const type of Object.keys(virtualTypes) as (keyof typeof virtualTypes)[]) {\n if (type[0] === \"_\") continue;\n if (!t.TYPES.includes(type)) t.TYPES.push(type);\n}\n\ninterface NodePathOverwrites {\n // We need to re-define these predicate and assertion\n // methods here, because we cannot refine `this` in\n // a function declaration.\n // See https://github.com/microsoft/TypeScript/issues/38150\n\n /**\n * NOTE: This assertion doesn't narrow the type on unions of\n * NodePaths, due to https://github.com/microsoft/TypeScript/issues/44212\n *\n * @see ./conversion.ts for implementation.\n */\n ensureBlock(\n this: NodePath_Final,\n ): asserts this is NodePath_Final<\n (\n | t.Loop\n | t.WithStatement\n | t.Function\n | t.LabeledStatement\n | t.CatchClause\n ) & { body: t.BlockStatement }\n >;\n /**\n * @see ./introspection.ts for implementation.\n */\n isStatementOrBlock(\n this: NodePath_Final,\n ): this is NodePath_Final<t.Statement | t.Block>;\n}\n\ntype NodePathMixins = Omit<typeof methods, keyof NodePathOverwrites>;\n\ninterface NodePath<T extends t.Node>\n extends InstanceType<typeof NodePath_Final>,\n NodePathAssertions,\n NodePathValidators,\n NodePathMixins,\n NodePathOverwrites {\n type: T[\"type\"] | null;\n node: T;\n parent: t.ParentMaps[T[\"type\"]];\n parentPath: t.ParentMaps[T[\"type\"]] extends null\n ? null\n : NodePath_Final<t.ParentMaps[T[\"type\"]]> | null;\n}\n\n// This trick is necessary so that\n// NodePath_Final<A | B> is the same as NodePath_Final<A> | NodePath_Final<B>\ntype NodePath_Final<T extends t.Node = t.Node> = T extends any\n ? NodePath<T>\n : never;\n\nexport { NodePath_Final as default, type NodePath as NodePath_Internal };\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAJ,OAAA;AAAwC,IAAAK,CAAA,GAAAD,EAAA;AAExC,IAAAE,KAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAGA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,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ACqI,SAAS,EAAE7I,gCAAgC,CAAC;AAEzE,KAAK,MAAMwB,IAAI,IAAIsB,MAAM,CAACuI,IAAI,CAAC1M,YAAY,CAAC,EAAmC;EAC7E,IAAI6C,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;EACrB,IAAI,CAACvC,CAAC,CAACgM,KAAK,CAACK,QAAQ,CAAC9J,IAAI,CAAC,EAAEvC,CAAC,CAACgM,KAAK,CAACM,IAAI,CAAC/J,IAAI,CAAC;AACjD","ignoreList":[]}
1
+ {"version":3,"names":["virtualTypes","require","_debug","_index","_index2","_t","t","cache","_generator","NodePath_ancestry","NodePath_inference","NodePath_replacement","NodePath_evaluation","NodePath_conversion","NodePath_introspection","_context","NodePath_context","NodePath_removal","NodePath_modification","NodePath_family","NodePath_comments","NodePath_virtual_types_validator","validate","debug","buildDebug","REMOVED","exports","SHOULD_STOP","SHOULD_SKIP","NodePath_Final","default","NodePath","constructor","hub","parent","contexts","state","opts","_traverseFlags","skipKeys","parentPath","container","listKey","key","node","type","_store","data","context","scope","removed","v","shouldStop","shouldSkip","get","Error","targetNode","paths","getOrCreateCachedPaths","path","set","setup","call","getScope","isScope","Scope","setData","val","Object","create","getData","def","undefined","hasNode","buildCodeFrameError","msg","SyntaxError","buildError","traverse","visitor","getPathLocation","parts","inList","unshift","join","message","enabled","toString","generator","code","parentKey","methods","findParent","find","getFunctionParent","getStatementParent","getEarliestCommonAncestorFrom","getDeepestCommonAncestorFrom","getAncestry","isAncestor","isDescendant","inType","getTypeAnnotation","isBaseType","couldBeBaseType","baseTypeStrictlyMatches","isGenericType","replaceWithMultiple","replaceWithSourceString","replaceWith","replaceExpressionWithStatements","replaceInline","evaluateTruthy","evaluate","toComputedKey","ensureBlock","unwrapFunctionEnvironment","arrowFunctionToExpression","splitExportDeclaration","ensureFunctionName","matchesPattern","isStatic","isNodeType","canHaveVariableDeclarationOrExpression","canSwapBetweenExpressionAndStatement","isCompletionRecord","isStatementOrBlock","referencesImport","getSource","willIMaybeExecuteBefore","_guessExecutionStatusRelativeTo","resolve","isConstantExpression","isInStrictMode","isDenylisted","visit","skip","skipKey","stop","setContext","requeue","requeueComputedKeyAndDecorators","remove","insertBefore","insertAfter","unshiftContainer","pushContainer","getOpposite","getCompletionRecords","getSibling","getPrevSibling","getNextSibling","getAllNextSiblings","getAllPrevSiblings","getAssignmentIdentifiers","getBindingIdentifiers","getOuterBindingIdentifiers","getBindingIdentifierPaths","getOuterBindingIdentifierPaths","shareCommentsWithSiblings","addComment","addComments","assign","prototype","arrowFunctionToShadowed","String","has","is","isnt","equals","hoist","updateSiblingKeys","isBlacklisted","setScope","resync","popContext","pushContext","setKey","_guessExecutionStatusRelativeToDifferentFunctions","_getTypeAnnotation","_replaceWith","_resolve","_call","_resyncParent","_resyncKey","_resyncList","_resyncRemoved","_getQueueContexts","_removeFromScope","_callRemovalHooks","_remove","_markRemoved","_assertUnremoved","_containerInsert","_containerInsertBefore","_containerInsertAfter","_verifyNodeList","_getKey","_getPattern","TYPES","typeKey","fn","TypeError","keys","includes","push"],"sources":["../../src/path/index.ts"],"sourcesContent":["import type { HubInterface } from \"../hub.ts\";\nimport type TraversalContext from \"../context.ts\";\nimport type { ExplodedTraverseOptions } from \"../index.ts\";\nimport * as virtualTypes from \"./lib/virtual-types.ts\";\nimport buildDebug from \"debug\";\nimport traverse from \"../index.ts\";\nimport type { Visitor } from \"../types.ts\";\nimport Scope from \"../scope/index.ts\";\nimport { validate } from \"@babel/types\";\nimport * as t from \"@babel/types\";\nimport * as cache from \"../cache.ts\";\nimport generator from \"@babel/generator\";\n\n// NodePath is split across many files.\nimport * as NodePath_ancestry from \"./ancestry.ts\";\nimport * as NodePath_inference from \"./inference/index.ts\";\nimport * as NodePath_replacement from \"./replacement.ts\";\nimport * as NodePath_evaluation from \"./evaluation.ts\";\nimport * as NodePath_conversion from \"./conversion.ts\";\nimport * as NodePath_introspection from \"./introspection.ts\";\nimport * as NodePath_context from \"./context.ts\";\nimport * as NodePath_removal from \"./removal.ts\";\nimport * as NodePath_modification from \"./modification.ts\";\nimport * as NodePath_family from \"./family.ts\";\nimport * as NodePath_comments from \"./comments.ts\";\nimport * as NodePath_virtual_types_validator from \"./lib/virtual-types-validator.ts\";\nimport type { NodePathAssertions } from \"./generated/asserts.ts\";\nimport type { NodePathValidators } from \"./generated/validators.ts\";\nimport { setup } from \"./context.ts\";\n\nconst debug = buildDebug(\"babel\");\n\nexport const REMOVED = 1 << 0;\nexport const SHOULD_STOP = 1 << 1;\nexport const SHOULD_SKIP = 1 << 2;\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator<any>;\n\nconst NodePath_Final = class NodePath {\n constructor(hub: HubInterface, parent: t.Node | null) {\n this.parent = parent;\n this.hub = hub;\n this.data = null;\n\n this.context = null;\n this.scope = null;\n }\n\n declare parent: t.Node;\n declare hub: HubInterface;\n declare data: Record<string | symbol, unknown>;\n // TraversalContext is configured by setContext\n declare context: TraversalContext;\n declare scope: Scope;\n\n contexts: Array<TraversalContext> = [];\n state: any = null;\n opts: ExplodedTraverseOptions | null = null;\n\n @bit.storage _traverseFlags: number;\n @bit(REMOVED) accessor removed = false;\n @bit(SHOULD_STOP) accessor shouldStop = false;\n @bit(SHOULD_SKIP) accessor shouldSkip = false;\n\n skipKeys: Record<string, boolean> | null = null;\n parentPath: NodePath_Final | null = null;\n container: t.Node | Array<t.Node> | null = null;\n listKey: string | null = null;\n key: string | number | null = null;\n node: t.Node | null = null;\n type: t.Node[\"type\"] | null = null;\n _store: Map<t.Node, NodePath_Final> | null = null;\n\n static get({\n hub,\n parentPath,\n parent,\n container,\n listKey,\n key,\n }: {\n hub?: HubInterface;\n parentPath: NodePath_Final | null;\n parent: t.Node;\n container: t.Node | t.Node[];\n listKey?: string;\n key: string | number;\n }): NodePath_Final {\n if (!hub && parentPath) {\n hub = parentPath.hub;\n }\n\n if (!parent) {\n throw new Error(\"To get a node path the parent needs to exist\");\n }\n\n const targetNode =\n // @ts-expect-error key must present in container\n container[key];\n\n const paths = cache.getOrCreateCachedPaths(parent, parentPath);\n\n let path = paths.get(targetNode);\n if (!path) {\n path = new NodePath(hub, parent) as NodePath_Final;\n if (targetNode) paths.set(targetNode, path);\n }\n\n setup.call(path, parentPath, container, listKey, key);\n\n return path;\n }\n\n getScope(this: NodePath_Final, scope: Scope): Scope {\n return this.isScope() ? new Scope(this) : scope;\n }\n\n setData(key: string | symbol, val: any): any {\n if (this.data == null) {\n this.data = Object.create(null);\n }\n return (this.data[key] = val);\n }\n\n getData(key: string | symbol, def?: any): any {\n if (this.data == null) {\n this.data = Object.create(null);\n }\n let val = this.data[key];\n if (val === undefined && def !== undefined) val = this.data[key] = def;\n return val;\n }\n\n hasNode(): boolean {\n return this.node != null;\n }\n\n buildCodeFrameError(\n msg: string,\n Error: new () => Error = SyntaxError,\n ): Error {\n return this.hub.buildError(this.node, msg, Error);\n }\n\n traverse<T>(this: NodePath_Final, visitor: Visitor<T>, state: T): void;\n traverse(this: NodePath_Final, visitor: Visitor): void;\n traverse(this: NodePath_Final, visitor: any, state?: any) {\n traverse(this.node, visitor, this.scope, state, this);\n }\n\n set(key: string, node: any) {\n validate(this.node, key, node);\n // @ts-expect-error key must present in this.node\n this.node[key] = node;\n }\n\n getPathLocation(this: NodePath_Final): string {\n const parts = [];\n let path: NodePath_Final = this;\n do {\n let key = path.key;\n if (path.inList) key = `${path.listKey}[${key}]`;\n parts.unshift(key);\n } while ((path = path.parentPath));\n return parts.join(\".\");\n }\n\n debug(this: NodePath_Final, message: string) {\n if (!debug.enabled) return;\n debug(`${this.getPathLocation()} ${this.type}: ${message}`);\n }\n\n toString() {\n return generator(this.node).code;\n }\n\n get inList() {\n return !!this.listKey;\n }\n\n set inList(inList) {\n if (!inList) {\n this.listKey = null;\n }\n // ignore inList = true as it should depend on `listKey`\n }\n\n get parentKey(): string {\n return (this.listKey || this.key) as string;\n }\n};\n\nconst methods = {\n // NodePath_ancestry\n findParent: NodePath_ancestry.findParent,\n find: NodePath_ancestry.find,\n getFunctionParent: NodePath_ancestry.getFunctionParent,\n getStatementParent: NodePath_ancestry.getStatementParent,\n getEarliestCommonAncestorFrom:\n NodePath_ancestry.getEarliestCommonAncestorFrom,\n getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom,\n getAncestry: NodePath_ancestry.getAncestry,\n isAncestor: NodePath_ancestry.isAncestor,\n isDescendant: NodePath_ancestry.isDescendant,\n inType: NodePath_ancestry.inType,\n\n // NodePath_inference\n getTypeAnnotation: NodePath_inference.getTypeAnnotation,\n isBaseType: NodePath_inference.isBaseType,\n couldBeBaseType: NodePath_inference.couldBeBaseType,\n baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches,\n isGenericType: NodePath_inference.isGenericType,\n\n // NodePath_replacement\n replaceWithMultiple: NodePath_replacement.replaceWithMultiple,\n replaceWithSourceString: NodePath_replacement.replaceWithSourceString,\n replaceWith: NodePath_replacement.replaceWith,\n replaceExpressionWithStatements:\n NodePath_replacement.replaceExpressionWithStatements,\n replaceInline: NodePath_replacement.replaceInline,\n\n // NodePath_evaluation\n evaluateTruthy: NodePath_evaluation.evaluateTruthy,\n evaluate: NodePath_evaluation.evaluate,\n\n // NodePath_conversion\n toComputedKey: NodePath_conversion.toComputedKey,\n ensureBlock: NodePath_conversion.ensureBlock,\n unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment,\n arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression,\n splitExportDeclaration: NodePath_conversion.splitExportDeclaration,\n ensureFunctionName: NodePath_conversion.ensureFunctionName,\n\n // NodePath_introspection\n matchesPattern: NodePath_introspection.matchesPattern,\n isStatic: NodePath_introspection.isStatic,\n isNodeType: NodePath_introspection.isNodeType,\n canHaveVariableDeclarationOrExpression:\n NodePath_introspection.canHaveVariableDeclarationOrExpression,\n canSwapBetweenExpressionAndStatement:\n NodePath_introspection.canSwapBetweenExpressionAndStatement,\n isCompletionRecord: NodePath_introspection.isCompletionRecord,\n isStatementOrBlock: NodePath_introspection.isStatementOrBlock,\n referencesImport: NodePath_introspection.referencesImport,\n getSource: NodePath_introspection.getSource,\n willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore,\n _guessExecutionStatusRelativeTo:\n NodePath_introspection._guessExecutionStatusRelativeTo,\n resolve: NodePath_introspection.resolve,\n isConstantExpression: NodePath_introspection.isConstantExpression,\n isInStrictMode: NodePath_introspection.isInStrictMode,\n\n // NodePath_context\n isDenylisted: NodePath_context.isDenylisted,\n visit: NodePath_context.visit,\n skip: NodePath_context.skip,\n skipKey: NodePath_context.skipKey,\n stop: NodePath_context.stop,\n setContext: NodePath_context.setContext,\n requeue: NodePath_context.requeue,\n requeueComputedKeyAndDecorators:\n NodePath_context.requeueComputedKeyAndDecorators,\n\n // NodePath_removal\n remove: NodePath_removal.remove,\n\n // NodePath_modification\n insertBefore: NodePath_modification.insertBefore,\n insertAfter: NodePath_modification.insertAfter,\n unshiftContainer: NodePath_modification.unshiftContainer,\n pushContainer: NodePath_modification.pushContainer,\n\n // NodePath_family\n getOpposite: NodePath_family.getOpposite,\n getCompletionRecords: NodePath_family.getCompletionRecords,\n getSibling: NodePath_family.getSibling,\n getPrevSibling: NodePath_family.getPrevSibling,\n getNextSibling: NodePath_family.getNextSibling,\n getAllNextSiblings: NodePath_family.getAllNextSiblings,\n getAllPrevSiblings: NodePath_family.getAllPrevSiblings,\n get: NodePath_family.get,\n getAssignmentIdentifiers: NodePath_family.getAssignmentIdentifiers,\n getBindingIdentifiers: NodePath_family.getBindingIdentifiers,\n getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers,\n getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths,\n getOuterBindingIdentifierPaths:\n NodePath_family.getOuterBindingIdentifierPaths,\n\n // NodePath_comments\n shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings,\n addComment: NodePath_comments.addComment,\n addComments: NodePath_comments.addComments,\n};\n\nObject.assign(NodePath_Final.prototype, methods);\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // String(x) is workaround for rollup\n\n // @ts-expect-error babel 7 only\n NodePath_Final.prototype.arrowFunctionToShadowed =\n // @ts-expect-error babel 7 only\n NodePath_conversion[String(\"arrowFunctionToShadowed\")];\n\n Object.assign(NodePath_Final.prototype, {\n // @ts-expect-error Babel 7 only\n has: NodePath_introspection[String(\"has\")],\n // @ts-expect-error Babel 7 only\n is: NodePath_introspection[String(\"is\")],\n // @ts-expect-error Babel 7 only\n isnt: NodePath_introspection[String(\"isnt\")],\n // @ts-expect-error Babel 7 only\n equals: NodePath_introspection[String(\"equals\")],\n // @ts-expect-error Babel 7 only\n hoist: NodePath_modification[String(\"hoist\")],\n updateSiblingKeys: NodePath_modification.updateSiblingKeys,\n call: NodePath_context.call,\n // @ts-expect-error Babel 7 only\n isBlacklisted: NodePath_context[String(\"isBlacklisted\")],\n setScope: NodePath_context.setScope,\n resync: NodePath_context.resync,\n popContext: NodePath_context.popContext,\n pushContext: NodePath_context.pushContext,\n setup: NodePath_context.setup,\n setKey: NodePath_context.setKey,\n });\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error The original _guessExecutionStatusRelativeToDifferentFunctions only worked for paths in\n // different functions, but _guessExecutionStatusRelativeTo works as a replacement in those cases.\n NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions =\n NodePath_introspection._guessExecutionStatusRelativeTo;\n\n // @ts-expect-error The original _guessExecutionStatusRelativeToDifferentFunctions only worked for paths in\n // different functions, but _guessExecutionStatusRelativeTo works as a replacement in those cases.\n NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions =\n NodePath_introspection._guessExecutionStatusRelativeTo;\n\n Object.assign(NodePath_Final.prototype, {\n // NodePath_inference\n _getTypeAnnotation: NodePath_inference._getTypeAnnotation,\n\n // NodePath_replacement\n _replaceWith: NodePath_replacement._replaceWith,\n\n // NodePath_introspection\n _resolve: NodePath_introspection._resolve,\n\n // NodePath_context\n _call: NodePath_context._call,\n _resyncParent: NodePath_context._resyncParent,\n _resyncKey: NodePath_context._resyncKey,\n _resyncList: NodePath_context._resyncList,\n _resyncRemoved: NodePath_context._resyncRemoved,\n _getQueueContexts: NodePath_context._getQueueContexts,\n\n // NodePath_removal\n _removeFromScope: NodePath_removal._removeFromScope,\n _callRemovalHooks: NodePath_removal._callRemovalHooks,\n _remove: NodePath_removal._remove,\n _markRemoved: NodePath_removal._markRemoved,\n _assertUnremoved: NodePath_removal._assertUnremoved,\n\n // NodePath_modification\n _containerInsert: NodePath_modification._containerInsert,\n _containerInsertBefore: NodePath_modification._containerInsertBefore,\n _containerInsertAfter: NodePath_modification._containerInsertAfter,\n _verifyNodeList: NodePath_modification._verifyNodeList,\n\n // NodePath_family\n _getKey: NodePath_family._getKey,\n _getPattern: NodePath_family._getPattern,\n });\n}\n\n// we can not use `import { TYPES } from \"@babel/types\"` here\n// because the transformNamedBabelTypesImportToDestructuring plugin in babel.config.js\n// does not offer live bindings for `TYPES`\n// we can change to `import { TYPES }` when we are publishing ES modules only\nfor (const type of t.TYPES) {\n const typeKey = `is${type}`;\n // @ts-expect-error typeKey must present in t\n const fn = t[typeKey];\n // @ts-expect-error augmenting NodePath prototype\n NodePath_Final.prototype[typeKey] = function (opts: any) {\n return fn(this.node, opts);\n };\n\n // @ts-expect-error augmenting NodePath prototype\n NodePath_Final.prototype[`assert${type}`] = function (opts: any) {\n if (!fn(this.node, opts)) {\n throw new TypeError(`Expected node path of type ${type}`);\n }\n };\n}\n\n// Register virtual types validators after base types validators\nObject.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);\n\nfor (const type of Object.keys(virtualTypes) as (keyof typeof virtualTypes)[]) {\n if (type[0] === \"_\") continue;\n if (!t.TYPES.includes(type)) t.TYPES.push(type);\n}\n\ninterface NodePathOverwrites {\n // We need to re-define these predicate and assertion\n // methods here, because we cannot refine `this` in\n // a function declaration.\n // See https://github.com/microsoft/TypeScript/issues/38150\n\n /**\n * NOTE: This assertion doesn't narrow the type on unions of\n * NodePaths, due to https://github.com/microsoft/TypeScript/issues/44212\n *\n * @see ./conversion.ts for implementation.\n */\n ensureBlock(\n this: NodePath_Final,\n ): asserts this is NodePath_Final<\n (\n | t.Loop\n | t.WithStatement\n | t.Function\n | t.LabeledStatement\n | t.CatchClause\n ) & { body: t.BlockStatement }\n >;\n /**\n * @see ./introspection.ts for implementation.\n */\n isStatementOrBlock(\n this: NodePath_Final,\n ): this is NodePath_Final<t.Statement | t.Block>;\n}\n\ntype NodePathMixins = Omit<typeof methods, keyof NodePathOverwrites>;\n\ninterface NodePath<T extends t.Node>\n extends InstanceType<typeof NodePath_Final>,\n NodePathAssertions,\n NodePathValidators,\n NodePathMixins,\n NodePathOverwrites {\n type: T[\"type\"] | null;\n node: T;\n parent: t.ParentMaps[T[\"type\"]];\n parentPath: t.ParentMaps[T[\"type\"]] extends null\n ? null\n : NodePath_Final<t.ParentMaps[T[\"type\"]]> | null;\n}\n\n// This trick is necessary so that\n// NodePath_Final<A | B> is the same as NodePath_Final<A> | NodePath_Final<B>\ntype NodePath_Final<T extends t.Node = t.Node> = T extends any\n ? NodePath<T>\n : never;\n\nexport { NodePath_Final as default, type NodePath as NodePath_Internal };\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,EAAA,GAAAJ,OAAA;AAAwC,IAAAK,CAAA,GAAAD,EAAA;AAExC,IAAAE,KAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAGA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAX,OAAA;AACA,IAAAY,mBAAA,GAAAZ,OAAA;AACA,IAAAa,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