@aws-amplify/graphql-api-construct 1.18.3-ai-next.0 → 1.18.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1042) hide show
  1. package/.jsii +456 -59
  2. package/API.md +17 -0
  3. package/CHANGELOG.md +1 -1
  4. package/jest.config.js +12 -0
  5. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  6. package/lib/amplify-graphql-api.js +4 -3
  7. package/lib/amplify-graphql-definition.js +1 -1
  8. package/lib/index.d.ts +2 -0
  9. package/lib/index.js +5 -2
  10. package/lib/log-config-types.d.ts +78 -0
  11. package/lib/log-config-types.js +8 -0
  12. package/lib/sql-model-datasource-strategy.js +1 -1
  13. package/lib/types.d.ts +5 -0
  14. package/lib/types.js +1 -1
  15. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +4 -0
  16. package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +201 -0
  17. package/node_modules/@aws-amplify/graphql-auth-transformer/jest.config.js +12 -0
  18. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +15 -54
  19. package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +2 -2
  20. package/node_modules/@aws-amplify/graphql-conversation-transformer/jest.config.js +10 -0
  21. package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +12 -48
  22. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
  23. package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +201 -0
  24. package/node_modules/@aws-amplify/graphql-default-value-transformer/jest.config.js +12 -0
  25. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -49
  26. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +4 -0
  27. package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
  28. package/node_modules/@aws-amplify/graphql-directives/jest.config.js +6 -0
  29. package/node_modules/@aws-amplify/graphql-directives/package.json +2 -42
  30. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
  31. package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +201 -0
  32. package/node_modules/@aws-amplify/graphql-function-transformer/jest.config.js +12 -0
  33. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +9 -48
  34. package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +4 -0
  35. package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
  36. package/node_modules/@aws-amplify/graphql-generation-transformer/jest.config.js +9 -0
  37. package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +9 -44
  38. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
  39. package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +201 -0
  40. package/node_modules/@aws-amplify/graphql-http-transformer/jest.config.js +12 -0
  41. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +9 -48
  42. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -0
  43. package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +201 -0
  44. package/node_modules/@aws-amplify/graphql-index-transformer/jest.config.js +12 -0
  45. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +10 -46
  46. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -0
  47. package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +201 -0
  48. package/node_modules/@aws-amplify/graphql-maps-to-transformer/jest.config.js +12 -0
  49. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  50. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +13 -49
  51. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -0
  52. package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +201 -0
  53. package/node_modules/@aws-amplify/graphql-model-transformer/jest.config.js +12 -0
  54. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  55. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  56. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  57. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +9 -49
  58. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
  59. package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +201 -0
  60. package/node_modules/@aws-amplify/graphql-predictions-transformer/jest.config.js +5 -0
  61. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  62. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +9 -48
  63. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +4 -0
  64. package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +201 -0
  65. package/node_modules/@aws-amplify/graphql-relational-transformer/jest.config.js +12 -0
  66. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +11 -47
  67. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +4 -0
  68. package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +201 -0
  69. package/node_modules/@aws-amplify/graphql-searchable-transformer/jest.config.js +12 -0
  70. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  71. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +10 -52
  72. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +4 -0
  73. package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +201 -0
  74. package/node_modules/@aws-amplify/graphql-sql-transformer/jest.config.js +12 -0
  75. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +10 -49
  76. package/node_modules/@aws-amplify/graphql-transformer/API.md +2 -0
  77. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +1 -1
  78. package/node_modules/@aws-amplify/graphql-transformer/jest.config.js +12 -0
  79. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +2 -1
  80. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
  81. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +2 -1
  82. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
  83. package/node_modules/@aws-amplify/graphql-transformer/package.json +20 -61
  84. package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +4 -0
  85. package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -3
  86. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -0
  87. package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +201 -0
  88. package/node_modules/@aws-amplify/graphql-transformer-core/jest.config.js +12 -0
  89. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +4 -3
  90. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
  91. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +27 -7
  92. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
  93. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts +4 -3
  94. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map +1 -1
  95. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js +5 -3
  96. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js.map +1 -1
  97. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts +3 -1
  98. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts.map +1 -1
  99. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js +2 -1
  100. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js.map +1 -1
  101. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +8 -46
  102. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +12 -0
  103. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -0
  104. package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +201 -0
  105. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts +1 -0
  106. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts.map +1 -1
  107. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts +8 -0
  108. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts.map +1 -0
  109. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js +3 -0
  110. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js.map +1 -0
  111. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +3 -35
  112. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts +1 -0
  113. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/logConfig.ts +8 -0
  114. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  115. package/node_modules/@aws-cdk/assert/BUILD.md +15 -0
  116. package/node_modules/@aws-cdk/assert/LICENSE +201 -0
  117. package/node_modules/@aws-cdk/assert/NOTICE +2 -0
  118. package/node_modules/@aws-cdk/assert/README.md +228 -0
  119. package/node_modules/@aws-cdk/assert/clone.sh +29 -0
  120. package/node_modules/@aws-cdk/assert/jest.d.ts +14 -0
  121. package/node_modules/@aws-cdk/assert/jest.js +57 -0
  122. package/node_modules/@aws-cdk/assert/lib/assertion.d.ts +17 -0
  123. package/node_modules/@aws-cdk/assert/lib/assertion.js +31 -0
  124. package/node_modules/@aws-cdk/assert/lib/assertions/and-assertion.d.ts +10 -0
  125. package/node_modules/@aws-cdk/assert/lib/assertions/and-assertion.js +21 -0
  126. package/node_modules/@aws-cdk/assert/lib/assertions/count-resources.d.ts +10 -0
  127. package/node_modules/@aws-cdk/assert/lib/assertions/count-resources.js +54 -0
  128. package/node_modules/@aws-cdk/assert/lib/assertions/exist.d.ts +3 -0
  129. package/node_modules/@aws-cdk/assert/lib/assertions/exist.js +18 -0
  130. package/node_modules/@aws-cdk/assert/lib/assertions/have-output.d.ts +29 -0
  131. package/node_modules/@aws-cdk/assert/lib/assertions/have-output.js +77 -0
  132. package/node_modules/@aws-cdk/assert/lib/assertions/have-resource-matchers.d.ts +123 -0
  133. package/node_modules/@aws-cdk/assert/lib/assertions/have-resource-matchers.js +404 -0
  134. package/node_modules/@aws-cdk/assert/lib/assertions/have-resource.d.ts +69 -0
  135. package/node_modules/@aws-cdk/assert/lib/assertions/have-resource.js +130 -0
  136. package/node_modules/@aws-cdk/assert/lib/assertions/have-type.d.ts +3 -0
  137. package/node_modules/@aws-cdk/assert/lib/assertions/have-type.js +22 -0
  138. package/node_modules/@aws-cdk/assert/lib/assertions/match-template.d.ts +19 -0
  139. package/node_modules/@aws-cdk/assert/lib/assertions/match-template.js +98 -0
  140. package/node_modules/@aws-cdk/assert/lib/assertions/negated-assertion.d.ts +8 -0
  141. package/node_modules/@aws-cdk/assert/lib/assertions/negated-assertion.js +18 -0
  142. package/node_modules/@aws-cdk/assert/lib/canonicalize-assets.d.ts +11 -0
  143. package/node_modules/@aws-cdk/assert/lib/canonicalize-assets.js +70 -0
  144. package/node_modules/@aws-cdk/assert/lib/expect.d.ts +4 -0
  145. package/node_modules/@aws-cdk/assert/lib/expect.js +16 -0
  146. package/node_modules/@aws-cdk/assert/lib/index.d.ts +14 -0
  147. package/node_modules/@aws-cdk/assert/lib/index.js +27 -0
  148. package/node_modules/@aws-cdk/assert/lib/inspector.d.ts +31 -0
  149. package/node_modules/@aws-cdk/assert/lib/inspector.js +69 -0
  150. package/node_modules/@aws-cdk/assert/lib/synth-utils.d.ts +30 -0
  151. package/node_modules/@aws-cdk/assert/lib/synth-utils.js +92 -0
  152. package/node_modules/@aws-cdk/assert/package.json +77 -0
  153. package/node_modules/@aws-cdk/cfnspec/CHANGELOG.md +16795 -0
  154. package/node_modules/@aws-cdk/cfnspec/LICENSE +201 -0
  155. package/node_modules/@aws-cdk/cfnspec/NOTICE +2 -0
  156. package/node_modules/@aws-cdk/cfnspec/README.md +14 -0
  157. package/node_modules/@aws-cdk/cfnspec/build-tools/build.d.ts +1 -0
  158. package/node_modules/@aws-cdk/cfnspec/build-tools/build.js +37 -0
  159. package/node_modules/@aws-cdk/cfnspec/build-tools/create-missing-libraries.d.ts +6 -0
  160. package/node_modules/@aws-cdk/cfnspec/build-tools/create-missing-libraries.js +311 -0
  161. package/node_modules/@aws-cdk/cfnspec/build-tools/massage-spec.d.ts +10 -0
  162. package/node_modules/@aws-cdk/cfnspec/build-tools/massage-spec.js +70 -0
  163. package/node_modules/@aws-cdk/cfnspec/build-tools/patch-set.d.ts +25 -0
  164. package/node_modules/@aws-cdk/cfnspec/build-tools/patch-set.js +241 -0
  165. package/node_modules/@aws-cdk/cfnspec/build-tools/report-issues.d.ts +9 -0
  166. package/node_modules/@aws-cdk/cfnspec/build-tools/report-issues.js +72 -0
  167. package/node_modules/@aws-cdk/cfnspec/build-tools/scrutiny.d.ts +12 -0
  168. package/node_modules/@aws-cdk/cfnspec/build-tools/scrutiny.js +85 -0
  169. package/node_modules/@aws-cdk/cfnspec/build-tools/spec-diff.d.ts +1 -0
  170. package/node_modules/@aws-cdk/cfnspec/build-tools/spec-diff.js +248 -0
  171. package/node_modules/@aws-cdk/cfnspec/build-tools/split-spec-by-service.d.ts +1 -0
  172. package/node_modules/@aws-cdk/cfnspec/build-tools/split-spec-by-service.js +120 -0
  173. package/node_modules/@aws-cdk/cfnspec/build-tools/template/LICENSE +201 -0
  174. package/node_modules/@aws-cdk/cfnspec/build-tools/template/NOTICE +2 -0
  175. package/node_modules/@aws-cdk/cfnspec/build-tools/update-cfnlint.sh +18 -0
  176. package/node_modules/@aws-cdk/cfnspec/build-tools/update-metrics.sh +15 -0
  177. package/node_modules/@aws-cdk/cfnspec/build-tools/update.sh +113 -0
  178. package/node_modules/@aws-cdk/cfnspec/build-tools/validate-cfn.d.ts +67 -0
  179. package/node_modules/@aws-cdk/cfnspec/build-tools/validate-cfn.js +285 -0
  180. package/node_modules/@aws-cdk/cfnspec/cfn.version +1 -0
  181. package/node_modules/@aws-cdk/cfnspec/lib/_private_schema/cfn-lint.d.ts +24 -0
  182. package/node_modules/@aws-cdk/cfnspec/lib/_private_schema/cfn-lint.js +3 -0
  183. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_EC2_VPNConnection.json +27 -0
  184. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_Lambda_Function.json +27 -0
  185. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_RDS_DBCluster.json +70 -0
  186. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_RDS_DBInstance.json +37 -0
  187. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_SNS_Topic.json +52 -0
  188. package/node_modules/@aws-cdk/cfnspec/lib/augmentations/AWS_SQS_Queue.json +53 -0
  189. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics/README.md +168 -0
  190. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.d.ts +60 -0
  191. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics/canned-metrics-schema.js +12 -0
  192. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics/services.json +31957 -0
  193. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics.d.ts +41 -0
  194. package/node_modules/@aws-cdk/cfnspec/lib/canned-metrics.js +75 -0
  195. package/node_modules/@aws-cdk/cfnspec/lib/index.d.ts +63 -0
  196. package/node_modules/@aws-cdk/cfnspec/lib/index.js +200 -0
  197. package/node_modules/@aws-cdk/cfnspec/lib/schema/augmentation.d.ts +87 -0
  198. package/node_modules/@aws-cdk/cfnspec/lib/schema/augmentation.js +28 -0
  199. package/node_modules/@aws-cdk/cfnspec/lib/schema/base-types.d.ts +14 -0
  200. package/node_modules/@aws-cdk/cfnspec/lib/schema/base-types.js +29 -0
  201. package/node_modules/@aws-cdk/cfnspec/lib/schema/cfn-lint.d.ts +13 -0
  202. package/node_modules/@aws-cdk/cfnspec/lib/schema/cfn-lint.js +3 -0
  203. package/node_modules/@aws-cdk/cfnspec/lib/schema/docs.d.ts +20 -0
  204. package/node_modules/@aws-cdk/cfnspec/lib/schema/docs.js +3 -0
  205. package/node_modules/@aws-cdk/cfnspec/lib/schema/index.d.ts +7 -0
  206. package/node_modules/@aws-cdk/cfnspec/lib/schema/index.js +20 -0
  207. package/node_modules/@aws-cdk/cfnspec/lib/schema/property.d.ts +179 -0
  208. package/node_modules/@aws-cdk/cfnspec/lib/schema/property.js +168 -0
  209. package/node_modules/@aws-cdk/cfnspec/lib/schema/resource-type.d.ts +118 -0
  210. package/node_modules/@aws-cdk/cfnspec/lib/schema/resource-type.js +99 -0
  211. package/node_modules/@aws-cdk/cfnspec/lib/schema/specification.d.ts +56 -0
  212. package/node_modules/@aws-cdk/cfnspec/lib/schema/specification.js +11 -0
  213. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/CHANGELOG.md +902 -0
  214. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/LICENSE +15 -0
  215. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/README.md +264 -0
  216. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/copy/copy.js +232 -0
  217. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/copy/index.js +6 -0
  218. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/copy-sync/copy-sync.js +166 -0
  219. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/copy-sync/index.js +5 -0
  220. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/empty/index.js +48 -0
  221. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/file.js +69 -0
  222. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/index.js +23 -0
  223. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/link.js +61 -0
  224. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
  225. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
  226. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/ensure/symlink.js +63 -0
  227. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/fs/index.js +130 -0
  228. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/index.js +27 -0
  229. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/json/index.js +16 -0
  230. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  231. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  232. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/json/output-json.js +12 -0
  233. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  234. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/mkdirs/make-dir.js +141 -0
  235. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/move/index.js +6 -0
  236. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/move/move.js +65 -0
  237. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/move-sync/index.js +5 -0
  238. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/move-sync/move-sync.js +47 -0
  239. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/output/index.js +40 -0
  240. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  241. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/remove/index.js +9 -0
  242. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
  243. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/util/stat.js +139 -0
  244. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/lib/util/utimes.js +26 -0
  245. package/node_modules/@aws-cdk/cfnspec/node_modules/fs-extra/package.json +70 -0
  246. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/CHANGELOG.md +171 -0
  247. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/LICENSE +15 -0
  248. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/README.md +230 -0
  249. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/index.js +88 -0
  250. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/package.json +40 -0
  251. package/node_modules/@aws-cdk/cfnspec/node_modules/jsonfile/utils.js +14 -0
  252. package/node_modules/@aws-cdk/cfnspec/node_modules/universalify/LICENSE +20 -0
  253. package/node_modules/@aws-cdk/cfnspec/node_modules/universalify/README.md +76 -0
  254. package/node_modules/@aws-cdk/cfnspec/node_modules/universalify/index.js +24 -0
  255. package/node_modules/@aws-cdk/cfnspec/node_modules/universalify/package.json +34 -0
  256. package/node_modules/@aws-cdk/cfnspec/package.json +63 -0
  257. package/node_modules/@aws-cdk/cfnspec/spec/cfn-docs.json +51044 -0
  258. package/node_modules/@aws-cdk/cfnspec/spec/cfn-lint.json +35 -0
  259. package/node_modules/@aws-cdk/cfnspec/spec/specification.json +148332 -0
  260. package/node_modules/@aws-cdk/cloudformation-diff/LICENSE +201 -0
  261. package/node_modules/@aws-cdk/cloudformation-diff/NOTICE +2 -0
  262. package/node_modules/@aws-cdk/cloudformation-diff/README.md +12 -0
  263. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.d.ts +9 -0
  264. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.js +94 -0
  265. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.d.ts +326 -0
  266. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.js +457 -0
  267. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.d.ts +41 -0
  268. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.js +165 -0
  269. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.d.ts +21 -0
  270. package/node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.js +166 -0
  271. package/node_modules/@aws-cdk/cloudformation-diff/lib/diffable.d.ts +22 -0
  272. package/node_modules/@aws-cdk/cloudformation-diff/lib/diffable.js +47 -0
  273. package/node_modules/@aws-cdk/cloudformation-diff/lib/format-table.d.ts +6 -0
  274. package/node_modules/@aws-cdk/cloudformation-diff/lib/format-table.js +109 -0
  275. package/node_modules/@aws-cdk/cloudformation-diff/lib/format.d.ts +23 -0
  276. package/node_modules/@aws-cdk/cloudformation-diff/lib/format.js +414 -0
  277. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.d.ts +62 -0
  278. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.js +246 -0
  279. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.d.ts +18 -0
  280. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.js +29 -0
  281. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.d.ts +127 -0
  282. package/node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.js +268 -0
  283. package/node_modules/@aws-cdk/cloudformation-diff/lib/index.d.ts +4 -0
  284. package/node_modules/@aws-cdk/cloudformation-diff/lib/index.js +18 -0
  285. package/node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.d.ts +32 -0
  286. package/node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.js +95 -0
  287. package/node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.d.ts +50 -0
  288. package/node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.js +91 -0
  289. package/node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.d.ts +21 -0
  290. package/node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.js +79 -0
  291. package/node_modules/@aws-cdk/cloudformation-diff/lib/util.d.ts +7 -0
  292. package/node_modules/@aws-cdk/cloudformation-diff/lib/util.js +63 -0
  293. package/node_modules/@aws-cdk/cloudformation-diff/package.json +60 -0
  294. package/node_modules/ajv/.runkit_example.js +23 -0
  295. package/node_modules/ajv/LICENSE +22 -0
  296. package/node_modules/ajv/README.md +207 -0
  297. package/node_modules/ajv/dist/2019.d.ts +19 -0
  298. package/node_modules/ajv/dist/2019.js +61 -0
  299. package/node_modules/ajv/dist/2019.js.map +1 -0
  300. package/node_modules/ajv/dist/2020.d.ts +19 -0
  301. package/node_modules/ajv/dist/2020.js +55 -0
  302. package/node_modules/ajv/dist/2020.js.map +1 -0
  303. package/node_modules/ajv/dist/ajv.d.ts +18 -0
  304. package/node_modules/ajv/dist/ajv.js +50 -0
  305. package/node_modules/ajv/dist/ajv.js.map +1 -0
  306. package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
  307. package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  308. package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  309. package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
  310. package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  311. package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  312. package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
  313. package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  314. package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  315. package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
  316. package/node_modules/ajv/dist/compile/errors.js +123 -0
  317. package/node_modules/ajv/dist/compile/errors.js.map +1 -0
  318. package/node_modules/ajv/dist/compile/index.d.ts +80 -0
  319. package/node_modules/ajv/dist/compile/index.js +242 -0
  320. package/node_modules/ajv/dist/compile/index.js.map +1 -0
  321. package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
  322. package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
  323. package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
  324. package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
  325. package/node_modules/ajv/dist/compile/jtd/serialize.js +229 -0
  326. package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
  327. package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
  328. package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
  329. package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
  330. package/node_modules/ajv/dist/compile/names.d.ts +20 -0
  331. package/node_modules/ajv/dist/compile/names.js +28 -0
  332. package/node_modules/ajv/dist/compile/names.js.map +1 -0
  333. package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
  334. package/node_modules/ajv/dist/compile/ref_error.js +12 -0
  335. package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  336. package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
  337. package/node_modules/ajv/dist/compile/resolve.js +155 -0
  338. package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  339. package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
  340. package/node_modules/ajv/dist/compile/rules.js +26 -0
  341. package/node_modules/ajv/dist/compile/rules.js.map +1 -0
  342. package/node_modules/ajv/dist/compile/util.d.ts +40 -0
  343. package/node_modules/ajv/dist/compile/util.js +178 -0
  344. package/node_modules/ajv/dist/compile/util.js.map +1 -0
  345. package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
  346. package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  347. package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  348. package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
  349. package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  350. package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  351. package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
  352. package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  353. package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  354. package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
  355. package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  356. package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  357. package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
  358. package/node_modules/ajv/dist/compile/validate/index.js +520 -0
  359. package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  360. package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
  361. package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  362. package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  363. package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
  364. package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  365. package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  366. package/node_modules/ajv/dist/core.d.ts +173 -0
  367. package/node_modules/ajv/dist/core.js +618 -0
  368. package/node_modules/ajv/dist/core.js.map +1 -0
  369. package/node_modules/ajv/dist/jtd.d.ts +47 -0
  370. package/node_modules/ajv/dist/jtd.js +72 -0
  371. package/node_modules/ajv/dist/jtd.js.map +1 -0
  372. package/node_modules/ajv/dist/refs/data.json +13 -0
  373. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
  374. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
  375. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
  376. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  377. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  378. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  379. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  380. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  381. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  382. package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  383. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
  384. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  385. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
  386. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  387. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  388. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  389. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  390. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  391. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  392. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  393. package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  394. package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  395. package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  396. package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  397. package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
  398. package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
  399. package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
  400. package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
  401. package/node_modules/ajv/dist/runtime/equal.js +7 -0
  402. package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  403. package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
  404. package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
  405. package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
  406. package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
  407. package/node_modules/ajv/dist/runtime/quote.js +30 -0
  408. package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
  409. package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
  410. package/node_modules/ajv/dist/runtime/re2.js +6 -0
  411. package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
  412. package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
  413. package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
  414. package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
  415. package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
  416. package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  417. package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  418. package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
  419. package/node_modules/ajv/dist/runtime/uri.js +6 -0
  420. package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  421. package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
  422. package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  423. package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  424. package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
  425. package/node_modules/ajv/dist/standalone/index.js +90 -0
  426. package/node_modules/ajv/dist/standalone/index.js.map +1 -0
  427. package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
  428. package/node_modules/ajv/dist/standalone/instance.js +35 -0
  429. package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
  430. package/node_modules/ajv/dist/types/index.d.ts +183 -0
  431. package/node_modules/ajv/dist/types/index.js +3 -0
  432. package/node_modules/ajv/dist/types/index.js.map +1 -0
  433. package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
  434. package/node_modules/ajv/dist/types/json-schema.js +3 -0
  435. package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
  436. package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
  437. package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
  438. package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
  439. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
  440. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  441. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  442. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
  443. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  444. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  445. package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
  446. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  447. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  448. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
  449. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  450. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  451. package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
  452. package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  453. package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  454. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
  455. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  456. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  457. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
  458. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  459. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
  460. package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
  461. package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  462. package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  463. package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
  464. package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  465. package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  466. package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
  467. package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  468. package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  469. package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
  470. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  471. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  472. package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
  473. package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  474. package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  475. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
  476. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  477. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  478. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
  479. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  480. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  481. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
  482. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  483. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  484. package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
  485. package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  486. package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  487. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
  488. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  489. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  490. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
  491. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  492. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  493. package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
  494. package/node_modules/ajv/dist/vocabularies/code.js +131 -0
  495. package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  496. package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
  497. package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  498. package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  499. package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
  500. package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  501. package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  502. package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
  503. package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  504. package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  505. package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
  506. package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  507. package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  508. package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
  509. package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  510. package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  511. package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
  512. package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  513. package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
  514. package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
  515. package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  516. package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  517. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
  518. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  519. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
  520. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
  521. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  522. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
  523. package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
  524. package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  525. package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
  526. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
  527. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  528. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
  529. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
  530. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  531. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
  532. package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
  533. package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
  534. package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
  535. package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
  536. package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  537. package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  538. package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
  539. package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  540. package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  541. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
  542. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
  543. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
  544. package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
  545. package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
  546. package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
  547. package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
  548. package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
  549. package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
  550. package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
  551. package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
  552. package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
  553. package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
  554. package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
  555. package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
  556. package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
  557. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
  558. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
  559. package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
  560. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
  561. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
  562. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
  563. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
  564. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
  565. package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
  566. package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
  567. package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
  568. package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
  569. package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
  570. package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
  571. package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
  572. package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
  573. package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
  574. package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
  575. package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
  576. package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
  577. package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
  578. package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
  579. package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
  580. package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
  581. package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  582. package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  583. package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
  584. package/node_modules/ajv/dist/vocabularies/next.js +8 -0
  585. package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
  586. package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
  587. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  588. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
  589. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
  590. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  591. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
  592. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
  593. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  594. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
  595. package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
  596. package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  597. package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  598. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
  599. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  600. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
  601. package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
  602. package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  603. package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  604. package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
  605. package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  606. package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  607. package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
  608. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  609. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
  610. package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
  611. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  612. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  613. package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
  614. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  615. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  616. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
  617. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  618. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  619. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
  620. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  621. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  622. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
  623. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  624. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  625. package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
  626. package/node_modules/ajv/dist/vocabularies/validation/pattern.js +24 -0
  627. package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  628. package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
  629. package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  630. package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  631. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
  632. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  633. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  634. package/node_modules/ajv/lib/2019.ts +81 -0
  635. package/node_modules/ajv/lib/2020.ts +75 -0
  636. package/node_modules/ajv/lib/ajv.ts +70 -0
  637. package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
  638. package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
  639. package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
  640. package/node_modules/ajv/lib/compile/errors.ts +184 -0
  641. package/node_modules/ajv/lib/compile/index.ts +324 -0
  642. package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
  643. package/node_modules/ajv/lib/compile/jtd/serialize.ts +266 -0
  644. package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
  645. package/node_modules/ajv/lib/compile/names.ts +27 -0
  646. package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
  647. package/node_modules/ajv/lib/compile/resolve.ts +149 -0
  648. package/node_modules/ajv/lib/compile/rules.ts +50 -0
  649. package/node_modules/ajv/lib/compile/util.ts +213 -0
  650. package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
  651. package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
  652. package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
  653. package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
  654. package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
  655. package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
  656. package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
  657. package/node_modules/ajv/lib/core.ts +891 -0
  658. package/node_modules/ajv/lib/jtd.ts +132 -0
  659. package/node_modules/ajv/lib/refs/data.json +13 -0
  660. package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
  661. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  662. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  663. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  664. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  665. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  666. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  667. package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  668. package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
  669. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  670. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  671. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  672. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  673. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  674. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  675. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  676. package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  677. package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  678. package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  679. package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  680. package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
  681. package/node_modules/ajv/lib/runtime/equal.ts +7 -0
  682. package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
  683. package/node_modules/ajv/lib/runtime/quote.ts +31 -0
  684. package/node_modules/ajv/lib/runtime/re2.ts +6 -0
  685. package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
  686. package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
  687. package/node_modules/ajv/lib/runtime/uri.ts +6 -0
  688. package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
  689. package/node_modules/ajv/lib/standalone/index.ts +100 -0
  690. package/node_modules/ajv/lib/standalone/instance.ts +36 -0
  691. package/node_modules/ajv/lib/types/index.ts +244 -0
  692. package/node_modules/ajv/lib/types/json-schema.ts +187 -0
  693. package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
  694. package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
  695. package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
  696. package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
  697. package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
  698. package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
  699. package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
  700. package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
  701. package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
  702. package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
  703. package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
  704. package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
  705. package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
  706. package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
  707. package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
  708. package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
  709. package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
  710. package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
  711. package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
  712. package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
  713. package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
  714. package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
  715. package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
  716. package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
  717. package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
  718. package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
  719. package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
  720. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
  721. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
  722. package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
  723. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
  724. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
  725. package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
  726. package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
  727. package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
  728. package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
  729. package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
  730. package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
  731. package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
  732. package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
  733. package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
  734. package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
  735. package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
  736. package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
  737. package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
  738. package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
  739. package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
  740. package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
  741. package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
  742. package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
  743. package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
  744. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
  745. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
  746. package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
  747. package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
  748. package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
  749. package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
  750. package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
  751. package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
  752. package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
  753. package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
  754. package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
  755. package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
  756. package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +28 -0
  757. package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
  758. package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
  759. package/node_modules/ajv/package.json +126 -0
  760. package/node_modules/ansi-regex/index.d.ts +37 -0
  761. package/node_modules/ansi-regex/index.js +10 -0
  762. package/node_modules/ansi-regex/license +9 -0
  763. package/node_modules/ansi-regex/package.json +55 -0
  764. package/node_modules/ansi-regex/readme.md +78 -0
  765. package/node_modules/ansi-styles/index.d.ts +345 -0
  766. package/node_modules/ansi-styles/index.js +163 -0
  767. package/node_modules/ansi-styles/license +9 -0
  768. package/node_modules/ansi-styles/package.json +56 -0
  769. package/node_modules/ansi-styles/readme.md +152 -0
  770. package/node_modules/astral-regex/index.d.ts +28 -0
  771. package/node_modules/astral-regex/index.js +6 -0
  772. package/node_modules/astral-regex/license +9 -0
  773. package/node_modules/astral-regex/package.json +33 -0
  774. package/node_modules/astral-regex/readme.md +46 -0
  775. package/node_modules/at-least-node/LICENSE +6 -0
  776. package/node_modules/at-least-node/README.md +25 -0
  777. package/node_modules/at-least-node/index.js +5 -0
  778. package/node_modules/at-least-node/package.json +32 -0
  779. package/node_modules/chalk/index.d.ts +415 -0
  780. package/node_modules/chalk/license +9 -0
  781. package/node_modules/chalk/package.json +68 -0
  782. package/node_modules/chalk/readme.md +341 -0
  783. package/node_modules/chalk/source/index.js +229 -0
  784. package/node_modules/chalk/source/templates.js +134 -0
  785. package/node_modules/chalk/source/util.js +39 -0
  786. package/node_modules/color-convert/CHANGELOG.md +54 -0
  787. package/node_modules/color-convert/LICENSE +21 -0
  788. package/node_modules/color-convert/README.md +68 -0
  789. package/node_modules/color-convert/conversions.js +839 -0
  790. package/node_modules/color-convert/index.js +81 -0
  791. package/node_modules/color-convert/package.json +48 -0
  792. package/node_modules/color-convert/route.js +97 -0
  793. package/node_modules/color-name/LICENSE +8 -0
  794. package/node_modules/color-name/README.md +11 -0
  795. package/node_modules/color-name/index.js +152 -0
  796. package/node_modules/color-name/package.json +28 -0
  797. package/node_modules/diff/CONTRIBUTING.md +36 -0
  798. package/node_modules/diff/LICENSE +29 -0
  799. package/node_modules/diff/README.md +339 -0
  800. package/node_modules/diff/dist/diff.js +1730 -0
  801. package/node_modules/diff/dist/diff.min.js +1 -0
  802. package/node_modules/diff/lib/convert/dmp.js +32 -0
  803. package/node_modules/diff/lib/convert/xml.js +42 -0
  804. package/node_modules/diff/lib/diff/array.js +45 -0
  805. package/node_modules/diff/lib/diff/base.js +358 -0
  806. package/node_modules/diff/lib/diff/character.js +37 -0
  807. package/node_modules/diff/lib/diff/css.js +41 -0
  808. package/node_modules/diff/lib/diff/json.js +163 -0
  809. package/node_modules/diff/lib/diff/line.js +94 -0
  810. package/node_modules/diff/lib/diff/sentence.js +41 -0
  811. package/node_modules/diff/lib/diff/word.js +108 -0
  812. package/node_modules/diff/lib/index.es6.js +1699 -0
  813. package/node_modules/diff/lib/index.js +234 -0
  814. package/node_modules/diff/lib/index.mjs +1699 -0
  815. package/node_modules/diff/lib/patch/apply.js +238 -0
  816. package/node_modules/diff/lib/patch/create.js +276 -0
  817. package/node_modules/diff/lib/patch/merge.js +613 -0
  818. package/node_modules/diff/lib/patch/parse.js +167 -0
  819. package/node_modules/diff/lib/patch/reverse.js +63 -0
  820. package/node_modules/diff/lib/util/array.js +32 -0
  821. package/node_modules/diff/lib/util/distance-iterator.js +57 -0
  822. package/node_modules/diff/lib/util/params.js +24 -0
  823. package/node_modules/diff/package.json +89 -0
  824. package/node_modules/diff/release-notes.md +317 -0
  825. package/node_modules/diff/runtime.js +3 -0
  826. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  827. package/node_modules/emoji-regex/README.md +73 -0
  828. package/node_modules/emoji-regex/es2015/index.js +6 -0
  829. package/node_modules/emoji-regex/es2015/text.js +6 -0
  830. package/node_modules/emoji-regex/index.d.ts +23 -0
  831. package/node_modules/emoji-regex/index.js +6 -0
  832. package/node_modules/emoji-regex/package.json +50 -0
  833. package/node_modules/emoji-regex/text.js +6 -0
  834. package/node_modules/fast-deep-equal/LICENSE +21 -0
  835. package/node_modules/fast-deep-equal/README.md +96 -0
  836. package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
  837. package/node_modules/fast-deep-equal/es6/index.js +72 -0
  838. package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
  839. package/node_modules/fast-deep-equal/es6/react.js +79 -0
  840. package/node_modules/fast-deep-equal/index.d.ts +4 -0
  841. package/node_modules/fast-deep-equal/index.js +46 -0
  842. package/node_modules/fast-deep-equal/package.json +61 -0
  843. package/node_modules/fast-deep-equal/react.d.ts +2 -0
  844. package/node_modules/fast-deep-equal/react.js +53 -0
  845. package/node_modules/fast-uri/.gitattributes +2 -0
  846. package/node_modules/fast-uri/.github/.stale.yml +21 -0
  847. package/node_modules/fast-uri/.github/dependabot.yml +13 -0
  848. package/node_modules/fast-uri/.github/tests_checker.yml +8 -0
  849. package/node_modules/fast-uri/.github/workflows/ci.yml +23 -0
  850. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +20 -0
  851. package/node_modules/fast-uri/LICENSE +30 -0
  852. package/node_modules/fast-uri/README.md +125 -0
  853. package/node_modules/fast-uri/benchmark.js +105 -0
  854. package/node_modules/fast-uri/index.js +303 -0
  855. package/node_modules/fast-uri/lib/schemes.js +188 -0
  856. package/node_modules/fast-uri/lib/scopedChars.js +30 -0
  857. package/node_modules/fast-uri/lib/utils.js +242 -0
  858. package/node_modules/fast-uri/package.json +39 -0
  859. package/node_modules/fast-uri/test/.gitkeep +0 -0
  860. package/node_modules/fast-uri/test/ajv.test.js +39 -0
  861. package/node_modules/fast-uri/test/compatibility.test.js +131 -0
  862. package/node_modules/fast-uri/test/equal.test.js +103 -0
  863. package/node_modules/fast-uri/test/parse.test.js +318 -0
  864. package/node_modules/fast-uri/test/resolve.test.js +75 -0
  865. package/node_modules/fast-uri/test/serialize.test.js +143 -0
  866. package/node_modules/fast-uri/test/uri-js.test.js +912 -0
  867. package/node_modules/fast-uri/test/util.test.js +23 -0
  868. package/node_modules/fast-uri/types/index.d.ts +53 -0
  869. package/node_modules/fast-uri/types/index.test-d.ts +17 -0
  870. package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
  871. package/node_modules/graphql-mapping-template/LICENSE +201 -0
  872. package/node_modules/graphql-mapping-template/jest.config.js +12 -0
  873. package/node_modules/graphql-mapping-template/package.json +2 -41
  874. package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -0
  875. package/node_modules/graphql-transformer-common/LICENSE +201 -0
  876. package/node_modules/graphql-transformer-common/jest.config.js +12 -0
  877. package/node_modules/graphql-transformer-common/package.json +3 -42
  878. package/node_modules/has-flag/index.d.ts +39 -0
  879. package/node_modules/has-flag/index.js +8 -0
  880. package/node_modules/has-flag/license +9 -0
  881. package/node_modules/has-flag/package.json +46 -0
  882. package/node_modules/has-flag/readme.md +89 -0
  883. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  884. package/node_modules/is-fullwidth-code-point/index.js +50 -0
  885. package/node_modules/is-fullwidth-code-point/license +9 -0
  886. package/node_modules/is-fullwidth-code-point/package.json +42 -0
  887. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  888. package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  889. package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
  890. package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
  891. package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
  892. package/node_modules/json-schema-traverse/LICENSE +21 -0
  893. package/node_modules/json-schema-traverse/README.md +95 -0
  894. package/node_modules/json-schema-traverse/index.d.ts +40 -0
  895. package/node_modules/json-schema-traverse/index.js +93 -0
  896. package/node_modules/json-schema-traverse/package.json +43 -0
  897. package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  898. package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  899. package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  900. package/node_modules/lodash.truncate/LICENSE +47 -0
  901. package/node_modules/lodash.truncate/README.md +18 -0
  902. package/node_modules/lodash.truncate/index.js +632 -0
  903. package/node_modules/lodash.truncate/package.json +17 -0
  904. package/node_modules/require-from-string/index.js +34 -0
  905. package/node_modules/require-from-string/license +21 -0
  906. package/node_modules/require-from-string/package.json +28 -0
  907. package/node_modules/require-from-string/readme.md +56 -0
  908. package/node_modules/slice-ansi/index.js +103 -0
  909. package/node_modules/slice-ansi/license +10 -0
  910. package/node_modules/slice-ansi/package.json +52 -0
  911. package/node_modules/slice-ansi/readme.md +66 -0
  912. package/node_modules/string-width/index.d.ts +29 -0
  913. package/node_modules/string-width/index.js +47 -0
  914. package/node_modules/string-width/license +9 -0
  915. package/node_modules/string-width/package.json +56 -0
  916. package/node_modules/string-width/readme.md +50 -0
  917. package/node_modules/strip-ansi/index.d.ts +17 -0
  918. package/node_modules/strip-ansi/index.js +4 -0
  919. package/node_modules/strip-ansi/license +9 -0
  920. package/node_modules/strip-ansi/package.json +54 -0
  921. package/node_modules/strip-ansi/readme.md +46 -0
  922. package/node_modules/supports-color/browser.js +5 -0
  923. package/node_modules/supports-color/index.js +135 -0
  924. package/node_modules/supports-color/license +9 -0
  925. package/node_modules/supports-color/package.json +53 -0
  926. package/node_modules/supports-color/readme.md +76 -0
  927. package/node_modules/table/LICENSE +24 -0
  928. package/node_modules/table/README.md +837 -0
  929. package/node_modules/table/dist/src/alignSpanningCell.d.ts +7 -0
  930. package/node_modules/table/dist/src/alignSpanningCell.js +48 -0
  931. package/node_modules/table/dist/src/alignSpanningCell.js.map +1 -0
  932. package/node_modules/table/dist/src/alignString.d.ts +6 -0
  933. package/node_modules/table/dist/src/alignString.js +60 -0
  934. package/node_modules/table/dist/src/alignString.js.map +1 -0
  935. package/node_modules/table/dist/src/alignTableData.d.ts +2 -0
  936. package/node_modules/table/dist/src/alignTableData.js +20 -0
  937. package/node_modules/table/dist/src/alignTableData.js.map +1 -0
  938. package/node_modules/table/dist/src/calculateCellHeight.d.ts +4 -0
  939. package/node_modules/table/dist/src/calculateCellHeight.js +12 -0
  940. package/node_modules/table/dist/src/calculateCellHeight.js.map +1 -0
  941. package/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts +7 -0
  942. package/node_modules/table/dist/src/calculateMaximumColumnWidths.js +36 -0
  943. package/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map +1 -0
  944. package/node_modules/table/dist/src/calculateOutputColumnWidths.d.ts +2 -0
  945. package/node_modules/table/dist/src/calculateOutputColumnWidths.js +10 -0
  946. package/node_modules/table/dist/src/calculateOutputColumnWidths.js.map +1 -0
  947. package/node_modules/table/dist/src/calculateRowHeights.d.ts +5 -0
  948. package/node_modules/table/dist/src/calculateRowHeights.js +42 -0
  949. package/node_modules/table/dist/src/calculateRowHeights.js.map +1 -0
  950. package/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts +3 -0
  951. package/node_modules/table/dist/src/calculateSpanningCellWidth.js +26 -0
  952. package/node_modules/table/dist/src/calculateSpanningCellWidth.js.map +1 -0
  953. package/node_modules/table/dist/src/createStream.d.ts +2 -0
  954. package/node_modules/table/dist/src/createStream.js +74 -0
  955. package/node_modules/table/dist/src/createStream.js.map +1 -0
  956. package/node_modules/table/dist/src/drawBorder.d.ts +34 -0
  957. package/node_modules/table/dist/src/drawBorder.js +202 -0
  958. package/node_modules/table/dist/src/drawBorder.js.map +1 -0
  959. package/node_modules/table/dist/src/drawContent.d.ts +14 -0
  960. package/node_modules/table/dist/src/drawContent.js +51 -0
  961. package/node_modules/table/dist/src/drawContent.js.map +1 -0
  962. package/node_modules/table/dist/src/drawRow.d.ts +10 -0
  963. package/node_modules/table/dist/src/drawRow.js +25 -0
  964. package/node_modules/table/dist/src/drawRow.js.map +1 -0
  965. package/node_modules/table/dist/src/drawTable.d.ts +2 -0
  966. package/node_modules/table/dist/src/drawTable.js +31 -0
  967. package/node_modules/table/dist/src/drawTable.js.map +1 -0
  968. package/node_modules/table/dist/src/generated/validators.d.ts +13 -0
  969. package/node_modules/table/dist/src/generated/validators.js +2694 -0
  970. package/node_modules/table/dist/src/generated/validators.js.map +1 -0
  971. package/node_modules/table/dist/src/getBorderCharacters.d.ts +2 -0
  972. package/node_modules/table/dist/src/getBorderCharacters.js +105 -0
  973. package/node_modules/table/dist/src/getBorderCharacters.js.map +1 -0
  974. package/node_modules/table/dist/src/index.d.ts +5 -0
  975. package/node_modules/table/dist/src/index.js +21 -0
  976. package/node_modules/table/dist/src/index.js.map +1 -0
  977. package/node_modules/table/dist/src/injectHeaderConfig.d.ts +3 -0
  978. package/node_modules/table/dist/src/injectHeaderConfig.js +29 -0
  979. package/node_modules/table/dist/src/injectHeaderConfig.js.map +1 -0
  980. package/node_modules/table/dist/src/makeRangeConfig.d.ts +3 -0
  981. package/node_modules/table/dist/src/makeRangeConfig.js +18 -0
  982. package/node_modules/table/dist/src/makeRangeConfig.js.map +1 -0
  983. package/node_modules/table/dist/src/makeStreamConfig.d.ts +7 -0
  984. package/node_modules/table/dist/src/makeStreamConfig.js +43 -0
  985. package/node_modules/table/dist/src/makeStreamConfig.js.map +1 -0
  986. package/node_modules/table/dist/src/makeTableConfig.d.ts +7 -0
  987. package/node_modules/table/dist/src/makeTableConfig.js +62 -0
  988. package/node_modules/table/dist/src/makeTableConfig.js.map +1 -0
  989. package/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts +4 -0
  990. package/node_modules/table/dist/src/mapDataUsingRowHeights.js +52 -0
  991. package/node_modules/table/dist/src/mapDataUsingRowHeights.js.map +1 -0
  992. package/node_modules/table/dist/src/padTableData.d.ts +3 -0
  993. package/node_modules/table/dist/src/padTableData.js +23 -0
  994. package/node_modules/table/dist/src/padTableData.js.map +1 -0
  995. package/node_modules/table/dist/src/schemas/config.json +95 -0
  996. package/node_modules/table/dist/src/schemas/shared.json +139 -0
  997. package/node_modules/table/dist/src/schemas/streamConfig.json +25 -0
  998. package/node_modules/table/dist/src/spanningCellManager.d.ts +23 -0
  999. package/node_modules/table/dist/src/spanningCellManager.js +95 -0
  1000. package/node_modules/table/dist/src/spanningCellManager.js.map +1 -0
  1001. package/node_modules/table/dist/src/stringifyTableData.d.ts +2 -0
  1002. package/node_modules/table/dist/src/stringifyTableData.js +13 -0
  1003. package/node_modules/table/dist/src/stringifyTableData.js.map +1 -0
  1004. package/node_modules/table/dist/src/table.d.ts +2 -0
  1005. package/node_modules/table/dist/src/table.js +32 -0
  1006. package/node_modules/table/dist/src/table.js.map +1 -0
  1007. package/node_modules/table/dist/src/truncateTableData.d.ts +6 -0
  1008. package/node_modules/table/dist/src/truncateTableData.js +24 -0
  1009. package/node_modules/table/dist/src/truncateTableData.js.map +1 -0
  1010. package/node_modules/table/dist/src/types/api.d.ts +130 -0
  1011. package/node_modules/table/dist/src/types/api.js +3 -0
  1012. package/node_modules/table/dist/src/types/api.js.map +1 -0
  1013. package/node_modules/table/dist/src/types/internal.d.ts +1 -0
  1014. package/node_modules/table/dist/src/types/internal.js +3 -0
  1015. package/node_modules/table/dist/src/types/internal.js.map +1 -0
  1016. package/node_modules/table/dist/src/utils.d.ts +9 -0
  1017. package/node_modules/table/dist/src/utils.js +134 -0
  1018. package/node_modules/table/dist/src/utils.js.map +1 -0
  1019. package/node_modules/table/dist/src/validateConfig.d.ts +2 -0
  1020. package/node_modules/table/dist/src/validateConfig.js +27 -0
  1021. package/node_modules/table/dist/src/validateConfig.js.map +1 -0
  1022. package/node_modules/table/dist/src/validateSpanningCellConfig.d.ts +3 -0
  1023. package/node_modules/table/dist/src/validateSpanningCellConfig.js +46 -0
  1024. package/node_modules/table/dist/src/validateSpanningCellConfig.js.map +1 -0
  1025. package/node_modules/table/dist/src/validateTableData.d.ts +1 -0
  1026. package/node_modules/table/dist/src/validateTableData.js +32 -0
  1027. package/node_modules/table/dist/src/validateTableData.js.map +1 -0
  1028. package/node_modules/table/dist/src/wrapCell.d.ts +8 -0
  1029. package/node_modules/table/dist/src/wrapCell.js +33 -0
  1030. package/node_modules/table/dist/src/wrapCell.js.map +1 -0
  1031. package/node_modules/table/dist/src/wrapString.d.ts +9 -0
  1032. package/node_modules/table/dist/src/wrapString.js +27 -0
  1033. package/node_modules/table/dist/src/wrapString.js.map +1 -0
  1034. package/node_modules/table/dist/src/wrapWord.d.ts +1 -0
  1035. package/node_modules/table/dist/src/wrapWord.js +42 -0
  1036. package/node_modules/table/dist/src/wrapWord.js.map +1 -0
  1037. package/node_modules/table/package.json +77 -0
  1038. package/package.json +132 -123
  1039. package/src/amplify-graphql-api.ts +2 -0
  1040. package/src/index.ts +2 -0
  1041. package/src/log-config-types.ts +84 -0
  1042. package/src/types.ts +6 -1
