@flourish/sdk 4.2.1 → 4.2.2

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 (1095) hide show
  1. package/RELEASE_NOTES.md +3 -0
  2. package/common/embed/credit.d.ts +5 -0
  3. package/common/embed/credit.js +47 -0
  4. package/common/embed/customer_analytics.d.ts +5 -0
  5. package/common/embed/customer_analytics.js +114 -0
  6. package/common/embed/embedding.d.ts +25 -0
  7. package/common/embed/embedding.js +461 -0
  8. package/common/embed/localizations.d.ts +243 -0
  9. package/common/embed/localizations.js +90 -0
  10. package/common/embed/parse_query_params.d.ts +2 -0
  11. package/common/embed/parse_query_params.js +18 -0
  12. package/common/package.json +8 -0
  13. package/common/tsconfig.sdk.tsbuildinfo +1 -0
  14. package/common/utils/columns.d.ts +11 -0
  15. package/common/utils/columns.js +175 -0
  16. package/common/utils/data.d.ts +30 -0
  17. package/common/utils/data.js +279 -0
  18. package/common/utils/json.d.ts +3 -0
  19. package/common/utils/json.js +60 -0
  20. package/common/utils/polyfills.d.ts +0 -0
  21. package/common/utils/polyfills.js +30 -0
  22. package/common/utils/state.d.ts +7 -0
  23. package/common/utils/state.js +144 -0
  24. package/lib/cmd/publish.js +1 -1
  25. package/lib/common.js +1 -1
  26. package/lib/validate_config.js +1 -1
  27. package/my_template/node_modules/.package-lock.json +525 -0
  28. package/my_template/node_modules/@babel/code-frame/LICENSE +22 -0
  29. package/my_template/node_modules/@babel/code-frame/README.md +19 -0
  30. package/my_template/node_modules/@babel/code-frame/lib/index.js +157 -0
  31. package/my_template/node_modules/@babel/code-frame/lib/index.js.map +1 -0
  32. package/my_template/node_modules/@babel/code-frame/package.json +30 -0
  33. package/my_template/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
  34. package/my_template/node_modules/@babel/helper-validator-identifier/README.md +19 -0
  35. package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
  36. package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
  37. package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
  38. package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
  39. package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
  40. package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
  41. package/my_template/node_modules/@babel/helper-validator-identifier/package.json +28 -0
  42. package/my_template/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +73 -0
  43. package/my_template/node_modules/@babel/highlight/LICENSE +22 -0
  44. package/my_template/node_modules/@babel/highlight/README.md +19 -0
  45. package/my_template/node_modules/@babel/highlight/lib/index.js +105 -0
  46. package/my_template/node_modules/@babel/highlight/lib/index.js.map +1 -0
  47. package/my_template/node_modules/@babel/highlight/package.json +29 -0
  48. package/my_template/node_modules/@types/estree/LICENSE +21 -0
  49. package/my_template/node_modules/@types/estree/README.md +15 -0
  50. package/my_template/node_modules/@types/estree/flow.d.ts +167 -0
  51. package/my_template/node_modules/@types/estree/index.d.ts +683 -0
  52. package/my_template/node_modules/@types/estree/package.json +26 -0
  53. package/my_template/node_modules/@types/node/LICENSE +21 -0
  54. package/my_template/node_modules/@types/node/README.md +15 -0
  55. package/my_template/node_modules/@types/node/assert/strict.d.ts +8 -0
  56. package/my_template/node_modules/@types/node/assert.d.ts +996 -0
  57. package/my_template/node_modules/@types/node/async_hooks.d.ts +539 -0
  58. package/my_template/node_modules/@types/node/buffer.d.ts +2362 -0
  59. package/my_template/node_modules/@types/node/child_process.d.ts +1540 -0
  60. package/my_template/node_modules/@types/node/cluster.d.ts +432 -0
  61. package/my_template/node_modules/@types/node/console.d.ts +415 -0
  62. package/my_template/node_modules/@types/node/constants.d.ts +19 -0
  63. package/my_template/node_modules/@types/node/crypto.d.ts +4456 -0
  64. package/my_template/node_modules/@types/node/dgram.d.ts +586 -0
  65. package/my_template/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
  66. package/my_template/node_modules/@types/node/dns/promises.d.ts +425 -0
  67. package/my_template/node_modules/@types/node/dns.d.ts +809 -0
  68. package/my_template/node_modules/@types/node/dom-events.d.ts +122 -0
  69. package/my_template/node_modules/@types/node/domain.d.ts +170 -0
  70. package/my_template/node_modules/@types/node/events.d.ts +879 -0
  71. package/my_template/node_modules/@types/node/fs/promises.d.ts +1239 -0
  72. package/my_template/node_modules/@types/node/fs.d.ts +4291 -0
  73. package/my_template/node_modules/@types/node/globals.d.ts +385 -0
  74. package/my_template/node_modules/@types/node/globals.global.d.ts +1 -0
  75. package/my_template/node_modules/@types/node/http.d.ts +1888 -0
  76. package/my_template/node_modules/@types/node/http2.d.ts +2382 -0
  77. package/my_template/node_modules/@types/node/https.d.ts +550 -0
  78. package/my_template/node_modules/@types/node/index.d.ts +88 -0
  79. package/my_template/node_modules/@types/node/inspector.d.ts +2747 -0
  80. package/my_template/node_modules/@types/node/module.d.ts +301 -0
  81. package/my_template/node_modules/@types/node/net.d.ts +949 -0
  82. package/my_template/node_modules/@types/node/os.d.ts +478 -0
  83. package/my_template/node_modules/@types/node/package.json +230 -0
  84. package/my_template/node_modules/@types/node/path.d.ts +191 -0
  85. package/my_template/node_modules/@types/node/perf_hooks.d.ts +639 -0
  86. package/my_template/node_modules/@types/node/process.d.ts +1539 -0
  87. package/my_template/node_modules/@types/node/punycode.d.ts +117 -0
  88. package/my_template/node_modules/@types/node/querystring.d.ts +141 -0
  89. package/my_template/node_modules/@types/node/readline/promises.d.ts +150 -0
  90. package/my_template/node_modules/@types/node/readline.d.ts +539 -0
  91. package/my_template/node_modules/@types/node/repl.d.ts +430 -0
  92. package/my_template/node_modules/@types/node/stream/consumers.d.ts +12 -0
  93. package/my_template/node_modules/@types/node/stream/promises.d.ts +83 -0
  94. package/my_template/node_modules/@types/node/stream/web.d.ts +350 -0
  95. package/my_template/node_modules/@types/node/stream.d.ts +1701 -0
  96. package/my_template/node_modules/@types/node/string_decoder.d.ts +67 -0
  97. package/my_template/node_modules/@types/node/test.d.ts +1382 -0
  98. package/my_template/node_modules/@types/node/timers/promises.d.ts +93 -0
  99. package/my_template/node_modules/@types/node/timers.d.ts +240 -0
  100. package/my_template/node_modules/@types/node/tls.d.ts +1210 -0
  101. package/my_template/node_modules/@types/node/trace_events.d.ts +182 -0
  102. package/my_template/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  103. package/my_template/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
  104. package/my_template/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
  105. package/my_template/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
  106. package/my_template/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
  107. package/my_template/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
  108. package/my_template/node_modules/@types/node/ts4.8/console.d.ts +415 -0
  109. package/my_template/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
  110. package/my_template/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
  111. package/my_template/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
  112. package/my_template/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  113. package/my_template/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
  114. package/my_template/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
  115. package/my_template/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
  116. package/my_template/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  117. package/my_template/node_modules/@types/node/ts4.8/events.d.ts +879 -0
  118. package/my_template/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
  119. package/my_template/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
  120. package/my_template/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
  121. package/my_template/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  122. package/my_template/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
  123. package/my_template/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
  124. package/my_template/node_modules/@types/node/ts4.8/https.d.ts +550 -0
  125. package/my_template/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  126. package/my_template/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
  127. package/my_template/node_modules/@types/node/ts4.8/module.d.ts +301 -0
  128. package/my_template/node_modules/@types/node/ts4.8/net.d.ts +949 -0
  129. package/my_template/node_modules/@types/node/ts4.8/os.d.ts +478 -0
  130. package/my_template/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  131. package/my_template/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
  132. package/my_template/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
  133. package/my_template/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  134. package/my_template/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
  135. package/my_template/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
  136. package/my_template/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
  137. package/my_template/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
  138. package/my_template/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  139. package/my_template/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
  140. package/my_template/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
  141. package/my_template/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
  142. package/my_template/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  143. package/my_template/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
  144. package/my_template/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  145. package/my_template/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
  146. package/my_template/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
  147. package/my_template/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  148. package/my_template/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  149. package/my_template/node_modules/@types/node/ts4.8/url.d.ts +927 -0
  150. package/my_template/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
  151. package/my_template/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  152. package/my_template/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
  153. package/my_template/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
  154. package/my_template/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
  155. package/my_template/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  156. package/my_template/node_modules/@types/node/tty.d.ts +208 -0
  157. package/my_template/node_modules/@types/node/url.d.ts +927 -0
  158. package/my_template/node_modules/@types/node/util.d.ts +2183 -0
  159. package/my_template/node_modules/@types/node/v8.d.ts +635 -0
  160. package/my_template/node_modules/@types/node/vm.d.ts +903 -0
  161. package/my_template/node_modules/@types/node/wasi.d.ts +158 -0
  162. package/my_template/node_modules/@types/node/worker_threads.d.ts +691 -0
  163. package/my_template/node_modules/@types/node/zlib.d.ts +517 -0
  164. package/my_template/node_modules/@types/resolve/LICENSE +21 -0
  165. package/my_template/node_modules/@types/resolve/README.md +16 -0
  166. package/my_template/node_modules/@types/resolve/index.d.ts +113 -0
  167. package/my_template/node_modules/@types/resolve/package.json +29 -0
  168. package/my_template/node_modules/acorn/CHANGELOG.md +620 -0
  169. package/my_template/node_modules/acorn/LICENSE +21 -0
  170. package/my_template/node_modules/acorn/README.md +269 -0
  171. package/my_template/node_modules/acorn/bin/acorn +4 -0
  172. package/my_template/node_modules/acorn/dist/acorn.d.ts +209 -0
  173. package/my_template/node_modules/acorn/dist/acorn.js +5186 -0
  174. package/my_template/node_modules/acorn/dist/acorn.js.map +1 -0
  175. package/my_template/node_modules/acorn/dist/acorn.mjs +5155 -0
  176. package/my_template/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  177. package/my_template/node_modules/acorn/dist/acorn.mjs.map +1 -0
  178. package/my_template/node_modules/acorn/dist/bin.js +64 -0
  179. package/my_template/node_modules/acorn/package.json +35 -0
  180. package/my_template/node_modules/amdefine/LICENSE +58 -0
  181. package/my_template/node_modules/amdefine/README.md +171 -0
  182. package/my_template/node_modules/amdefine/amdefine.js +301 -0
  183. package/my_template/node_modules/amdefine/intercept.js +36 -0
  184. package/my_template/node_modules/amdefine/package.json +16 -0
  185. package/my_template/node_modules/ansi-styles/index.js +165 -0
  186. package/my_template/node_modules/ansi-styles/license +9 -0
  187. package/my_template/node_modules/ansi-styles/package.json +56 -0
  188. package/my_template/node_modules/ansi-styles/readme.md +147 -0
  189. package/my_template/node_modules/builtin-modules/builtin-modules.json +43 -0
  190. package/my_template/node_modules/builtin-modules/index.d.ts +14 -0
  191. package/my_template/node_modules/builtin-modules/index.js +11 -0
  192. package/my_template/node_modules/builtin-modules/license +9 -0
  193. package/my_template/node_modules/builtin-modules/package.json +44 -0
  194. package/my_template/node_modules/builtin-modules/readme.md +44 -0
  195. package/my_template/node_modules/builtin-modules/static.d.ts +14 -0
  196. package/my_template/node_modules/builtin-modules/static.js +2 -0
  197. package/my_template/node_modules/chalk/index.js +228 -0
  198. package/my_template/node_modules/chalk/index.js.flow +93 -0
  199. package/my_template/node_modules/chalk/license +9 -0
  200. package/my_template/node_modules/chalk/package.json +71 -0
  201. package/my_template/node_modules/chalk/readme.md +314 -0
  202. package/my_template/node_modules/chalk/templates.js +128 -0
  203. package/my_template/node_modules/chalk/types/index.d.ts +97 -0
  204. package/my_template/node_modules/clean-css/History.md +1138 -0
  205. package/my_template/node_modules/clean-css/LICENSE +19 -0
  206. package/my_template/node_modules/clean-css/README.md +369 -0
  207. package/my_template/node_modules/clean-css/bin/cleancss +184 -0
  208. package/my_template/node_modules/clean-css/index.js +1 -0
  209. package/my_template/node_modules/clean-css/lib/clean.js +231 -0
  210. package/my_template/node_modules/clean-css/lib/colors/hex-name-shortener.js +186 -0
  211. package/my_template/node_modules/clean-css/lib/colors/hsl.js +67 -0
  212. package/my_template/node_modules/clean-css/lib/colors/rgb.js +16 -0
  213. package/my_template/node_modules/clean-css/lib/imports/inliner.js +399 -0
  214. package/my_template/node_modules/clean-css/lib/properties/break-up.js +335 -0
  215. package/my_template/node_modules/clean-css/lib/properties/can-override.js +142 -0
  216. package/my_template/node_modules/clean-css/lib/properties/clone.js +26 -0
  217. package/my_template/node_modules/clean-css/lib/properties/compactable.js +285 -0
  218. package/my_template/node_modules/clean-css/lib/properties/every-combination.js +28 -0
  219. package/my_template/node_modules/clean-css/lib/properties/has-inherit.js +10 -0
  220. package/my_template/node_modules/clean-css/lib/properties/invalid-property-error.js +10 -0
  221. package/my_template/node_modules/clean-css/lib/properties/optimizer.js +215 -0
  222. package/my_template/node_modules/clean-css/lib/properties/override-compactor.js +384 -0
  223. package/my_template/node_modules/clean-css/lib/properties/populate-components.js +32 -0
  224. package/my_template/node_modules/clean-css/lib/properties/remove-unused.js +10 -0
  225. package/my_template/node_modules/clean-css/lib/properties/restore-from-optimizing.js +60 -0
  226. package/my_template/node_modules/clean-css/lib/properties/restore.js +232 -0
  227. package/my_template/node_modules/clean-css/lib/properties/shorthand-compactor.js +134 -0
  228. package/my_template/node_modules/clean-css/lib/properties/validator.js +197 -0
  229. package/my_template/node_modules/clean-css/lib/properties/vendor-prefixes.js +26 -0
  230. package/my_template/node_modules/clean-css/lib/properties/wrap-for-optimizing.js +118 -0
  231. package/my_template/node_modules/clean-css/lib/selectors/advanced.js +86 -0
  232. package/my_template/node_modules/clean-css/lib/selectors/clean-up.js +89 -0
  233. package/my_template/node_modules/clean-css/lib/selectors/extractor.js +69 -0
  234. package/my_template/node_modules/clean-css/lib/selectors/is-special.js +5 -0
  235. package/my_template/node_modules/clean-css/lib/selectors/merge-adjacent.js +35 -0
  236. package/my_template/node_modules/clean-css/lib/selectors/merge-media-queries.js +64 -0
  237. package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js +61 -0
  238. package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js +76 -0
  239. package/my_template/node_modules/clean-css/lib/selectors/reduce-non-adjacent.js +172 -0
  240. package/my_template/node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js +21 -0
  241. package/my_template/node_modules/clean-css/lib/selectors/remove-duplicates.js +41 -0
  242. package/my_template/node_modules/clean-css/lib/selectors/reorderable.js +99 -0
  243. package/my_template/node_modules/clean-css/lib/selectors/restructure.js +369 -0
  244. package/my_template/node_modules/clean-css/lib/selectors/simple.js +454 -0
  245. package/my_template/node_modules/clean-css/lib/source-maps/track.js +119 -0
  246. package/my_template/node_modules/clean-css/lib/stringifier/helpers.js +167 -0
  247. package/my_template/node_modules/clean-css/lib/stringifier/one-time.js +50 -0
  248. package/my_template/node_modules/clean-css/lib/stringifier/simple.js +22 -0
  249. package/my_template/node_modules/clean-css/lib/stringifier/source-maps.js +96 -0
  250. package/my_template/node_modules/clean-css/lib/text/comments-processor.js +131 -0
  251. package/my_template/node_modules/clean-css/lib/text/escape-store.js +53 -0
  252. package/my_template/node_modules/clean-css/lib/text/expressions-processor.js +117 -0
  253. package/my_template/node_modules/clean-css/lib/text/free-text-processor.js +98 -0
  254. package/my_template/node_modules/clean-css/lib/text/urls-processor.js +75 -0
  255. package/my_template/node_modules/clean-css/lib/tokenizer/extract-properties.js +193 -0
  256. package/my_template/node_modules/clean-css/lib/tokenizer/extract-selectors.js +17 -0
  257. package/my_template/node_modules/clean-css/lib/tokenizer/tokenize.js +297 -0
  258. package/my_template/node_modules/clean-css/lib/urls/rebase.js +30 -0
  259. package/my_template/node_modules/clean-css/lib/urls/reduce.js +154 -0
  260. package/my_template/node_modules/clean-css/lib/urls/rewrite.js +107 -0
  261. package/my_template/node_modules/clean-css/lib/utils/clone-array.js +12 -0
  262. package/my_template/node_modules/clean-css/lib/utils/compatibility.js +162 -0
  263. package/my_template/node_modules/clean-css/lib/utils/input-source-map-tracker.js +284 -0
  264. package/my_template/node_modules/clean-css/lib/utils/object.js +11 -0
  265. package/my_template/node_modules/clean-css/lib/utils/quote-scanner.js +119 -0
  266. package/my_template/node_modules/clean-css/lib/utils/source-reader.js +96 -0
  267. package/my_template/node_modules/clean-css/lib/utils/source-tracker.js +31 -0
  268. package/my_template/node_modules/clean-css/lib/utils/split.js +62 -0
  269. package/my_template/node_modules/clean-css/node_modules/source-map/README.md +510 -0
  270. package/my_template/node_modules/clean-css/node_modules/source-map/build/assert-shim.js +56 -0
  271. package/my_template/node_modules/clean-css/node_modules/source-map/build/mini-require.js +152 -0
  272. package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-source-map.jsm +21 -0
  273. package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-utils.jsm +18 -0
  274. package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-browser.js +8 -0
  275. package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  276. package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-utils.jsm +21 -0
  277. package/my_template/node_modules/clean-css/node_modules/source-map/build/test-prefix.js +8 -0
  278. package/my_template/node_modules/clean-css/node_modules/source-map/build/test-suffix.js +3 -0
  279. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/array-set.js +107 -0
  280. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64-vlq.js +146 -0
  281. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64.js +73 -0
  282. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/binary-search.js +117 -0
  283. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
  284. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/quick-sort.js +120 -0
  285. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-consumer.js +1077 -0
  286. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-generator.js +399 -0
  287. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-node.js +414 -0
  288. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/util.js +370 -0
  289. package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map.js +8 -0
  290. package/my_template/node_modules/clean-css/node_modules/source-map/package.json +68 -0
  291. package/my_template/node_modules/clean-css/package.json +53 -0
  292. package/my_template/node_modules/color-convert/CHANGELOG.md +54 -0
  293. package/my_template/node_modules/color-convert/LICENSE +21 -0
  294. package/my_template/node_modules/color-convert/README.md +68 -0
  295. package/my_template/node_modules/color-convert/conversions.js +868 -0
  296. package/my_template/node_modules/color-convert/index.js +78 -0
  297. package/my_template/node_modules/color-convert/package.json +46 -0
  298. package/my_template/node_modules/color-convert/route.js +97 -0
  299. package/my_template/node_modules/color-name/.eslintrc.json +43 -0
  300. package/my_template/node_modules/color-name/LICENSE +8 -0
  301. package/my_template/node_modules/color-name/README.md +11 -0
  302. package/my_template/node_modules/color-name/index.js +152 -0
  303. package/my_template/node_modules/color-name/package.json +25 -0
  304. package/my_template/node_modules/color-name/test.js +7 -0
  305. package/my_template/node_modules/commander/History.md +256 -0
  306. package/my_template/node_modules/commander/LICENSE +22 -0
  307. package/my_template/node_modules/commander/Readme.md +342 -0
  308. package/my_template/node_modules/commander/index.js +1103 -0
  309. package/my_template/node_modules/commander/package.json +33 -0
  310. package/my_template/node_modules/copy-anything/LICENSE +21 -0
  311. package/my_template/node_modules/copy-anything/README.md +130 -0
  312. package/my_template/node_modules/copy-anything/dist/index.cjs +52 -0
  313. package/my_template/node_modules/copy-anything/dist/index.es.js +48 -0
  314. package/my_template/node_modules/copy-anything/dist/types/index.d.ts +15 -0
  315. package/my_template/node_modules/copy-anything/package.json +98 -0
  316. package/my_template/node_modules/errno/.jshintrc +59 -0
  317. package/my_template/node_modules/errno/.travis.yml +19 -0
  318. package/my_template/node_modules/errno/README.md +145 -0
  319. package/my_template/node_modules/errno/build.js +43 -0
  320. package/my_template/node_modules/errno/cli.js +22 -0
  321. package/my_template/node_modules/errno/custom.js +57 -0
  322. package/my_template/node_modules/errno/errno.js +313 -0
  323. package/my_template/node_modules/errno/package.json +33 -0
  324. package/my_template/node_modules/errno/test.js +88 -0
  325. package/my_template/node_modules/escape-string-regexp/index.js +11 -0
  326. package/my_template/node_modules/escape-string-regexp/license +21 -0
  327. package/my_template/node_modules/escape-string-regexp/package.json +41 -0
  328. package/my_template/node_modules/escape-string-regexp/readme.md +27 -0
  329. package/my_template/node_modules/estree-walker/CHANGELOG.md +55 -0
  330. package/my_template/node_modules/estree-walker/README.md +45 -0
  331. package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
  332. package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js.map +1 -0
  333. package/my_template/node_modules/estree-walker/index.d.ts +27 -0
  334. package/my_template/node_modules/estree-walker/package.json +30 -0
  335. package/my_template/node_modules/estree-walker/src/estree-walker.js +51 -0
  336. package/my_template/node_modules/function-bind/.eslintrc +21 -0
  337. package/my_template/node_modules/function-bind/.github/FUNDING.yml +12 -0
  338. package/my_template/node_modules/function-bind/.github/SECURITY.md +3 -0
  339. package/my_template/node_modules/function-bind/.nycrc +13 -0
  340. package/my_template/node_modules/function-bind/CHANGELOG.md +136 -0
  341. package/my_template/node_modules/function-bind/LICENSE +20 -0
  342. package/my_template/node_modules/function-bind/README.md +46 -0
  343. package/my_template/node_modules/function-bind/implementation.js +84 -0
  344. package/my_template/node_modules/function-bind/index.js +5 -0
  345. package/my_template/node_modules/function-bind/package.json +87 -0
  346. package/my_template/node_modules/function-bind/test/.eslintrc +9 -0
  347. package/my_template/node_modules/function-bind/test/index.js +252 -0
  348. package/my_template/node_modules/graceful-fs/LICENSE +15 -0
  349. package/my_template/node_modules/graceful-fs/README.md +143 -0
  350. package/my_template/node_modules/graceful-fs/clone.js +23 -0
  351. package/my_template/node_modules/graceful-fs/graceful-fs.js +448 -0
  352. package/my_template/node_modules/graceful-fs/legacy-streams.js +118 -0
  353. package/my_template/node_modules/graceful-fs/package.json +53 -0
  354. package/my_template/node_modules/graceful-fs/polyfills.js +355 -0
  355. package/my_template/node_modules/graceful-readlink/.travis.yml +5 -0
  356. package/my_template/node_modules/graceful-readlink/LICENSE +22 -0
  357. package/my_template/node_modules/graceful-readlink/README.md +17 -0
  358. package/my_template/node_modules/graceful-readlink/index.js +12 -0
  359. package/my_template/node_modules/graceful-readlink/package.json +18 -0
  360. package/my_template/node_modules/has-flag/index.js +8 -0
  361. package/my_template/node_modules/has-flag/license +9 -0
  362. package/my_template/node_modules/has-flag/package.json +44 -0
  363. package/my_template/node_modules/has-flag/readme.md +70 -0
  364. package/my_template/node_modules/hasown/.eslintrc +5 -0
  365. package/my_template/node_modules/hasown/.github/FUNDING.yml +12 -0
  366. package/my_template/node_modules/hasown/.nycrc +13 -0
  367. package/my_template/node_modules/hasown/CHANGELOG.md +20 -0
  368. package/my_template/node_modules/hasown/LICENSE +21 -0
  369. package/my_template/node_modules/hasown/README.md +40 -0
  370. package/my_template/node_modules/hasown/index.d.ts +3 -0
  371. package/my_template/node_modules/hasown/index.d.ts.map +1 -0
  372. package/my_template/node_modules/hasown/index.js +8 -0
  373. package/my_template/node_modules/hasown/package.json +91 -0
  374. package/my_template/node_modules/hasown/tsconfig.json +49 -0
  375. package/my_template/node_modules/image-size/LICENSE +9 -0
  376. package/my_template/node_modules/image-size/Readme.md +88 -0
  377. package/my_template/node_modules/image-size/bin/image-size.js +36 -0
  378. package/my_template/node_modules/image-size/lib/detector.js +19 -0
  379. package/my_template/node_modules/image-size/lib/index.js +105 -0
  380. package/my_template/node_modules/image-size/lib/readUInt.js +11 -0
  381. package/my_template/node_modules/image-size/lib/types/bmp.js +17 -0
  382. package/my_template/node_modules/image-size/lib/types/dds.js +18 -0
  383. package/my_template/node_modules/image-size/lib/types/gif.js +19 -0
  384. package/my_template/node_modules/image-size/lib/types/jpg.js +62 -0
  385. package/my_template/node_modules/image-size/lib/types/png.js +36 -0
  386. package/my_template/node_modules/image-size/lib/types/psd.js +17 -0
  387. package/my_template/node_modules/image-size/lib/types/svg.js +78 -0
  388. package/my_template/node_modules/image-size/lib/types/tiff.js +118 -0
  389. package/my_template/node_modules/image-size/lib/types/webp.js +69 -0
  390. package/my_template/node_modules/image-size/lib/types.js +13 -0
  391. package/my_template/node_modules/image-size/package.json +49 -0
  392. package/my_template/node_modules/is-core-module/.eslintrc +18 -0
  393. package/my_template/node_modules/is-core-module/.nycrc +9 -0
  394. package/my_template/node_modules/is-core-module/CHANGELOG.md +180 -0
  395. package/my_template/node_modules/is-core-module/LICENSE +20 -0
  396. package/my_template/node_modules/is-core-module/README.md +40 -0
  397. package/my_template/node_modules/is-core-module/core.json +158 -0
  398. package/my_template/node_modules/is-core-module/index.js +69 -0
  399. package/my_template/node_modules/is-core-module/package.json +73 -0
  400. package/my_template/node_modules/is-core-module/test/index.js +133 -0
  401. package/my_template/node_modules/is-module/README.md +41 -0
  402. package/my_template/node_modules/is-module/component.json +11 -0
  403. package/my_template/node_modules/is-module/index.js +11 -0
  404. package/my_template/node_modules/is-module/package.json +20 -0
  405. package/my_template/node_modules/is-what/.babelrc +3 -0
  406. package/my_template/node_modules/is-what/.eslintignore +9 -0
  407. package/my_template/node_modules/is-what/.eslintrc.js +18 -0
  408. package/my_template/node_modules/is-what/.github/FUNDING.yml +12 -0
  409. package/my_template/node_modules/is-what/.prettierrc +9 -0
  410. package/my_template/node_modules/is-what/.vscode/settings.json +9 -0
  411. package/my_template/node_modules/is-what/LICENSE +21 -0
  412. package/my_template/node_modules/is-what/README.md +191 -0
  413. package/my_template/node_modules/is-what/build.js +60 -0
  414. package/my_template/node_modules/is-what/dist/index.cjs.js +364 -0
  415. package/my_template/node_modules/is-what/dist/index.esm.js +327 -0
  416. package/my_template/node_modules/is-what/package.json +86 -0
  417. package/my_template/node_modules/is-what/src/index.ts +395 -0
  418. package/my_template/node_modules/is-what/test/ava.ts +376 -0
  419. package/my_template/node_modules/is-what/test/index.test.js +15 -0
  420. package/my_template/node_modules/is-what/tsconfig.json +11 -0
  421. package/my_template/node_modules/is-what/types/index.d.ts +253 -0
  422. package/my_template/node_modules/jest-worker/LICENSE +21 -0
  423. package/my_template/node_modules/jest-worker/README.md +215 -0
  424. package/my_template/node_modules/jest-worker/build/Farm.d.ts +27 -0
  425. package/my_template/node_modules/jest-worker/build/Farm.d.ts.map +1 -0
  426. package/my_template/node_modules/jest-worker/build/Farm.js +179 -0
  427. package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts +14 -0
  428. package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts.map +1 -0
  429. package/my_template/node_modules/jest-worker/build/WorkerPool.js +49 -0
  430. package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +22 -0
  431. package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map +1 -0
  432. package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.js +134 -0
  433. package/my_template/node_modules/jest-worker/build/index.d.ts +46 -0
  434. package/my_template/node_modules/jest-worker/build/index.d.ts.map +1 -0
  435. package/my_template/node_modules/jest-worker/build/index.js +184 -0
  436. package/my_template/node_modules/jest-worker/build/types.d.ts +98 -0
  437. package/my_template/node_modules/jest-worker/build/types.d.ts.map +1 -0
  438. package/my_template/node_modules/jest-worker/build/types.js +43 -0
  439. package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +47 -0
  440. package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map +1 -0
  441. package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.js +310 -0
  442. package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +29 -0
  443. package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map +1 -0
  444. package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +289 -0
  445. package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts +8 -0
  446. package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts.map +1 -0
  447. package/my_template/node_modules/jest-worker/build/workers/processChild.js +166 -0
  448. package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts +8 -0
  449. package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts.map +1 -0
  450. package/my_template/node_modules/jest-worker/build/workers/threadChild.js +176 -0
  451. package/my_template/node_modules/jest-worker/node_modules/supports-color/browser.js +5 -0
  452. package/my_template/node_modules/jest-worker/node_modules/supports-color/index.js +138 -0
  453. package/my_template/node_modules/jest-worker/node_modules/supports-color/license +9 -0
  454. package/my_template/node_modules/jest-worker/node_modules/supports-color/package.json +53 -0
  455. package/my_template/node_modules/jest-worker/node_modules/supports-color/readme.md +85 -0
  456. package/my_template/node_modules/jest-worker/package.json +29 -0
  457. package/my_template/node_modules/js-tokens/CHANGELOG.md +151 -0
  458. package/my_template/node_modules/js-tokens/LICENSE +21 -0
  459. package/my_template/node_modules/js-tokens/README.md +240 -0
  460. package/my_template/node_modules/js-tokens/index.js +23 -0
  461. package/my_template/node_modules/js-tokens/package.json +30 -0
  462. package/my_template/node_modules/less/.eslintignore +5 -0
  463. package/my_template/node_modules/less/.eslintrc.json +3 -0
  464. package/my_template/node_modules/less/Gruntfile.js +420 -0
  465. package/my_template/node_modules/less/README.md +13 -0
  466. package/my_template/node_modules/less/bin/lessc +633 -0
  467. package/my_template/node_modules/less/bower.json +22 -0
  468. package/my_template/node_modules/less/dist/less.js +11275 -0
  469. package/my_template/node_modules/less/dist/less.min.js +11 -0
  470. package/my_template/node_modules/less/dist/less.min.js.map +1 -0
  471. package/my_template/node_modules/less/index.js +1 -0
  472. package/my_template/node_modules/less/lib/less/constants.js +15 -0
  473. package/my_template/node_modules/less/lib/less/constants.js.map +1 -0
  474. package/my_template/node_modules/less/lib/less/contexts.js +171 -0
  475. package/my_template/node_modules/less/lib/less/contexts.js.map +1 -0
  476. package/my_template/node_modules/less/lib/less/data/colors.js +153 -0
  477. package/my_template/node_modules/less/lib/less/data/colors.js.map +1 -0
  478. package/my_template/node_modules/less/lib/less/data/index.js +9 -0
  479. package/my_template/node_modules/less/lib/less/data/index.js.map +1 -0
  480. package/my_template/node_modules/less/lib/less/data/unit-conversions.js +24 -0
  481. package/my_template/node_modules/less/lib/less/data/unit-conversions.js.map +1 -0
  482. package/my_template/node_modules/less/lib/less/default-options.js +57 -0
  483. package/my_template/node_modules/less/lib/less/default-options.js.map +1 -0
  484. package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js +122 -0
  485. package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js.map +1 -0
  486. package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js +168 -0
  487. package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js.map +1 -0
  488. package/my_template/node_modules/less/lib/less/environment/environment-api.js +28 -0
  489. package/my_template/node_modules/less/lib/less/environment/environment-api.js.map +1 -0
  490. package/my_template/node_modules/less/lib/less/environment/environment.js +57 -0
  491. package/my_template/node_modules/less/lib/less/environment/environment.js.map +1 -0
  492. package/my_template/node_modules/less/lib/less/environment/file-manager-api.js +106 -0
  493. package/my_template/node_modules/less/lib/less/environment/file-manager-api.js.map +1 -0
  494. package/my_template/node_modules/less/lib/less/functions/boolean.js +21 -0
  495. package/my_template/node_modules/less/lib/less/functions/boolean.js.map +1 -0
  496. package/my_template/node_modules/less/lib/less/functions/color-blending.js +78 -0
  497. package/my_template/node_modules/less/lib/less/functions/color-blending.js.map +1 -0
  498. package/my_template/node_modules/less/lib/less/functions/color.js +404 -0
  499. package/my_template/node_modules/less/lib/less/functions/color.js.map +1 -0
  500. package/my_template/node_modules/less/lib/less/functions/data-uri.js +86 -0
  501. package/my_template/node_modules/less/lib/less/functions/data-uri.js.map +1 -0
  502. package/my_template/node_modules/less/lib/less/functions/default.js +29 -0
  503. package/my_template/node_modules/less/lib/less/functions/default.js.map +1 -0
  504. package/my_template/node_modules/less/lib/less/functions/function-caller.js +66 -0
  505. package/my_template/node_modules/less/lib/less/functions/function-caller.js.map +1 -0
  506. package/my_template/node_modules/less/lib/less/functions/function-registry.js +36 -0
  507. package/my_template/node_modules/less/lib/less/functions/function-registry.js.map +1 -0
  508. package/my_template/node_modules/less/lib/less/functions/index.js +35 -0
  509. package/my_template/node_modules/less/lib/less/functions/index.js.map +1 -0
  510. package/my_template/node_modules/less/lib/less/functions/list.js +136 -0
  511. package/my_template/node_modules/less/lib/less/functions/list.js.map +1 -0
  512. package/my_template/node_modules/less/lib/less/functions/math-helper.js +20 -0
  513. package/my_template/node_modules/less/lib/less/functions/math-helper.js.map +1 -0
  514. package/my_template/node_modules/less/lib/less/functions/math.js +30 -0
  515. package/my_template/node_modules/less/lib/less/functions/math.js.map +1 -0
  516. package/my_template/node_modules/less/lib/less/functions/number.js +98 -0
  517. package/my_template/node_modules/less/lib/less/functions/number.js.map +1 -0
  518. package/my_template/node_modules/less/lib/less/functions/string.js +42 -0
  519. package/my_template/node_modules/less/lib/less/functions/string.js.map +1 -0
  520. package/my_template/node_modules/less/lib/less/functions/svg.js +88 -0
  521. package/my_template/node_modules/less/lib/less/functions/svg.js.map +1 -0
  522. package/my_template/node_modules/less/lib/less/functions/types.js +75 -0
  523. package/my_template/node_modules/less/lib/less/functions/types.js.map +1 -0
  524. package/my_template/node_modules/less/lib/less/import-manager.js +196 -0
  525. package/my_template/node_modules/less/lib/less/import-manager.js.map +1 -0
  526. package/my_template/node_modules/less/lib/less/index.js +130 -0
  527. package/my_template/node_modules/less/lib/less/index.js.map +1 -0
  528. package/my_template/node_modules/less/lib/less/less-error.js +162 -0
  529. package/my_template/node_modules/less/lib/less/less-error.js.map +1 -0
  530. package/my_template/node_modules/less/lib/less/logger.js +37 -0
  531. package/my_template/node_modules/less/lib/less/logger.js.map +1 -0
  532. package/my_template/node_modules/less/lib/less/parse-tree.js +69 -0
  533. package/my_template/node_modules/less/lib/less/parse-tree.js.map +1 -0
  534. package/my_template/node_modules/less/lib/less/parse.js +108 -0
  535. package/my_template/node_modules/less/lib/less/parse.js.map +1 -0
  536. package/my_template/node_modules/less/lib/less/parser/chunker.js +147 -0
  537. package/my_template/node_modules/less/lib/less/parser/chunker.js.map +1 -0
  538. package/my_template/node_modules/less/lib/less/parser/parser-input.js +355 -0
  539. package/my_template/node_modules/less/lib/less/parser/parser-input.js.map +1 -0
  540. package/my_template/node_modules/less/lib/less/parser/parser.js +2262 -0
  541. package/my_template/node_modules/less/lib/less/parser/parser.js.map +1 -0
  542. package/my_template/node_modules/less/lib/less/plugin-manager.js +158 -0
  543. package/my_template/node_modules/less/lib/less/plugin-manager.js.map +1 -0
  544. package/my_template/node_modules/less/lib/less/render.js +64 -0
  545. package/my_template/node_modules/less/lib/less/render.js.map +1 -0
  546. package/my_template/node_modules/less/lib/less/source-map-builder.js +72 -0
  547. package/my_template/node_modules/less/lib/less/source-map-builder.js.map +1 -0
  548. package/my_template/node_modules/less/lib/less/source-map-output.js +140 -0
  549. package/my_template/node_modules/less/lib/less/source-map-output.js.map +1 -0
  550. package/my_template/node_modules/less/lib/less/transform-tree.js +93 -0
  551. package/my_template/node_modules/less/lib/less/transform-tree.js.map +1 -0
  552. package/my_template/node_modules/less/lib/less/tree/anonymous.js +34 -0
  553. package/my_template/node_modules/less/lib/less/tree/anonymous.js.map +1 -0
  554. package/my_template/node_modules/less/lib/less/tree/assignment.js +32 -0
  555. package/my_template/node_modules/less/lib/less/tree/assignment.js.map +1 -0
  556. package/my_template/node_modules/less/lib/less/tree/atrule.js +146 -0
  557. package/my_template/node_modules/less/lib/less/tree/atrule.js.map +1 -0
  558. package/my_template/node_modules/less/lib/less/tree/attribute.js +29 -0
  559. package/my_template/node_modules/less/lib/less/tree/attribute.js.map +1 -0
  560. package/my_template/node_modules/less/lib/less/tree/call.js +104 -0
  561. package/my_template/node_modules/less/lib/less/tree/call.js.map +1 -0
  562. package/my_template/node_modules/less/lib/less/tree/color.js +243 -0
  563. package/my_template/node_modules/less/lib/less/tree/color.js.map +1 -0
  564. package/my_template/node_modules/less/lib/less/tree/combinator.js +29 -0
  565. package/my_template/node_modules/less/lib/less/tree/combinator.js.map +1 -0
  566. package/my_template/node_modules/less/lib/less/tree/comment.js +28 -0
  567. package/my_template/node_modules/less/lib/less/tree/comment.js.map +1 -0
  568. package/my_template/node_modules/less/lib/less/tree/condition.js +41 -0
  569. package/my_template/node_modules/less/lib/less/tree/condition.js.map +1 -0
  570. package/my_template/node_modules/less/lib/less/tree/debug-info.js +37 -0
  571. package/my_template/node_modules/less/lib/less/tree/debug-info.js.map +1 -0
  572. package/my_template/node_modules/less/lib/less/tree/declaration.js +118 -0
  573. package/my_template/node_modules/less/lib/less/tree/declaration.js.map +1 -0
  574. package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js +47 -0
  575. package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js.map +1 -0
  576. package/my_template/node_modules/less/lib/less/tree/dimension.js +159 -0
  577. package/my_template/node_modules/less/lib/less/tree/dimension.js.map +1 -0
  578. package/my_template/node_modules/less/lib/less/tree/element.js +64 -0
  579. package/my_template/node_modules/less/lib/less/tree/element.js.map +1 -0
  580. package/my_template/node_modules/less/lib/less/tree/expression.js +90 -0
  581. package/my_template/node_modules/less/lib/less/tree/expression.js.map +1 -0
  582. package/my_template/node_modules/less/lib/less/tree/extend.js +62 -0
  583. package/my_template/node_modules/less/lib/less/tree/extend.js.map +1 -0
  584. package/my_template/node_modules/less/lib/less/tree/import.js +191 -0
  585. package/my_template/node_modules/less/lib/less/tree/import.js.map +1 -0
  586. package/my_template/node_modules/less/lib/less/tree/index.js +56 -0
  587. package/my_template/node_modules/less/lib/less/tree/index.js.map +1 -0
  588. package/my_template/node_modules/less/lib/less/tree/javascript.js +35 -0
  589. package/my_template/node_modules/less/lib/less/tree/javascript.js.map +1 -0
  590. package/my_template/node_modules/less/lib/less/tree/js-eval-node.js +57 -0
  591. package/my_template/node_modules/less/lib/less/tree/js-eval-node.js.map +1 -0
  592. package/my_template/node_modules/less/lib/less/tree/keyword.js +21 -0
  593. package/my_template/node_modules/less/lib/less/tree/keyword.js.map +1 -0
  594. package/my_template/node_modules/less/lib/less/tree/media.js +152 -0
  595. package/my_template/node_modules/less/lib/less/tree/media.js.map +1 -0
  596. package/my_template/node_modules/less/lib/less/tree/mixin-call.js +194 -0
  597. package/my_template/node_modules/less/lib/less/tree/mixin-call.js.map +1 -0
  598. package/my_template/node_modules/less/lib/less/tree/mixin-definition.js +233 -0
  599. package/my_template/node_modules/less/lib/less/tree/mixin-definition.js.map +1 -0
  600. package/my_template/node_modules/less/lib/less/tree/namespace-value.js +76 -0
  601. package/my_template/node_modules/less/lib/less/tree/namespace-value.js.map +1 -0
  602. package/my_template/node_modules/less/lib/less/tree/negative.js +25 -0
  603. package/my_template/node_modules/less/lib/less/tree/negative.js.map +1 -0
  604. package/my_template/node_modules/less/lib/less/tree/node.js +166 -0
  605. package/my_template/node_modules/less/lib/less/tree/node.js.map +1 -0
  606. package/my_template/node_modules/less/lib/less/tree/operation.js +77 -0
  607. package/my_template/node_modules/less/lib/less/tree/operation.js.map +1 -0
  608. package/my_template/node_modules/less/lib/less/tree/paren.js +21 -0
  609. package/my_template/node_modules/less/lib/less/tree/paren.js.map +1 -0
  610. package/my_template/node_modules/less/lib/less/tree/property.js +62 -0
  611. package/my_template/node_modules/less/lib/less/tree/property.js.map +1 -0
  612. package/my_template/node_modules/less/lib/less/tree/quoted.js +66 -0
  613. package/my_template/node_modules/less/lib/less/tree/quoted.js.map +1 -0
  614. package/my_template/node_modules/less/lib/less/tree/ruleset.js +786 -0
  615. package/my_template/node_modules/less/lib/less/tree/ruleset.js.map +1 -0
  616. package/my_template/node_modules/less/lib/less/tree/selector.js +126 -0
  617. package/my_template/node_modules/less/lib/less/tree/selector.js.map +1 -0
  618. package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js +13 -0
  619. package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js.map +1 -0
  620. package/my_template/node_modules/less/lib/less/tree/unit.js +141 -0
  621. package/my_template/node_modules/less/lib/less/tree/unit.js.map +1 -0
  622. package/my_template/node_modules/less/lib/less/tree/url.js +60 -0
  623. package/my_template/node_modules/less/lib/less/tree/url.js.map +1 -0
  624. package/my_template/node_modules/less/lib/less/tree/value.js +43 -0
  625. package/my_template/node_modules/less/lib/less/tree/value.js.map +1 -0
  626. package/my_template/node_modules/less/lib/less/tree/variable-call.js +44 -0
  627. package/my_template/node_modules/less/lib/less/tree/variable-call.js.map +1 -0
  628. package/my_template/node_modules/less/lib/less/tree/variable.js +61 -0
  629. package/my_template/node_modules/less/lib/less/tree/variable.js.map +1 -0
  630. package/my_template/node_modules/less/lib/less/utils.js +143 -0
  631. package/my_template/node_modules/less/lib/less/utils.js.map +1 -0
  632. package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js +462 -0
  633. package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js.map +1 -0
  634. package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js +61 -0
  635. package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js.map +1 -0
  636. package/my_template/node_modules/less/lib/less/visitors/import-visitor.js +202 -0
  637. package/my_template/node_modules/less/lib/less/visitors/import-visitor.js.map +1 -0
  638. package/my_template/node_modules/less/lib/less/visitors/index.js +20 -0
  639. package/my_template/node_modules/less/lib/less/visitors/index.js.map +1 -0
  640. package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js +57 -0
  641. package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js.map +1 -0
  642. package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js +43 -0
  643. package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js.map +1 -0
  644. package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js +321 -0
  645. package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js.map +1 -0
  646. package/my_template/node_modules/less/lib/less/visitors/visitor.js +158 -0
  647. package/my_template/node_modules/less/lib/less/visitors/visitor.js.map +1 -0
  648. package/my_template/node_modules/less/lib/less-browser/add-default-options.js +45 -0
  649. package/my_template/node_modules/less/lib/less-browser/add-default-options.js.map +1 -0
  650. package/my_template/node_modules/less/lib/less-browser/bootstrap.js +64 -0
  651. package/my_template/node_modules/less/lib/less-browser/bootstrap.js.map +1 -0
  652. package/my_template/node_modules/less/lib/less-browser/browser.js +80 -0
  653. package/my_template/node_modules/less/lib/less-browser/browser.js.map +1 -0
  654. package/my_template/node_modules/less/lib/less-browser/cache.js +45 -0
  655. package/my_template/node_modules/less/lib/less-browser/cache.js.map +1 -0
  656. package/my_template/node_modules/less/lib/less-browser/error-reporting.js +183 -0
  657. package/my_template/node_modules/less/lib/less-browser/error-reporting.js.map +1 -0
  658. package/my_template/node_modules/less/lib/less-browser/file-manager.js +122 -0
  659. package/my_template/node_modules/less/lib/less-browser/file-manager.js.map +1 -0
  660. package/my_template/node_modules/less/lib/less-browser/image-size.js +30 -0
  661. package/my_template/node_modules/less/lib/less-browser/image-size.js.map +1 -0
  662. package/my_template/node_modules/less/lib/less-browser/index.js +256 -0
  663. package/my_template/node_modules/less/lib/less-browser/index.js.map +1 -0
  664. package/my_template/node_modules/less/lib/less-browser/log-listener.js +43 -0
  665. package/my_template/node_modules/less/lib/less-browser/log-listener.js.map +1 -0
  666. package/my_template/node_modules/less/lib/less-browser/plugin-loader.js +42 -0
  667. package/my_template/node_modules/less/lib/less-browser/plugin-loader.js.map +1 -0
  668. package/my_template/node_modules/less/lib/less-browser/utils.js +29 -0
  669. package/my_template/node_modules/less/lib/less-browser/utils.js.map +1 -0
  670. package/my_template/node_modules/less/lib/less-node/environment.js +19 -0
  671. package/my_template/node_modules/less/lib/less-node/environment.js.map +1 -0
  672. package/my_template/node_modules/less/lib/less-node/file-manager.js +158 -0
  673. package/my_template/node_modules/less/lib/less-node/file-manager.js.map +1 -0
  674. package/my_template/node_modules/less/lib/less-node/fs.js +11 -0
  675. package/my_template/node_modules/less/lib/less-node/fs.js.map +1 -0
  676. package/my_template/node_modules/less/lib/less-node/image-size.js +54 -0
  677. package/my_template/node_modules/less/lib/less-node/image-size.js.map +1 -0
  678. package/my_template/node_modules/less/lib/less-node/index.js +28 -0
  679. package/my_template/node_modules/less/lib/less-node/index.js.map +1 -0
  680. package/my_template/node_modules/less/lib/less-node/lessc-helper.js +92 -0
  681. package/my_template/node_modules/less/lib/less-node/lessc-helper.js.map +1 -0
  682. package/my_template/node_modules/less/lib/less-node/plugin-loader.js +73 -0
  683. package/my_template/node_modules/less/lib/less-node/plugin-loader.js.map +1 -0
  684. package/my_template/node_modules/less/lib/less-node/url-file-manager.js +68 -0
  685. package/my_template/node_modules/less/lib/less-node/url-file-manager.js.map +1 -0
  686. package/my_template/node_modules/less/package.json +133 -0
  687. package/my_template/node_modules/less/test/.eslintrc.json +9 -0
  688. package/my_template/node_modules/less/test/README.md +3 -0
  689. package/my_template/node_modules/less/test/browser/common.js +230 -0
  690. package/my_template/node_modules/less/test/browser/css/global-vars/simple.css +3 -0
  691. package/my_template/node_modules/less/test/browser/css/modify-vars/simple.css +8 -0
  692. package/my_template/node_modules/less/test/browser/css/plugin/plugin.css +3 -0
  693. package/my_template/node_modules/less/test/browser/css/postProcessor/postProcessor.css +4 -0
  694. package/my_template/node_modules/less/test/browser/css/relative-urls/urls.css +36 -0
  695. package/my_template/node_modules/less/test/browser/css/rewrite-urls/urls.css +36 -0
  696. package/my_template/node_modules/less/test/browser/css/rootpath/urls.css +35 -0
  697. package/my_template/node_modules/less/test/browser/css/rootpath-relative/urls.css +35 -0
  698. package/my_template/node_modules/less/test/browser/css/rootpath-rewrite-urls/urls.css +35 -0
  699. package/my_template/node_modules/less/test/browser/css/urls.css +54 -0
  700. package/my_template/node_modules/less/test/browser/generator/benchmark.config.js +50 -0
  701. package/my_template/node_modules/less/test/browser/generator/generate.js +78 -0
  702. package/my_template/node_modules/less/test/browser/generator/runner.config.js +186 -0
  703. package/my_template/node_modules/less/test/browser/generator/runner.js +2 -0
  704. package/my_template/node_modules/less/test/browser/generator/template.js +83 -0
  705. package/my_template/node_modules/less/test/browser/less/console-errors/test-error.less +3 -0
  706. package/my_template/node_modules/less/test/browser/less/console-errors/test-error.txt +2 -0
  707. package/my_template/node_modules/less/test/browser/less/errors/image-height-error.less +3 -0
  708. package/my_template/node_modules/less/test/browser/less/errors/image-height-error.txt +4 -0
  709. package/my_template/node_modules/less/test/browser/less/errors/image-size-error.less +3 -0
  710. package/my_template/node_modules/less/test/browser/less/errors/image-size-error.txt +4 -0
  711. package/my_template/node_modules/less/test/browser/less/errors/image-width-error.less +3 -0
  712. package/my_template/node_modules/less/test/browser/less/errors/image-width-error.txt +4 -0
  713. package/my_template/node_modules/less/test/browser/less/global-vars/simple.less +3 -0
  714. package/my_template/node_modules/less/test/browser/less/imports/urls.less +4 -0
  715. package/my_template/node_modules/less/test/browser/less/imports/urls2.less +4 -0
  716. package/my_template/node_modules/less/test/browser/less/modify-vars/imports/simple2.less +4 -0
  717. package/my_template/node_modules/less/test/browser/less/modify-vars/simple.less +8 -0
  718. package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
  719. package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
  720. package/my_template/node_modules/less/test/browser/less/plugin/plugin.js +4 -0
  721. package/my_template/node_modules/less/test/browser/less/plugin/plugin.less +4 -0
  722. package/my_template/node_modules/less/test/browser/less/postProcessor/postProcessor.less +4 -0
  723. package/my_template/node_modules/less/test/browser/less/relative-urls/urls.less +34 -0
  724. package/my_template/node_modules/less/test/browser/less/rewrite-urls/urls.less +34 -0
  725. package/my_template/node_modules/less/test/browser/less/rootpath/urls.less +33 -0
  726. package/my_template/node_modules/less/test/browser/less/rootpath-relative/urls.less +33 -0
  727. package/my_template/node_modules/less/test/browser/less/rootpath-rewrite-urls/urls.less +33 -0
  728. package/my_template/node_modules/less/test/browser/less/urls.less +62 -0
  729. package/my_template/node_modules/less/test/browser/runner-VisitorPlugin-options.js +3 -0
  730. package/my_template/node_modules/less/test/browser/runner-VisitorPlugin.js +3 -0
  731. package/my_template/node_modules/less/test/browser/runner-browser-options.js +51 -0
  732. package/my_template/node_modules/less/test/browser/runner-browser-spec.js +12 -0
  733. package/my_template/node_modules/less/test/browser/runner-console-errors.js +5 -0
  734. package/my_template/node_modules/less/test/browser/runner-errors-options.js +6 -0
  735. package/my_template/node_modules/less/test/browser/runner-errors-spec.js +3 -0
  736. package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin-options.js +5 -0
  737. package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin.js +3 -0
  738. package/my_template/node_modules/less/test/browser/runner-global-vars-options.js +7 -0
  739. package/my_template/node_modules/less/test/browser/runner-global-vars-spec.js +3 -0
  740. package/my_template/node_modules/less/test/browser/runner-legacy-options.js +6 -0
  741. package/my_template/node_modules/less/test/browser/runner-legacy-spec.js +3 -0
  742. package/my_template/node_modules/less/test/browser/runner-main-options.js +17 -0
  743. package/my_template/node_modules/less/test/browser/runner-main-spec.js +7 -0
  744. package/my_template/node_modules/less/test/browser/runner-modify-vars-options.js +5 -0
  745. package/my_template/node_modules/less/test/browser/runner-modify-vars-spec.js +33 -0
  746. package/my_template/node_modules/less/test/browser/runner-no-js-errors-options.js +4 -0
  747. package/my_template/node_modules/less/test/browser/runner-no-js-errors-spec.js +3 -0
  748. package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin-options.js +3 -0
  749. package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin.js +3 -0
  750. package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin-options.js +3 -0
  751. package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin.js +3 -0
  752. package/my_template/node_modules/less/test/browser/runner-production-options.js +3 -0
  753. package/my_template/node_modules/less/test/browser/runner-production-spec.js +5 -0
  754. package/my_template/node_modules/less/test/browser/runner-relative-urls-options.js +3 -0
  755. package/my_template/node_modules/less/test/browser/runner-relative-urls-spec.js +3 -0
  756. package/my_template/node_modules/less/test/browser/runner-rewrite-urls-options.js +3 -0
  757. package/my_template/node_modules/less/test/browser/runner-rewrite-urls-spec.js +3 -0
  758. package/my_template/node_modules/less/test/browser/runner-rootpath-options.js +3 -0
  759. package/my_template/node_modules/less/test/browser/runner-rootpath-relative-options.js +4 -0
  760. package/my_template/node_modules/less/test/browser/runner-rootpath-relative-spec.js +3 -0
  761. package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-options.js +4 -0
  762. package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-spec.js +3 -0
  763. package/my_template/node_modules/less/test/browser/runner-rootpath-spec.js +3 -0
  764. package/my_template/node_modules/less/test/browser/runner-strict-units-options.js +5 -0
  765. package/my_template/node_modules/less/test/browser/runner-strict-units-spec.js +3 -0
  766. package/my_template/node_modules/less/test/index.js +89 -0
  767. package/my_template/node_modules/less/test/less-test.js +535 -0
  768. package/my_template/node_modules/less/test/modify-vars.js +28 -0
  769. package/my_template/node_modules/less/test/plugins/filemanager/index.js +19 -0
  770. package/my_template/node_modules/less/test/plugins/postprocess/index.js +14 -0
  771. package/my_template/node_modules/less/test/plugins/preprocess/index.js +19 -0
  772. package/my_template/node_modules/less/test/plugins/visitor/index.js +24 -0
  773. package/my_template/node_modules/less/test/sourcemaps/basic.json +1 -0
  774. package/my_template/node_modules/less/test/sourcemaps/custom-props.json +1 -0
  775. package/my_template/node_modules/less/test/sourcemaps/index.html +17 -0
  776. package/my_template/node_modules/less/test/sourcemaps-disable-annotation/basic.json +1 -0
  777. package/my_template/node_modules/less/test/test-es6.ts +17 -0
  778. package/my_template/node_modules/less/tsconfig.json +13 -0
  779. package/my_template/node_modules/less-plugin-clean-css/LICENSE +201 -0
  780. package/my_template/node_modules/less-plugin-clean-css/README.md +33 -0
  781. package/my_template/node_modules/less-plugin-clean-css/lib/clean-css-processor.js +63 -0
  782. package/my_template/node_modules/less-plugin-clean-css/lib/index.js +23 -0
  783. package/my_template/node_modules/less-plugin-clean-css/lib/parse-options.js +61 -0
  784. package/my_template/node_modules/less-plugin-clean-css/lib/usage.js +19 -0
  785. package/my_template/node_modules/less-plugin-clean-css/package.json +39 -0
  786. package/my_template/node_modules/make-dir/index.d.ts +39 -0
  787. package/my_template/node_modules/make-dir/index.js +139 -0
  788. package/my_template/node_modules/make-dir/license +9 -0
  789. package/my_template/node_modules/make-dir/package.json +59 -0
  790. package/my_template/node_modules/make-dir/readme.md +123 -0
  791. package/my_template/node_modules/merge-stream/LICENSE +21 -0
  792. package/my_template/node_modules/merge-stream/README.md +78 -0
  793. package/my_template/node_modules/merge-stream/index.js +41 -0
  794. package/my_template/node_modules/merge-stream/package.json +19 -0
  795. package/my_template/node_modules/mime/CHANGELOG.md +164 -0
  796. package/my_template/node_modules/mime/LICENSE +21 -0
  797. package/my_template/node_modules/mime/README.md +90 -0
  798. package/my_template/node_modules/mime/cli.js +8 -0
  799. package/my_template/node_modules/mime/mime.js +108 -0
  800. package/my_template/node_modules/mime/package.json +44 -0
  801. package/my_template/node_modules/mime/src/build.js +53 -0
  802. package/my_template/node_modules/mime/src/test.js +60 -0
  803. package/my_template/node_modules/mime/types.json +1 -0
  804. package/my_template/node_modules/native-request/README.md +184 -0
  805. package/my_template/node_modules/native-request/commons/jsonToParameter.js +14 -0
  806. package/my_template/node_modules/native-request/index.js +65 -0
  807. package/my_template/node_modules/native-request/lib/Request.js +144 -0
  808. package/my_template/node_modules/native-request/package.json +45 -0
  809. package/my_template/node_modules/native-request/test/express.get.cookies.js +58 -0
  810. package/my_template/node_modules/native-request/test/express.get.js +146 -0
  811. package/my_template/node_modules/native-request/test/express.post.cookies.js +59 -0
  812. package/my_template/node_modules/native-request/test/express.post.js +148 -0
  813. package/my_template/node_modules/native-request/test/get.cookies.js +72 -0
  814. package/my_template/node_modules/native-request/test/get.js +140 -0
  815. package/my_template/node_modules/native-request/test/post.cookies.js +72 -0
  816. package/my_template/node_modules/native-request/test/post.js +155 -0
  817. package/my_template/node_modules/path-parse/LICENSE +21 -0
  818. package/my_template/node_modules/path-parse/README.md +42 -0
  819. package/my_template/node_modules/path-parse/index.js +75 -0
  820. package/my_template/node_modules/path-parse/package.json +33 -0
  821. package/my_template/node_modules/pify/index.js +68 -0
  822. package/my_template/node_modules/pify/license +9 -0
  823. package/my_template/node_modules/pify/package.json +51 -0
  824. package/my_template/node_modules/pify/readme.md +145 -0
  825. package/my_template/node_modules/prr/.jshintrc +61 -0
  826. package/my_template/node_modules/prr/.travis.yml +10 -0
  827. package/my_template/node_modules/prr/LICENSE.md +11 -0
  828. package/my_template/node_modules/prr/README.md +47 -0
  829. package/my_template/node_modules/prr/package.json +26 -0
  830. package/my_template/node_modules/prr/prr.js +63 -0
  831. package/my_template/node_modules/prr/test.js +169 -0
  832. package/my_template/node_modules/resolve/.editorconfig +37 -0
  833. package/my_template/node_modules/resolve/.eslintrc +65 -0
  834. package/my_template/node_modules/resolve/.github/FUNDING.yml +12 -0
  835. package/my_template/node_modules/resolve/LICENSE +21 -0
  836. package/my_template/node_modules/resolve/SECURITY.md +3 -0
  837. package/my_template/node_modules/resolve/async.js +3 -0
  838. package/my_template/node_modules/resolve/bin/resolve +50 -0
  839. package/my_template/node_modules/resolve/example/async.js +5 -0
  840. package/my_template/node_modules/resolve/example/sync.js +3 -0
  841. package/my_template/node_modules/resolve/index.js +6 -0
  842. package/my_template/node_modules/resolve/lib/async.js +329 -0
  843. package/my_template/node_modules/resolve/lib/caller.js +8 -0
  844. package/my_template/node_modules/resolve/lib/core.js +12 -0
  845. package/my_template/node_modules/resolve/lib/core.json +158 -0
  846. package/my_template/node_modules/resolve/lib/homedir.js +24 -0
  847. package/my_template/node_modules/resolve/lib/is-core.js +5 -0
  848. package/my_template/node_modules/resolve/lib/node-modules-paths.js +42 -0
  849. package/my_template/node_modules/resolve/lib/normalize-options.js +10 -0
  850. package/my_template/node_modules/resolve/lib/sync.js +208 -0
  851. package/my_template/node_modules/resolve/package.json +72 -0
  852. package/my_template/node_modules/resolve/readme.markdown +301 -0
  853. package/my_template/node_modules/resolve/sync.js +3 -0
  854. package/my_template/node_modules/resolve/test/core.js +88 -0
  855. package/my_template/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  856. package/my_template/node_modules/resolve/test/dotdot/index.js +1 -0
  857. package/my_template/node_modules/resolve/test/dotdot.js +29 -0
  858. package/my_template/node_modules/resolve/test/faulty_basedir.js +29 -0
  859. package/my_template/node_modules/resolve/test/filter.js +34 -0
  860. package/my_template/node_modules/resolve/test/filter_sync.js +33 -0
  861. package/my_template/node_modules/resolve/test/home_paths.js +127 -0
  862. package/my_template/node_modules/resolve/test/home_paths_sync.js +114 -0
  863. package/my_template/node_modules/resolve/test/mock.js +315 -0
  864. package/my_template/node_modules/resolve/test/mock_sync.js +214 -0
  865. package/my_template/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  866. package/my_template/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  867. package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  868. package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  869. package/my_template/node_modules/resolve/test/module_dir.js +56 -0
  870. package/my_template/node_modules/resolve/test/node-modules-paths.js +143 -0
  871. package/my_template/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  872. package/my_template/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  873. package/my_template/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  874. package/my_template/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  875. package/my_template/node_modules/resolve/test/node_path.js +70 -0
  876. package/my_template/node_modules/resolve/test/nonstring.js +9 -0
  877. package/my_template/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  878. package/my_template/node_modules/resolve/test/pathfilter.js +75 -0
  879. package/my_template/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  880. package/my_template/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  881. package/my_template/node_modules/resolve/test/precedence/aaa.js +1 -0
  882. package/my_template/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  883. package/my_template/node_modules/resolve/test/precedence/bbb.js +1 -0
  884. package/my_template/node_modules/resolve/test/precedence.js +23 -0
  885. package/my_template/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  886. package/my_template/node_modules/resolve/test/resolver/baz/package.json +4 -0
  887. package/my_template/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  888. package/my_template/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  889. package/my_template/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  890. package/my_template/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  891. package/my_template/node_modules/resolve/test/resolver/cup.coffee +1 -0
  892. package/my_template/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  893. package/my_template/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  894. package/my_template/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  895. package/my_template/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  896. package/my_template/node_modules/resolve/test/resolver/false_main/index.js +0 -0
  897. package/my_template/node_modules/resolve/test/resolver/false_main/package.json +4 -0
  898. package/my_template/node_modules/resolve/test/resolver/foo.js +1 -0
  899. package/my_template/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  900. package/my_template/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  901. package/my_template/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  902. package/my_template/node_modules/resolve/test/resolver/mug.coffee +0 -0
  903. package/my_template/node_modules/resolve/test/resolver/mug.js +0 -0
  904. package/my_template/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  905. package/my_template/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  906. package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  907. package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  908. package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  909. package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  910. package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
  911. package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
  912. package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
  913. package/my_template/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  914. package/my_template/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  915. package/my_template/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  916. package/my_template/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  917. package/my_template/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  918. package/my_template/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  919. package/my_template/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  920. package/my_template/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
  921. package/my_template/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
  922. package/my_template/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  923. package/my_template/node_modules/resolve/test/resolver.js +597 -0
  924. package/my_template/node_modules/resolve/test/resolver_sync.js +730 -0
  925. package/my_template/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  926. package/my_template/node_modules/resolve/test/shadowed_core.js +54 -0
  927. package/my_template/node_modules/resolve/test/subdirs.js +13 -0
  928. package/my_template/node_modules/resolve/test/symlinks.js +176 -0
  929. package/my_template/node_modules/rollup/CHANGELOG.md +3084 -0
  930. package/my_template/node_modules/rollup/LICENSE.md +578 -0
  931. package/my_template/node_modules/rollup/README.md +138 -0
  932. package/my_template/node_modules/rollup/dist/bin/rollup +1457 -0
  933. package/my_template/node_modules/rollup/dist/rollup.browser.es.js +25 -0
  934. package/my_template/node_modules/rollup/dist/rollup.browser.js +26 -0
  935. package/my_template/node_modules/rollup/dist/rollup.d.ts +656 -0
  936. package/my_template/node_modules/rollup/dist/rollup.es.js +17493 -0
  937. package/my_template/node_modules/rollup/dist/rollup.js +29 -0
  938. package/my_template/node_modules/rollup/dist/shared/index.js +321 -0
  939. package/my_template/node_modules/rollup/dist/shared/node-entry.js +17504 -0
  940. package/my_template/node_modules/rollup/package.json +139 -0
  941. package/my_template/node_modules/rollup-plugin-node-resolve/CHANGELOG.md +195 -0
  942. package/my_template/node_modules/rollup-plugin-node-resolve/README.md +135 -0
  943. package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +425 -0
  944. package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +421 -0
  945. package/my_template/node_modules/rollup-plugin-node-resolve/index.d.ts +100 -0
  946. package/my_template/node_modules/rollup-plugin-node-resolve/package.json +60 -0
  947. package/my_template/node_modules/rollup-plugin-node-resolve/src/index.js +358 -0
  948. package/my_template/node_modules/rollup-plugin-uglify/LICENSE +20 -0
  949. package/my_template/node_modules/rollup-plugin-uglify/README.md +84 -0
  950. package/my_template/node_modules/rollup-plugin-uglify/index.js +51 -0
  951. package/my_template/node_modules/rollup-plugin-uglify/package.json +43 -0
  952. package/my_template/node_modules/rollup-plugin-uglify/transform.js +13 -0
  953. package/my_template/node_modules/rollup-pluginutils/CHANGELOG.md +125 -0
  954. package/my_template/node_modules/rollup-pluginutils/README.md +169 -0
  955. package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +3292 -0
  956. package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.d.ts +39 -0
  957. package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.es.js +3280 -0
  958. package/my_template/node_modules/rollup-pluginutils/package.json +57 -0
  959. package/my_template/node_modules/rollup-pluginutils/src/addExtension.ts +9 -0
  960. package/my_template/node_modules/rollup-pluginutils/src/attachScopes.ts +125 -0
  961. package/my_template/node_modules/rollup-pluginutils/src/createFilter.ts +52 -0
  962. package/my_template/node_modules/rollup-pluginutils/src/dataToEsm.ts +92 -0
  963. package/my_template/node_modules/rollup-pluginutils/src/extractAssignedNames.ts +46 -0
  964. package/my_template/node_modules/rollup-pluginutils/src/index.ts +6 -0
  965. package/my_template/node_modules/rollup-pluginutils/src/makeLegalIdentifier.ts +21 -0
  966. package/my_template/node_modules/rollup-pluginutils/src/pluginutils.d.ts +39 -0
  967. package/my_template/node_modules/rollup-pluginutils/src/utils/ensureArray.ts +5 -0
  968. package/my_template/node_modules/semver/LICENSE +15 -0
  969. package/my_template/node_modules/semver/README.md +412 -0
  970. package/my_template/node_modules/semver/bin/semver +160 -0
  971. package/my_template/node_modules/semver/package.json +38 -0
  972. package/my_template/node_modules/semver/range.bnf +16 -0
  973. package/my_template/node_modules/semver/semver.js +1525 -0
  974. package/my_template/node_modules/serialize-javascript/LICENSE +27 -0
  975. package/my_template/node_modules/serialize-javascript/README.md +143 -0
  976. package/my_template/node_modules/serialize-javascript/index.js +210 -0
  977. package/my_template/node_modules/serialize-javascript/package.json +33 -0
  978. package/my_template/node_modules/source-map/CHANGELOG.md +301 -0
  979. package/my_template/node_modules/source-map/LICENSE +28 -0
  980. package/my_template/node_modules/source-map/README.md +742 -0
  981. package/my_template/node_modules/source-map/dist/source-map.debug.js +3234 -0
  982. package/my_template/node_modules/source-map/dist/source-map.js +3233 -0
  983. package/my_template/node_modules/source-map/dist/source-map.min.js +2 -0
  984. package/my_template/node_modules/source-map/dist/source-map.min.js.map +1 -0
  985. package/my_template/node_modules/source-map/lib/array-set.js +121 -0
  986. package/my_template/node_modules/source-map/lib/base64-vlq.js +140 -0
  987. package/my_template/node_modules/source-map/lib/base64.js +67 -0
  988. package/my_template/node_modules/source-map/lib/binary-search.js +111 -0
  989. package/my_template/node_modules/source-map/lib/mapping-list.js +79 -0
  990. package/my_template/node_modules/source-map/lib/quick-sort.js +114 -0
  991. package/my_template/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  992. package/my_template/node_modules/source-map/lib/source-map-generator.js +425 -0
  993. package/my_template/node_modules/source-map/lib/source-node.js +413 -0
  994. package/my_template/node_modules/source-map/lib/util.js +488 -0
  995. package/my_template/node_modules/source-map/package.json +73 -0
  996. package/my_template/node_modules/source-map/source-map.d.ts +98 -0
  997. package/my_template/node_modules/source-map/source-map.js +8 -0
  998. package/my_template/node_modules/supports-color/browser.js +5 -0
  999. package/my_template/node_modules/supports-color/index.js +131 -0
  1000. package/my_template/node_modules/supports-color/license +9 -0
  1001. package/my_template/node_modules/supports-color/package.json +53 -0
  1002. package/my_template/node_modules/supports-color/readme.md +66 -0
  1003. package/my_template/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
  1004. package/my_template/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
  1005. package/my_template/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
  1006. package/my_template/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
  1007. package/my_template/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
  1008. package/my_template/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
  1009. package/my_template/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
  1010. package/my_template/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
  1011. package/my_template/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
  1012. package/my_template/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
  1013. package/my_template/node_modules/tslib/CopyrightNotice.txt +15 -0
  1014. package/my_template/node_modules/tslib/LICENSE.txt +12 -0
  1015. package/my_template/node_modules/tslib/README.md +142 -0
  1016. package/my_template/node_modules/tslib/modules/index.js +51 -0
  1017. package/my_template/node_modules/tslib/modules/package.json +3 -0
  1018. package/my_template/node_modules/tslib/package.json +37 -0
  1019. package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js +23 -0
  1020. package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json +6 -0
  1021. package/my_template/node_modules/tslib/tslib.d.ts +37 -0
  1022. package/my_template/node_modules/tslib/tslib.es6.html +1 -0
  1023. package/my_template/node_modules/tslib/tslib.es6.js +218 -0
  1024. package/my_template/node_modules/tslib/tslib.html +1 -0
  1025. package/my_template/node_modules/tslib/tslib.js +284 -0
  1026. package/my_template/node_modules/uglify-js/LICENSE +29 -0
  1027. package/my_template/node_modules/uglify-js/README.md +1478 -0
  1028. package/my_template/node_modules/uglify-js/bin/uglifyjs +605 -0
  1029. package/my_template/node_modules/uglify-js/lib/ast.js +2356 -0
  1030. package/my_template/node_modules/uglify-js/lib/compress.js +14241 -0
  1031. package/my_template/node_modules/uglify-js/lib/minify.js +276 -0
  1032. package/my_template/node_modules/uglify-js/lib/mozilla-ast.js +1310 -0
  1033. package/my_template/node_modules/uglify-js/lib/output.js +1956 -0
  1034. package/my_template/node_modules/uglify-js/lib/parse.js +2585 -0
  1035. package/my_template/node_modules/uglify-js/lib/propmangle.js +328 -0
  1036. package/my_template/node_modules/uglify-js/lib/scope.js +866 -0
  1037. package/my_template/node_modules/uglify-js/lib/sourcemap.js +195 -0
  1038. package/my_template/node_modules/uglify-js/lib/transform.js +250 -0
  1039. package/my_template/node_modules/uglify-js/lib/utils.js +287 -0
  1040. package/my_template/node_modules/uglify-js/package.json +56 -0
  1041. package/my_template/node_modules/uglify-js/tools/domprops.html +456 -0
  1042. package/my_template/node_modules/uglify-js/tools/domprops.json +8325 -0
  1043. package/my_template/node_modules/uglify-js/tools/exports.js +8 -0
  1044. package/my_template/node_modules/uglify-js/tools/node.js +110 -0
  1045. package/my_template/node_modules/uglify-js/tools/tty.js +22 -0
  1046. package/my_template/node_modules/undici-types/README.md +6 -0
  1047. package/my_template/node_modules/undici-types/agent.d.ts +31 -0
  1048. package/my_template/node_modules/undici-types/api.d.ts +43 -0
  1049. package/my_template/node_modules/undici-types/balanced-pool.d.ts +18 -0
  1050. package/my_template/node_modules/undici-types/cache.d.ts +36 -0
  1051. package/my_template/node_modules/undici-types/client.d.ts +97 -0
  1052. package/my_template/node_modules/undici-types/connector.d.ts +34 -0
  1053. package/my_template/node_modules/undici-types/content-type.d.ts +21 -0
  1054. package/my_template/node_modules/undici-types/cookies.d.ts +28 -0
  1055. package/my_template/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  1056. package/my_template/node_modules/undici-types/dispatcher.d.ts +241 -0
  1057. package/my_template/node_modules/undici-types/errors.d.ts +128 -0
  1058. package/my_template/node_modules/undici-types/fetch.d.ts +209 -0
  1059. package/my_template/node_modules/undici-types/file.d.ts +39 -0
  1060. package/my_template/node_modules/undici-types/filereader.d.ts +54 -0
  1061. package/my_template/node_modules/undici-types/formdata.d.ts +108 -0
  1062. package/my_template/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  1063. package/my_template/node_modules/undici-types/global-origin.d.ts +7 -0
  1064. package/my_template/node_modules/undici-types/handlers.d.ts +9 -0
  1065. package/my_template/node_modules/undici-types/header.d.ts +4 -0
  1066. package/my_template/node_modules/undici-types/index.d.ts +63 -0
  1067. package/my_template/node_modules/undici-types/interceptors.d.ts +5 -0
  1068. package/my_template/node_modules/undici-types/mock-agent.d.ts +50 -0
  1069. package/my_template/node_modules/undici-types/mock-client.d.ts +25 -0
  1070. package/my_template/node_modules/undici-types/mock-errors.d.ts +12 -0
  1071. package/my_template/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  1072. package/my_template/node_modules/undici-types/mock-pool.d.ts +25 -0
  1073. package/my_template/node_modules/undici-types/package.json +55 -0
  1074. package/my_template/node_modules/undici-types/patch.d.ts +71 -0
  1075. package/my_template/node_modules/undici-types/pool-stats.d.ts +19 -0
  1076. package/my_template/node_modules/undici-types/pool.d.ts +28 -0
  1077. package/my_template/node_modules/undici-types/proxy-agent.d.ts +30 -0
  1078. package/my_template/node_modules/undici-types/readable.d.ts +61 -0
  1079. package/my_template/node_modules/undici-types/webidl.d.ts +220 -0
  1080. package/my_template/node_modules/undici-types/websocket.d.ts +131 -0
  1081. package/package.json +1 -1
  1082. package/server/comms_js.js +1 -0
  1083. package/server/index.js +3 -3
  1084. package/site/images/icon-add-folder.svg +5 -0
  1085. package/site/images/icon-all-projects.svg +3 -0
  1086. package/site/images/icon-folder.svg +3 -0
  1087. package/site/images/icon-search.svg +5 -0
  1088. package/site/images/icon-shared-projects.svg +10 -0
  1089. package/site/images/onboarding-tour-story-duplicate-slide.png +0 -0
  1090. package/site/images/onboarding-tour-white-story.gif +0 -0
  1091. package/site/images/story-onboarding-tour-legend.gif +0 -0
  1092. package/site/script.js +2 -2
  1093. package/site/sdk.css +2 -2
  1094. package/tsconfig.json +10 -0
  1095. package/utils/state.js +0 -152