@@ -0,0 +1,1699 @@
1
+ function Diff() {}
2
+ Diff.prototype = {
3
+ diff: function diff(oldString, newString) {
4
+ var _options$timeout;
5
+
6
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7
+ var callback = options.callback;
8
+
9
+ if (typeof options === 'function') {
10
+ callback = options;
11
+ options = {};
12
+ }
13
+
14
+ this.options = options;
15
+ var self = this;
16
+
17
+ function done(value) {
18
+ if (callback) {
19
+ setTimeout(function () {
20
+ callback(undefined, value);
21
+ }, 0);
22
+ return true;
23
+ } else {
24
+ return value;
25
+ }
26
+ } // Allow subclasses to massage the input prior to running
27
+
28
+
29
+ oldString = this.castInput(oldString);
30
+ newString = this.castInput(newString);
31
+ oldString = this.removeEmpty(this.tokenize(oldString));
32
+ newString = this.removeEmpty(this.tokenize(newString));
33
+ var newLen = newString.length,
34
+ oldLen = oldString.length;
35
+ var editLength = 1;
36
+ var maxEditLength = newLen + oldLen;
37
+
38
+ if (options.maxEditLength) {
39
+ maxEditLength = Math.min(maxEditLength, options.maxEditLength);
40
+ }
41
+
42
+ var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity;
43
+ var abortAfterTimestamp = Date.now() + maxExecutionTime;
44
+ var bestPath = [{
45
+ oldPos: -1,
46
+ lastComponent: undefined
47
+ }]; // Seed editLength = 0, i.e. the content starts with the same values
48
+
49
+ var newPos = this.extractCommon(bestPath[0], newString, oldString, 0);
50
+
51
+ if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
52
+ // Identity per the equality and tokenizer
53
+ return done([{
54
+ value: this.join(newString),
55
+ count: newString.length
56
+ }]);
57
+ } // Once we hit the right edge of the edit graph on some diagonal k, we can
58
+ // definitely reach the end of the edit graph in no more than k edits, so
59
+ // there's no point in considering any moves to diagonal k+1 any more (from
60
+ // which we're guaranteed to need at least k+1 more edits).
61
+ // Similarly, once we've reached the bottom of the edit graph, there's no
62
+ // point considering moves to lower diagonals.
63
+ // We record this fact by setting minDiagonalToConsider and
64
+ // maxDiagonalToConsider to some finite value once we've hit the edge of
65
+ // the edit graph.
66
+ // This optimization is not faithful to the original algorithm presented in
67
+ // Myers's paper, which instead pointlessly extends D-paths off the end of
68
+ // the edit graph - see page 7 of Myers's paper which notes this point
69
+ // explicitly and illustrates it with a diagram. This has major performance
70
+ // implications for some common scenarios. For instance, to compute a diff
71
+ // where the new text simply appends d characters on the end of the
72
+ // original text of length n, the true Myers algorithm will take O(n+d^2)
73
+ // time while this optimization needs only O(n+d) time.
74
+
75
+
76
+ var minDiagonalToConsider = -Infinity,
77
+ maxDiagonalToConsider = Infinity; // Main worker method. checks all permutations of a given edit length for acceptance.
78
+
79
+ function execEditLength() {
80
+ for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
81
+ var basePath = void 0;
82
+ var removePath = bestPath[diagonalPath - 1],
83
+ addPath = bestPath[diagonalPath + 1];
84
+
85
+ if (removePath) {
86
+ // No one else is going to attempt to use this value, clear it
87
+ bestPath[diagonalPath - 1] = undefined;
88
+ }
89
+
90
+ var canAdd = false;
91
+
92
+ if (addPath) {
93
+ // what newPos will be after we do an insertion:
94
+ var addPathNewPos = addPath.oldPos - diagonalPath;
95
+ canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
96
+ }
97
+
98
+ var canRemove = removePath && removePath.oldPos + 1 < oldLen;
99
+
100
+ if (!canAdd && !canRemove) {
101
+ // If this path is a terminal then prune
102
+ bestPath[diagonalPath] = undefined;
103
+ continue;
104
+ } // Select the diagonal that we want to branch from. We select the prior
105
+ // path whose position in the old string is the farthest from the origin
106
+ // and does not pass the bounds of the diff graph
107
+ // TODO: Remove the `+ 1` here to make behavior match Myers algorithm
108
+ // and prefer to order removals before insertions.
109
+
110
+
111
+ if (!canRemove || canAdd && removePath.oldPos + 1 < addPath.oldPos) {
112
+ basePath = self.addToPath(addPath, true, undefined, 0);
113
+ } else {
114
+ basePath = self.addToPath(removePath, undefined, true, 1);
115
+ }
116
+
117
+ newPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
118
+
119
+ if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
120
+ // If we have hit the end of both strings, then we are done
121
+ return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken));
122
+ } else {
123
+ bestPath[diagonalPath] = basePath;
124
+
125
+ if (basePath.oldPos + 1 >= oldLen) {
126
+ maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
127
+ }
128
+
129
+ if (newPos + 1 >= newLen) {
130
+ minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
131
+ }
132
+ }
133
+ }
134
+
135
+ editLength++;
136
+ } // Performs the length of edit iteration. Is a bit fugly as this has to support the
137
+ // sync and async mode which is never fun. Loops over execEditLength until a value
138
+ // is produced, or until the edit length exceeds options.maxEditLength (if given),
139
+ // in which case it will return undefined.
140
+
141
+
142
+ if (callback) {
143
+ (function exec() {
144
+ setTimeout(function () {
145
+ if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
146
+ return callback();
147
+ }
148
+
149
+ if (!execEditLength()) {
150
+ exec();
151
+ }
152
+ }, 0);
153
+ })();
154
+ } else {
155
+ while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
156
+ var ret = execEditLength();
157
+
158
+ if (ret) {
159
+ return ret;
160
+ }
161
+ }
162
+ }
163
+ },
164
+ addToPath: function addToPath(path, added, removed, oldPosInc) {
165
+ var last = path.lastComponent;
166
+
167
+ if (last && last.added === added && last.removed === removed) {
168
+ return {
169
+ oldPos: path.oldPos + oldPosInc,
170
+ lastComponent: {
171
+ count: last.count + 1,
172
+ added: added,
173
+ removed: removed,
174
+ previousComponent: last.previousComponent
175
+ }
176
+ };
177
+ } else {
178
+ return {
179
+ oldPos: path.oldPos + oldPosInc,
180
+ lastComponent: {
181
+ count: 1,
182
+ added: added,
183
+ removed: removed,
184
+ previousComponent: last
185
+ }
186
+ };
187
+ }
188
+ },
189
+ extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
190
+ var newLen = newString.length,
191
+ oldLen = oldString.length,
192
+ oldPos = basePath.oldPos,
193
+ newPos = oldPos - diagonalPath,
194
+ commonCount = 0;
195
+
196
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
197
+ newPos++;
198
+ oldPos++;
199
+ commonCount++;
200
+ }
201
+
202
+ if (commonCount) {
203
+ basePath.lastComponent = {
204
+ count: commonCount,
205
+ previousComponent: basePath.lastComponent
206
+ };
207
+ }
208
+
209
+ basePath.oldPos = oldPos;
210
+ return newPos;
211
+ },
212
+ equals: function equals(left, right) {
213
+ if (this.options.comparator) {
214
+ return this.options.comparator(left, right);
215
+ } else {
216
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
217
+ }
218
+ },
219
+ removeEmpty: function removeEmpty(array) {
220
+ var ret = [];
221
+
222
+ for (var i = 0; i < array.length; i++) {
223
+ if (array[i]) {
224
+ ret.push(array[i]);
225
+ }
226
+ }
227
+
228
+ return ret;
229
+ },
230
+ castInput: function castInput(value) {
231
+ return value;
232
+ },
233
+ tokenize: function tokenize(value) {
234
+ return value.split('');
235
+ },
236
+ join: function join(chars) {
237
+ return chars.join('');
238
+ }
239
+ };
240
+
241
+ function buildValues(diff, lastComponent, newString, oldString, useLongestToken) {
242
+ // First we convert our linked list of components in reverse order to an
243
+ // array in the right order:
244
+ var components = [];
245
+ var nextComponent;
246
+
247
+ while (lastComponent) {
248
+ components.push(lastComponent);
249
+ nextComponent = lastComponent.previousComponent;
250
+ delete lastComponent.previousComponent;
251
+ lastComponent = nextComponent;
252
+ }
253
+
254
+ components.reverse();
255
+ var componentPos = 0,
256
+ componentLen = components.length,
257
+ newPos = 0,
258
+ oldPos = 0;
259
+
260
+ for (; componentPos < componentLen; componentPos++) {
261
+ var component = components[componentPos];
262
+
263
+ if (!component.removed) {
264
+ if (!component.added && useLongestToken) {
265
+ var value = newString.slice(newPos, newPos + component.count);
266
+ value = value.map(function (value, i) {
267
+ var oldValue = oldString[oldPos + i];
268
+ return oldValue.length > value.length ? oldValue : value;
269
+ });
270
+ component.value = diff.join(value);
271
+ } else {
272
+ component.value = diff.join(newString.slice(newPos, newPos + component.count));
273
+ }
274
+
275
+ newPos += component.count; // Common case
276
+
277
+ if (!component.added) {
278
+ oldPos += component.count;
279
+ }
280
+ } else {
281
+ component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
282
+ oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
283
+ // The diffing algorithm is tied to add then remove output and this is the simplest
284
+ // route to get the desired output with minimal overhead.
285
+
286
+ if (componentPos && components[componentPos - 1].added) {
287
+ var tmp = components[componentPos - 1];
288
+ components[componentPos - 1] = components[componentPos];
289
+ components[componentPos] = tmp;
290
+ }
291
+ }
292
+ } // Special case handle for when one terminal is ignored (i.e. whitespace).
293
+ // For this case we merge the terminal into the prior string and drop the change.
294
+ // This is only available for string mode.
295
+
296
+
297
+ var finalComponent = components[componentLen - 1];
298
+
299
+ if (componentLen > 1 && typeof finalComponent.value === 'string' && (finalComponent.added || finalComponent.removed) && diff.equals('', finalComponent.value)) {
300
+ components[componentLen - 2].value += finalComponent.value;
301
+ components.pop();
302
+ }
303
+
304
+ return components;
305
+ }
306
+
307
+ var characterDiff = new Diff();
308
+ function diffChars(oldStr, newStr, options) {
309
+ return characterDiff.diff(oldStr, newStr, options);
310
+ }
311
+
312
+ function generateOptions(options, defaults) {
313
+ if (typeof options === 'function') {
314
+ defaults.callback = options;
315
+ } else if (options) {
316
+ for (var name in options) {
317
+ /* istanbul ignore else */
318
+ if (options.hasOwnProperty(name)) {
319
+ defaults[name] = options[name];
320
+ }
321
+ }
322
+ }
323
+
324
+ return defaults;
325
+ }
326
+
327
+ //
328
+ // Ranges and exceptions:
329
+ // Latin-1 Supplement, 0080–00FF
330
+ // - U+00D7 × Multiplication sign
331
+ // - U+00F7 ÷ Division sign
332
+ // Latin Extended-A, 0100–017F
333
+ // Latin Extended-B, 0180–024F
334
+ // IPA Extensions, 0250–02AF
335
+ // Spacing Modifier Letters, 02B0–02FF
336
+ // - U+02C7 ˇ &#711; Caron
337
+ // - U+02D8 ˘ &#728; Breve
338
+ // - U+02D9 ˙ &#729; Dot Above
339
+ // - U+02DA ˚ &#730; Ring Above
340
+ // - U+02DB ˛ &#731; Ogonek
341
+ // - U+02DC ˜ &#732; Small Tilde
342
+ // - U+02DD ˝ &#733; Double Acute Accent
343
+ // Latin Extended Additional, 1E00–1EFF
344
+
345
+ var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
346
+ var reWhitespace = /\S/;
347
+ var wordDiff = new Diff();
348
+
349
+ wordDiff.equals = function (left, right) {
350
+ if (this.options.ignoreCase) {
351
+ left = left.toLowerCase();
352
+ right = right.toLowerCase();
353
+ }
354
+
355
+ return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
356
+ };
357
+
358
+ wordDiff.tokenize = function (value) {
359
+ // All whitespace symbols except newline group into one token, each newline - in separate token
360
+ var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
361
+
362
+ for (var i = 0; i < tokens.length - 1; i++) {
363
+ // If we have an empty string in the next field and we have only word chars before and after, merge
364
+ if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
365
+ tokens[i] += tokens[i + 2];
366
+ tokens.splice(i + 1, 2);
367
+ i--;
368
+ }
369
+ }
370
+
371
+ return tokens;
372
+ };
373
+
374
+ function diffWords(oldStr, newStr, options) {
375
+ options = generateOptions(options, {
376
+ ignoreWhitespace: true
377
+ });
378
+ return wordDiff.diff(oldStr, newStr, options);
379
+ }
380
+ function diffWordsWithSpace(oldStr, newStr, options) {
381
+ return wordDiff.diff(oldStr, newStr, options);
382
+ }
383
+
384
+ var lineDiff = new Diff();
385
+
386
+ lineDiff.tokenize = function (value) {
387
+ if (this.options.stripTrailingCr) {
388
+ // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior
389
+ value = value.replace(/\r\n/g, '\n');
390
+ }
391
+
392
+ var retLines = [],
393
+ linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
394
+
395
+ if (!linesAndNewlines[linesAndNewlines.length - 1]) {
396
+ linesAndNewlines.pop();
397
+ } // Merge the content and line separators into single tokens
398
+
399
+
400
+ for (var i = 0; i < linesAndNewlines.length; i++) {
401
+ var line = linesAndNewlines[i];
402
+
403
+ if (i % 2 && !this.options.newlineIsToken) {
404
+ retLines[retLines.length - 1] += line;
405
+ } else {
406
+ if (this.options.ignoreWhitespace) {
407
+ line = line.trim();
408
+ }
409
+
410
+ retLines.push(line);
411
+ }
412
+ }
413
+
414
+ return retLines;
415
+ };
416
+
417
+ function diffLines(oldStr, newStr, callback) {
418
+ return lineDiff.diff(oldStr, newStr, callback);
419
+ }
420
+ function diffTrimmedLines(oldStr, newStr, callback) {
421
+ var options = generateOptions(callback, {
422
+ ignoreWhitespace: true
423
+ });
424
+ return lineDiff.diff(oldStr, newStr, options);
425
+ }
426
+
427
+ var sentenceDiff = new Diff();
428
+
429
+ sentenceDiff.tokenize = function (value) {
430
+ return value.split(/(\S.+?[.!?])(?=\s+|$)/);
431
+ };
432
+
433
+ function diffSentences(oldStr, newStr, callback) {
434
+ return sentenceDiff.diff(oldStr, newStr, callback);
435
+ }
436
+
437
+ var cssDiff = new Diff();
438
+
439
+ cssDiff.tokenize = function (value) {
440
+ return value.split(/([{}:;,]|\s+)/);
441
+ };
442
+
443
+ function diffCss(oldStr, newStr, callback) {
444
+ return cssDiff.diff(oldStr, newStr, callback);
445
+ }
446
+
447
+ function _typeof(obj) {
448
+ "@babel/helpers - typeof";
449
+
450
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
451
+ _typeof = function (obj) {
452
+ return typeof obj;
453
+ };
454
+ } else {
455
+ _typeof = function (obj) {
456
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
457
+ };
458
+ }
459
+
460
+ return _typeof(obj);
461
+ }
462
+
463
+ function _defineProperty(obj, key, value) {
464
+ if (key in obj) {
465
+ Object.defineProperty(obj, key, {
466
+ value: value,
467
+ enumerable: true,
468
+ configurable: true,
469
+ writable: true
470
+ });
471
+ } else {
472
+ obj[key] = value;
473
+ }
474
+
475
+ return obj;
476
+ }
477
+
478
+ function ownKeys(object, enumerableOnly) {
479
+ var keys = Object.keys(object);
480
+
481
+ if (Object.getOwnPropertySymbols) {
482
+ var symbols = Object.getOwnPropertySymbols(object);
483
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
484
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
485
+ });
486
+ keys.push.apply(keys, symbols);
487
+ }
488
+
489
+ return keys;
490
+ }
491
+
492
+ function _objectSpread2(target) {
493
+ for (var i = 1; i < arguments.length; i++) {
494
+ var source = arguments[i] != null ? arguments[i] : {};
495
+
496
+ if (i % 2) {
497
+ ownKeys(Object(source), true).forEach(function (key) {
498
+ _defineProperty(target, key, source[key]);
499
+ });
500
+ } else if (Object.getOwnPropertyDescriptors) {
501
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
502
+ } else {
503
+ ownKeys(Object(source)).forEach(function (key) {
504
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
505
+ });
506
+ }
507
+ }
508
+
509
+ return target;
510
+ }
511
+
512
+ function _toConsumableArray(arr) {
513
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
514
+ }
515
+
516
+ function _arrayWithoutHoles(arr) {
517
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
518
+ }
519
+
520
+ function _iterableToArray(iter) {
521
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
522
+ }
523
+
524
+ function _unsupportedIterableToArray(o, minLen) {
525
+ if (!o) return;
526
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
527
+ var n = Object.prototype.toString.call(o).slice(8, -1);
528
+ if (n === "Object" && o.constructor) n = o.constructor.name;
529
+ if (n === "Map" || n === "Set") return Array.from(o);
530
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
531
+ }
532
+
533
+ function _arrayLikeToArray(arr, len) {
534
+ if (len == null || len > arr.length) len = arr.length;
535
+
536
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
537
+
538
+ return arr2;
539
+ }
540
+
541
+ function _nonIterableSpread() {
542
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
543
+ }
544
+
545
+ var objectPrototypeToString = Object.prototype.toString;
546
+ var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
547
+ // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
548
+
549
+ jsonDiff.useLongestToken = true;
550
+ jsonDiff.tokenize = lineDiff.tokenize;
551
+
552
+ jsonDiff.castInput = function (value) {
553
+ var _this$options = this.options,
554
+ undefinedReplacement = _this$options.undefinedReplacement,
555
+ _this$options$stringi = _this$options.stringifyReplacer,
556
+ stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
557
+ return typeof v === 'undefined' ? undefinedReplacement : v;
558
+ } : _this$options$stringi;
559
+ return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
560
+ };
561
+
562
+ jsonDiff.equals = function (left, right) {
563
+ return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
564
+ };
565
+
566
+ function diffJson(oldObj, newObj, options) {
567
+ return jsonDiff.diff(oldObj, newObj, options);
568
+ } // This function handles the presence of circular references by bailing out when encountering an
569
+ // object that is already on the "stack" of items being processed. Accepts an optional replacer
570
+
571
+ function canonicalize(obj, stack, replacementStack, replacer, key) {
572
+ stack = stack || [];
573
+ replacementStack = replacementStack || [];
574
+
575
+ if (replacer) {
576
+ obj = replacer(key, obj);
577
+ }
578
+
579
+ var i;
580
+
581
+ for (i = 0; i < stack.length; i += 1) {
582
+ if (stack[i] === obj) {
583
+ return replacementStack[i];
584
+ }
585
+ }
586
+
587
+ var canonicalizedObj;
588
+
589
+ if ('[object Array]' === objectPrototypeToString.call(obj)) {
590
+ stack.push(obj);
591
+ canonicalizedObj = new Array(obj.length);
592
+ replacementStack.push(canonicalizedObj);
593
+
594
+ for (i = 0; i < obj.length; i += 1) {
595
+ canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
596
+ }
597
+
598
+ stack.pop();
599
+ replacementStack.pop();
600
+ return canonicalizedObj;
601
+ }
602
+
603
+ if (obj && obj.toJSON) {
604
+ obj = obj.toJSON();
605
+ }
606
+
607
+ if (_typeof(obj) === 'object' && obj !== null) {
608
+ stack.push(obj);
609
+ canonicalizedObj = {};
610
+ replacementStack.push(canonicalizedObj);
611
+
612
+ var sortedKeys = [],
613
+ _key;
614
+
615
+ for (_key in obj) {
616
+ /* istanbul ignore else */
617
+ if (obj.hasOwnProperty(_key)) {
618
+ sortedKeys.push(_key);
619
+ }
620
+ }
621
+
622
+ sortedKeys.sort();
623
+
624
+ for (i = 0; i < sortedKeys.length; i += 1) {
625
+ _key = sortedKeys[i];
626
+ canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
627
+ }
628
+
629
+ stack.pop();
630
+ replacementStack.pop();
631
+ } else {
632
+ canonicalizedObj = obj;
633
+ }
634
+
635
+ return canonicalizedObj;
636
+ }
637
+
638
+ var arrayDiff = new Diff();
639
+
640
+ arrayDiff.tokenize = function (value) {
641
+ return value.slice();
642
+ };
643
+
644
+ arrayDiff.join = arrayDiff.removeEmpty = function (value) {
645
+ return value;
646
+ };
647
+
648
+ function diffArrays(oldArr, newArr, callback) {
649
+ return arrayDiff.diff(oldArr, newArr, callback);
650
+ }
651
+
652
+ function parsePatch(uniDiff) {
653
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
654
+ var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
655
+ delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
656
+ list = [],
657
+ i = 0;
658
+
659
+ function parseIndex() {
660
+ var index = {};
661
+ list.push(index); // Parse diff metadata
662
+
663
+ while (i < diffstr.length) {
664
+ var line = diffstr[i]; // File header found, end parsing diff metadata
665
+
666
+ if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
667
+ break;
668
+ } // Diff index
669
+
670
+
671
+ var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
672
+
673
+ if (header) {
674
+ index.index = header[1];
675
+ }
676
+
677
+ i++;
678
+ } // Parse file headers if they are defined. Unified diff requires them, but
679
+ // there's no technical issues to have an isolated hunk without file header
680
+
681
+
682
+ parseFileHeader(index);
683
+ parseFileHeader(index); // Parse hunks
684
+
685
+ index.hunks = [];
686
+
687
+ while (i < diffstr.length) {
688
+ var _line = diffstr[i];
689
+
690
+ if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
691
+ break;
692
+ } else if (/^@@/.test(_line)) {
693
+ index.hunks.push(parseHunk());
694
+ } else if (_line && options.strict) {
695
+ // Ignore unexpected content unless in strict mode
696
+ throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
697
+ } else {
698
+ i++;
699
+ }
700
+ }
701
+ } // Parses the --- and +++ headers, if none are found, no lines
702
+ // are consumed.
703
+
704
+
705
+ function parseFileHeader(index) {
706
+ var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
707
+
708
+ if (fileHeader) {
709
+ var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
710
+ var data = fileHeader[2].split('\t', 2);
711
+ var fileName = data[0].replace(/\\\\/g, '\\');
712
+
713
+ if (/^".*"$/.test(fileName)) {
714
+ fileName = fileName.substr(1, fileName.length - 2);
715
+ }
716
+
717
+ index[keyPrefix + 'FileName'] = fileName;
718
+ index[keyPrefix + 'Header'] = (data[1] || '').trim();
719
+ i++;
720
+ }
721
+ } // Parses a hunk
722
+ // This assumes that we are at the start of a hunk.
723
+
724
+
725
+ function parseHunk() {
726
+ var chunkHeaderIndex = i,
727
+ chunkHeaderLine = diffstr[i++],
728
+ chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
729
+ var hunk = {
730
+ oldStart: +chunkHeader[1],
731
+ oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
732
+ newStart: +chunkHeader[3],
733
+ newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
734
+ lines: [],
735
+ linedelimiters: []
736
+ }; // Unified Diff Format quirk: If the chunk size is 0,
737
+ // the first number is one lower than one would expect.
738
+ // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
739
+
740
+ if (hunk.oldLines === 0) {
741
+ hunk.oldStart += 1;
742
+ }
743
+
744
+ if (hunk.newLines === 0) {
745
+ hunk.newStart += 1;
746
+ }
747
+
748
+ var addCount = 0,
749
+ removeCount = 0;
750
+
751
+ for (; i < diffstr.length; i++) {
752
+ // Lines starting with '---' could be mistaken for the "remove line" operation
753
+ // But they could be the header for the next file. Therefore prune such cases out.
754
+ if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
755
+ break;
756
+ }
757
+
758
+ var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
759
+
760
+ if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
761
+ hunk.lines.push(diffstr[i]);
762
+ hunk.linedelimiters.push(delimiters[i] || '\n');
763
+
764
+ if (operation === '+') {
765
+ addCount++;
766
+ } else if (operation === '-') {
767
+ removeCount++;
768
+ } else if (operation === ' ') {
769
+ addCount++;
770
+ removeCount++;
771
+ }
772
+ } else {
773
+ break;
774
+ }
775
+ } // Handle the empty block count case
776
+
777
+
778
+ if (!addCount && hunk.newLines === 1) {
779
+ hunk.newLines = 0;
780
+ }
781
+
782
+ if (!removeCount && hunk.oldLines === 1) {
783
+ hunk.oldLines = 0;
784
+ } // Perform optional sanity checking
785
+
786
+
787
+ if (options.strict) {
788
+ if (addCount !== hunk.newLines) {
789
+ throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
790
+ }
791
+
792
+ if (removeCount !== hunk.oldLines) {
793
+ throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
794
+ }
795
+ }
796
+
797
+ return hunk;
798
+ }
799
+
800
+ while (i < diffstr.length) {
801
+ parseIndex();
802
+ }
803
+
804
+ return list;
805
+ }
806
+
807
+ // Iterator that traverses in the range of [min, max], stepping
808
+ // by distance from a given start position. I.e. for [0, 4], with
809
+ // start of 2, this will iterate 2, 3, 1, 4, 0.
810
+ function distanceIterator (start, minLine, maxLine) {
811
+ var wantForward = true,
812
+ backwardExhausted = false,
813
+ forwardExhausted = false,
814
+ localOffset = 1;
815
+ return function iterator() {
816
+ if (wantForward && !forwardExhausted) {
817
+ if (backwardExhausted) {
818
+ localOffset++;
819
+ } else {
820
+ wantForward = false;
821
+ } // Check if trying to fit beyond text length, and if not, check it fits
822
+ // after offset location (or desired location on first iteration)
823
+
824
+
825
+ if (start + localOffset <= maxLine) {
826
+ return localOffset;
827
+ }
828
+
829
+ forwardExhausted = true;
830
+ }
831
+
832
+ if (!backwardExhausted) {
833
+ if (!forwardExhausted) {
834
+ wantForward = true;
835
+ } // Check if trying to fit before text beginning, and if not, check it fits
836
+ // before offset location
837
+
838
+
839
+ if (minLine <= start - localOffset) {
840
+ return -localOffset++;
841
+ }
842
+
843
+ backwardExhausted = true;
844
+ return iterator();
845
+ } // We tried to fit hunk before text beginning and beyond text length, then
846
+ // hunk can't fit on the text. Return undefined
847
+
848
+ };
849
+ }
850
+
851
+ function applyPatch(source, uniDiff) {
852
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
853
+
854
+ if (typeof uniDiff === 'string') {
855
+ uniDiff = parsePatch(uniDiff);
856
+ }
857
+
858
+ if (Array.isArray(uniDiff)) {
859
+ if (uniDiff.length > 1) {
860
+ throw new Error('applyPatch only works with a single input.');
861
+ }
862
+
863
+ uniDiff = uniDiff[0];
864
+ } // Apply the diff to the input
865
+
866
+
867
+ var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
868
+ delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
869
+ hunks = uniDiff.hunks,
870
+ compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
871
+ return line === patchContent;
872
+ },
873
+ errorCount = 0,
874
+ fuzzFactor = options.fuzzFactor || 0,
875
+ minLine = 0,
876
+ offset = 0,
877
+ removeEOFNL,
878
+ addEOFNL;
879
+ /**
880
+ * Checks if the hunk exactly fits on the provided location
881
+ */
882
+
883
+
884
+ function hunkFits(hunk, toPos) {
885
+ for (var j = 0; j < hunk.lines.length; j++) {
886
+ var line = hunk.lines[j],
887
+ operation = line.length > 0 ? line[0] : ' ',
888
+ content = line.length > 0 ? line.substr(1) : line;
889
+
890
+ if (operation === ' ' || operation === '-') {
891
+ // Context sanity check
892
+ if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
893
+ errorCount++;
894
+
895
+ if (errorCount > fuzzFactor) {
896
+ return false;
897
+ }
898
+ }
899
+
900
+ toPos++;
901
+ }
902
+ }
903
+
904
+ return true;
905
+ } // Search best fit offsets for each hunk based on the previous ones
906
+
907
+
908
+ for (var i = 0; i < hunks.length; i++) {
909
+ var hunk = hunks[i],
910
+ maxLine = lines.length - hunk.oldLines,
911
+ localOffset = 0,
912
+ toPos = offset + hunk.oldStart - 1;
913
+ var iterator = distanceIterator(toPos, minLine, maxLine);
914
+
915
+ for (; localOffset !== undefined; localOffset = iterator()) {
916
+ if (hunkFits(hunk, toPos + localOffset)) {
917
+ hunk.offset = offset += localOffset;
918
+ break;
919
+ }
920
+ }
921
+
922
+ if (localOffset === undefined) {
923
+ return false;
924
+ } // Set lower text limit to end of the current hunk, so next ones don't try
925
+ // to fit over already patched text
926
+
927
+
928
+ minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
929
+ } // Apply patch hunks
930
+
931
+
932
+ var diffOffset = 0;
933
+
934
+ for (var _i = 0; _i < hunks.length; _i++) {
935
+ var _hunk = hunks[_i],
936
+ _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
937
+
938
+ diffOffset += _hunk.newLines - _hunk.oldLines;
939
+
940
+ for (var j = 0; j < _hunk.lines.length; j++) {
941
+ var line = _hunk.lines[j],
942
+ operation = line.length > 0 ? line[0] : ' ',
943
+ content = line.length > 0 ? line.substr(1) : line,
944
+ delimiter = _hunk.linedelimiters && _hunk.linedelimiters[j] || '\n';
945
+
946
+ if (operation === ' ') {
947
+ _toPos++;
948
+ } else if (operation === '-') {
949
+ lines.splice(_toPos, 1);
950
+ delimiters.splice(_toPos, 1);
951
+ /* istanbul ignore else */
952
+ } else if (operation === '+') {
953
+ lines.splice(_toPos, 0, content);
954
+ delimiters.splice(_toPos, 0, delimiter);
955
+ _toPos++;
956
+ } else if (operation === '\\') {
957
+ var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
958
+
959
+ if (previousOperation === '+') {
960
+ removeEOFNL = true;
961
+ } else if (previousOperation === '-') {
962
+ addEOFNL = true;
963
+ }
964
+ }
965
+ }
966
+ } // Handle EOFNL insertion/removal
967
+
968
+
969
+ if (removeEOFNL) {
970
+ while (!lines[lines.length - 1]) {
971
+ lines.pop();
972
+ delimiters.pop();
973
+ }
974
+ } else if (addEOFNL) {
975
+ lines.push('');
976
+ delimiters.push('\n');
977
+ }
978
+
979
+ for (var _k = 0; _k < lines.length - 1; _k++) {
980
+ lines[_k] = lines[_k] + delimiters[_k];
981
+ }
982
+
983
+ return lines.join('');
984
+ } // Wrapper that supports multiple file patches via callbacks.
985
+
986
+ function applyPatches(uniDiff, options) {
987
+ if (typeof uniDiff === 'string') {
988
+ uniDiff = parsePatch(uniDiff);
989
+ }
990
+
991
+ var currentIndex = 0;
992
+
993
+ function processIndex() {
994
+ var index = uniDiff[currentIndex++];
995
+
996
+ if (!index) {
997
+ return options.complete();
998
+ }
999
+
1000
+ options.loadFile(index, function (err, data) {
1001
+ if (err) {
1002
+ return options.complete(err);
1003
+ }
1004
+
1005
+ var updatedContent = applyPatch(data, index, options);
1006
+ options.patched(index, updatedContent, function (err) {
1007
+ if (err) {
1008
+ return options.complete(err);
1009
+ }
1010
+
1011
+ processIndex();
1012
+ });
1013
+ });
1014
+ }
1015
+
1016
+ processIndex();
1017
+ }
1018
+
1019
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
1020
+ if (!options) {
1021
+ options = {};
1022
+ }
1023
+
1024
+ if (typeof options.context === 'undefined') {
1025
+ options.context = 4;
1026
+ }
1027
+
1028
+ var diff = diffLines(oldStr, newStr, options);
1029
+
1030
+ if (!diff) {
1031
+ return;
1032
+ }
1033
+
1034
+ diff.push({
1035
+ value: '',
1036
+ lines: []
1037
+ }); // Append an empty value to make cleanup easier
1038
+
1039
+ function contextLines(lines) {
1040
+ return lines.map(function (entry) {
1041
+ return ' ' + entry;
1042
+ });
1043
+ }
1044
+
1045
+ var hunks = [];
1046
+ var oldRangeStart = 0,
1047
+ newRangeStart = 0,
1048
+ curRange = [],
1049
+ oldLine = 1,
1050
+ newLine = 1;
1051
+
1052
+ var _loop = function _loop(i) {
1053
+ var current = diff[i],
1054
+ lines = current.lines || current.value.replace(/\n$/, '').split('\n');
1055
+ current.lines = lines;
1056
+
1057
+ if (current.added || current.removed) {
1058
+ var _curRange;
1059
+
1060
+ // If we have previous context, start with that
1061
+ if (!oldRangeStart) {
1062
+ var prev = diff[i - 1];
1063
+ oldRangeStart = oldLine;
1064
+ newRangeStart = newLine;
1065
+
1066
+ if (prev) {
1067
+ curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
1068
+ oldRangeStart -= curRange.length;
1069
+ newRangeStart -= curRange.length;
1070
+ }
1071
+ } // Output our changes
1072
+
1073
+
1074
+ (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
1075
+ return (current.added ? '+' : '-') + entry;
1076
+ }))); // Track the updated file position
1077
+
1078
+
1079
+ if (current.added) {
1080
+ newLine += lines.length;
1081
+ } else {
1082
+ oldLine += lines.length;
1083
+ }
1084
+ } else {
1085
+ // Identical context lines. Track line changes
1086
+ if (oldRangeStart) {
1087
+ // Close out any changes that have been output (or join overlapping)
1088
+ if (lines.length <= options.context * 2 && i < diff.length - 2) {
1089
+ var _curRange2;
1090
+
1091
+ // Overlapping
1092
+ (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
1093
+ } else {
1094
+ var _curRange3;
1095
+
1096
+ // end the range and output
1097
+ var contextSize = Math.min(lines.length, options.context);
1098
+
1099
+ (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
1100
+
1101
+ var hunk = {
1102
+ oldStart: oldRangeStart,
1103
+ oldLines: oldLine - oldRangeStart + contextSize,
1104
+ newStart: newRangeStart,
1105
+ newLines: newLine - newRangeStart + contextSize,
1106
+ lines: curRange
1107
+ };
1108
+
1109
+ if (i >= diff.length - 2 && lines.length <= options.context) {
1110
+ // EOF is inside this hunk
1111
+ var oldEOFNewline = /\n$/.test(oldStr);
1112
+ var newEOFNewline = /\n$/.test(newStr);
1113
+ var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
1114
+
1115
+ if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
1116
+ // special case: old has no eol and no trailing context; no-nl can end up before adds
1117
+ // however, if the old file is empty, do not output the no-nl line
1118
+ curRange.splice(hunk.oldLines, 0, '\');
1119
+ }
1120
+
1121
+ if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
1122
+ curRange.push('\');
1123
+ }
1124
+ }
1125
+
1126
+ hunks.push(hunk);
1127
+ oldRangeStart = 0;
1128
+ newRangeStart = 0;
1129
+ curRange = [];
1130
+ }
1131
+ }
1132
+
1133
+ oldLine += lines.length;
1134
+ newLine += lines.length;
1135
+ }
1136
+ };
1137
+
1138
+ for (var i = 0; i < diff.length; i++) {
1139
+ _loop(i);
1140
+ }
1141
+
1142
+ return {
1143
+ oldFileName: oldFileName,
1144
+ newFileName: newFileName,
1145
+ oldHeader: oldHeader,
1146
+ newHeader: newHeader,
1147
+ hunks: hunks
1148
+ };
1149
+ }
1150
+ function formatPatch(diff) {
1151
+ if (Array.isArray(diff)) {
1152
+ return diff.map(formatPatch).join('\n');
1153
+ }
1154
+
1155
+ var ret = [];
1156
+
1157
+ if (diff.oldFileName == diff.newFileName) {
1158
+ ret.push('Index: ' + diff.oldFileName);
1159
+ }
1160
+
1161
+ ret.push('===================================================================');
1162
+ ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
1163
+ ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
1164
+
1165
+ for (var i = 0; i < diff.hunks.length; i++) {
1166
+ var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
1167
+ // the first number is one lower than one would expect.
1168
+ // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
1169
+
1170
+ if (hunk.oldLines === 0) {
1171
+ hunk.oldStart -= 1;
1172
+ }
1173
+
1174
+ if (hunk.newLines === 0) {
1175
+ hunk.newStart -= 1;
1176
+ }
1177
+
1178
+ ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
1179
+ ret.push.apply(ret, hunk.lines);
1180
+ }
1181
+
1182
+ return ret.join('\n') + '\n';
1183
+ }
1184
+ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
1185
+ return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
1186
+ }
1187
+ function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
1188
+ return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
1189
+ }
1190
+
1191
+ function arrayEqual(a, b) {
1192
+ if (a.length !== b.length) {
1193
+ return false;
1194
+ }
1195
+
1196
+ return arrayStartsWith(a, b);
1197
+ }
1198
+ function arrayStartsWith(array, start) {
1199
+ if (start.length > array.length) {
1200
+ return false;
1201
+ }
1202
+
1203
+ for (var i = 0; i < start.length; i++) {
1204
+ if (start[i] !== array[i]) {
1205
+ return false;
1206
+ }
1207
+ }
1208
+
1209
+ return true;
1210
+ }
1211
+
1212
+ function calcLineCount(hunk) {
1213
+ var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
1214
+ oldLines = _calcOldNewLineCount.oldLines,
1215
+ newLines = _calcOldNewLineCount.newLines;
1216
+
1217
+ if (oldLines !== undefined) {
1218
+ hunk.oldLines = oldLines;
1219
+ } else {
1220
+ delete hunk.oldLines;
1221
+ }
1222
+
1223
+ if (newLines !== undefined) {
1224
+ hunk.newLines = newLines;
1225
+ } else {
1226
+ delete hunk.newLines;
1227
+ }
1228
+ }
1229
+ function merge(mine, theirs, base) {
1230
+ mine = loadPatch(mine, base);
1231
+ theirs = loadPatch(theirs, base);
1232
+ var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
1233
+ // Leaving sanity checks on this to the API consumer that may know more about the
1234
+ // meaning in their own context.
1235
+
1236
+ if (mine.index || theirs.index) {
1237
+ ret.index = mine.index || theirs.index;
1238
+ }
1239
+
1240
+ if (mine.newFileName || theirs.newFileName) {
1241
+ if (!fileNameChanged(mine)) {
1242
+ // No header or no change in ours, use theirs (and ours if theirs does not exist)
1243
+ ret.oldFileName = theirs.oldFileName || mine.oldFileName;
1244
+ ret.newFileName = theirs.newFileName || mine.newFileName;
1245
+ ret.oldHeader = theirs.oldHeader || mine.oldHeader;
1246
+ ret.newHeader = theirs.newHeader || mine.newHeader;
1247
+ } else if (!fileNameChanged(theirs)) {
1248
+ // No header or no change in theirs, use ours
1249
+ ret.oldFileName = mine.oldFileName;
1250
+ ret.newFileName = mine.newFileName;
1251
+ ret.oldHeader = mine.oldHeader;
1252
+ ret.newHeader = mine.newHeader;
1253
+ } else {
1254
+ // Both changed... figure it out
1255
+ ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
1256
+ ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
1257
+ ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
1258
+ ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
1259
+ }
1260
+ }
1261
+
1262
+ ret.hunks = [];
1263
+ var mineIndex = 0,
1264
+ theirsIndex = 0,
1265
+ mineOffset = 0,
1266
+ theirsOffset = 0;
1267
+
1268
+ while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
1269
+ var mineCurrent = mine.hunks[mineIndex] || {
1270
+ oldStart: Infinity
1271
+ },
1272
+ theirsCurrent = theirs.hunks[theirsIndex] || {
1273
+ oldStart: Infinity
1274
+ };
1275
+
1276
+ if (hunkBefore(mineCurrent, theirsCurrent)) {
1277
+ // This patch does not overlap with any of the others, yay.
1278
+ ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
1279
+ mineIndex++;
1280
+ theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
1281
+ } else if (hunkBefore(theirsCurrent, mineCurrent)) {
1282
+ // This patch does not overlap with any of the others, yay.
1283
+ ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
1284
+ theirsIndex++;
1285
+ mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
1286
+ } else {
1287
+ // Overlap, merge as best we can
1288
+ var mergedHunk = {
1289
+ oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
1290
+ oldLines: 0,
1291
+ newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
1292
+ newLines: 0,
1293
+ lines: []
1294
+ };
1295
+ mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
1296
+ theirsIndex++;
1297
+ mineIndex++;
1298
+ ret.hunks.push(mergedHunk);
1299
+ }
1300
+ }
1301
+
1302
+ return ret;
1303
+ }
1304
+
1305
+ function loadPatch(param, base) {
1306
+ if (typeof param === 'string') {
1307
+ if (/^@@/m.test(param) || /^Index:/m.test(param)) {
1308
+ return parsePatch(param)[0];
1309
+ }
1310
+
1311
+ if (!base) {
1312
+ throw new Error('Must provide a base reference or pass in a patch');
1313
+ }
1314
+
1315
+ return structuredPatch(undefined, undefined, base, param);
1316
+ }
1317
+
1318
+ return param;
1319
+ }
1320
+
1321
+ function fileNameChanged(patch) {
1322
+ return patch.newFileName && patch.newFileName !== patch.oldFileName;
1323
+ }
1324
+
1325
+ function selectField(index, mine, theirs) {
1326
+ if (mine === theirs) {
1327
+ return mine;
1328
+ } else {
1329
+ index.conflict = true;
1330
+ return {
1331
+ mine: mine,
1332
+ theirs: theirs
1333
+ };
1334
+ }
1335
+ }
1336
+
1337
+ function hunkBefore(test, check) {
1338
+ return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
1339
+ }
1340
+
1341
+ function cloneHunk(hunk, offset) {
1342
+ return {
1343
+ oldStart: hunk.oldStart,
1344
+ oldLines: hunk.oldLines,
1345
+ newStart: hunk.newStart + offset,
1346
+ newLines: hunk.newLines,
1347
+ lines: hunk.lines
1348
+ };
1349
+ }
1350
+
1351
+ function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
1352
+ // This will generally result in a conflicted hunk, but there are cases where the context
1353
+ // is the only overlap where we can successfully merge the content here.
1354
+ var mine = {
1355
+ offset: mineOffset,
1356
+ lines: mineLines,
1357
+ index: 0
1358
+ },
1359
+ their = {
1360
+ offset: theirOffset,
1361
+ lines: theirLines,
1362
+ index: 0
1363
+ }; // Handle any leading content
1364
+
1365
+ insertLeading(hunk, mine, their);
1366
+ insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
1367
+
1368
+ while (mine.index < mine.lines.length && their.index < their.lines.length) {
1369
+ var mineCurrent = mine.lines[mine.index],
1370
+ theirCurrent = their.lines[their.index];
1371
+
1372
+ if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
1373
+ // Both modified ...
1374
+ mutualChange(hunk, mine, their);
1375
+ } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
1376
+ var _hunk$lines;
1377
+
1378
+ // Mine inserted
1379
+ (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
1380
+ } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
1381
+ var _hunk$lines2;
1382
+
1383
+ // Theirs inserted
1384
+ (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
1385
+ } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
1386
+ // Mine removed or edited
1387
+ removal(hunk, mine, their);
1388
+ } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
1389
+ // Their removed or edited
1390
+ removal(hunk, their, mine, true);
1391
+ } else if (mineCurrent === theirCurrent) {
1392
+ // Context identity
1393
+ hunk.lines.push(mineCurrent);
1394
+ mine.index++;
1395
+ their.index++;
1396
+ } else {
1397
+ // Context mismatch
1398
+ conflict(hunk, collectChange(mine), collectChange(their));
1399
+ }
1400
+ } // Now push anything that may be remaining
1401
+
1402
+
1403
+ insertTrailing(hunk, mine);
1404
+ insertTrailing(hunk, their);
1405
+ calcLineCount(hunk);
1406
+ }
1407
+
1408
+ function mutualChange(hunk, mine, their) {
1409
+ var myChanges = collectChange(mine),
1410
+ theirChanges = collectChange(their);
1411
+
1412
+ if (allRemoves(myChanges) && allRemoves(theirChanges)) {
1413
+ // Special case for remove changes that are supersets of one another
1414
+ if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
1415
+ var _hunk$lines3;
1416
+
1417
+ (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
1418
+
1419
+ return;
1420
+ } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
1421
+ var _hunk$lines4;
1422
+
1423
+ (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
1424
+
1425
+ return;
1426
+ }
1427
+ } else if (arrayEqual(myChanges, theirChanges)) {
1428
+ var _hunk$lines5;
1429
+
1430
+ (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
1431
+
1432
+ return;
1433
+ }
1434
+
1435
+ conflict(hunk, myChanges, theirChanges);
1436
+ }
1437
+
1438
+ function removal(hunk, mine, their, swap) {
1439
+ var myChanges = collectChange(mine),
1440
+ theirChanges = collectContext(their, myChanges);
1441
+
1442
+ if (theirChanges.merged) {
1443
+ var _hunk$lines6;
1444
+
1445
+ (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
1446
+ } else {
1447
+ conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
1448
+ }
1449
+ }
1450
+
1451
+ function conflict(hunk, mine, their) {
1452
+ hunk.conflict = true;
1453
+ hunk.lines.push({
1454
+ conflict: true,
1455
+ mine: mine,
1456
+ theirs: their
1457
+ });
1458
+ }
1459
+
1460
+ function insertLeading(hunk, insert, their) {
1461
+ while (insert.offset < their.offset && insert.index < insert.lines.length) {
1462
+ var line = insert.lines[insert.index++];
1463
+ hunk.lines.push(line);
1464
+ insert.offset++;
1465
+ }
1466
+ }
1467
+
1468
+ function insertTrailing(hunk, insert) {
1469
+ while (insert.index < insert.lines.length) {
1470
+ var line = insert.lines[insert.index++];
1471
+ hunk.lines.push(line);
1472
+ }
1473
+ }
1474
+
1475
+ function collectChange(state) {
1476
+ var ret = [],
1477
+ operation = state.lines[state.index][0];
1478
+
1479
+ while (state.index < state.lines.length) {
1480
+ var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
1481
+
1482
+ if (operation === '-' && line[0] === '+') {
1483
+ operation = '+';
1484
+ }
1485
+
1486
+ if (operation === line[0]) {
1487
+ ret.push(line);
1488
+ state.index++;
1489
+ } else {
1490
+ break;
1491
+ }
1492
+ }
1493
+
1494
+ return ret;
1495
+ }
1496
+
1497
+ function collectContext(state, matchChanges) {
1498
+ var changes = [],
1499
+ merged = [],
1500
+ matchIndex = 0,
1501
+ contextChanges = false,
1502
+ conflicted = false;
1503
+
1504
+ while (matchIndex < matchChanges.length && state.index < state.lines.length) {
1505
+ var change = state.lines[state.index],
1506
+ match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
1507
+
1508
+ if (match[0] === '+') {
1509
+ break;
1510
+ }
1511
+
1512
+ contextChanges = contextChanges || change[0] !== ' ';
1513
+ merged.push(match);
1514
+ matchIndex++; // Consume any additions in the other block as a conflict to attempt
1515
+ // to pull in the remaining context after this
1516
+
1517
+ if (change[0] === '+') {
1518
+ conflicted = true;
1519
+
1520
+ while (change[0] === '+') {
1521
+ changes.push(change);
1522
+ change = state.lines[++state.index];
1523
+ }
1524
+ }
1525
+
1526
+ if (match.substr(1) === change.substr(1)) {
1527
+ changes.push(change);
1528
+ state.index++;
1529
+ } else {
1530
+ conflicted = true;
1531
+ }
1532
+ }
1533
+
1534
+ if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
1535
+ conflicted = true;
1536
+ }
1537
+
1538
+ if (conflicted) {
1539
+ return changes;
1540
+ }
1541
+
1542
+ while (matchIndex < matchChanges.length) {
1543
+ merged.push(matchChanges[matchIndex++]);
1544
+ }
1545
+
1546
+ return {
1547
+ merged: merged,
1548
+ changes: changes
1549
+ };
1550
+ }
1551
+
1552
+ function allRemoves(changes) {
1553
+ return changes.reduce(function (prev, change) {
1554
+ return prev && change[0] === '-';
1555
+ }, true);
1556
+ }
1557
+
1558
+ function skipRemoveSuperset(state, removeChanges, delta) {
1559
+ for (var i = 0; i < delta; i++) {
1560
+ var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
1561
+
1562
+ if (state.lines[state.index + i] !== ' ' + changeContent) {
1563
+ return false;
1564
+ }
1565
+ }
1566
+
1567
+ state.index += delta;
1568
+ return true;
1569
+ }
1570
+
1571
+ function calcOldNewLineCount(lines) {
1572
+ var oldLines = 0;
1573
+ var newLines = 0;
1574
+ lines.forEach(function (line) {
1575
+ if (typeof line !== 'string') {
1576
+ var myCount = calcOldNewLineCount(line.mine);
1577
+ var theirCount = calcOldNewLineCount(line.theirs);
1578
+
1579
+ if (oldLines !== undefined) {
1580
+ if (myCount.oldLines === theirCount.oldLines) {
1581
+ oldLines += myCount.oldLines;
1582
+ } else {
1583
+ oldLines = undefined;
1584
+ }
1585
+ }
1586
+
1587
+ if (newLines !== undefined) {
1588
+ if (myCount.newLines === theirCount.newLines) {
1589
+ newLines += myCount.newLines;
1590
+ } else {
1591
+ newLines = undefined;
1592
+ }
1593
+ }
1594
+ } else {
1595
+ if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
1596
+ newLines++;
1597
+ }
1598
+
1599
+ if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
1600
+ oldLines++;
1601
+ }
1602
+ }
1603
+ });
1604
+ return {
1605
+ oldLines: oldLines,
1606
+ newLines: newLines
1607
+ };
1608
+ }
1609
+
1610
+ function reversePatch(structuredPatch) {
1611
+ if (Array.isArray(structuredPatch)) {
1612
+ return structuredPatch.map(reversePatch).reverse();
1613
+ }
1614
+
1615
+ return _objectSpread2(_objectSpread2({}, structuredPatch), {}, {
1616
+ oldFileName: structuredPatch.newFileName,
1617
+ oldHeader: structuredPatch.newHeader,
1618
+ newFileName: structuredPatch.oldFileName,
1619
+ newHeader: structuredPatch.oldHeader,
1620
+ hunks: structuredPatch.hunks.map(function (hunk) {
1621
+ return {
1622
+ oldLines: hunk.newLines,
1623
+ oldStart: hunk.newStart,
1624
+ newLines: hunk.oldLines,
1625
+ newStart: hunk.oldStart,
1626
+ linedelimiters: hunk.linedelimiters,
1627
+ lines: hunk.lines.map(function (l) {
1628
+ if (l.startsWith('-')) {
1629
+ return "+".concat(l.slice(1));
1630
+ }
1631
+
1632
+ if (l.startsWith('+')) {
1633
+ return "-".concat(l.slice(1));
1634
+ }
1635
+
1636
+ return l;
1637
+ })
1638
+ };
1639
+ })
1640
+ });
1641
+ }
1642
+
1643
+ // See: http://code.google.com/p/google-diff-match-patch/wiki/API
1644
+ function convertChangesToDMP(changes) {
1645
+ var ret = [],
1646
+ change,
1647
+ operation;
1648
+
1649
+ for (var i = 0; i < changes.length; i++) {
1650
+ change = changes[i];
1651
+
1652
+ if (change.added) {
1653
+ operation = 1;
1654
+ } else if (change.removed) {
1655
+ operation = -1;
1656
+ } else {
1657
+ operation = 0;
1658
+ }
1659
+
1660
+ ret.push([operation, change.value]);
1661
+ }
1662
+
1663
+ return ret;
1664
+ }
1665
+
1666
+ function convertChangesToXML(changes) {
1667
+ var ret = [];
1668
+
1669
+ for (var i = 0; i < changes.length; i++) {
1670
+ var change = changes[i];
1671
+
1672
+ if (change.added) {
1673
+ ret.push('<ins>');
1674
+ } else if (change.removed) {
1675
+ ret.push('<del>');
1676
+ }
1677
+
1678
+ ret.push(escapeHTML(change.value));
1679
+
1680
+ if (change.added) {
1681
+ ret.push('</ins>');
1682
+ } else if (change.removed) {
1683
+ ret.push('</del>');
1684
+ }
1685
+ }
1686
+
1687
+ return ret.join('');
1688
+ }
1689
+
1690
+ function escapeHTML(s) {
1691
+ var n = s;
1692
+ n = n.replace(/&/g, '&amp;');
1693
+ n = n.replace(/</g, '&lt;');
1694
+ n = n.replace(/>/g, '&gt;');
1695
+ n = n.replace(/"/g, '&quot;');
1696
+ return n;
1697
+ }
1698
+
1699
+ export { Diff, applyPatch, applyPatches, canonicalize, convertChangesToDMP, convertChangesToXML, createPatch, createTwoFilesPatch, diffArrays, diffChars, diffCss, diffJson, diffLines, diffSentences, diffTrimmedLines, diffWords, diffWordsWithSpace, formatPatch, merge, parsePatch, reversePatch, structuredPatch };