@@ -0,0 +1,1956 @@
1
+ /***********************************************************************
2
+
3
+ A JavaScript tokenizer / parser / beautifier / compressor.
4
+ https://github.com/mishoo/UglifyJS
5
+
6
+ -------------------------------- (C) ---------------------------------
7
+
8
+ Author: Mihai Bazon
9
+ <mihai.bazon@gmail.com>
10
+ http://mihai.bazon.net/blog
11
+
12
+ Distributed under the BSD license:
13
+
14
+ Copyright 2012 (c) Mihai Bazon <mihai.bazon@gmail.com>
15
+
16
+ Redistribution and use in source and binary forms, with or without
17
+ modification, are permitted provided that the following conditions
18
+ are met:
19
+
20
+ * Redistributions of source code must retain the above
21
+ copyright notice, this list of conditions and the following
22
+ disclaimer.
23
+
24
+ * Redistributions in binary form must reproduce the above
25
+ copyright notice, this list of conditions and the following
26
+ disclaimer in the documentation and/or other materials
27
+ provided with the distribution.
28
+
29
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
30
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
33
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
34
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
38
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
39
+ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40
+ SUCH DAMAGE.
41
+
42
+ ***********************************************************************/
43
+
44
+ "use strict";
45
+
46
+ function is_some_comments(comment) {
47
+ // multiline comment
48
+ return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value);
49
+ }
50
+
51
+ function OutputStream(options) {
52
+ options = defaults(options, {
53
+ annotations : false,
54
+ ascii_only : false,
55
+ beautify : false,
56
+ braces : false,
57
+ comments : false,
58
+ extendscript : false,
59
+ galio : false,
60
+ ie : false,
61
+ indent_level : 4,
62
+ indent_start : 0,
63
+ inline_script : true,
64
+ keep_quoted_props: false,
65
+ max_line_len : false,
66
+ preamble : null,
67
+ preserve_line : false,
68
+ quote_keys : false,
69
+ quote_style : 0,
70
+ semicolons : true,
71
+ shebang : true,
72
+ source_map : null,
73
+ v8 : false,
74
+ webkit : false,
75
+ width : 80,
76
+ wrap_iife : false,
77
+ }, true);
78
+
79
+ // Convert comment option to RegExp if necessary and set up comments filter
80
+ var comment_filter = return_false; // Default case, throw all comments away
81
+ if (options.comments) {
82
+ var comments = options.comments;
83
+ if (typeof options.comments === "string" && /^\/.*\/[a-zA-Z]*$/.test(options.comments)) {
84
+ var regex_pos = options.comments.lastIndexOf("/");
85
+ comments = new RegExp(
86
+ options.comments.substr(1, regex_pos - 1),
87
+ options.comments.substr(regex_pos + 1)
88
+ );
89
+ }
90
+ if (comments instanceof RegExp) {
91
+ comment_filter = function(comment) {
92
+ return comment.type != "comment5" && comments.test(comment.value);
93
+ };
94
+ } else if (typeof comments === "function") {
95
+ comment_filter = function(comment) {
96
+ return comment.type != "comment5" && comments(this, comment);
97
+ };
98
+ } else if (comments === "some") {
99
+ comment_filter = is_some_comments;
100
+ } else { // NOTE includes "all" option
101
+ comment_filter = return_true;
102
+ }
103
+ }
104
+
105
+ function make_indent(value) {
106
+ if (typeof value == "number") return new Array(value + 1).join(" ");
107
+ if (!value) return "";
108
+ if (!/^\s*$/.test(value)) throw new Error("unsupported indentation: " + JSON.stringify("" + value));
109
+ return value;
110
+ }
111
+
112
+ var current_col = 0;
113
+ var current_line = 1;
114
+ var current_indent = make_indent(options.indent_start);
115
+ var full_indent = make_indent(options.indent_level);
116
+ var half_indent = full_indent.length + 1 >> 1;
117
+ var last;
118
+ var line_end = 0;
119
+ var line_fixed = true;
120
+ var mappings = options.source_map && [];
121
+ var mapping_name;
122
+ var mapping_token;
123
+ var might_need_space;
124
+ var might_need_semicolon;
125
+ var need_newline_indented = false;
126
+ var need_space = false;
127
+ var output;
128
+ var stack;
129
+ var stored = "";
130
+
131
+ function reset() {
132
+ last = "";
133
+ might_need_space = false;
134
+ might_need_semicolon = false;
135
+ stack = [];
136
+ var str = output;
137
+ output = "";
138
+ return str;
139
+ }
140
+
141
+ reset();
142
+ var to_utf8 = options.ascii_only ? function(str, identifier) {
143
+ if (identifier) str = str.replace(/[\ud800-\udbff][\udc00-\udfff]/g, function(ch) {
144
+ return "\\u{" + (ch.charCodeAt(0) - 0xd7c0 << 10 | ch.charCodeAt(1) - 0xdc00).toString(16) + "}";
145
+ });
146
+ return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) {
147
+ var code = ch.charCodeAt(0).toString(16);
148
+ if (code.length <= 2 && !identifier) {
149
+ while (code.length < 2) code = "0" + code;
150
+ return "\\x" + code;
151
+ } else {
152
+ while (code.length < 4) code = "0" + code;
153
+ return "\\u" + code;
154
+ }
155
+ });
156
+ } : function(str) {
157
+ var s = "";
158
+ for (var i = 0, j = 0; i < str.length; i++) {
159
+ var code = str.charCodeAt(i);
160
+ if (is_surrogate_pair_head(code)) {
161
+ if (is_surrogate_pair_tail(str.charCodeAt(i + 1))) {
162
+ i++;
163
+ continue;
164
+ }
165
+ } else if (!is_surrogate_pair_tail(code)) {
166
+ continue;
167
+ }
168
+ s += str.slice(j, i) + "\\u" + code.toString(16);
169
+ j = i + 1;
170
+ }
171
+ return j == 0 ? str : s + str.slice(j);
172
+ };
173
+
174
+ function quote_single(str) {
175
+ return "'" + str.replace(/\x27/g, "\\'") + "'";
176
+ }
177
+
178
+ function quote_double(str) {
179
+ return '"' + str.replace(/\x22/g, '\\"') + '"';
180
+ }
181
+
182
+ var quote_string = [
183
+ null,
184
+ quote_single,
185
+ quote_double,
186
+ function(str, quote) {
187
+ return quote == "'" ? quote_single(str) : quote_double(str);
188
+ },
189
+ ][options.quote_style] || function(str, quote, dq, sq) {
190
+ return dq > sq ? quote_single(str) : quote_double(str);
191
+ };
192
+
193
+ function make_string(str, quote) {
194
+ var dq = 0, sq = 0;
195
+ str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s, i) {
196
+ switch (s) {
197
+ case '"': ++dq; return '"';
198
+ case "'": ++sq; return "'";
199
+ case "\\": return "\\\\";
200
+ case "\n": return "\\n";
201
+ case "\r": return "\\r";
202
+ case "\t": return "\\t";
203
+ case "\b": return "\\b";
204
+ case "\f": return "\\f";
205
+ case "\x0B": return options.ie ? "\\x0B" : "\\v";
206
+ case "\u2028": return "\\u2028";
207
+ case "\u2029": return "\\u2029";
208
+ case "\ufeff": return "\\ufeff";
209
+ case "\0":
210
+ return /[0-9]/.test(str.charAt(i+1)) ? "\\x00" : "\\0";
211
+ }
212
+ return s;
213
+ });
214
+ return quote_string(to_utf8(str), quote, dq, sq);
215
+ }
216
+
217
+ /* -----[ beautification/minification ]----- */
218
+
219
+ var adjust_mappings = mappings ? function(line, col) {
220
+ mappings.forEach(function(mapping) {
221
+ mapping.line += line;
222
+ mapping.col += col;
223
+ });
224
+ } : noop;
225
+
226
+ var flush_mappings = mappings ? function() {
227
+ mappings.forEach(function(mapping) {
228
+ options.source_map.add(
229
+ mapping.token.file,
230
+ mapping.line, mapping.col,
231
+ mapping.token.line, mapping.token.col,
232
+ !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name
233
+ );
234
+ });
235
+ mappings = [];
236
+ } : noop;
237
+
238
+ function insert_newlines(count) {
239
+ stored += output.slice(0, line_end);
240
+ output = output.slice(line_end);
241
+ var new_col = output.length;
242
+ adjust_mappings(count, new_col - current_col);
243
+ current_line += count;
244
+ current_col = new_col;
245
+ while (count--) stored += "\n";
246
+ }
247
+
248
+ var fix_line = options.max_line_len ? function(flush) {
249
+ if (line_fixed) {
250
+ if (current_col > options.max_line_len) {
251
+ AST_Node.warn("Output exceeds {max_line_len} characters", options);
252
+ }
253
+ return;
254
+ }
255
+ if (current_col > options.max_line_len) {
256
+ insert_newlines(1);
257
+ line_fixed = true;
258
+ }
259
+ if (line_fixed || flush) flush_mappings();
260
+ } : noop;
261
+
262
+ var require_semicolon = makePredicate("( [ + * / - , .");
263
+
264
+ function require_space(prev, ch, str) {
265
+ return is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\")
266
+ || (ch == "/" && ch == prev)
267
+ || ((ch == "+" || ch == "-") && ch == last)
268
+ || last == "--" && ch == ">"
269
+ || last == "!" && str == "--"
270
+ || prev == "/" && (str == "in" || str == "instanceof");
271
+ }
272
+
273
+ var print = options.beautify
274
+ || options.comments
275
+ || options.max_line_len
276
+ || options.preserve_line
277
+ || options.shebang
278
+ || !options.semicolons
279
+ || options.source_map
280
+ || options.width ? function(str) {
281
+ var ch = str.charAt(0);
282
+ if (need_newline_indented && ch) {
283
+ need_newline_indented = false;
284
+ if (ch != "\n") {
285
+ print("\n");
286
+ indent();
287
+ }
288
+ }
289
+ if (need_space && ch) {
290
+ need_space = false;
291
+ if (!/[\s;})]/.test(ch)) {
292
+ space();
293
+ }
294
+ }
295
+ var prev = last.slice(-1);
296
+ if (might_need_semicolon) {
297
+ might_need_semicolon = false;
298
+ if (prev == ":" && ch == "}" || prev != ";" && (!ch || ";}".indexOf(ch) < 0)) {
299
+ var need_semicolon = require_semicolon[ch];
300
+ if (need_semicolon || options.semicolons) {
301
+ output += ";";
302
+ current_col++;
303
+ if (!line_fixed) {
304
+ fix_line();
305
+ if (line_fixed && !need_semicolon && output == ";") {
306
+ output = "";
307
+ current_col = 0;
308
+ }
309
+ }
310
+ if (line_end == output.length - 1) line_end++;
311
+ } else {
312
+ fix_line();
313
+ output += "\n";
314
+ current_line++;
315
+ current_col = 0;
316
+ // reset the semicolon flag, since we didn't print one
317
+ // now and might still have to later
318
+ if (/^\s+$/.test(str)) might_need_semicolon = true;
319
+ }
320
+ if (!options.beautify) might_need_space = false;
321
+ }
322
+ }
323
+
324
+ if (might_need_space) {
325
+ if (require_space(prev, ch, str)) {
326
+ output += " ";
327
+ current_col++;
328
+ }
329
+ if (prev != "<" || str != "!") might_need_space = false;
330
+ }
331
+
332
+ if (mapping_token) {
333
+ mappings.push({
334
+ token: mapping_token,
335
+ name: mapping_name,
336
+ line: current_line,
337
+ col: current_col,
338
+ });
339
+ mapping_token = false;
340
+ if (line_fixed) flush_mappings();
341
+ }
342
+
343
+ output += str;
344
+ var a = str.split(/\r?\n/), n = a.length - 1;
345
+ current_line += n;
346
+ current_col += a[0].length;
347
+ if (n > 0) {
348
+ fix_line();
349
+ current_col = a[n].length;
350
+ }
351
+ last = str;
352
+ } : function(str) {
353
+ var ch = str.charAt(0);
354
+ var prev = last.slice(-1);
355
+ if (might_need_semicolon) {
356
+ might_need_semicolon = false;
357
+ if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") {
358
+ output += ";";
359
+ might_need_space = false;
360
+ }
361
+ }
362
+ if (might_need_space) {
363
+ if (require_space(prev, ch, str)) output += " ";
364
+ if (prev != "<" || str != "!") might_need_space = false;
365
+ }
366
+ output += str;
367
+ last = str;
368
+ };
369
+
370
+ var space = options.beautify ? function() {
371
+ print(" ");
372
+ } : function() {
373
+ might_need_space = true;
374
+ };
375
+
376
+ var indent = options.beautify ? function(half) {
377
+ if (need_newline_indented) print("\n");
378
+ print(half ? current_indent.slice(0, -half_indent) : current_indent);
379
+ } : noop;
380
+
381
+ var with_indent = options.beautify ? function(cont) {
382
+ var save_indentation = current_indent;
383
+ current_indent += full_indent;
384
+ cont();
385
+ current_indent = save_indentation;
386
+ } : function(cont) { cont() };
387
+
388
+ var may_add_newline = options.max_line_len || options.preserve_line ? function() {
389
+ fix_line();
390
+ line_end = output.length;
391
+ line_fixed = false;
392
+ } : noop;
393
+
394
+ var newline = options.beautify ? function() {
395
+ print("\n");
396
+ line_end = output.length;
397
+ } : may_add_newline;
398
+
399
+ var semicolon = options.beautify ? function() {
400
+ print(";");
401
+ } : function() {
402
+ might_need_semicolon = true;
403
+ };
404
+
405
+ function force_semicolon() {
406
+ if (might_need_semicolon) print(";");
407
+ print(";");
408
+ }
409
+
410
+ function with_block(cont, end) {
411
+ print("{");
412
+ newline();
413
+ with_indent(cont);
414
+ add_mapping(end);
415
+ indent();
416
+ print("}");
417
+ }
418
+
419
+ function with_parens(cont) {
420
+ print("(");
421
+ may_add_newline();
422
+ cont();
423
+ may_add_newline();
424
+ print(")");
425
+ }
426
+
427
+ function with_square(cont) {
428
+ print("[");
429
+ may_add_newline();
430
+ cont();
431
+ may_add_newline();
432
+ print("]");
433
+ }
434
+
435
+ function comma() {
436
+ may_add_newline();
437
+ print(",");
438
+ may_add_newline();
439
+ space();
440
+ }
441
+
442
+ function colon() {
443
+ print(":");
444
+ space();
445
+ }
446
+
447
+ var add_mapping = mappings ? function(token, name) {
448
+ mapping_token = token;
449
+ mapping_name = name;
450
+ } : noop;
451
+
452
+ function get() {
453
+ if (!line_fixed) fix_line(true);
454
+ return stored + output;
455
+ }
456
+
457
+ function has_nlb() {
458
+ return /(^|\n) *$/.test(output);
459
+ }
460
+
461
+ function pad_comment(token, force) {
462
+ if (need_newline_indented) return;
463
+ if (token.nlb && (force || !has_nlb())) {
464
+ need_newline_indented = true;
465
+ } else if (force) {
466
+ need_space = true;
467
+ }
468
+ }
469
+
470
+ function print_comment(comment) {
471
+ var value = comment.value.replace(/[@#]__PURE__/g, " ");
472
+ if (/^\s*$/.test(value) && !/^\s*$/.test(comment.value)) return false;
473
+ if (/comment[134]/.test(comment.type)) {
474
+ print("//" + value);
475
+ need_newline_indented = true;
476
+ } else if (comment.type == "comment2") {
477
+ print("/*" + value + "*/");
478
+ }
479
+ return true;
480
+ }
481
+
482
+ function should_merge_comments(node, parent) {
483
+ if (parent instanceof AST_Binary) return parent.left === node;
484
+ if (parent.TYPE == "Call") return parent.expression === node;
485
+ if (parent instanceof AST_Conditional) return parent.condition === node;
486
+ if (parent instanceof AST_Dot) return parent.expression === node;
487
+ if (parent instanceof AST_Exit) return true;
488
+ if (parent instanceof AST_Sequence) return parent.expressions[0] === node;
489
+ if (parent instanceof AST_Sub) return parent.expression === node;
490
+ if (parent instanceof AST_UnaryPostfix) return true;
491
+ if (parent instanceof AST_Yield) return true;
492
+ }
493
+
494
+ function prepend_comments(node) {
495
+ var self = this;
496
+ var scan;
497
+ if (node instanceof AST_Exit) {
498
+ scan = node.value;
499
+ } else if (node instanceof AST_Yield) {
500
+ scan = node.expression;
501
+ }
502
+ var comments = dump(node);
503
+ if (!comments) comments = [];
504
+
505
+ if (scan) {
506
+ var tw = new TreeWalker(function(node) {
507
+ if (!should_merge_comments(node, tw.parent())) return true;
508
+ var before = dump(node);
509
+ if (before) comments = comments.concat(before);
510
+ });
511
+ tw.push(node);
512
+ scan.walk(tw);
513
+ }
514
+
515
+ if (current_line == 1 && current_col == 0) {
516
+ if (comments.length > 0 && options.shebang && comments[0].type == "comment5") {
517
+ print("#!" + comments.shift().value + "\n");
518
+ indent();
519
+ }
520
+ var preamble = options.preamble;
521
+ if (preamble) print(preamble.replace(/\r\n?|\u2028|\u2029|(^|\S)\s*$/g, "$1\n"));
522
+ }
523
+
524
+ comments = comments.filter(comment_filter, node);
525
+ var printed = false;
526
+ comments.forEach(function(comment, index) {
527
+ pad_comment(comment, index);
528
+ if (print_comment(comment)) printed = true;
529
+ });
530
+ if (printed) pad_comment(node.start, true);
531
+
532
+ function dump(node) {
533
+ var token = node.start;
534
+ if (!token) {
535
+ if (!scan) return;
536
+ node.start = token = new AST_Token();
537
+ }
538
+ var comments = token.comments_before;
539
+ if (!comments) {
540
+ if (!scan) return;
541
+ token.comments_before = comments = [];
542
+ }
543
+ if (comments._dumped === self) return;
544
+ comments._dumped = self;
545
+ return comments;
546
+ }
547
+ }
548
+
549
+ function append_comments(node, tail) {
550
+ var self = this;
551
+ var token = node.end;
552
+ if (!token) return;
553
+ var comments = token[tail ? "comments_before" : "comments_after"];
554
+ if (!comments || comments._dumped === self) return;
555
+ if (!(node instanceof AST_Statement || all(comments, function(c) {
556
+ return !/comment[134]/.test(c.type);
557
+ }))) return;
558
+ comments._dumped = self;
559
+ comments.filter(comment_filter, node).forEach(function(comment, index) {
560
+ pad_comment(comment, index || !tail);
561
+ print_comment(comment);
562
+ });
563
+ }
564
+
565
+ return {
566
+ get : get,
567
+ reset : reset,
568
+ indent : indent,
569
+ should_break : options.beautify && options.width ? function() {
570
+ return current_col >= options.width;
571
+ } : return_false,
572
+ has_parens : function() { return last.slice(-1) == "(" },
573
+ newline : newline,
574
+ print : print,
575
+ space : space,
576
+ comma : comma,
577
+ colon : colon,
578
+ last : function() { return last },
579
+ semicolon : semicolon,
580
+ force_semicolon : force_semicolon,
581
+ to_utf8 : to_utf8,
582
+ print_name : function(name) { print(to_utf8(name.toString(), true)) },
583
+ print_string : options.inline_script ? function(str, quote) {
584
+ str = make_string(str, quote).replace(/<\x2f(script)([>\/\t\n\f\r ])/gi, "<\\/$1$2");
585
+ print(str.replace(/\x3c!--/g, "\\x3c!--").replace(/--\x3e/g, "--\\x3e"));
586
+ } : function(str, quote) {
587
+ print(make_string(str, quote));
588
+ },
589
+ with_indent : with_indent,
590
+ with_block : with_block,
591
+ with_parens : with_parens,
592
+ with_square : with_square,
593
+ add_mapping : add_mapping,
594
+ option : function(opt) { return options[opt] },
595
+ prepend_comments: options.comments || options.shebang ? prepend_comments : noop,
596
+ append_comments : options.comments ? append_comments : noop,
597
+ push_node : function(node) { stack.push(node) },
598
+ pop_node : options.preserve_line ? function() {
599
+ var node = stack.pop();
600
+ if (node.start && node.start.line > current_line) {
601
+ insert_newlines(node.start.line - current_line);
602
+ }
603
+ } : function() {
604
+ stack.pop();
605
+ },
606
+ parent : function(n) {
607
+ return stack[stack.length - 2 - (n || 0)];
608
+ },
609
+ };
610
+ }
611
+
612
+ /* -----[ code generators ]----- */
613
+
614
+ (function() {
615
+
616
+ /* -----[ utils ]----- */
617
+
618
+ function DEFPRINT(nodetype, generator) {
619
+ nodetype.DEFMETHOD("_codegen", generator);
620
+ }
621
+
622
+ var use_asm = false;
623
+
624
+ AST_Node.DEFMETHOD("print", function(stream, force_parens) {
625
+ var self = this;
626
+ stream.push_node(self);
627
+ if (force_parens || self.needs_parens(stream)) {
628
+ stream.with_parens(doit);
629
+ } else {
630
+ doit();
631
+ }
632
+ stream.pop_node();
633
+
634
+ function doit() {
635
+ stream.prepend_comments(self);
636
+ self.add_source_map(stream);
637
+ self._codegen(stream);
638
+ stream.append_comments(self);
639
+ }
640
+ });
641
+ var readonly = OutputStream({
642
+ inline_script: false,
643
+ shebang: false,
644
+ width: false,
645
+ });
646
+ AST_Node.DEFMETHOD("print_to_string", function(options) {
647
+ if (options) {
648
+ var stream = OutputStream(options);
649
+ this.print(stream);
650
+ return stream.get();
651
+ }
652
+ this.print(readonly);
653
+ return readonly.reset();
654
+ });
655
+
656
+ /* -----[ PARENTHESES ]----- */
657
+
658
+ function PARENS(nodetype, func) {
659
+ nodetype.DEFMETHOD("needs_parens", func);
660
+ }
661
+
662
+ PARENS(AST_Node, return_false);
663
+
664
+ // a function expression needs parens around it when it's provably
665
+ // the first token to appear in a statement.
666
+ function needs_parens_function(output) {
667
+ var p = output.parent();
668
+ if (!output.has_parens() && first_in_statement(output, false, true)) {
669
+ // export default function() {}
670
+ // export default (function foo() {});
671
+ // export default (function() {})(foo);
672
+ // export default (function() {})`foo`;
673
+ // export default (function() {}) ? foo : bar;
674
+ return this.name || !(p instanceof AST_ExportDefault);
675
+ }
676
+ if (output.option("webkit") && p instanceof AST_PropAccess && p.expression === this) return true;
677
+ if (output.option("wrap_iife") && p instanceof AST_Call && p.expression === this) return true;
678
+ }
679
+ PARENS(AST_AsyncFunction, needs_parens_function);
680
+ PARENS(AST_AsyncGeneratorFunction, needs_parens_function);
681
+ PARENS(AST_ClassExpression, needs_parens_function);
682
+ PARENS(AST_Function, needs_parens_function);
683
+ PARENS(AST_GeneratorFunction, needs_parens_function);
684
+
685
+ // same goes for an object literal, because otherwise it would be
686
+ // interpreted as a block of code.
687
+ function needs_parens_obj(output) {
688
+ return !output.has_parens() && first_in_statement(output, true);
689
+ }
690
+ PARENS(AST_Object, needs_parens_obj);
691
+
692
+ function needs_parens_unary(output) {
693
+ var p = output.parent();
694
+ // (-x) ** y
695
+ if (p instanceof AST_Binary) return p.operator == "**" && p.left === this;
696
+ // (await x)(y)
697
+ // new (await x)
698
+ if (p instanceof AST_Call) return p.expression === this;
699
+ // class extends (x++) {}
700
+ // class x extends (typeof y) {}
701
+ if (p instanceof AST_Class) return true;
702
+ // (x++)[y]
703
+ // (typeof x).y
704
+ // https://github.com/mishoo/UglifyJS/issues/115
705
+ if (p instanceof AST_PropAccess) return p.expression === this;
706
+ // (~x)`foo`
707
+ if (p instanceof AST_Template) return p.tag === this;
708
+ }
709
+ PARENS(AST_Await, needs_parens_unary);
710
+ PARENS(AST_Unary, needs_parens_unary);
711
+
712
+ PARENS(AST_Sequence, function(output) {
713
+ var p = output.parent();
714
+ // [ 1, (2, 3), 4 ] ---> [ 1, 3, 4 ]
715
+ return p instanceof AST_Array
716
+ // () ---> (foo, bar)
717
+ || is_arrow(p) && p.value === this
718
+ // await (foo, bar)
719
+ || p instanceof AST_Await
720
+ // 1 + (2, 3) + 4 ---> 8
721
+ || p instanceof AST_Binary
722
+ // new (foo, bar) or foo(1, (2, 3), 4)
723
+ || p instanceof AST_Call
724
+ // class extends (foo, bar) {}
725
+ // class foo extends (bar, baz) {}
726
+ || p instanceof AST_Class
727
+ // class { foo = (bar, baz) }
728
+ // class { [(foo, bar)]() {} }
729
+ || p instanceof AST_ClassProperty
730
+ // (false, true) ? (a = 10, b = 20) : (c = 30)
731
+ // ---> 20 (side effect, set a := 10 and b := 20)
732
+ || p instanceof AST_Conditional
733
+ // [ a = (1, 2) ] = [] ---> a == 2
734
+ || p instanceof AST_DefaultValue
735
+ // { [(1, 2)]: foo } = bar
736
+ // { 1: (2, foo) } = bar
737
+ || p instanceof AST_DestructuredKeyVal
738
+ // export default (foo, bar)
739
+ || p instanceof AST_ExportDefault
740
+ // for (foo of (bar, baz));
741
+ || p instanceof AST_ForOf
742
+ // { [(1, 2)]: 3 }[2] ---> 3
743
+ // { foo: (1, 2) }.foo ---> 2
744
+ || p instanceof AST_ObjectProperty
745
+ // (1, {foo:2}).foo or (1, {foo:2})["foo"] ---> 2
746
+ || p instanceof AST_PropAccess && p.expression === this
747
+ // ...(foo, bar, baz)
748
+ || p instanceof AST_Spread
749
+ // (foo, bar)`baz`
750
+ || p instanceof AST_Template && p.tag === this
751
+ // !(foo, bar, baz)
752
+ || p instanceof AST_Unary
753
+ // var a = (1, 2), b = a + a; ---> b == 4
754
+ || p instanceof AST_VarDef
755
+ // yield (foo, bar)
756
+ || p instanceof AST_Yield;
757
+ });
758
+
759
+ PARENS(AST_Binary, function(output) {
760
+ var p = output.parent();
761
+ // await (foo && bar)
762
+ if (p instanceof AST_Await) return true;
763
+ // this deals with precedence:
764
+ // 3 * (2 + 1)
765
+ // 3 - (2 - 1)
766
+ // (1 ** 2) ** 3
767
+ if (p instanceof AST_Binary) {
768
+ var po = p.operator, pp = PRECEDENCE[po];
769
+ var so = this.operator, sp = PRECEDENCE[so];
770
+ return pp > sp
771
+ || po == "??" && (so == "&&" || so == "||")
772
+ || (pp == sp && this === p[po == "**" ? "left" : "right"]);
773
+ }
774
+ // (foo && bar)()
775
+ if (p instanceof AST_Call) return p.expression === this;
776
+ // class extends (foo && bar) {}
777
+ // class foo extends (bar || null) {}
778
+ if (p instanceof AST_Class) return true;
779
+ // (foo && bar)["prop"], (foo && bar).prop
780
+ if (p instanceof AST_PropAccess) return p.expression === this;
781
+ // (foo && bar)``
782
+ if (p instanceof AST_Template) return p.tag === this;
783
+ // typeof (foo && bar)
784
+ if (p instanceof AST_Unary) return true;
785
+ });
786
+
787
+ function need_chain_parens(node, parent) {
788
+ if (!node.terminal) return false;
789
+ if (!(parent instanceof AST_Call || parent instanceof AST_PropAccess)) return false;
790
+ return parent.expression === node;
791
+ }
792
+
793
+ PARENS(AST_PropAccess, function(output) {
794
+ var node = this;
795
+ var p = output.parent();
796
+ // i.e. new (foo().bar)
797
+ //
798
+ // if there's one call into this subtree, then we need
799
+ // parens around it too, otherwise the call will be
800
+ // interpreted as passing the arguments to the upper New
801
+ // expression.
802
+ if (p instanceof AST_New && p.expression === node && root_expr(node).TYPE == "Call") return true;
803
+ // (foo?.bar)()
804
+ // (foo?.bar).baz
805
+ // new (foo?.bar)()
806
+ return need_chain_parens(node, p);
807
+ });
808
+
809
+ PARENS(AST_Call, function(output) {
810
+ var node = this;
811
+ var p = output.parent();
812
+ if (p instanceof AST_New) return p.expression === node;
813
+ // https://bugs.webkit.org/show_bug.cgi?id=123506
814
+ if (output.option("webkit")
815
+ && node.expression instanceof AST_Function
816
+ && p instanceof AST_PropAccess
817
+ && p.expression === node) {
818
+ var g = output.parent(1);
819
+ if (g instanceof AST_Assign && g.left === p) return true;
820
+ }
821
+ // (foo?.())()
822
+ // (foo?.()).bar
823
+ // new (foo?.())()
824
+ return need_chain_parens(node, p);
825
+ });
826
+
827
+ PARENS(AST_New, function(output) {
828
+ if (need_constructor_parens(this, output)) return false;
829
+ var p = output.parent();
830
+ // (new foo)(bar)
831
+ if (p instanceof AST_Call) return p.expression === this;
832
+ // (new Date).getTime(), (new Date)["getTime"]()
833
+ if (p instanceof AST_PropAccess) return true;
834
+ // (new foo)`bar`
835
+ if (p instanceof AST_Template) return p.tag === this;
836
+ });
837
+
838
+ PARENS(AST_Number, function(output) {
839
+ if (!output.option("galio")) return false;
840
+ // https://github.com/mishoo/UglifyJS/pull/1009
841
+ var p = output.parent();
842
+ return p instanceof AST_PropAccess && p.expression === this && /^0/.test(make_num(this.value));
843
+ });
844
+
845
+ function needs_parens_assign_cond(self, output) {
846
+ var p = output.parent();
847
+ // await (a = foo)
848
+ if (p instanceof AST_Await) return true;
849
+ // 1 + (a = 2) + 3 → 6, side effect setting a = 2
850
+ if (p instanceof AST_Binary) return !(p instanceof AST_Assign);
851
+ // (a = func)() —or— new (a = Object)()
852
+ if (p instanceof AST_Call) return p.expression === self;
853
+ // class extends (a = foo) {}
854
+ // class foo extends (bar ? baz : moo) {}
855
+ if (p instanceof AST_Class) return true;
856
+ // (a = foo) ? bar : baz
857
+ if (p instanceof AST_Conditional) return p.condition === self;
858
+ // (a = foo)["prop"] —or— (a = foo).prop
859
+ if (p instanceof AST_PropAccess) return p.expression === self;
860
+ // (a = foo)`bar`
861
+ if (p instanceof AST_Template) return p.tag === self;
862
+ // !(a = false) → true
863
+ if (p instanceof AST_Unary) return true;
864
+ }
865
+ PARENS(AST_Arrow, function(output) {
866
+ return needs_parens_assign_cond(this, output);
867
+ });
868
+ PARENS(AST_Assign, function(output) {
869
+ if (needs_parens_assign_cond(this, output)) return true;
870
+ // v8 parser bug ---> workaround
871
+ // f([1], [a] = []) ---> f([1], ([a] = []))
872
+ if (output.option("v8")) return this.left instanceof AST_Destructured;
873
+ // ({ p: a } = o);
874
+ if (this.left instanceof AST_DestructuredObject) return needs_parens_obj(output);
875
+ });
876
+ PARENS(AST_AsyncArrow, function(output) {
877
+ return needs_parens_assign_cond(this, output);
878
+ });
879
+ PARENS(AST_Conditional, function(output) {
880
+ return needs_parens_assign_cond(this, output)
881
+ // https://github.com/mishoo/UglifyJS/issues/1144
882
+ || output.option("extendscript") && output.parent() instanceof AST_Conditional;
883
+ });
884
+ PARENS(AST_Yield, function(output) {
885
+ return needs_parens_assign_cond(this, output);
886
+ });
887
+
888
+ /* -----[ PRINTERS ]----- */
889
+
890
+ DEFPRINT(AST_Directive, function(output) {
891
+ var quote = this.quote;
892
+ var value = this.value;
893
+ switch (output.option("quote_style")) {
894
+ case 0:
895
+ case 2:
896
+ if (value.indexOf('"') == -1) quote = '"';
897
+ break;
898
+ case 1:
899
+ if (value.indexOf("'") == -1) quote = "'";
900
+ break;
901
+ }
902
+ output.print(quote + value + quote);
903
+ output.semicolon();
904
+ });
905
+ DEFPRINT(AST_Debugger, function(output) {
906
+ output.print("debugger");
907
+ output.semicolon();
908
+ });
909
+
910
+ /* -----[ statements ]----- */
911
+
912
+ function display_body(body, is_toplevel, output, allow_directives) {
913
+ var last = body.length - 1;
914
+ var in_directive = allow_directives;
915
+ var was_asm = use_asm;
916
+ body.forEach(function(stmt, i) {
917
+ if (in_directive) {
918
+ if (stmt instanceof AST_Directive) {
919
+ if (stmt.value == "use asm") use_asm = true;
920
+ } else if (!(stmt instanceof AST_EmptyStatement)) {
921
+ if (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) {
922
+ output.force_semicolon();
923
+ }
924
+ in_directive = false;
925
+ }
926
+ }
927
+ if (stmt instanceof AST_EmptyStatement) return;
928
+ output.indent();
929
+ stmt.print(output);
930
+ if (i == last && is_toplevel) return;
931
+ output.newline();
932
+ if (is_toplevel) output.newline();
933
+ });
934
+ use_asm = was_asm;
935
+ }
936
+
937
+ DEFPRINT(AST_Toplevel, function(output) {
938
+ display_body(this.body, true, output, true);
939
+ output.print("");
940
+ });
941
+ DEFPRINT(AST_LabeledStatement, function(output) {
942
+ this.label.print(output);
943
+ output.colon();
944
+ this.body.print(output);
945
+ });
946
+ DEFPRINT(AST_SimpleStatement, function(output) {
947
+ this.body.print(output);
948
+ output.semicolon();
949
+ });
950
+ function print_braced_empty(self, output) {
951
+ output.print("{");
952
+ output.with_indent(function() {
953
+ output.append_comments(self, true);
954
+ });
955
+ output.print("}");
956
+ }
957
+ function print_braced(self, output, allow_directives) {
958
+ if (self.body.length > 0) {
959
+ output.with_block(function() {
960
+ display_body(self.body, false, output, allow_directives);
961
+ }, self.end);
962
+ } else print_braced_empty(self, output);
963
+ }
964
+ DEFPRINT(AST_BlockStatement, function(output) {
965
+ print_braced(this, output);
966
+ });
967
+ DEFPRINT(AST_EmptyStatement, function(output) {
968
+ output.semicolon();
969
+ });
970
+ DEFPRINT(AST_Do, function(output) {
971
+ var self = this;
972
+ output.print("do");
973
+ make_block(self.body, output);
974
+ output.space();
975
+ output.print("while");
976
+ output.space();
977
+ output.with_parens(function() {
978
+ self.condition.print(output);
979
+ });
980
+ output.semicolon();
981
+ });
982
+ DEFPRINT(AST_While, function(output) {
983
+ var self = this;
984
+ output.print("while");
985
+ output.space();
986
+ output.with_parens(function() {
987
+ self.condition.print(output);
988
+ });
989
+ force_statement(self.body, output);
990
+ });
991
+ DEFPRINT(AST_For, function(output) {
992
+ var self = this;
993
+ output.print("for");
994
+ output.space();
995
+ output.with_parens(function() {
996
+ if (self.init) {
997
+ if (self.init instanceof AST_Definitions) {
998
+ self.init.print(output);
999
+ } else {
1000
+ parenthesize_for_no_in(self.init, output, true);
1001
+ }
1002
+ output.print(";");
1003
+ output.space();
1004
+ } else {
1005
+ output.print(";");
1006
+ }
1007
+ if (self.condition) {
1008
+ self.condition.print(output);
1009
+ output.print(";");
1010
+ output.space();
1011
+ } else {
1012
+ output.print(";");
1013
+ }
1014
+ if (self.step) {
1015
+ self.step.print(output);
1016
+ }
1017
+ });
1018
+ force_statement(self.body, output);
1019
+ });
1020
+ function print_for_enum(prefix, infix) {
1021
+ return function(output) {
1022
+ var self = this;
1023
+ output.print(prefix);
1024
+ output.space();
1025
+ output.with_parens(function() {
1026
+ self.init.print(output);
1027
+ output.space();
1028
+ output.print(infix);
1029
+ output.space();
1030
+ self.object.print(output);
1031
+ });
1032
+ force_statement(self.body, output);
1033
+ };
1034
+ }
1035
+ DEFPRINT(AST_ForAwaitOf, print_for_enum("for await", "of"));
1036
+ DEFPRINT(AST_ForIn, print_for_enum("for", "in"));
1037
+ DEFPRINT(AST_ForOf, print_for_enum("for", "of"));
1038
+ DEFPRINT(AST_With, function(output) {
1039
+ var self = this;
1040
+ output.print("with");
1041
+ output.space();
1042
+ output.with_parens(function() {
1043
+ self.expression.print(output);
1044
+ });
1045
+ force_statement(self.body, output);
1046
+ });
1047
+ DEFPRINT(AST_ExportDeclaration, function(output) {
1048
+ output.print("export");
1049
+ output.space();
1050
+ this.body.print(output);
1051
+ });
1052
+ DEFPRINT(AST_ExportDefault, function(output) {
1053
+ output.print("export");
1054
+ output.space();
1055
+ output.print("default");
1056
+ output.space();
1057
+ var body = this.body;
1058
+ body.print(output);
1059
+ if (body instanceof AST_ClassExpression) {
1060
+ if (!body.name) return;
1061
+ }
1062
+ if (body instanceof AST_DefClass) return;
1063
+ if (body instanceof AST_LambdaDefinition) return;
1064
+ if (body instanceof AST_LambdaExpression) {
1065
+ if (!body.name && !is_arrow(body)) return;
1066
+ }
1067
+ output.semicolon();
1068
+ });
1069
+ function print_alias(alias, output) {
1070
+ var value = alias.value;
1071
+ if (value == "*" || is_identifier_string(value)) {
1072
+ output.print_name(value);
1073
+ } else {
1074
+ output.print_string(value, alias.quote);
1075
+ }
1076
+ }
1077
+ DEFPRINT(AST_ExportForeign, function(output) {
1078
+ var self = this;
1079
+ output.print("export");
1080
+ output.space();
1081
+ var len = self.keys.length;
1082
+ if (len == 0) {
1083
+ print_braced_empty(self, output);
1084
+ } else if (self.keys[0].value == "*") {
1085
+ print_entry(0);
1086
+ } else output.with_block(function() {
1087
+ output.indent();
1088
+ print_entry(0);
1089
+ for (var i = 1; i < len; i++) {
1090
+ output.print(",");
1091
+ output.newline();
1092
+ output.indent();
1093
+ print_entry(i);
1094
+ }
1095
+ output.newline();
1096
+ }, self.end);
1097
+ output.space();
1098
+ output.print("from");
1099
+ output.space();
1100
+ self.path.print(output);
1101
+ output.semicolon();
1102
+
1103
+ function print_entry(index) {
1104
+ var alias = self.aliases[index];
1105
+ var key = self.keys[index];
1106
+ print_alias(key, output);
1107
+ if (alias.value != key.value) {
1108
+ output.space();
1109
+ output.print("as");
1110
+ output.space();
1111
+ print_alias(alias, output);
1112
+ }
1113
+ }
1114
+ });
1115
+ DEFPRINT(AST_ExportReferences, function(output) {
1116
+ var self = this;
1117
+ output.print("export");
1118
+ output.space();
1119
+ print_properties(self, output);
1120
+ output.semicolon();
1121
+ });
1122
+ DEFPRINT(AST_Import, function(output) {
1123
+ var self = this;
1124
+ output.print("import");
1125
+ output.space();
1126
+ if (self.default) self.default.print(output);
1127
+ if (self.all) {
1128
+ if (self.default) output.comma();
1129
+ self.all.print(output);
1130
+ }
1131
+ if (self.properties) {
1132
+ if (self.default) output.comma();
1133
+ print_properties(self, output);
1134
+ }
1135
+ if (self.all || self.default || self.properties) {
1136
+ output.space();
1137
+ output.print("from");
1138
+ output.space();
1139
+ }
1140
+ self.path.print(output);
1141
+ output.semicolon();
1142
+ });
1143
+
1144
+ /* -----[ functions ]----- */
1145
+ function print_funargs(self, output) {
1146
+ output.with_parens(function() {
1147
+ self.argnames.forEach(function(arg, i) {
1148
+ if (i) output.comma();
1149
+ arg.print(output);
1150
+ });
1151
+ if (self.rest) {
1152
+ if (self.argnames.length) output.comma();
1153
+ output.print("...");
1154
+ self.rest.print(output);
1155
+ }
1156
+ });
1157
+ }
1158
+ function print_arrow(self, output) {
1159
+ var argname = self.argnames.length == 1 && !self.rest && self.argnames[0];
1160
+ if (argname instanceof AST_SymbolFunarg && argname.name != "yield") {
1161
+ argname.print(output);
1162
+ } else {
1163
+ print_funargs(self, output);
1164
+ }
1165
+ output.space();
1166
+ output.print("=>");
1167
+ output.space();
1168
+ if (self.value) {
1169
+ self.value.print(output);
1170
+ } else {
1171
+ print_braced(self, output, true);
1172
+ }
1173
+ }
1174
+ DEFPRINT(AST_Arrow, function(output) {
1175
+ print_arrow(this, output);
1176
+ });
1177
+ DEFPRINT(AST_AsyncArrow, function(output) {
1178
+ output.print("async");
1179
+ output.space();
1180
+ print_arrow(this, output);
1181
+ });
1182
+ function print_lambda(self, output) {
1183
+ if (self.name) {
1184
+ output.space();
1185
+ self.name.print(output);
1186
+ }
1187
+ print_funargs(self, output);
1188
+ output.space();
1189
+ print_braced(self, output, true);
1190
+ }
1191
+ DEFPRINT(AST_Lambda, function(output) {
1192
+ output.print("function");
1193
+ print_lambda(this, output);
1194
+ });
1195
+ function print_async(output) {
1196
+ output.print("async");
1197
+ output.space();
1198
+ output.print("function");
1199
+ print_lambda(this, output);
1200
+ }
1201
+ DEFPRINT(AST_AsyncDefun, print_async);
1202
+ DEFPRINT(AST_AsyncFunction, print_async);
1203
+ function print_async_generator(output) {
1204
+ output.print("async");
1205
+ output.space();
1206
+ output.print("function*");
1207
+ print_lambda(this, output);
1208
+ }
1209
+ DEFPRINT(AST_AsyncGeneratorDefun, print_async_generator);
1210
+ DEFPRINT(AST_AsyncGeneratorFunction, print_async_generator);
1211
+ function print_generator(output) {
1212
+ output.print("function*");
1213
+ print_lambda(this, output);
1214
+ }
1215
+ DEFPRINT(AST_GeneratorDefun, print_generator);
1216
+ DEFPRINT(AST_GeneratorFunction, print_generator);
1217
+
1218
+ /* -----[ classes ]----- */
1219
+ DEFPRINT(AST_Class, function(output) {
1220
+ var self = this;
1221
+ output.print("class");
1222
+ if (self.name) {
1223
+ output.space();
1224
+ self.name.print(output);
1225
+ }
1226
+ if (self.extends) {
1227
+ output.space();
1228
+ output.print("extends");
1229
+ output.space();
1230
+ self.extends.print(output);
1231
+ }
1232
+ output.space();
1233
+ print_properties(self, output, true);
1234
+ });
1235
+ DEFPRINT(AST_ClassField, function(output) {
1236
+ var self = this;
1237
+ if (self.static) {
1238
+ output.print("static");
1239
+ output.space();
1240
+ }
1241
+ print_property_key(self, output);
1242
+ if (self.value) {
1243
+ output.space();
1244
+ output.print("=");
1245
+ output.space();
1246
+ self.value.print(output);
1247
+ }
1248
+ output.semicolon();
1249
+ });
1250
+ DEFPRINT(AST_ClassGetter, print_accessor("get"));
1251
+ DEFPRINT(AST_ClassSetter, print_accessor("set"));
1252
+ function print_method(self, output) {
1253
+ var fn = self.value;
1254
+ if (is_async(fn)) {
1255
+ output.print("async");
1256
+ output.space();
1257
+ }
1258
+ if (is_generator(fn)) output.print("*");
1259
+ print_property_key(self, output);
1260
+ print_lambda(self.value, output);
1261
+ }
1262
+ DEFPRINT(AST_ClassMethod, function(output) {
1263
+ var self = this;
1264
+ if (self.static) {
1265
+ output.print("static");
1266
+ output.space();
1267
+ }
1268
+ print_method(self, output);
1269
+ });
1270
+ DEFPRINT(AST_ClassInit, function(output) {
1271
+ output.print("static");
1272
+ output.space();
1273
+ print_braced(this.value, output);
1274
+ });
1275
+
1276
+ /* -----[ jumps ]----- */
1277
+ function print_jump(kind, prop) {
1278
+ return function(output) {
1279
+ output.print(kind);
1280
+ var target = this[prop];
1281
+ if (target) {
1282
+ output.space();
1283
+ target.print(output);
1284
+ }
1285
+ output.semicolon();
1286
+ };
1287
+ }
1288
+ DEFPRINT(AST_Return, print_jump("return", "value"));
1289
+ DEFPRINT(AST_Throw, print_jump("throw", "value"));
1290
+ DEFPRINT(AST_Break, print_jump("break", "label"));
1291
+ DEFPRINT(AST_Continue, print_jump("continue", "label"));
1292
+
1293
+ /* -----[ if ]----- */
1294
+ function make_then(self, output) {
1295
+ var b = self.body;
1296
+ if (output.option("braces") && !(b instanceof AST_Const || b instanceof AST_Let)
1297
+ || output.option("ie") && b instanceof AST_Do)
1298
+ return make_block(b, output);
1299
+ // The squeezer replaces "block"-s that contain only a single
1300
+ // statement with the statement itself; technically, the AST
1301
+ // is correct, but this can create problems when we output an
1302
+ // IF having an ELSE clause where the THEN clause ends in an
1303
+ // IF *without* an ELSE block (then the outer ELSE would refer
1304
+ // to the inner IF). This function checks for this case and
1305
+ // adds the block braces if needed.
1306
+ if (!b) return output.force_semicolon();
1307
+ while (true) {
1308
+ if (b instanceof AST_If) {
1309
+ if (!b.alternative) {
1310
+ make_block(self.body, output);
1311
+ return;
1312
+ }
1313
+ b = b.alternative;
1314
+ } else if (b instanceof AST_StatementWithBody) {
1315
+ b = b.body;
1316
+ } else break;
1317
+ }
1318
+ force_statement(self.body, output);
1319
+ }
1320
+ DEFPRINT(AST_If, function(output) {
1321
+ var self = this;
1322
+ output.print("if");
1323
+ output.space();
1324
+ output.with_parens(function() {
1325
+ self.condition.print(output);
1326
+ });
1327
+ if (self.alternative) {
1328
+ make_then(self, output);
1329
+ output.space();
1330
+ output.print("else");
1331
+ if (self.alternative instanceof AST_If) {
1332
+ output.space();
1333
+ self.alternative.print(output);
1334
+ } else {
1335
+ force_statement(self.alternative, output);
1336
+ }
1337
+ } else {
1338
+ force_statement(self.body, output);
1339
+ }
1340
+ });
1341
+
1342
+ /* -----[ switch ]----- */
1343
+ DEFPRINT(AST_Switch, function(output) {
1344
+ var self = this;
1345
+ output.print("switch");
1346
+ output.space();
1347
+ output.with_parens(function() {
1348
+ self.expression.print(output);
1349
+ });
1350
+ output.space();
1351
+ var last = self.body.length - 1;
1352
+ if (last < 0) print_braced_empty(self, output);
1353
+ else output.with_block(function() {
1354
+ self.body.forEach(function(branch, i) {
1355
+ output.indent(true);
1356
+ branch.print(output);
1357
+ if (i < last && branch.body.length > 0)
1358
+ output.newline();
1359
+ });
1360
+ }, self.end);
1361
+ });
1362
+ function print_branch_body(self, output) {
1363
+ output.newline();
1364
+ self.body.forEach(function(stmt) {
1365
+ output.indent();
1366
+ stmt.print(output);
1367
+ output.newline();
1368
+ });
1369
+ }
1370
+ DEFPRINT(AST_Default, function(output) {
1371
+ output.print("default:");
1372
+ print_branch_body(this, output);
1373
+ });
1374
+ DEFPRINT(AST_Case, function(output) {
1375
+ var self = this;
1376
+ output.print("case");
1377
+ output.space();
1378
+ self.expression.print(output);
1379
+ output.print(":");
1380
+ print_branch_body(self, output);
1381
+ });
1382
+
1383
+ /* -----[ exceptions ]----- */
1384
+ DEFPRINT(AST_Try, function(output) {
1385
+ var self = this;
1386
+ output.print("try");
1387
+ output.space();
1388
+ print_braced(self, output);
1389
+ if (self.bcatch) {
1390
+ output.space();
1391
+ self.bcatch.print(output);
1392
+ }
1393
+ if (self.bfinally) {
1394
+ output.space();
1395
+ self.bfinally.print(output);
1396
+ }
1397
+ });
1398
+ DEFPRINT(AST_Catch, function(output) {
1399
+ var self = this;
1400
+ output.print("catch");
1401
+ if (self.argname) {
1402
+ output.space();
1403
+ output.with_parens(function() {
1404
+ self.argname.print(output);
1405
+ });
1406
+ }
1407
+ output.space();
1408
+ print_braced(self, output);
1409
+ });
1410
+ DEFPRINT(AST_Finally, function(output) {
1411
+ output.print("finally");
1412
+ output.space();
1413
+ print_braced(this, output);
1414
+ });
1415
+
1416
+ function print_definitions(type) {
1417
+ return function(output) {
1418
+ var self = this;
1419
+ output.print(type);
1420
+ output.space();
1421
+ self.definitions.forEach(function(def, i) {
1422
+ if (i) output.comma();
1423
+ def.print(output);
1424
+ });
1425
+ var p = output.parent();
1426
+ if (!(p instanceof AST_IterationStatement && p.init === self)) output.semicolon();
1427
+ };
1428
+ }
1429
+ DEFPRINT(AST_Const, print_definitions("const"));
1430
+ DEFPRINT(AST_Let, print_definitions("let"));
1431
+ DEFPRINT(AST_Var, print_definitions("var"));
1432
+
1433
+ function parenthesize_for_no_in(node, output, no_in) {
1434
+ var parens = false;
1435
+ // need to take some precautions here:
1436
+ // https://github.com/mishoo/UglifyJS/issues/60
1437
+ if (no_in) node.walk(new TreeWalker(function(node) {
1438
+ if (parens) return true;
1439
+ if (node instanceof AST_Binary && node.operator == "in") return parens = true;
1440
+ if (node instanceof AST_Scope && !(is_arrow(node) && node.value)) return true;
1441
+ }));
1442
+ node.print(output, parens);
1443
+ }
1444
+
1445
+ DEFPRINT(AST_VarDef, function(output) {
1446
+ var self = this;
1447
+ self.name.print(output);
1448
+ if (self.value) {
1449
+ output.space();
1450
+ output.print("=");
1451
+ output.space();
1452
+ var p = output.parent(1);
1453
+ var no_in = p instanceof AST_For || p instanceof AST_ForEnumeration;
1454
+ parenthesize_for_no_in(self.value, output, no_in);
1455
+ }
1456
+ });
1457
+
1458
+ DEFPRINT(AST_DefaultValue, function(output) {
1459
+ var self = this;
1460
+ self.name.print(output);
1461
+ output.space();
1462
+ output.print("=");
1463
+ output.space();
1464
+ self.value.print(output);
1465
+ });
1466
+
1467
+ /* -----[ other expressions ]----- */
1468
+ function print_annotation(self, output) {
1469
+ if (!output.option("annotations")) return;
1470
+ if (!self.pure) return;
1471
+ var level = 0, parent = self, node;
1472
+ do {
1473
+ node = parent;
1474
+ parent = output.parent(level++);
1475
+ if (parent instanceof AST_Call && parent.expression === node) return;
1476
+ } while (parent instanceof AST_PropAccess && parent.expression === node);
1477
+ output.print("/*@__PURE__*/");
1478
+ }
1479
+ function print_call_args(self, output) {
1480
+ output.with_parens(function() {
1481
+ self.args.forEach(function(expr, i) {
1482
+ if (i) output.comma();
1483
+ expr.print(output);
1484
+ });
1485
+ output.add_mapping(self.end);
1486
+ });
1487
+ }
1488
+ DEFPRINT(AST_Call, function(output) {
1489
+ var self = this;
1490
+ print_annotation(self, output);
1491
+ self.expression.print(output);
1492
+ if (self.optional) output.print("?.");
1493
+ print_call_args(self, output);
1494
+ });
1495
+ DEFPRINT(AST_New, function(output) {
1496
+ var self = this;
1497
+ print_annotation(self, output);
1498
+ output.print("new");
1499
+ output.space();
1500
+ self.expression.print(output);
1501
+ if (need_constructor_parens(self, output)) print_call_args(self, output);
1502
+ });
1503
+ DEFPRINT(AST_Sequence, function(output) {
1504
+ this.expressions.forEach(function(node, index) {
1505
+ if (index > 0) {
1506
+ output.comma();
1507
+ if (output.should_break()) {
1508
+ output.newline();
1509
+ output.indent();
1510
+ }
1511
+ }
1512
+ node.print(output);
1513
+ });
1514
+ });
1515
+ DEFPRINT(AST_Dot, function(output) {
1516
+ var self = this;
1517
+ var expr = self.expression;
1518
+ expr.print(output);
1519
+ var prop = self.property;
1520
+ if (output.option("ie") && RESERVED_WORDS[prop] || self.quoted && output.option("keep_quoted_props")) {
1521
+ if (self.optional) output.print("?.");
1522
+ output.with_square(function() {
1523
+ output.add_mapping(self.end);
1524
+ output.print_string(prop);
1525
+ });
1526
+ } else {
1527
+ if (expr instanceof AST_Number && !/[ex.)]/i.test(output.last())) output.print(".");
1528
+ output.print(self.optional ? "?." : ".");
1529
+ // the name after dot would be mapped about here.
1530
+ output.add_mapping(self.end);
1531
+ output.print_name(prop);
1532
+ }
1533
+ });
1534
+ DEFPRINT(AST_Sub, function(output) {
1535
+ var self = this;
1536
+ self.expression.print(output);
1537
+ if (self.optional) output.print("?.");
1538
+ output.with_square(function() {
1539
+ self.property.print(output);
1540
+ });
1541
+ });
1542
+ DEFPRINT(AST_Spread, function(output) {
1543
+ output.print("...");
1544
+ this.expression.print(output);
1545
+ });
1546
+ DEFPRINT(AST_UnaryPrefix, function(output) {
1547
+ var op = this.operator;
1548
+ var exp = this.expression;
1549
+ output.print(op);
1550
+ if (/^[a-z]/i.test(op)
1551
+ || (/[+-]$/.test(op)
1552
+ && exp instanceof AST_UnaryPrefix
1553
+ && /^[+-]/.test(exp.operator))) {
1554
+ output.space();
1555
+ }
1556
+ exp.print(output);
1557
+ });
1558
+ DEFPRINT(AST_UnaryPostfix, function(output) {
1559
+ var self = this;
1560
+ self.expression.print(output);
1561
+ output.add_mapping(self.end);
1562
+ output.print(self.operator);
1563
+ });
1564
+ DEFPRINT(AST_Binary, function(output) {
1565
+ var self = this;
1566
+ self.left.print(output);
1567
+ output.space();
1568
+ output.print(self.operator);
1569
+ output.space();
1570
+ self.right.print(output);
1571
+ });
1572
+ DEFPRINT(AST_Conditional, function(output) {
1573
+ var self = this;
1574
+ self.condition.print(output);
1575
+ output.space();
1576
+ output.print("?");
1577
+ output.space();
1578
+ self.consequent.print(output);
1579
+ output.space();
1580
+ output.colon();
1581
+ self.alternative.print(output);
1582
+ });
1583
+ DEFPRINT(AST_Await, function(output) {
1584
+ output.print("await");
1585
+ output.space();
1586
+ this.expression.print(output);
1587
+ });
1588
+ DEFPRINT(AST_Yield, function(output) {
1589
+ output.print(this.nested ? "yield*" : "yield");
1590
+ if (this.expression) {
1591
+ output.space();
1592
+ this.expression.print(output);
1593
+ }
1594
+ });
1595
+
1596
+ /* -----[ literals ]----- */
1597
+ DEFPRINT(AST_Array, function(output) {
1598
+ var a = this.elements, len = a.length;
1599
+ output.with_square(len > 0 ? function() {
1600
+ output.space();
1601
+ a.forEach(function(exp, i) {
1602
+ if (i) output.comma();
1603
+ exp.print(output);
1604
+ // If the final element is a hole, we need to make sure it
1605
+ // doesn't look like a trailing comma, by inserting an actual
1606
+ // trailing comma.
1607
+ if (i === len - 1 && exp instanceof AST_Hole)
1608
+ output.comma();
1609
+ });
1610
+ output.space();
1611
+ } : noop);
1612
+ });
1613
+ DEFPRINT(AST_DestructuredArray, function(output) {
1614
+ var a = this.elements, len = a.length, rest = this.rest;
1615
+ output.with_square(len || rest ? function() {
1616
+ output.space();
1617
+ a.forEach(function(exp, i) {
1618
+ if (i) output.comma();
1619
+ exp.print(output);
1620
+ });
1621
+ if (rest) {
1622
+ if (len) output.comma();
1623
+ output.print("...");
1624
+ rest.print(output);
1625
+ } else if (a[len - 1] instanceof AST_Hole) {
1626
+ // If the final element is a hole, we need to make sure it
1627
+ // doesn't look like a trailing comma, by inserting an actual
1628
+ // trailing comma.
1629
+ output.comma();
1630
+ }
1631
+ output.space();
1632
+ } : noop);
1633
+ });
1634
+ DEFPRINT(AST_DestructuredKeyVal, function(output) {
1635
+ var self = this;
1636
+ var key = print_property_key(self, output);
1637
+ var value = self.value;
1638
+ if (key) {
1639
+ if (value instanceof AST_DefaultValue) {
1640
+ if (value.name instanceof AST_Symbol && key == get_symbol_name(value.name)) {
1641
+ output.space();
1642
+ output.print("=");
1643
+ output.space();
1644
+ value.value.print(output);
1645
+ return;
1646
+ }
1647
+ } else if (value instanceof AST_Symbol) {
1648
+ if (key == get_symbol_name(value)) return;
1649
+ }
1650
+ }
1651
+ output.colon();
1652
+ value.print(output);
1653
+ });
1654
+ DEFPRINT(AST_DestructuredObject, function(output) {
1655
+ var self = this;
1656
+ var props = self.properties, len = props.length, rest = self.rest;
1657
+ if (len || rest) output.with_block(function() {
1658
+ props.forEach(function(prop, i) {
1659
+ if (i) {
1660
+ output.print(",");
1661
+ output.newline();
1662
+ }
1663
+ output.indent();
1664
+ prop.print(output);
1665
+ });
1666
+ if (rest) {
1667
+ if (len) {
1668
+ output.print(",");
1669
+ output.newline();
1670
+ }
1671
+ output.indent();
1672
+ output.print("...");
1673
+ rest.print(output);
1674
+ }
1675
+ output.newline();
1676
+ }, self.end);
1677
+ else print_braced_empty(self, output);
1678
+ });
1679
+ function print_properties(self, output, no_comma) {
1680
+ var props = self.properties;
1681
+ if (props.length > 0) output.with_block(function() {
1682
+ props.forEach(function(prop, i) {
1683
+ if (i) {
1684
+ if (!no_comma) output.print(",");
1685
+ output.newline();
1686
+ }
1687
+ output.indent();
1688
+ prop.print(output);
1689
+ });
1690
+ output.newline();
1691
+ }, self.end);
1692
+ else print_braced_empty(self, output);
1693
+ }
1694
+ DEFPRINT(AST_Object, function(output) {
1695
+ print_properties(this, output);
1696
+ });
1697
+
1698
+ function print_property_key(self, output) {
1699
+ var key = self.key;
1700
+ if (key instanceof AST_Node) return output.with_square(function() {
1701
+ key.print(output);
1702
+ });
1703
+ var quote = self.start && self.start.quote;
1704
+ if (output.option("quote_keys") || quote && output.option("keep_quoted_props")) {
1705
+ output.print_string(key, quote);
1706
+ } else if ("" + +key == key && key >= 0) {
1707
+ output.print(make_num(key));
1708
+ } else if (self.private) {
1709
+ output.print_name(key);
1710
+ } else if (RESERVED_WORDS[key] ? !output.option("ie") : is_identifier_string(key)) {
1711
+ output.print_name(key);
1712
+ return key;
1713
+ } else {
1714
+ output.print_string(key, quote);
1715
+ }
1716
+ }
1717
+ DEFPRINT(AST_ObjectKeyVal, function(output) {
1718
+ var self = this;
1719
+ print_property_key(self, output);
1720
+ output.colon();
1721
+ self.value.print(output);
1722
+ });
1723
+ DEFPRINT(AST_ObjectMethod, function(output) {
1724
+ print_method(this, output);
1725
+ });
1726
+ function print_accessor(type) {
1727
+ return function(output) {
1728
+ var self = this;
1729
+ if (self.static) {
1730
+ output.print("static");
1731
+ output.space();
1732
+ }
1733
+ output.print(type);
1734
+ output.space();
1735
+ print_property_key(self, output);
1736
+ print_lambda(self.value, output);
1737
+ };
1738
+ }
1739
+ DEFPRINT(AST_ObjectGetter, print_accessor("get"));
1740
+ DEFPRINT(AST_ObjectSetter, print_accessor("set"));
1741
+ function get_symbol_name(sym) {
1742
+ var def = sym.definition();
1743
+ return def && def.mangled_name || sym.name;
1744
+ }
1745
+ DEFPRINT(AST_Symbol, function(output) {
1746
+ output.print_name(get_symbol_name(this));
1747
+ });
1748
+ DEFPRINT(AST_SymbolExport, function(output) {
1749
+ var self = this;
1750
+ var name = get_symbol_name(self);
1751
+ output.print_name(name);
1752
+ var alias = self.alias;
1753
+ if (alias.value != name) {
1754
+ output.space();
1755
+ output.print("as");
1756
+ output.space();
1757
+ print_alias(alias, output);
1758
+ }
1759
+ });
1760
+ DEFPRINT(AST_SymbolImport, function(output) {
1761
+ var self = this;
1762
+ var name = get_symbol_name(self);
1763
+ var key = self.key;
1764
+ if (key.value && key.value != name) {
1765
+ print_alias(key, output);
1766
+ output.space();
1767
+ output.print("as");
1768
+ output.space();
1769
+ }
1770
+ output.print_name(name);
1771
+ });
1772
+ DEFPRINT(AST_Hole, noop);
1773
+ DEFPRINT(AST_Template, function(output) {
1774
+ var self = this;
1775
+ if (self.tag) self.tag.print(output);
1776
+ output.print("`");
1777
+ for (var i = 0; i < self.expressions.length; i++) {
1778
+ output.print(self.strings[i]);
1779
+ output.print("${");
1780
+ self.expressions[i].print(output);
1781
+ output.print("}");
1782
+ }
1783
+ output.print(self.strings[i]);
1784
+ output.print("`");
1785
+ });
1786
+ DEFPRINT(AST_Constant, function(output) {
1787
+ output.print("" + this.value);
1788
+ });
1789
+ DEFPRINT(AST_String, function(output) {
1790
+ output.print_string(this.value, this.quote);
1791
+ });
1792
+ DEFPRINT(AST_Number, function(output) {
1793
+ var start = this.start;
1794
+ if (use_asm && start && start.raw != null) {
1795
+ output.print(start.raw);
1796
+ } else {
1797
+ output.print(make_num(this.value));
1798
+ }
1799
+ });
1800
+
1801
+ DEFPRINT(AST_RegExp, function(output) {
1802
+ var regexp = this.value;
1803
+ var str = regexp.toString();
1804
+ var end = str.lastIndexOf("/");
1805
+ if (regexp.raw_source) {
1806
+ str = "/" + regexp.raw_source + str.slice(end);
1807
+ } else if (end == 1) {
1808
+ str = "/(?:)" + str.slice(end);
1809
+ } else if (str.indexOf("/", 1) < end) {
1810
+ str = "/" + str.slice(1, end).replace(/\\\\|[^/]?\//g, function(match) {
1811
+ return match[0] == "\\" ? match : match.slice(0, -1) + "\\/";
1812
+ }) + str.slice(end);
1813
+ }
1814
+ output.print(output.to_utf8(str).replace(/\\(?:\0(?![0-9])|[^\0])/g, function(match) {
1815
+ switch (match[1]) {
1816
+ case "\n": return "\\n";
1817
+ case "\r": return "\\r";
1818
+ case "\t": return "\t";
1819
+ case "\b": return "\b";
1820
+ case "\f": return "\f";
1821
+ case "\0": return "\0";
1822
+ case "\x0B": return "\v";
1823
+ case "\u2028": return "\\u2028";
1824
+ case "\u2029": return "\\u2029";
1825
+ default: return match;
1826
+ }
1827
+ }).replace(/[\n\r\u2028\u2029]/g, function(c) {
1828
+ switch (c) {
1829
+ case "\n": return "\\n";
1830
+ case "\r": return "\\r";
1831
+ case "\u2028": return "\\u2028";
1832
+ case "\u2029": return "\\u2029";
1833
+ }
1834
+ }));
1835
+ });
1836
+
1837
+ function force_statement(stat, output) {
1838
+ if (output.option("braces") && !(stat instanceof AST_Const || stat instanceof AST_Let)) {
1839
+ make_block(stat, output);
1840
+ } else if (stat instanceof AST_EmptyStatement) {
1841
+ output.force_semicolon();
1842
+ } else {
1843
+ output.space();
1844
+ stat.print(output);
1845
+ }
1846
+ }
1847
+
1848
+ // self should be AST_New. decide if we want to show parens or not.
1849
+ function need_constructor_parens(self, output) {
1850
+ // Always print parentheses with arguments
1851
+ if (self.args.length > 0) return true;
1852
+
1853
+ return output.option("beautify");
1854
+ }
1855
+
1856
+ function best_of(a) {
1857
+ var best = a[0], len = best.length;
1858
+ for (var i = 1; i < a.length; ++i) {
1859
+ if (a[i].length < len) {
1860
+ best = a[i];
1861
+ len = best.length;
1862
+ }
1863
+ }
1864
+ return best;
1865
+ }
1866
+
1867
+ function make_num(num) {
1868
+ var str = num.toString(10).replace(/^0\./, ".").replace("e+", "e");
1869
+ var candidates = [ str ];
1870
+ if (Math.floor(num) === num) {
1871
+ if (num < 0) {
1872
+ candidates.push("-0x" + (-num).toString(16).toLowerCase());
1873
+ } else {
1874
+ candidates.push("0x" + num.toString(16).toLowerCase());
1875
+ }
1876
+ }
1877
+ var match, len, digits;
1878
+ if (match = /^\.0+/.exec(str)) {
1879
+ len = match[0].length;
1880
+ digits = str.slice(len);
1881
+ candidates.push(digits + "e-" + (digits.length + len - 1));
1882
+ } else if (match = /[^0]0+$/.exec(str)) {
1883
+ len = match[0].length - 1;
1884
+ candidates.push(str.slice(0, -len) + "e" + len);
1885
+ } else if (match = /^(\d)\.(\d+)e(-?\d+)$/.exec(str)) {
1886
+ candidates.push(match[1] + match[2] + "e" + (match[3] - match[2].length));
1887
+ }
1888
+ return best_of(candidates);
1889
+ }
1890
+
1891
+ function make_block(stmt, output) {
1892
+ output.space();
1893
+ if (stmt instanceof AST_EmptyStatement) {
1894
+ print_braced_empty(stmt, output);
1895
+ } else if (stmt instanceof AST_BlockStatement) {
1896
+ stmt.print(output);
1897
+ } else output.with_block(function() {
1898
+ output.indent();
1899
+ stmt.print(output);
1900
+ output.newline();
1901
+ }, stmt.end);
1902
+ }
1903
+
1904
+ /* -----[ source map generators ]----- */
1905
+
1906
+ function DEFMAP(nodetype, generator) {
1907
+ nodetype.forEach(function(nodetype) {
1908
+ nodetype.DEFMETHOD("add_source_map", generator);
1909
+ });
1910
+ }
1911
+
1912
+ DEFMAP([
1913
+ // We could easily add info for ALL nodes, but it seems to me that
1914
+ // would be quite wasteful, hence this noop in the base class.
1915
+ AST_Node,
1916
+ // since the label symbol will mark it
1917
+ AST_LabeledStatement,
1918
+ ], noop);
1919
+
1920
+ // XXX: I'm not exactly sure if we need it for all of these nodes,
1921
+ // or if we should add even more.
1922
+ DEFMAP([
1923
+ AST_Array,
1924
+ AST_Await,
1925
+ AST_BlockStatement,
1926
+ AST_Catch,
1927
+ AST_Constant,
1928
+ AST_Debugger,
1929
+ AST_Definitions,
1930
+ AST_Destructured,
1931
+ AST_Directive,
1932
+ AST_Finally,
1933
+ AST_Jump,
1934
+ AST_Lambda,
1935
+ AST_New,
1936
+ AST_Object,
1937
+ AST_Spread,
1938
+ AST_StatementWithBody,
1939
+ AST_Symbol,
1940
+ AST_Switch,
1941
+ AST_SwitchBranch,
1942
+ AST_Try,
1943
+ AST_UnaryPrefix,
1944
+ AST_Yield,
1945
+ ], function(output) {
1946
+ output.add_mapping(this.start);
1947
+ });
1948
+
1949
+ DEFMAP([
1950
+ AST_ClassProperty,
1951
+ AST_DestructuredKeyVal,
1952
+ AST_ObjectProperty,
1953
+ ], function(output) {
1954
+ if (typeof this.key == "string") output.add_mapping(this.start, this.key);
1955
+ });
1956
+ })();