@inseefr/lunatic 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1038) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +169 -22
  3. package/lib/components/button/__snapshots__/lunatic-button.spec.jsx.snap +80 -0
  4. package/lib/components/button/button.scss +24 -0
  5. package/lib/components/button/index.js +13 -0
  6. package/lib/components/button/lunatic-button.js +56 -0
  7. package/lib/components/button/lunatic-button.spec.js +87 -0
  8. package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +55 -0
  9. package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.spec.js +57 -0
  10. package/lib/components/checkbox/checkbox-boolean/index.js +13 -0
  11. package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +58 -0
  12. package/lib/components/checkbox/checkbox-group/checkbox-group-content.js +41 -0
  13. package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.js +51 -0
  14. package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.spec.js +44 -0
  15. package/lib/components/checkbox/checkbox-group/html/checkbox-group.js +52 -0
  16. package/lib/components/checkbox/checkbox-group/html/checkbox-group.scss +12 -0
  17. package/lib/components/checkbox/checkbox-group/index.js +13 -0
  18. package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +64 -0
  19. package/lib/components/checkbox/checkbox-one/html/checkbox-one.js +54 -0
  20. package/lib/components/checkbox/checkbox-one/html/checkbox-one.scss +19 -0
  21. package/lib/components/checkbox/checkbox-one/html/checkbox-one.spec.js +51 -0
  22. package/lib/components/checkbox/checkbox-one/index.js +13 -0
  23. package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +58 -0
  24. package/lib/components/checkbox/commons/checkbox-option.js +89 -0
  25. package/lib/components/checkbox/commons/checkbox-option.scss +19 -0
  26. package/lib/components/checkbox/commons/checkbox-option.spec.js +71 -0
  27. package/lib/components/checkbox/commons/getShortcutKey.js +11 -0
  28. package/lib/components/checkbox/commons/index.js +13 -0
  29. package/lib/components/checkbox/index.js +27 -0
  30. package/lib/components/commons/build-style-object.js +25 -0
  31. package/lib/components/commons/components/combo-box/combo-box-container.js +33 -0
  32. package/lib/components/commons/components/combo-box/combo-box-container.spec.js +45 -0
  33. package/lib/components/commons/components/combo-box/combo-box-content.js +63 -0
  34. package/lib/components/commons/components/combo-box/combo-box.js +199 -0
  35. package/lib/components/commons/components/combo-box/combo-box.scss +206 -0
  36. package/lib/components/commons/components/combo-box/index.js +13 -0
  37. package/lib/components/commons/components/combo-box/panel/index.js +13 -0
  38. package/lib/components/commons/components/combo-box/panel/option-container.js +61 -0
  39. package/lib/components/commons/components/combo-box/panel/option-container.spec.js +27 -0
  40. package/lib/components/commons/components/combo-box/panel/panel-container.js +28 -0
  41. package/lib/components/commons/components/combo-box/panel/panel-container.spec.js +59 -0
  42. package/lib/components/commons/components/combo-box/panel/panel.js +63 -0
  43. package/lib/components/commons/components/combo-box/panel/panel.spec.js +93 -0
  44. package/lib/components/commons/components/combo-box/selection/__snapshots__/selection.spec.jsx.snap +81 -0
  45. package/lib/components/commons/components/combo-box/selection/delete.js +55 -0
  46. package/lib/components/commons/components/combo-box/selection/delete.spec.js +88 -0
  47. package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +29 -0
  48. package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.spec.js +57 -0
  49. package/lib/components/commons/components/combo-box/selection/index.js +13 -0
  50. package/lib/components/commons/components/combo-box/selection/input.js +56 -0
  51. package/lib/components/commons/components/combo-box/selection/label-selection.js +32 -0
  52. package/lib/components/commons/components/combo-box/selection/label-selection.spec.js +45 -0
  53. package/lib/components/commons/components/combo-box/selection/selection-container.js +39 -0
  54. package/lib/components/commons/components/combo-box/selection/selection-container.spec.js +53 -0
  55. package/lib/components/commons/components/combo-box/selection/selection.js +60 -0
  56. package/lib/components/commons/components/combo-box/selection/selection.spec.js +104 -0
  57. package/lib/components/commons/components/combo-box/state-management/actions.js +82 -0
  58. package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +16 -0
  59. package/lib/components/commons/components/combo-box/state-management/index.js +33 -0
  60. package/lib/components/commons/components/combo-box/state-management/initial-state.js +14 -0
  61. package/lib/components/commons/components/combo-box/state-management/reducer/index.js +13 -0
  62. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +20 -0
  63. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +22 -0
  64. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +21 -0
  65. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +20 -0
  66. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +38 -0
  67. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +13 -0
  68. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/keyboard-key-codes.js +18 -0
  69. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +32 -0
  70. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +32 -0
  71. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +25 -0
  72. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +21 -0
  73. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +20 -0
  74. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +25 -0
  75. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +20 -0
  76. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +40 -0
  77. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +22 -0
  78. package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +41 -0
  79. package/lib/components/commons/components/default-label-renderer.js +47 -0
  80. package/lib/components/commons/components/default-label-renderer.spec.js +43 -0
  81. package/lib/components/commons/components/default-option-renderer.js +44 -0
  82. package/lib/components/commons/components/default-option-renderer.spec.js +65 -0
  83. package/lib/components/commons/components/description.js +52 -0
  84. package/lib/components/commons/components/description.spec.js +45 -0
  85. package/lib/components/commons/components/dragger/dragger.js +95 -0
  86. package/lib/components/commons/components/dragger/dragger.scss +8 -0
  87. package/lib/components/commons/components/dragger/dragger.spec.js +80 -0
  88. package/lib/components/commons/components/dragger/index.js +13 -0
  89. package/lib/components/commons/components/errors/errors.js +53 -0
  90. package/lib/components/commons/components/errors/errors.scss +5 -0
  91. package/lib/components/commons/components/errors/errors.spec.js +40 -0
  92. package/lib/components/commons/components/errors/index.js +13 -0
  93. package/lib/components/commons/components/fab/fab.js +50 -0
  94. package/lib/components/commons/components/fab/fab.scss +32 -0
  95. package/lib/components/commons/components/fab/fab.spec.js +76 -0
  96. package/lib/components/commons/components/fab/index.js +13 -0
  97. package/lib/components/commons/components/field-container/field-container.js +41 -0
  98. package/lib/components/commons/components/field-container/filed-container.spec.js +37 -0
  99. package/lib/components/commons/components/field-container/index.js +13 -0
  100. package/lib/components/commons/components/fieldset.js +30 -0
  101. package/lib/components/commons/components/fieldset.scss +5 -0
  102. package/lib/components/commons/components/fieldset.spec.js +51 -0
  103. package/lib/components/commons/components/html-table/index.js +48 -0
  104. package/lib/components/commons/components/html-table/table.js +32 -0
  105. package/lib/components/commons/components/html-table/table.scss +27 -0
  106. package/lib/components/commons/components/html-table/table.spec.js +25 -0
  107. package/lib/components/commons/components/html-table/tbody.js +32 -0
  108. package/lib/components/commons/components/html-table/tbody.spec.js +34 -0
  109. package/lib/components/commons/components/html-table/td.js +43 -0
  110. package/lib/components/commons/components/html-table/td.spec.js +43 -0
  111. package/lib/components/commons/components/html-table/th.js +41 -0
  112. package/lib/components/commons/components/html-table/th.spec.js +46 -0
  113. package/lib/components/commons/components/html-table/thead.js +31 -0
  114. package/lib/components/commons/components/html-table/thead.spec.js +30 -0
  115. package/lib/components/commons/components/html-table/tr.js +33 -0
  116. package/lib/components/commons/components/html-table/tr.spec.js +45 -0
  117. package/lib/components/commons/components/is-network/index.js +13 -0
  118. package/lib/components/commons/components/is-network/is-network.js +53 -0
  119. package/lib/components/commons/components/is-network/is-network.spec.js +34 -0
  120. package/lib/components/commons/components/is-network/use-online-status.js +46 -0
  121. package/lib/components/commons/components/is-network/use-online-status.spec.js +45 -0
  122. package/lib/components/commons/components/label/index.js +13 -0
  123. package/lib/components/commons/components/label/label.js +35 -0
  124. package/lib/components/commons/components/label/label.scss +6 -0
  125. package/lib/components/commons/components/label/label.spec.js +78 -0
  126. package/lib/components/commons/components/lunatic-component-without-label.js +87 -0
  127. package/lib/components/commons/components/md-label/index.js +13 -0
  128. package/lib/components/commons/components/md-label/link.js +54 -0
  129. package/lib/components/commons/components/md-label/md-label.js +45 -0
  130. package/lib/components/commons/components/missing/index.js +13 -0
  131. package/lib/components/commons/components/missing/missing.js +87 -0
  132. package/lib/components/commons/components/missing/missing.scss +30 -0
  133. package/lib/components/commons/components/missing/missing.spec.js +81 -0
  134. package/lib/components/commons/components/nothing-to-display.js +16 -0
  135. package/lib/components/commons/components/nothing-to-display.spec.js +16 -0
  136. package/lib/components/commons/components/orchestrated-component.js +62 -0
  137. package/lib/components/commons/components/variable-status/img/index.js +20 -0
  138. package/lib/components/commons/components/variable-status/index.js +13 -0
  139. package/lib/components/commons/components/variable-status/variable-status.js +85 -0
  140. package/lib/components/commons/components/variable-status/variable-status.scss +39 -0
  141. package/lib/components/commons/components/variable-status/variable-status.spec.js +24 -0
  142. package/lib/components/commons/create-customizable-field.js +29 -0
  143. package/lib/components/commons/create-row-orchestrator.js +51 -0
  144. package/lib/components/commons/icons/checkbox-checked.icon.js +39 -0
  145. package/lib/components/commons/icons/checkbox-unchecked.icon.js +39 -0
  146. package/lib/components/commons/icons/closed.icon.js +36 -0
  147. package/lib/components/commons/icons/cross.icon.js +36 -0
  148. package/lib/components/commons/icons/index.js +76 -0
  149. package/lib/components/commons/icons/load.icon.js +36 -0
  150. package/lib/components/commons/icons/lunatic-icon.js +21 -0
  151. package/lib/components/commons/icons/lunatic-icon.scss +3 -0
  152. package/lib/components/commons/icons/network.icon.js +36 -0
  153. package/lib/components/commons/icons/on-drag.icon.js +36 -0
  154. package/lib/components/commons/icons/opened.icon.js +36 -0
  155. package/lib/components/commons/icons/radio-checked.icon.js +39 -0
  156. package/lib/components/commons/icons/radio-unchecked.icon.js +39 -0
  157. package/lib/components/commons/index.js +131 -0
  158. package/lib/components/commons/prop-types/declarations.js +19 -0
  159. package/lib/components/commons/prop-types/index.js +41 -0
  160. package/lib/components/commons/prop-types/lines.js +13 -0
  161. package/lib/components/commons/prop-types/options.js +13 -0
  162. package/lib/components/commons/prop-types/response.js +13 -0
  163. package/lib/components/commons/prop-types/value-type.js +14 -0
  164. package/lib/components/commons/safety-label.js +26 -0
  165. package/lib/components/commons/use-document-add-event-listener.js +84 -0
  166. package/lib/components/commons/use-on-handle-change.js +19 -0
  167. package/lib/components/commons/use-on-handle-change.spec.js +46 -0
  168. package/lib/components/commons/use-options-keydown.js +24 -0
  169. package/lib/components/commons/use-previous.js +16 -0
  170. package/lib/components/components.js +171 -0
  171. package/lib/components/datepicker/html/datepicker-container.js +18 -0
  172. package/lib/components/datepicker/html/datepicker-input.js +37 -0
  173. package/lib/components/datepicker/html/datepicker.js +69 -0
  174. package/lib/components/datepicker/html/datepicker.scss +1 -0
  175. package/lib/components/datepicker/index.js +13 -0
  176. package/lib/components/datepicker/lunatic-datepicker.js +61 -0
  177. package/lib/components/declarations/declaration.js +22 -0
  178. package/lib/components/declarations/declaration.spec.js +30 -0
  179. package/lib/components/declarations/declarations-after-text.js +25 -0
  180. package/lib/components/declarations/declarations-before-text.js +25 -0
  181. package/lib/components/declarations/declarations-detachable.js +25 -0
  182. package/lib/components/declarations/declarations.js +50 -0
  183. package/lib/components/declarations/declarations.scss +36 -0
  184. package/lib/components/declarations/declarations.spec.js +79 -0
  185. package/lib/components/declarations/index.js +43 -0
  186. package/lib/components/dropdown/html/dropdown-simple/dropdown-simple.js +39 -0
  187. package/lib/components/dropdown/html/dropdown-simple/index.js +13 -0
  188. package/lib/components/dropdown/html/dropdown-simple/simple-label-renderer.js +46 -0
  189. package/lib/components/dropdown/html/dropdown-simple/simple-option-renderer.js +45 -0
  190. package/lib/components/dropdown/html/dropdown-writable/dropdown-writable.js +62 -0
  191. package/lib/components/dropdown/html/dropdown-writable/filter-tools/filter-options.js +37 -0
  192. package/lib/components/dropdown/html/dropdown-writable/filter-tools/get-label.js +24 -0
  193. package/lib/components/dropdown/html/dropdown-writable/filter-tools/letters-matching.js +29 -0
  194. package/lib/components/dropdown/html/dropdown-writable/filter-tools/match.js +22 -0
  195. package/lib/components/dropdown/html/dropdown-writable/filter-tools/prepare-prefix.js +13 -0
  196. package/lib/components/dropdown/html/dropdown-writable/index.js +13 -0
  197. package/lib/components/dropdown/html/dropdown-writable/writable-label-renderer.js +52 -0
  198. package/lib/components/dropdown/html/dropdown-writable/writable-option-renderer.js +146 -0
  199. package/lib/components/dropdown/html/dropdown.js +51 -0
  200. package/lib/components/dropdown/html/dropdown.scss +41 -0
  201. package/lib/components/dropdown/index.js +13 -0
  202. package/lib/components/dropdown/lunatic-dropdown.js +75 -0
  203. package/lib/components/filter-description/component.js +22 -0
  204. package/lib/components/filter-description/component.spec.js +23 -0
  205. package/lib/components/filter-description/index.js +13 -0
  206. package/lib/components/index.js +28 -0
  207. package/lib/components/index.scss +136 -0
  208. package/lib/components/input/html/input.js +79 -0
  209. package/lib/components/input/html/input.scss +42 -0
  210. package/lib/components/input/index.js +13 -0
  211. package/lib/components/input/lunatic-input.js +57 -0
  212. package/lib/components/input-number/html/__snapshots__/inpute-number.spec.jsx.snap +92 -0
  213. package/lib/components/input-number/html/input-number-default.js +78 -0
  214. package/lib/components/input-number/html/input-number-thousand.js +54 -0
  215. package/lib/components/input-number/html/input-number.js +102 -0
  216. package/lib/components/input-number/html/input-number.scss +11 -0
  217. package/lib/components/input-number/html/inpute-number.spec.js +110 -0
  218. package/lib/components/input-number/index.js +13 -0
  219. package/lib/components/input-number/lunatic-input-number.js +64 -0
  220. package/lib/components/loop/block-for-loop/block-for-loop-ochestrator.js +12 -0
  221. package/lib/components/loop/block-for-loop/block-for-loop.js +140 -0
  222. package/lib/components/loop/block-for-loop/index.js +13 -0
  223. package/lib/components/loop/block-for-loop/row.js +66 -0
  224. package/lib/components/loop/commons/get-init-length.js +16 -0
  225. package/lib/components/loop/commons/handle-row-button.js +22 -0
  226. package/lib/components/loop/commons/index.js +20 -0
  227. package/lib/components/loop/commons/row-component.js +70 -0
  228. package/lib/components/loop/index.js +13 -0
  229. package/lib/components/loop/loop.js +82 -0
  230. package/lib/components/loop/roster-for-loop/body.js +56 -0
  231. package/lib/components/loop/roster-for-loop/header.js +34 -0
  232. package/lib/components/loop/roster-for-loop/index.js +13 -0
  233. package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +12 -0
  234. package/lib/components/loop/roster-for-loop/roster-for-loop.js +124 -0
  235. package/lib/components/loop/roster-for-loop/roster-table.js +48 -0
  236. package/lib/components/loop/roster-for-loop/roster.scss +42 -0
  237. package/lib/components/loop/roster-for-loop/row.js +73 -0
  238. package/lib/components/modal-controls/close-or-skip.js +41 -0
  239. package/lib/components/modal-controls/close-or-skip.spec.js +52 -0
  240. package/lib/components/modal-controls/index.js +13 -0
  241. package/lib/components/modal-controls/modal-container.js +22 -0
  242. package/lib/components/modal-controls/modal-container.spec.js +24 -0
  243. package/lib/components/modal-controls/modal-controls.js +78 -0
  244. package/lib/components/modal-controls/modal-controls.scss +48 -0
  245. package/lib/components/modal-controls/modal-controls.spec.js +77 -0
  246. package/lib/components/pairwise-links/index.js +13 -0
  247. package/lib/components/pairwise-links/orchestrator.js +70 -0
  248. package/lib/components/pairwise-links/pairwise-links.js +65 -0
  249. package/lib/components/pairwise-links/row.js +78 -0
  250. package/lib/components/radio/html/dist/radio-group.css +12 -0
  251. package/lib/components/radio/html/radio-group-content.js +45 -0
  252. package/lib/components/radio/html/radio-group-content.spec.js +86 -0
  253. package/lib/components/radio/html/radio-group.js +67 -0
  254. package/lib/components/radio/html/radio-group.scss +21 -0
  255. package/lib/components/radio/html/radio-option.js +105 -0
  256. package/lib/components/radio/html/radio-option.spec.js +80 -0
  257. package/lib/components/radio/index.js +13 -0
  258. package/lib/components/radio/lunatic-radio-group.js +64 -0
  259. package/lib/components/radio/radio-group.js +48 -0
  260. package/lib/components/radio/radio.scss +19 -0
  261. package/lib/components/roundabout/components/roundabout-container.js +20 -0
  262. package/lib/components/roundabout/components/roundabout-container.spec.js +23 -0
  263. package/lib/components/roundabout/components/roundabout-it-button.js +80 -0
  264. package/lib/components/roundabout/components/roundabout-it-button.spec.js +102 -0
  265. package/lib/components/roundabout/components/roundabout-it-container.js +19 -0
  266. package/lib/components/roundabout/components/roundabout-it-container.spec.js +23 -0
  267. package/lib/components/roundabout/components/roundabout-it-title.js +19 -0
  268. package/lib/components/roundabout/components/roundabout-it-title.spec.js +18 -0
  269. package/lib/components/roundabout/components/roundabout-label.js +19 -0
  270. package/lib/components/roundabout/components/roundabout-label.spec.js +18 -0
  271. package/lib/components/roundabout/components/roundabout-pending.js +18 -0
  272. package/lib/components/roundabout/components/roundabout-pending.spec.js +15 -0
  273. package/lib/components/roundabout/components/roundabout.scss +16 -0
  274. package/lib/components/roundabout/index.js +13 -0
  275. package/lib/components/roundabout/lunatic-roundabout.js +62 -0
  276. package/lib/components/roundabout/redirect.js +23 -0
  277. package/lib/components/roundabout/redirect.spec.js +19 -0
  278. package/lib/components/roundabout/roundabout.js +89 -0
  279. package/lib/components/roundabout/roundabout.spec.js +71 -0
  280. package/lib/components/sequence/index.js +13 -0
  281. package/lib/components/sequence/sequence.js +37 -0
  282. package/lib/components/sequence/sequence.scss +10 -0
  283. package/lib/components/sequence/sequence.spec.js +79 -0
  284. package/lib/components/subsequence/index.js +13 -0
  285. package/lib/components/subsequence/subsequence.js +35 -0
  286. package/lib/components/subsequence/subsequence.spec.js +79 -0
  287. package/lib/components/suggester/find-best-label/find-best-label.js +55 -0
  288. package/lib/components/suggester/find-best-label/index.js +13 -0
  289. package/lib/components/suggester/html/alert-icon.svg +2 -0
  290. package/lib/components/suggester/html/default-style.scss +175 -0
  291. package/lib/components/suggester/html/notification.js +31 -0
  292. package/lib/components/suggester/html/suggester.js +142 -0
  293. package/lib/components/suggester/html/wait-icon.svg +17 -0
  294. package/lib/components/suggester/html/warn-icon.svg +1 -0
  295. package/lib/components/suggester/idb-suggester/check-store.js +107 -0
  296. package/lib/components/suggester/idb-suggester/dist/index.dev.js +12 -0
  297. package/lib/components/suggester/idb-suggester/idb-suggester.js +90 -0
  298. package/lib/components/suggester/idb-suggester/index.js +12 -0
  299. package/lib/components/suggester/idb-suggester/suggester-notification.js +61 -0
  300. package/lib/components/suggester/idb-suggester/suggester-status.js +52 -0
  301. package/lib/components/suggester/index.js +13 -0
  302. package/lib/components/suggester/lunatic-suggester.js +106 -0
  303. package/lib/components/suggester/searching/create-searching.js +73 -0
  304. package/lib/components/suggester/searching/index.js +13 -0
  305. package/lib/components/suggester-loader-widget/index.js +13 -0
  306. package/lib/components/suggester-loader-widget/loader-row.js +129 -0
  307. package/lib/components/suggester-loader-widget/loader.js +136 -0
  308. package/lib/components/suggester-loader-widget/progress.js +41 -0
  309. package/lib/components/suggester-loader-widget/tools/action-tool.js +30 -0
  310. package/lib/components/suggester-loader-widget/tools/index.js +20 -0
  311. package/lib/components/suggester-loader-widget/tools/tools.js +18 -0
  312. package/lib/components/suggester-loader-widget/widget-container.js +44 -0
  313. package/lib/components/suggester-loader-widget/widget.js +145 -0
  314. package/lib/components/suggester-loader-widget/widget.scss +176 -0
  315. package/lib/components/switch/html/switch.js +95 -0
  316. package/lib/components/switch/html/switch.scss +47 -0
  317. package/lib/components/switch/index.js +13 -0
  318. package/lib/components/switch/lunatic-switch.js +66 -0
  319. package/lib/components/table/cell.js +102 -0
  320. package/lib/components/table/header.js +40 -0
  321. package/lib/components/table/index.js +13 -0
  322. package/lib/components/table/lunatic-table.js +92 -0
  323. package/lib/components/table/row.js +43 -0
  324. package/lib/components/table/table-orchestrator.js +50 -0
  325. package/lib/components/textarea/html/textarea.js +54 -0
  326. package/lib/components/textarea/html/textarea.scss +8 -0
  327. package/lib/components/textarea/index.js +13 -0
  328. package/lib/components/textarea/lunatic-textarea.js +72 -0
  329. package/lib/components/type.js +5 -0
  330. package/lib/constants/component-types.js +8 -0
  331. package/lib/constants/declarations.js +28 -0
  332. package/lib/constants/event-types.js +29 -0
  333. package/lib/constants/index.js +60 -0
  334. package/lib/constants/supported-preferences.js +13 -0
  335. package/lib/constants/value-types.js +16 -0
  336. package/lib/constants/variable-types.js +12 -0
  337. package/lib/dist/index.dev.js +31 -0
  338. package/lib/i18n/build-dictionary.js +59 -0
  339. package/lib/i18n/dictionary.js +34 -0
  340. package/lib/i18n/index.js +28 -0
  341. package/lib/i18n/inputNumberProps.js +20 -0
  342. package/lib/index.js +28 -1767
  343. package/lib/insee.d.js +1 -0
  344. package/lib/src/components/commons/components/md-label/index.d.ts +1 -0
  345. package/lib/src/components/commons/components/md-label/link.d.ts +7 -0
  346. package/lib/src/components/commons/components/md-label/md-label.d.ts +8 -0
  347. package/lib/src/components/type.d.ts +195 -0
  348. package/lib/src/constants/component-types.d.ts +1 -0
  349. package/lib/src/constants/declarations.d.ts +9 -0
  350. package/lib/src/constants/event-types.d.ts +10 -0
  351. package/lib/src/constants/index.d.ts +5 -0
  352. package/lib/src/constants/supported-preferences.d.ts +1 -0
  353. package/lib/src/constants/value-types.d.ts +5 -0
  354. package/lib/src/constants/variable-types.d.ts +2 -0
  355. package/lib/src/i18n/build-dictionary.d.ts +24 -0
  356. package/lib/src/i18n/dictionary.d.ts +37 -0
  357. package/lib/src/i18n/index.d.ts +7 -0
  358. package/lib/src/i18n/inputNumberProps.d.ts +13 -0
  359. package/lib/src/index.d.ts +3 -0
  360. package/lib/src/type.utils.d.ts +1 -0
  361. package/lib/src/use-lunatic/actions.d.ts +289 -0
  362. package/lib/src/use-lunatic/commons/calculated-variables.d.ts +8 -0
  363. package/lib/src/use-lunatic/commons/check-loops.d.ts +3 -0
  364. package/lib/src/use-lunatic/commons/check-pager.d.ts +5 -0
  365. package/lib/src/use-lunatic/commons/compile-controls.d.ts +7 -0
  366. package/lib/src/use-lunatic/commons/compose.d.ts +3 -0
  367. package/lib/src/use-lunatic/commons/create-map-pages.d.ts +7 -0
  368. package/lib/src/use-lunatic/commons/execute-condition-filter.d.ts +3 -0
  369. package/lib/src/use-lunatic/commons/execute-expression/create-execute-expression.d.ts +9 -0
  370. package/lib/src/use-lunatic/commons/execute-expression/create-memoizer.d.ts +8 -0
  371. package/lib/src/use-lunatic/commons/execute-expression/create-refresh-calculated.d.ts +24 -0
  372. package/lib/src/use-lunatic/commons/execute-expression/execute-expression.d.ts +11 -0
  373. package/lib/src/use-lunatic/commons/execute-expression/execute-expression.spec.d.ts +1 -0
  374. package/lib/src/use-lunatic/commons/execute-expression/get-expressions-variables.d.ts +7 -0
  375. package/lib/src/use-lunatic/commons/execute-expression/get-expressions-variables.spec.d.ts +1 -0
  376. package/lib/src/use-lunatic/commons/execute-expression/get-safety-expression.d.ts +6 -0
  377. package/lib/src/use-lunatic/commons/execute-expression/index.d.ts +1 -0
  378. package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +9 -0
  379. package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.spec.d.ts +1 -0
  380. package/lib/src/use-lunatic/commons/fill-components/fill-component-value.d.ts +6 -0
  381. package/lib/src/use-lunatic/commons/fill-components/fill-components.d.ts +12 -0
  382. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +699 -0
  383. package/lib/src/use-lunatic/commons/fill-components/fill-management.d.ts +6 -0
  384. package/lib/src/use-lunatic/commons/fill-components/fill-missing-response.d.ts +11 -0
  385. package/lib/src/use-lunatic/commons/fill-components/fill-pagination.d.ts +9 -0
  386. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +571 -0
  387. package/lib/src/use-lunatic/commons/fill-components/index.d.ts +1 -0
  388. package/lib/src/use-lunatic/commons/get-compatible-vtl-expression.d.ts +6 -0
  389. package/lib/src/use-lunatic/commons/get-component-value/get-component-value.d.ts +6 -0
  390. package/lib/src/use-lunatic/commons/get-component-value/index.d.ts +1 -0
  391. package/lib/src/use-lunatic/commons/get-components-from-state.d.ts +7 -0
  392. package/lib/src/use-lunatic/commons/get-data.d.ts +26 -0
  393. package/lib/src/use-lunatic/commons/get-errors-without-empty-value.d.ts +6 -0
  394. package/lib/src/use-lunatic/commons/getOverview.d.ts +19 -0
  395. package/lib/src/use-lunatic/commons/index.d.ts +13 -0
  396. package/lib/src/use-lunatic/commons/is-First-last-page.d.ts +6 -0
  397. package/lib/src/use-lunatic/commons/is-paginated-loop.d.ts +6 -0
  398. package/lib/src/use-lunatic/commons/is-roundabout.d.ts +2 -0
  399. package/lib/src/use-lunatic/commons/page-tag.d.ts +12 -0
  400. package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +4 -0
  401. package/lib/src/use-lunatic/hooks/use-loop-variables.d.ts +5 -0
  402. package/lib/src/use-lunatic/index.d.ts +1 -0
  403. package/lib/src/use-lunatic/initial-state.d.ts +3 -0
  404. package/lib/src/use-lunatic/lunatic-context.d.ts +31 -0
  405. package/lib/src/use-lunatic/reducer/commons/index.d.ts +4 -0
  406. package/lib/src/use-lunatic/reducer/commons/is-empty-on-empty-page.d.ts +3 -0
  407. package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +12 -0
  408. package/lib/src/use-lunatic/reducer/commons/resize-array-variable.d.ts +5 -0
  409. package/lib/src/use-lunatic/reducer/commons/validate-condition-filter.d.ts +6 -0
  410. package/lib/src/use-lunatic/reducer/index.d.ts +1 -0
  411. package/lib/src/use-lunatic/reducer/overview/overview-on-change.d.ts +2 -0
  412. package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +99 -0
  413. package/lib/src/use-lunatic/reducer/reduce-go-next-page.d.ts +4 -0
  414. package/lib/src/use-lunatic/reducer/reduce-go-previous-page.d.ts +3 -0
  415. package/lib/src/use-lunatic/reducer/reduce-go-to-page.d.ts +4 -0
  416. package/lib/src/use-lunatic/reducer/reduce-handle-change/index.d.ts +1 -0
  417. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.d.ts +7 -0
  418. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.spec.d.ts +1 -0
  419. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.d.ts +4 -0
  420. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.d.ts +15 -0
  421. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-missing.d.ts +7 -0
  422. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-resizing.d.ts +4 -0
  423. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.d.ts +14 -0
  424. package/lib/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.d.ts +9 -0
  425. package/lib/src/use-lunatic/reducer/reduce-on-init.d.ts +15 -0
  426. package/lib/src/use-lunatic/reducer/reduce-on-set-waiting.d.ts +4 -0
  427. package/lib/src/use-lunatic/reducer/reduce-roundabout.d.ts +99 -0
  428. package/lib/src/use-lunatic/reducer/reduce-update-state.d.ts +3 -0
  429. package/lib/src/use-lunatic/reducer/reducer.d.ts +4 -0
  430. package/lib/src/use-lunatic/reducer/validate-controls/validation-utils.d.ts +6 -0
  431. package/lib/src/use-lunatic/type-source.d.ts +281 -0
  432. package/lib/src/use-lunatic/type.d.ts +143 -0
  433. package/lib/src/use-lunatic/use-lunatic.d.ts +84 -0
  434. package/lib/src/use-lunatic/use-lunatic.test.d.ts +1 -0
  435. package/lib/src/use-lunatic/use-suggesters.d.ts +19 -0
  436. package/lib/src/utils/constants/features.d.ts +3 -0
  437. package/lib/src/utils/constants/index.d.ts +5 -0
  438. package/lib/src/utils/constants/links.d.ts +2 -0
  439. package/lib/src/utils/constants/missing.d.ts +2 -0
  440. package/lib/src/utils/constants/variable-status.d.ts +5 -0
  441. package/lib/src/utils/constants/variable-types.d.ts +1 -0
  442. package/lib/src/utils/idb-tools/clear-store.d.ts +2 -0
  443. package/lib/src/utils/idb-tools/get-idb.d.ts +2 -0
  444. package/lib/src/utils/idb-tools/insert-entity.d.ts +2 -0
  445. package/lib/src/utils/is-element.d.ts +3 -0
  446. package/lib/src/utils/is-object.d.ts +4 -0
  447. package/lib/src/utils/object.d.ts +4 -0
  448. package/lib/src/utils/store-tools/constantes.d.ts +21 -0
  449. package/lib/src/utils/store-tools/initStore.d.ts +2 -0
  450. package/lib/src/utils/store-tools/open-or-create-store.d.ts +2 -0
  451. package/lib/src/utils/suggester-workers/append-to-index/create-append-task.d.ts +7 -0
  452. package/lib/src/utils/suggester-workers/create-worker-ts.d.ts +1 -0
  453. package/lib/src/utils/to-number.d.ts +4 -0
  454. package/lib/src/utils/vtl/dataset-builder.d.ts +5 -0
  455. package/lib/src/utils/vtl/index.d.ts +1 -0
  456. package/lib/stories/Introduction.stories.mdx +114 -0
  457. package/lib/stories/checkbox-boolean/checkboxBoolean.stories.js +34 -0
  458. package/lib/stories/checkbox-boolean/source.json +58 -0
  459. package/lib/stories/checkbox-group/checkbox-group.stories.js +34 -0
  460. package/lib/stories/checkbox-group/source.json +86 -0
  461. package/lib/stories/checkbox-one/checkboxOne.stories.js +43 -0
  462. package/lib/stories/checkbox-one/source.json +52 -0
  463. package/lib/stories/checkboxGroup/checkboxGroup.stories.js +43 -0
  464. package/lib/stories/checkboxGroup/source.json +403 -0
  465. package/lib/stories/custom-mui/checkbox-boolean-mui.js +32 -0
  466. package/lib/stories/custom-mui/checkbox-group-mui.js +68 -0
  467. package/lib/stories/custom-mui/checkbox-one-mui.js +16 -0
  468. package/lib/stories/custom-mui/index.js +111 -0
  469. package/lib/stories/custom-mui/input-mui.js +52 -0
  470. package/lib/stories/custom-mui/input-number-mui.js +40 -0
  471. package/lib/stories/custom-mui/radio-mui.js +62 -0
  472. package/lib/stories/custom-mui/suggester-mui/index.js +13 -0
  473. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +304 -0
  474. package/lib/stories/custom-mui/switch-mui.js +47 -0
  475. package/lib/stories/custom-mui/table-mui.js +28 -0
  476. package/lib/stories/custom-mui/tbody-mui.js +23 -0
  477. package/lib/stories/custom-mui/td-mui.js +25 -0
  478. package/lib/stories/custom-mui/textarea-mui.js +43 -0
  479. package/lib/stories/custom-mui/th-mui.js +24 -0
  480. package/lib/stories/custom-mui/thead-mui.js +23 -0
  481. package/lib/stories/custom-mui/tr-mui.js +33 -0
  482. package/lib/stories/date-picker/data.json +3 -0
  483. package/lib/stories/date-picker/datepicker.stories.js +38 -0
  484. package/lib/stories/date-picker/source.json +110 -0
  485. package/lib/stories/declaration/data.json +1 -0
  486. package/lib/stories/declaration/input.stories.js +36 -0
  487. package/lib/stories/declaration/source.json +74 -0
  488. package/lib/stories/dropdown/data.json +16 -0
  489. package/lib/stories/dropdown/dropdown.stories.js +39 -0
  490. package/lib/stories/dropdown/source.json +158 -0
  491. package/lib/stories/filter-description/filter-description.stories.js +50 -0
  492. package/lib/stories/filter-description/source-options.json +81 -0
  493. package/lib/stories/filter-description/source.json +11 -0
  494. package/lib/stories/input/data.json +1 -0
  495. package/lib/stories/input/input.stories.js +36 -0
  496. package/lib/stories/input/source.json +91 -0
  497. package/lib/stories/input-number/input-number.stories.js +56 -0
  498. package/lib/stories/input-number/source-euros.json +37 -0
  499. package/lib/stories/input-number/source-thansand.json +34 -0
  500. package/lib/stories/input-number/source.json +33 -0
  501. package/lib/stories/loop/block-for-loop.stories.js +41 -0
  502. package/lib/stories/loop/roster-for-loop.stories.js +34 -0
  503. package/lib/stories/loop/source-bloc.json +114 -0
  504. package/lib/stories/loop/source-roster.json +114 -0
  505. package/lib/stories/loop/source-with-header.json +127 -0
  506. package/lib/stories/overview/data.json +1 -0
  507. package/lib/stories/overview/overview.stories.js +37 -0
  508. package/lib/stories/overview/source.json +28 -0
  509. package/lib/stories/overview/sourceWithHierarchy.json +6290 -0
  510. package/lib/stories/pairwise/data.json +12 -0
  511. package/lib/stories/pairwise/links.json +270 -0
  512. package/lib/stories/pairwise/pairwise-links.stories.js +137 -0
  513. package/lib/stories/paste-questionnaire/source.json +6290 -0
  514. package/lib/stories/paste-questionnaire/test.stories.js +84 -0
  515. package/lib/stories/questionnaires/logement/data.json +2686 -0
  516. package/lib/stories/questionnaires/logement/logement.stories.js +76 -0
  517. package/lib/stories/questionnaires/logement/source-sequence.json +34181 -0
  518. package/lib/stories/questionnaires/logement/source-sum.json +34612 -0
  519. package/lib/stories/questionnaires/logement/source.json +34191 -0
  520. package/lib/stories/questionnaires/recensement/data.json +12 -0
  521. package/lib/stories/questionnaires/recensement/recensement.stories.js +52 -0
  522. package/lib/stories/questionnaires/recensement/source.json +15190 -0
  523. package/lib/stories/questionnaires/rp/data.json +5 -0
  524. package/lib/stories/questionnaires/rp/rp.stories.js +37 -0
  525. package/lib/stories/questionnaires/rp/source.json +262 -0
  526. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +553 -0
  527. package/lib/stories/questionnaires/simpsons/source.json +6296 -0
  528. package/lib/stories/questionnaires-test/V2_DeclarationsSimples.json +848 -0
  529. package/lib/stories/questionnaires-test/V2_MinMaxSum_Boucles.json +509 -0
  530. package/lib/stories/questionnaires-test/V2_QuestSimple_Boucles.json +4091 -0
  531. package/lib/stories/questionnaires-test/V2_TCMRallyeGames.json +2892 -0
  532. package/lib/stories/questionnaires-test/controls/V2_ControlesNonNum_horsBoucle_PasPageFin.json +666 -0
  533. package/lib/stories/questionnaires-test/controls/V2_ControlesNum_horsBoucle_PasPageFin.json +1966 -0
  534. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees2_PasPageFin.json +709 -0
  535. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +533 -0
  536. package/lib/stories/questionnaires-test/controls/boucles-n.json +202 -0
  537. package/lib/stories/questionnaires-test/controls/controls.stories.js +97 -0
  538. package/lib/stories/questionnaires-test/test-dylan.json +558 -0
  539. package/lib/stories/questionnaires-test/test.stories.js +93 -0
  540. package/lib/stories/radio/radio.stories.js +43 -0
  541. package/lib/stories/radio/source.json +51 -0
  542. package/lib/stories/roundabout/data.json +25 -0
  543. package/lib/stories/roundabout/roundabout.stories.js +36 -0
  544. package/lib/stories/roundabout/source.json +273 -0
  545. package/lib/stories/suggester/simple.json +146 -0
  546. package/lib/stories/suggester/source.json +254 -0
  547. package/lib/stories/suggester/suggester-workers.stories.js +208 -0
  548. package/lib/stories/suggester/suggester.stories.js +84 -0
  549. package/lib/stories/switch/README.md +31 -0
  550. package/lib/stories/switch/data-forced.json +48 -0
  551. package/lib/stories/switch/source.json +80 -0
  552. package/lib/stories/switch/switch.stories.js +39 -0
  553. package/lib/stories/table/data-roster.json +1 -0
  554. package/lib/stories/table/data.json +1 -0
  555. package/lib/stories/table/source-roster.json +513 -0
  556. package/lib/stories/table/source.json +31 -0
  557. package/lib/stories/table/table-dynamique.json +67 -0
  558. package/lib/stories/table/table.stories.js +63 -0
  559. package/lib/stories/textarea/data.json +1 -0
  560. package/lib/stories/textarea/source.json +51 -0
  561. package/lib/stories/textarea/textarea.stories.js +36 -0
  562. package/lib/stories/utils/custom-lunatic.scss +28 -0
  563. package/lib/stories/utils/default-arg-types.js +22 -0
  564. package/lib/stories/utils/options.js +32 -0
  565. package/lib/stories/utils/orchestrator.js +263 -0
  566. package/lib/stories/utils/orchestrator.scss +5 -0
  567. package/lib/stories/utils/overview.js +54 -0
  568. package/lib/stories/utils/overview.scss +30 -0
  569. package/lib/stories/utils/waiting/index.js +13 -0
  570. package/lib/stories/utils/waiting/preloader.svg +1 -0
  571. package/lib/stories/utils/waiting/waiting.js +33 -0
  572. package/lib/stories/utils/waiting/waiting.scss +21 -0
  573. package/lib/tests/utils/lunatic.d.ts +11 -0
  574. package/lib/type.utils.js +5 -0
  575. package/lib/use-lunatic/actions.js +60 -0
  576. package/lib/use-lunatic/commons/calculated-variables.js +104 -0
  577. package/lib/use-lunatic/commons/check-loops.js +99 -0
  578. package/lib/use-lunatic/commons/check-pager.js +24 -0
  579. package/lib/use-lunatic/commons/compile-controls.js +72 -0
  580. package/lib/use-lunatic/commons/compose.js +20 -0
  581. package/lib/use-lunatic/commons/create-map-pages.js +81 -0
  582. package/lib/use-lunatic/commons/execute-condition-filter.js +27 -0
  583. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +268 -0
  584. package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +63 -0
  585. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +148 -0
  586. package/lib/use-lunatic/commons/execute-expression/execute-expression.js +91 -0
  587. package/lib/use-lunatic/commons/execute-expression/execute-expression.spec.js +38 -0
  588. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +40 -0
  589. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.spec.js +31 -0
  590. package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +35 -0
  591. package/lib/use-lunatic/commons/execute-expression/index.js +13 -0
  592. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +111 -0
  593. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.spec.js +42 -0
  594. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +22 -0
  595. package/lib/use-lunatic/commons/fill-components/fill-components.js +45 -0
  596. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +30 -0
  597. package/lib/use-lunatic/commons/fill-components/fill-management.js +23 -0
  598. package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +35 -0
  599. package/lib/use-lunatic/commons/fill-components/fill-pagination.js +24 -0
  600. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +46 -0
  601. package/lib/use-lunatic/commons/fill-components/index.js +13 -0
  602. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +28 -0
  603. package/lib/use-lunatic/commons/get-component-value/get-component-value.js +176 -0
  604. package/lib/use-lunatic/commons/get-component-value/index.js +13 -0
  605. package/lib/use-lunatic/commons/get-components-from-state.js +47 -0
  606. package/lib/use-lunatic/commons/get-data.js +80 -0
  607. package/lib/use-lunatic/commons/get-errors-without-empty-value.js +25 -0
  608. package/lib/use-lunatic/commons/getOverview.js +40 -0
  609. package/lib/use-lunatic/commons/index.js +109 -0
  610. package/lib/use-lunatic/commons/is-First-last-page.js +18 -0
  611. package/lib/use-lunatic/commons/is-paginated-loop.js +11 -0
  612. package/lib/use-lunatic/commons/is-roundabout.js +10 -0
  613. package/lib/use-lunatic/commons/load-suggesters.js +158 -0
  614. package/lib/use-lunatic/commons/page-tag.js +72 -0
  615. package/lib/use-lunatic/commons/use-components-from-state.js +41 -0
  616. package/lib/use-lunatic/hooks/use-loop-variables.js +26 -0
  617. package/lib/use-lunatic/index.js +13 -0
  618. package/lib/use-lunatic/initial-state.js +49 -0
  619. package/lib/use-lunatic/lunatic-context.js +83 -0
  620. package/lib/use-lunatic/reducer/commons/index.js +44 -0
  621. package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +32 -0
  622. package/lib/use-lunatic/reducer/commons/is-loop-component.js +10 -0
  623. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +32 -0
  624. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +29 -0
  625. package/lib/use-lunatic/reducer/index.js +13 -0
  626. package/lib/use-lunatic/reducer/overview/overview-on-change.js +49 -0
  627. package/lib/use-lunatic/reducer/overview/overview-on-init.js +104 -0
  628. package/lib/use-lunatic/reducer/reduce-go-next-page.js +181 -0
  629. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +146 -0
  630. package/lib/use-lunatic/reducer/reduce-go-to-page.js +79 -0
  631. package/lib/use-lunatic/reducer/reduce-handle-change/__mocks__/source-cleaning-loop.json +926 -0
  632. package/lib/use-lunatic/reducer/reduce-handle-change/index.js +13 -0
  633. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +72 -0
  634. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.spec.js +46 -0
  635. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +115 -0
  636. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +89 -0
  637. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +88 -0
  638. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +113 -0
  639. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +44 -0
  640. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +28 -0
  641. package/lib/use-lunatic/reducer/reduce-on-init.js +238 -0
  642. package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +21 -0
  643. package/lib/use-lunatic/reducer/reduce-roundabout.js +29 -0
  644. package/lib/use-lunatic/reducer/reduce-update-state.js +22 -0
  645. package/lib/use-lunatic/reducer/reducer.js +37 -0
  646. package/lib/use-lunatic/reducer/validate-controls/validation-utils.js +63 -0
  647. package/lib/use-lunatic/type-source.js +24 -0
  648. package/lib/use-lunatic/type.js +5 -0
  649. package/lib/use-lunatic/use-lunatic.js +189 -0
  650. package/lib/use-lunatic/use-lunatic.test.js +168 -0
  651. package/lib/use-lunatic/use-suggesters.js +158 -0
  652. package/lib/utils/constants/alphabet.js +8 -0
  653. package/lib/utils/constants/features.js +12 -0
  654. package/lib/utils/constants/index.js +60 -0
  655. package/lib/utils/constants/links.js +10 -0
  656. package/lib/utils/constants/missing.js +10 -0
  657. package/lib/utils/constants/variable-status.js +16 -0
  658. package/lib/utils/constants/variable-types.js +8 -0
  659. package/lib/utils/idb-tools/clear-store.js +40 -0
  660. package/lib/utils/idb-tools/create-db-opener.js +47 -0
  661. package/lib/utils/idb-tools/create-open-db.js +29 -0
  662. package/lib/utils/idb-tools/get-entity.js +21 -0
  663. package/lib/utils/idb-tools/get-idb.js +13 -0
  664. package/lib/utils/idb-tools/idb-bulk-insert.js +134 -0
  665. package/lib/utils/idb-tools/index.js +64 -0
  666. package/lib/utils/idb-tools/insert-entity.js +21 -0
  667. package/lib/utils/idb-tools/open-db.js +24 -0
  668. package/lib/utils/idb-tools/open-or-create-db.js +42 -0
  669. package/lib/utils/is-element.js +10 -0
  670. package/lib/utils/is-object.js +13 -0
  671. package/lib/utils/object.js +31 -0
  672. package/lib/utils/store-tools/auto-load.js +162 -0
  673. package/lib/utils/store-tools/clear-store-data.js +33 -0
  674. package/lib/utils/store-tools/clear-store-info.js +33 -0
  675. package/lib/utils/store-tools/constantes.js +31 -0
  676. package/lib/utils/store-tools/create/create.js +51 -0
  677. package/lib/utils/store-tools/create/index.js +20 -0
  678. package/lib/utils/store-tools/create/update-store-info.js +27 -0
  679. package/lib/utils/store-tools/get-store-count.js +24 -0
  680. package/lib/utils/store-tools/index.js +54 -0
  681. package/lib/utils/store-tools/initStore.js +56 -0
  682. package/lib/utils/store-tools/open-or-create-store.js +52 -0
  683. package/lib/utils/store-tools/use-store-index.js +58 -0
  684. package/lib/utils/suggester-workers/append-to-index/append.js +78 -0
  685. package/lib/utils/suggester-workers/append-to-index/append.worker.js +33 -0
  686. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +66 -0
  687. package/lib/utils/suggester-workers/append-to-index/dist/append.worker.dev.js +37 -0
  688. package/lib/utils/suggester-workers/append-to-index/dist/create-append-task.js +69 -0
  689. package/lib/utils/suggester-workers/append-to-index/dist/index.dev.js +24 -0
  690. package/lib/utils/suggester-workers/append-to-index/index.js +20 -0
  691. package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +88 -0
  692. package/lib/utils/suggester-workers/append-to-index/store-messages.js +45 -0
  693. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +54 -0
  694. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +77 -0
  695. package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +36 -0
  696. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +21 -0
  697. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +36 -0
  698. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +15 -0
  699. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +19 -0
  700. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +17 -0
  701. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +25 -0
  702. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +24 -0
  703. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +15 -0
  704. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +24 -0
  705. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +23 -0
  706. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +17 -0
  707. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +53 -0
  708. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +15 -0
  709. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +16 -0
  710. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +15 -0
  711. package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +20 -0
  712. package/lib/utils/suggester-workers/commons-tokenizer/filters/stop-words.js +9 -0
  713. package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +14 -0
  714. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +23 -0
  715. package/lib/utils/suggester-workers/commons-tokenizer/index.js +69 -0
  716. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +18 -0
  717. package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +12 -0
  718. package/lib/utils/suggester-workers/create-worker-ts.js +54 -0
  719. package/lib/utils/suggester-workers/create-worker.js +54 -0
  720. package/lib/utils/suggester-workers/find-best-label/find-best-label.js +63 -0
  721. package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +53 -0
  722. package/lib/utils/suggester-workers/find-best-label/index.js +1 -0
  723. package/lib/utils/suggester-workers/find-best-label/tokenize.js +45 -0
  724. package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +25 -0
  725. package/lib/utils/suggester-workers/searching/compute-score.js +36 -0
  726. package/lib/utils/suggester-workers/searching/get-db.js +48 -0
  727. package/lib/utils/suggester-workers/searching/index.js +13 -0
  728. package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +28 -0
  729. package/lib/utils/suggester-workers/searching/order/index.js +25 -0
  730. package/lib/utils/suggester-workers/searching/query-parser/index.js +20 -0
  731. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +12 -0
  732. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +27 -0
  733. package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +35 -0
  734. package/lib/utils/suggester-workers/searching/resolve-query-parser.js +57 -0
  735. package/lib/utils/suggester-workers/searching/search-in-index.js +22 -0
  736. package/lib/utils/suggester-workers/searching/searching.js +141 -0
  737. package/lib/utils/suggester-workers/searching/searching.worker.js +20 -0
  738. package/lib/utils/to-number.js +18 -0
  739. package/lib/utils/vtl/dataset-builder.js +27 -0
  740. package/lib/utils/vtl/index.js +13 -0
  741. package/package.json +164 -142
  742. package/lib/index.js.map +0 -1
  743. package/src/components/breadcrumb/breadcrumb.scss +0 -20
  744. package/src/components/breadcrumb/component.js +0 -29
  745. package/src/components/breadcrumb/index.js +0 -1
  746. package/src/components/button/button.scss +0 -24
  747. package/src/components/button/component.js +0 -25
  748. package/src/components/button/index.js +0 -1
  749. package/src/components/checkbox/boolean.js +0 -152
  750. package/src/components/checkbox/checkbox.scss +0 -71
  751. package/src/components/checkbox/group.js +0 -187
  752. package/src/components/checkbox/index.js +0 -3
  753. package/src/components/checkbox/one.js +0 -10
  754. package/src/components/components.js +0 -17
  755. package/src/components/datepicker/component.js +0 -10
  756. package/src/components/datepicker/datepicker.scss +0 -1
  757. package/src/components/datepicker/index.js +0 -1
  758. package/src/components/declarations/component.js +0 -38
  759. package/src/components/declarations/declarations.scss +0 -38
  760. package/src/components/declarations/index.js +0 -1
  761. package/src/components/declarations/wrappers/index.js +0 -3
  762. package/src/components/declarations/wrappers/input-declarations-wrapper.js +0 -229
  763. package/src/components/declarations/wrappers/list-declarations-wrapper.js +0 -203
  764. package/src/components/declarations/wrappers/simple-declarations-wrapper.js +0 -54
  765. package/src/components/dropdown/commons/actions.js +0 -56
  766. package/src/components/dropdown/commons/children-to-option.js +0 -9
  767. package/src/components/dropdown/commons/cleaner-callbacks.js +0 -58
  768. package/src/components/dropdown/commons/components/closed.icon.js +0 -24
  769. package/src/components/dropdown/commons/components/dropdown-container.js +0 -29
  770. package/src/components/dropdown/commons/components/dropdown-field.js +0 -46
  771. package/src/components/dropdown/commons/components/dropdown.js +0 -183
  772. package/src/components/dropdown/commons/components/label.js +0 -28
  773. package/src/components/dropdown/commons/components/opened.icon.js +0 -24
  774. package/src/components/dropdown/commons/components/panel.js +0 -78
  775. package/src/components/dropdown/commons/event-callbacks/index.js +0 -5
  776. package/src/components/dropdown/commons/event-callbacks/on-keydown-callback.js +0 -29
  777. package/src/components/dropdown/commons/event-callbacks/on-mousedown-callback.js +0 -11
  778. package/src/components/dropdown/commons/reducer.js +0 -149
  779. package/src/components/dropdown/commons/tools/index.js +0 -17
  780. package/src/components/dropdown/component.js +0 -125
  781. package/src/components/dropdown/dropdown-edit/cross.icon.js +0 -20
  782. package/src/components/dropdown/dropdown-edit/dropdown-edit.js +0 -190
  783. package/src/components/dropdown/dropdown-edit/icone.js +0 -33
  784. package/src/components/dropdown/dropdown-edit/index.js +0 -11
  785. package/src/components/dropdown/dropdown-edit/option.js +0 -62
  786. package/src/components/dropdown/dropdown-edit/prefix-tools.js +0 -51
  787. package/src/components/dropdown/dropdown-simple/dropdown.js +0 -155
  788. package/src/components/dropdown/dropdown-simple/index.js +0 -20
  789. package/src/components/dropdown/dropdown-simple/option.js +0 -15
  790. package/src/components/dropdown/dropdown.scss +0 -175
  791. package/src/components/dropdown/index.js +0 -1
  792. package/src/components/filter-description/component.js +0 -41
  793. package/src/components/filter-description/index.js +0 -1
  794. package/src/components/icon/assets/checkbox-checked.js +0 -16
  795. package/src/components/icon/assets/checkbox-unchecked.js +0 -16
  796. package/src/components/icon/assets/index.js +0 -4
  797. package/src/components/icon/assets/radio-checked.js +0 -16
  798. package/src/components/icon/assets/radio-unchecked.js +0 -16
  799. package/src/components/icon/component.js +0 -33
  800. package/src/components/icon/icon.scss +0 -13
  801. package/src/components/icon/index.js +0 -1
  802. package/src/components/index.js +0 -4
  803. package/src/components/index.scss +0 -141
  804. package/src/components/input/index.js +0 -2
  805. package/src/components/input/input-number.js +0 -44
  806. package/src/components/input/input.js +0 -10
  807. package/src/components/input/input.scss +0 -35
  808. package/src/components/loop/component.js +0 -105
  809. package/src/components/loop/index.js +0 -1
  810. package/src/components/loop/loop.scss +0 -11
  811. package/src/components/loop/paginated-component.js +0 -205
  812. package/src/components/loop/wrapper.js +0 -15
  813. package/src/components/loop-constructor/block/block.scss +0 -8
  814. package/src/components/loop-constructor/block/component.js +0 -8
  815. package/src/components/loop-constructor/block/index.js +0 -1
  816. package/src/components/loop-constructor/index.js +0 -1
  817. package/src/components/loop-constructor/roster/component.js +0 -7
  818. package/src/components/loop-constructor/roster/index.js +0 -1
  819. package/src/components/loop-constructor/wrapper/body-component.js +0 -118
  820. package/src/components/loop-constructor/wrapper/build-components.js +0 -33
  821. package/src/components/loop-constructor/wrapper/component.js +0 -154
  822. package/src/components/loop-constructor/wrapper/index.js +0 -1
  823. package/src/components/progress-bar/component.js +0 -28
  824. package/src/components/progress-bar/index.js +0 -1
  825. package/src/components/progress-bar/progress-bar.scss +0 -52
  826. package/src/components/radio/component.js +0 -8
  827. package/src/components/radio/index.js +0 -1
  828. package/src/components/radio/radio.scss +0 -57
  829. package/src/components/sequence/component.js +0 -41
  830. package/src/components/sequence/index.js +0 -1
  831. package/src/components/sequence/sequence.scss +0 -8
  832. package/src/components/subsequence/component.js +0 -47
  833. package/src/components/subsequence/index.js +0 -1
  834. package/src/components/suggester/component.js +0 -103
  835. package/src/components/suggester/index.js +0 -1
  836. package/src/components/table/index.js +0 -1
  837. package/src/components/table/table.js +0 -162
  838. package/src/components/table/table.scss +0 -24
  839. package/src/components/textarea/component.js +0 -10
  840. package/src/components/textarea/index.js +0 -1
  841. package/src/components/textarea/textarea.scss +0 -6
  842. package/src/components/tooltip/img/index.js +0 -4
  843. package/src/components/tooltip/index.js +0 -1
  844. package/src/components/tooltip/response.js +0 -52
  845. package/src/components/tooltip/tooltip.scss +0 -27
  846. package/src/constants/component-types.js +0 -1
  847. package/src/constants/declarations.js +0 -14
  848. package/src/constants/index.js +0 -4
  849. package/src/constants/supported-preferences.js +0 -10
  850. package/src/constants/value-types.js +0 -5
  851. package/src/constants/variable-types.js +0 -4
  852. package/src/stories/breadcrumb/README.md +0 -14
  853. package/src/stories/breadcrumb/breadcrumb.stories.js +0 -19
  854. package/src/stories/button/README.md +0 -14
  855. package/src/stories/button/button.stories.js +0 -27
  856. package/src/stories/checkbox-boolean/README.md +0 -27
  857. package/src/stories/checkbox-boolean/checkbox-boolean.stories.js +0 -30
  858. package/src/stories/checkbox-boolean/data.json +0 -48
  859. package/src/stories/checkbox-group/README.md +0 -29
  860. package/src/stories/checkbox-group/checkbox-group.stories.js +0 -35
  861. package/src/stories/checkbox-group/data-vtl.json +0 -89
  862. package/src/stories/checkbox-group/data.json +0 -89
  863. package/src/stories/checkbox-one/README.md +0 -31
  864. package/src/stories/checkbox-one/checkbox-one.stories.js +0 -32
  865. package/src/stories/checkbox-one/data-vtl.json +0 -33
  866. package/src/stories/checkbox-one/data.json +0 -33
  867. package/src/stories/datepicker/README.md +0 -31
  868. package/src/stories/datepicker/data.json +0 -28
  869. package/src/stories/datepicker/datepicker.stories.js +0 -36
  870. package/src/stories/declarations/README.md +0 -19
  871. package/src/stories/declarations/declarations.stories.js +0 -112
  872. package/src/stories/dropdown/README.md +0 -44
  873. package/src/stories/dropdown/data-naf.json +0 -6963
  874. package/src/stories/dropdown/data-props.json +0 -81
  875. package/src/stories/dropdown/data.json +0 -78
  876. package/src/stories/dropdown/dropdown.stories.js +0 -65
  877. package/src/stories/filter-description/README.md +0 -15
  878. package/src/stories/filter-description/filter-description.stories.js +0 -53
  879. package/src/stories/input/README.md +0 -33
  880. package/src/stories/input/data.json +0 -28
  881. package/src/stories/input/input.stories.js +0 -44
  882. package/src/stories/input-number/README.md +0 -37
  883. package/src/stories/input-number/data.json +0 -30
  884. package/src/stories/input-number/input-number.stories.js +0 -53
  885. package/src/stories/loop/README.md +0 -25
  886. package/src/stories/loop/loop.stories.js +0 -80
  887. package/src/stories/loop/with-loop/data-loop-deeper.json +0 -298
  888. package/src/stories/loop/with-loop/data-loop.json +0 -211
  889. package/src/stories/loop/with-loop/data-vqs.json +0 -1384
  890. package/src/stories/loop/with-loop/index.js +0 -3
  891. package/src/stories/loop/with-roster/data-loop-deeper.json +0 -298
  892. package/src/stories/loop/with-roster/data-loop.json +0 -213
  893. package/src/stories/loop/with-roster/data-vqs.json +0 -1383
  894. package/src/stories/loop/with-roster/index.js +0 -3
  895. package/src/stories/loop-constructor/README.md +0 -27
  896. package/src/stories/loop-constructor/data-input.json +0 -64
  897. package/src/stories/loop-constructor/data-loop.json +0 -66
  898. package/src/stories/loop-constructor/data-roster.json +0 -68
  899. package/src/stories/loop-constructor/loop-constructor.stories.js +0 -59
  900. package/src/stories/pagination/deeper-loop.json +0 -327
  901. package/src/stories/pagination/pagination.stories.js +0 -57
  902. package/src/stories/pagination/simple-loop.json +0 -277
  903. package/src/stories/pagination/simpsons-question.json +0 -4262
  904. package/src/stories/pagination/simpsons-sequence.json +0 -4362
  905. package/src/stories/progress-bar/README.md +0 -13
  906. package/src/stories/progress-bar/progress-bar.stories.js +0 -24
  907. package/src/stories/questionnaire/fat.json +0 -6558
  908. package/src/stories/questionnaire/questionnaire.stories.js +0 -25
  909. package/src/stories/radio/README.md +0 -31
  910. package/src/stories/radio/data-vtl.json +0 -32
  911. package/src/stories/radio/data.json +0 -32
  912. package/src/stories/radio/radio.stories.js +0 -35
  913. package/src/stories/sequence/README.md +0 -18
  914. package/src/stories/sequence/sequence.stories.js +0 -28
  915. package/src/stories/subsequence/README.md +0 -18
  916. package/src/stories/subsequence/subsequence.stories.js +0 -28
  917. package/src/stories/suggester/README.md +0 -29
  918. package/src/stories/suggester/data-vtl.json +0 -28
  919. package/src/stories/suggester/data.json +0 -28
  920. package/src/stories/suggester/suggester.stories.js +0 -38
  921. package/src/stories/table/README.md +0 -29
  922. package/src/stories/table/data-default.json +0 -19
  923. package/src/stories/table/data-one-axis-one-measure.json +0 -124
  924. package/src/stories/table/data-one-axis-two-measures.json +0 -193
  925. package/src/stories/table/data-one-hierarchical-axis.json +0 -204
  926. package/src/stories/table/data-roster.json +0 -471
  927. package/src/stories/table/data-two-axis-one-measure.json +0 -492
  928. package/src/stories/table/table.stories.js +0 -77
  929. package/src/stories/textarea/README.md +0 -33
  930. package/src/stories/textarea/data-forced.json +0 -28
  931. package/src/stories/textarea/data.json +0 -28
  932. package/src/stories/textarea/textarea.stories.js +0 -67
  933. package/src/stories/tooltip-response/README.md +0 -14
  934. package/src/stories/tooltip-response/md-link.json +0 -31
  935. package/src/stories/tooltip-response/md-tooltip.json +0 -31
  936. package/src/stories/tooltip-response/tooltip.stories.js +0 -83
  937. package/src/stories/utils/custom-lunatic.scss +0 -23
  938. package/src/stories/utils/img/arrow.png +0 -0
  939. package/src/stories/utils/img/check_box.svg +0 -1
  940. package/src/stories/utils/img/check_box_outline.svg +0 -1
  941. package/src/stories/utils/img/lunatic-logo.png +0 -0
  942. package/src/stories/utils/img/menu-down.svg +0 -1
  943. package/src/stories/utils/img/menu-up.svg +0 -1
  944. package/src/stories/utils/img/radio_button_checked.svg +0 -1
  945. package/src/stories/utils/img/radio_button_unchecked.svg +0 -1
  946. package/src/stories/utils/options.js +0 -25
  947. package/src/stories/utils/orchestrator.js +0 -83
  948. package/src/tests/components/breadcrumb.spec.js +0 -13
  949. package/src/tests/components/button.spec.js +0 -11
  950. package/src/tests/components/checkbox-boolean.spec.js +0 -45
  951. package/src/tests/components/checkbox-group.spec.js +0 -53
  952. package/src/tests/components/checkbox-one.spec.js +0 -32
  953. package/src/tests/components/datepicker.spec.js +0 -22
  954. package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +0 -67
  955. package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +0 -52
  956. package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +0 -21
  957. package/src/tests/components/declarations.spec.js +0 -46
  958. package/src/tests/components/input-number.spec.js +0 -194
  959. package/src/tests/components/input.spec.js +0 -18
  960. package/src/tests/components/progress-bar.spec.js +0 -15
  961. package/src/tests/components/radio.spec.js +0 -27
  962. package/src/tests/components/sequence.spec.js +0 -9
  963. package/src/tests/components/subsequence.spec.js +0 -9
  964. package/src/tests/components/table.spec.js +0 -11
  965. package/src/tests/components/textarea.spec.js +0 -18
  966. package/src/tests/components/tooltip.spec.js +0 -25
  967. package/src/tests/setup/setupTests.js +0 -4
  968. package/src/tests/utils/lib/alphabet.spec.js +0 -36
  969. package/src/tests/utils/lib/checkbox/group.spec.js +0 -72
  970. package/src/tests/utils/lib/decorator/title-decorator.spec.js +0 -12
  971. package/src/tests/utils/lib/items-positioning.spec.js +0 -17
  972. package/src/tests/utils/lib/label-position.spec.js +0 -22
  973. package/src/tests/utils/lib/loops/bindings.spec.js +0 -60
  974. package/src/tests/utils/lib/loops/shared.spec.js +0 -78
  975. package/src/tests/utils/lib/pagination/shared.spec.js +0 -42
  976. package/src/tests/utils/lib/responses.spec.js +0 -64
  977. package/src/tests/utils/lib/style.spec.js +0 -26
  978. package/src/tests/utils/lib/table/roster.spec.js +0 -25
  979. package/src/tests/utils/lib/tooltip/build-response.spec.js +0 -95
  980. package/src/tests/utils/lib/tooltip/content.spec.js +0 -109
  981. package/src/tests/utils/to-expose/handler/handler.spec.js +0 -86
  982. package/src/tests/utils/to-expose/handler/questionnaire.json +0 -154
  983. package/src/tests/utils/to-expose/handler/results/index.js +0 -6
  984. package/src/tests/utils/to-expose/handler/results/res-double.json +0 -157
  985. package/src/tests/utils/to-expose/handler/results/res-input-collected.json +0 -154
  986. package/src/tests/utils/to-expose/handler/results/res-input-edited.json +0 -157
  987. package/src/tests/utils/to-expose/handler/results/res-loop.json +0 -157
  988. package/src/tests/utils/to-expose/handler/results/res-matrix.json +0 -157
  989. package/src/tests/utils/to-expose/handler/results/res-responses.json +0 -157
  990. package/src/tests/utils/to-expose/init-questionnaire/data.json +0 -12
  991. package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +0 -19
  992. package/src/tests/utils/to-expose/init-questionnaire/questionnaire.json +0 -129
  993. package/src/tests/utils/to-expose/init-questionnaire/result.json +0 -162
  994. package/src/tests/utils/to-expose/interpret/interpret.spec.js +0 -66
  995. package/src/tests/utils/to-expose/state/questionnaire.json +0 -61
  996. package/src/tests/utils/to-expose/state/results.js +0 -78
  997. package/src/tests/utils/to-expose/state/state.spec.js +0 -59
  998. package/src/utils/lib/alphabet.js +0 -1
  999. package/src/utils/lib/checkbox/group.js +0 -21
  1000. package/src/utils/lib/checkbox/index.js +0 -1
  1001. package/src/utils/lib/decorator/index.js +0 -1
  1002. package/src/utils/lib/decorator/title-decorator.js +0 -16
  1003. package/src/utils/lib/index.js +0 -13
  1004. package/src/utils/lib/label-position.js +0 -12
  1005. package/src/utils/lib/loops/bindings.js +0 -53
  1006. package/src/utils/lib/loops/build-components.js +0 -33
  1007. package/src/utils/lib/loops/index.js +0 -3
  1008. package/src/utils/lib/loops/shared.js +0 -43
  1009. package/src/utils/lib/memo-check.js +0 -24
  1010. package/src/utils/lib/options-positioning.js +0 -9
  1011. package/src/utils/lib/pagination/flow.js +0 -2
  1012. package/src/utils/lib/pagination/index.js +0 -2
  1013. package/src/utils/lib/pagination/navigation/index.js +0 -1
  1014. package/src/utils/lib/pagination/navigation/shared.js +0 -107
  1015. package/src/utils/lib/prop-types/declarations.js +0 -22
  1016. package/src/utils/lib/prop-types/index.js +0 -5
  1017. package/src/utils/lib/prop-types/lines.js +0 -6
  1018. package/src/utils/lib/prop-types/options.js +0 -8
  1019. package/src/utils/lib/prop-types/response.js +0 -6
  1020. package/src/utils/lib/prop-types/value-type.js +0 -9
  1021. package/src/utils/lib/responses.js +0 -9
  1022. package/src/utils/lib/style.js +0 -10
  1023. package/src/utils/lib/table/index.js +0 -1
  1024. package/src/utils/lib/table/roster.js +0 -23
  1025. package/src/utils/lib/tooltip/build-response.js +0 -41
  1026. package/src/utils/lib/tooltip/content.js +0 -55
  1027. package/src/utils/lib/tooltip/index.js +0 -6
  1028. package/src/utils/to-expose/handler.js +0 -99
  1029. package/src/utils/to-expose/hook.js +0 -153
  1030. package/src/utils/to-expose/index.js +0 -11
  1031. package/src/utils/to-expose/init-questionnaire.js +0 -116
  1032. package/src/utils/to-expose/interpret/index.js +0 -1
  1033. package/src/utils/to-expose/interpret/main.js +0 -36
  1034. package/src/utils/to-expose/interpret/md.js +0 -42
  1035. package/src/utils/to-expose/interpret/vtl.js +0 -43
  1036. package/src/utils/to-expose/state.js +0 -58
  1037. /package/{src/components/tooltip → lib/components/commons/components/variable-status}/img/edited.png +0 -0
  1038. /package/{src/components/tooltip → lib/components/commons/components/variable-status}/img/forced.png +0 -0
package/lib/index.js CHANGED
@@ -1,1767 +1,28 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PropTypes=require("prop-types"),isEqual=require("lodash.isequal"),fs$2=require("fs"),stream=require("stream"),ReactMarkdown=require("react-markdown"),ReactTooltip=require("react-tooltip"),camelCase=require("lodash.camelcase"),debounce=require("lodash.debounce"),removeAccents=require("remove-accents");function _interopDefaultLegacy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var React__default=/*#__PURE__*/_interopDefaultLegacy(React),PropTypes__default=/*#__PURE__*/_interopDefaultLegacy(PropTypes),isEqual__default=/*#__PURE__*/_interopDefaultLegacy(isEqual),fs__default=/*#__PURE__*/_interopDefaultLegacy(fs$2),stream__default=/*#__PURE__*/_interopDefaultLegacy(stream),ReactMarkdown__default=/*#__PURE__*/_interopDefaultLegacy(ReactMarkdown),ReactTooltip__default=/*#__PURE__*/_interopDefaultLegacy(ReactTooltip),camelCase__default=/*#__PURE__*/_interopDefaultLegacy(camelCase),debounce__default=/*#__PURE__*/_interopDefaultLegacy(debounce),removeAccents__default=/*#__PURE__*/_interopDefaultLegacy(removeAccents),lunatic=/*#__PURE__*/Object.freeze({__proto__:null,get Breadcrumb(){return Breadcrumb},get Button(){return Button},get Datepicker(){return component$7},get Declarations(){return Declarations},get Dropdown(){return component$6},get FilterDescription(){return FilterDescription},get ProgressBar(){return ProgressBar},get Radio(){return component$5},get Loop(){return LoopWrapper},get Sequence(){return component$3},get Subsequence(){return component$2},get Suggester(){return component$1},get Textarea(){return component},get TooltipResponse(){return TooltipResponse},get CheckboxGroup(){return group},get CheckboxBoolean(){return boolean},get CheckboxOne(){return one},get Input(){return input},get InputNumber(){return inputNumber},get RosterForLoop(){return component$4}}),getAlphabet=function(){return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]};function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return _extends=Object.assign||function(e){for(var t=1,r;t<arguments.length;t++)for(var o in r=arguments[t],r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},_extends.apply(this,arguments)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1,r;t<arguments.length;t++)r=null==arguments[t]?{}:arguments[t],t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))});return e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={},o=Object.keys(e),n,a;for(a=0;a<o.length;a++)n=o[a],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _objectWithoutProperties(e,t){if(null==e)return{};var r=_objectWithoutPropertiesLoose(e,t),o,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],o=!0,n=!1,a=void 0;try{for(var i=e[Symbol.iterator](),p;!(o=(p=i.next()).done)&&(r.push(p.value),!(t&&r.length===t));o=!0);}catch(e){n=!0,a=e}finally{try{o||null==i["return"]||i["return"]()}finally{if(n)throw a}}return r}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var responseToClean=function(e){return function(t){if(!t||!e.values)return!1;var r=e.values;if(!r)return!1;var o=_objectSpread2(_objectSpread2({},r),{},_defineProperty({},t[t.length-1],null));return 0===Object.values(o).filter(function(e){return null!==e}).length}},responsesToClean=function(e){return function(t){return function(o){if(!t||!o)return!1;var n=e.find(function(e){return e.response.name===o}).response.values;if(!n)return!1;var a=_objectSpread2(_objectSpread2({},n),{},_defineProperty({},t[t.length-1],null));return 0===Object.values(a).filter(function(e){return null!==e}).length}}},getLabelPositionClass=function(e){return"LEFT"===e?"label-left":"BOTTOM"===e?"label-bottom":"RIGHT"===e?"label-right":"label-top"},buildBindingsForDeeperComponents=function(e){return function(t){return t?Object.entries(t).reduce(function(t,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return Array.isArray(a)?_objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,a[e]||null)):_objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,a))},{}):{}}},getDefaultDatasetStructure=function(e,t){return _defineProperty({},e,{dataStructure:{},dataPoints:_defineProperty({},e,t)})},buildVectorialBindings=function(e){return e?Object.entries(e).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1];return Array.isArray(n)?_objectSpread2(_objectSpread2({},e),getDefaultDatasetStructure(o,n)):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n))},{}):{}},displayLoopQuestion=function(e){return function(t){return!!(Array.isArray(e)&&t)&&0!==e.map(function(e){return Array.isArray(t[e])?t[e].flat()[0]:t[e]}).filter(function(e){return e}).length}},buildLoopComponents=function(e){return function(t){var r=_toConsumableArray(Array(e).keys()).map(function(e){return buildFlatten(e)(t).map(function(t){return _objectSpread2(_objectSpread2({},t),{},{rowNumber:e})})});return r.flat()}},buildFlatten=function e(t){return function(r){return r.map(function(r){var o=r.response,n=r.responses,a=r.components;return o?buildFlattenResponse(t)(r):n?_objectSpread2(_objectSpread2({},r),{},{responses:n.map(function(e){return buildFlattenResponse(t)(e)})}):a?_objectSpread2(_objectSpread2({},r),{},{components:e(t)(a)}):r})}},buildFlattenResponse=function(e){return function(t){var r=t.response,o=_objectWithoutProperties(t,["response"]),n=r.name,a=r.values,i=Object.entries(a).reduce(function(t,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return _objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,a?a[e]:null))},{});return _objectSpread2(_objectSpread2({},o),{},{response:{name:n,values:i}})}},BEFORE_QUESTION_TEXT="BEFORE_QUESTION_TEXT",AFTER_QUESTION_TEXT="AFTER_QUESTION_TEXT",DETACHABLE="DETACHABLE",INSTRUCTION="INSTRUCTION",COMMENT="COMMENT",HELP="HELP",WARNING="WARNING",MESSAGE_FILTER="MESSAGE_FILTER",STATEMENT="STATEMENT",PREVIOUS="PREVIOUS",COLLECTED="COLLECTED",FORCED="FORCED",EDITED="EDITED",INPUTED="INPUTED",EXTERNAL="EXTERNAL",CALCULATED="CALCULATED",getLoopConstructorInitLines=function(e){return Array.isArray(e)?e.reduce(function(e,t){return t.response&&t.response.values[COLLECTED]&&t.response.values[COLLECTED].length>e?t.response.values[COLLECTED].length:e},0):0},getInvolvedVariables=function e(t){return Array.isArray(t)?t.reduce(function(t,r){var o=r.response,n=r.responses,a=r.components,i=r.depth;return o&&o.name?[].concat(_toConsumableArray(t),[{name:o.name,depth:i}]):n||a?[].concat(_toConsumableArray(t),[e(n||a)]):t},[]).flat():[]},buildEmptyValue=function(e){return!+e||2>=e?null:Array(e-2).fill(null).reduce(function(e){return[,].fill(e)},null)},VarsHasBeenUpdated=function(e,t){var r=e.response,o=e.responses,n=e.cells,a=t.response,i=t.responses,p=t.cells;return!(a||i||p)||!(a&&isEqual__default["default"](r,a)||i&&isEqual__default["default"](o,i)||p&&isEqual__default["default"](n,p))},areEqual=function(e,t){if(VarsHasBeenUpdated(e,t))return!1;var r=t.bindingDependencies;if(Array.isArray(r)&&0<r.length){var o=e.bindings,n=t.bindings;return!r.map(function(e){return isEqual__default["default"](o[e],n[e])}).includes(!1)}return!0},getItemsPositioningClass=function(e){switch(e){case"HORIZONTAL":return"horizontal-options";case"VERTICAL":default:return"";}},FLOW_NEXT="FLOW_NEXT",FLOW_PREVIOUS="FLOW_PREVIOUS";/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2
- * Use of this file is governed by the BSD 3-clause license that
3
- * can be found in the LICENSE.txt file in the project root.
4
- */function arrayToString(e){return"["+e.join(", ")+"]"}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){var e=String.prototype,t=this.toString(),r,o,n,a,p,s,l,d;for(r=3&t.length,o=t.length-r,n=e.seed,p=3432918353,s=461845907,d=0;d<o;)l=255&t.charCodeAt(d)|(255&t.charCodeAt(++d))<<8|(255&t.charCodeAt(++d))<<16|(255&t.charCodeAt(++d))<<24,++d,l=4294967295&(65535&l)*p+((65535&(l>>>16)*p)<<16),l=l<<15|l>>>17,l=4294967295&(65535&l)*s+((65535&(l>>>16)*s)<<16),n^=l,n=n<<13|n>>>19,a=4294967295&5*(65535&n)+((65535&5*(n>>>16))<<16),n=(65535&a)+27492+((65535&(a>>>16)+58964)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(d+2))<<16;case 2:l^=(255&t.charCodeAt(d+1))<<8;case 1:l^=255&t.charCodeAt(d),l=4294967295&(65535&l)*p+((65535&(l>>>16)*p)<<16),l=l<<15|l>>>17,l=4294967295&(65535&l)*s+((65535&(l>>>16)*s)<<16),n^=l;}return n^=t.length,n^=n>>>16,n=4294967295&2246822507*(65535&n)+((65535&2246822507*(n>>>16))<<16),n^=n>>>13,n=4294967295&3266489909*(65535&n)+((65535&3266489909*(n>>>16))<<16),n^=n>>>16,n>>>0};function standardEqualsFunction(e,t){return e.equals(t)}function standardHashCodeFunction(e){return e.hashCode()}function Set$7(e,t){return this.data={},this.hashFunction=e||standardHashCodeFunction,this.equalsFunction=t||standardEqualsFunction,this}Object.defineProperty(Set$7.prototype,"length",{get:function(){var e=0;for(var t in this.data)0===t.indexOf("hash_")&&(e+=this.data[t].length);return e}}),Set$7.prototype.add=function(e){var t=this.hashFunction(e),r="hash_"+t;if(r in this.data){for(var o=this.data[r],n=0;n<o.length;n++)if(this.equalsFunction(e,o[n]))return o[n];return o.push(e),e}return this.data[r]=[e],e},Set$7.prototype.contains=function(e){return null!=this.get(e)},Set$7.prototype.get=function(e){var t=this.hashFunction(e),r="hash_"+t;if(r in this.data)for(var o=this.data[r],n=0;n<o.length;n++)if(this.equalsFunction(e,o[n]))return o[n];return null},Set$7.prototype.values=function(){var e=[];for(var t in this.data)0===t.indexOf("hash_")&&(e=e.concat(this.data[t]));return e},Set$7.prototype.toString=function(){return arrayToString(this.values())};function BitSet$4(){return this.data=[],this}BitSet$4.prototype.add=function(e){this.data[e]=!0},BitSet$4.prototype.or=function(e){var t=this;Object.keys(e.data).map(function(e){t.add(e)})},BitSet$4.prototype.remove=function(e){delete this.data[e]},BitSet$4.prototype.contains=function(e){return!0===this.data[e]},BitSet$4.prototype.values=function(){return Object.keys(this.data)},BitSet$4.prototype.minValue=function(){return Math.min.apply(null,this.values())},BitSet$4.prototype.hashCode=function(){var e=new Hash$6;return e.update(this.values()),e.finish()},BitSet$4.prototype.equals=function(e){return!!(e instanceof BitSet$4)&&this.hashCode()===e.hashCode()},Object.defineProperty(BitSet$4.prototype,"length",{get:function(){return this.values().length}}),BitSet$4.prototype.toString=function(){return"{"+this.values().join(", ")+"}"};function Map$4(e,t){return this.data={},this.hashFunction=e||standardHashCodeFunction,this.equalsFunction=t||standardEqualsFunction,this}Object.defineProperty(Map$4.prototype,"length",{get:function(){var e=0;for(var t in this.data)0===t.indexOf("hash_")&&(e+=this.data[t].length);return e}}),Map$4.prototype.put=function(e,t){var r="hash_"+this.hashFunction(e);if(r in this.data){for(var o=this.data[r],n=0,a;n<o.length;n++)if(a=o[n],this.equalsFunction(e,a.key)){var p=a.value;return a.value=t,p}return o.push({key:e,value:t}),t}return this.data[r]=[{key:e,value:t}],t},Map$4.prototype.containsKey=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data)for(var r=this.data[t],o=0,n;o<r.length;o++)if(n=r[o],this.equalsFunction(e,n.key))return!0;return!1},Map$4.prototype.get=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data)for(var r=this.data[t],o=0,n;o<r.length;o++)if(n=r[o],this.equalsFunction(e,n.key))return n.value;return null},Map$4.prototype.entries=function(){var e=[];for(var t in this.data)0===t.indexOf("hash_")&&(e=e.concat(this.data[t]));return e},Map$4.prototype.getKeys=function(){return this.entries().map(function(t){return t.key})},Map$4.prototype.getValues=function(){return this.entries().map(function(t){return t.value})},Map$4.prototype.toString=function(){var e=this.entries().map(function(e){return"{"+e.key+":"+e.value+"}"});return"["+e.join(", ")+"]"};function AltDict$1(){return this.data={},this}AltDict$1.prototype.get=function(e){return e="k-"+e,e in this.data?this.data[e]:null},AltDict$1.prototype.put=function(e,t){e="k-"+e,this.data[e]=t},AltDict$1.prototype.values=function(){var e=this.data,t=Object.keys(this.data);return t.map(function(t){return e[t]})};function DoubleDict$1(e){return this.defaultMapCtor=e||Map$4,this.cacheMap=new this.defaultMapCtor,this}function Hash$6(){return this.count=0,this.hash=0,this}Hash$6.prototype.update=function(){for(var e=0,t;e<arguments.length;e++)if(t=arguments[e],null!=t)if(Array.isArray(t))this.update.apply(this,t);else{var r=0;switch(typeof t){case"undefined":case"function":continue;case"number":case"boolean":r=t;break;case"string":r=t.hashCode();break;default:t.updateHashCode?t.updateHashCode(this):console.log("No updateHashCode for "+t.toString());continue;}r*=3432918353,r=r<<15|r>>>17,r*=461845907,++this.count;var o=this.hash^r;o=o<<13|o>>>19,o=5*o+3864292196,this.hash=o}},Hash$6.prototype.finish=function(){var e=this.hash^4*this.count;return e^=e>>>16,e*=2246822507,e^=e>>>13,e*=3266489909,e^=e>>>16,e};function hashStuff$2(){var e=new Hash$6;return e.update.apply(e,arguments),e.finish()}DoubleDict$1.prototype.get=function(e,t){var r=this.cacheMap.get(e)||null;return null===r?null:r.get(t)||null},DoubleDict$1.prototype.set=function(e,t,r){var o=this.cacheMap.get(e)||null;null===o&&(o=new this.defaultMapCtor,this.cacheMap.put(e,o)),o.put(t,r)};function escapeWhitespace(e,t){return e=e.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),t&&(e=e.replace(/ /g,"\xB7")),e}function titleCase(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1)})}function equalArrays(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e==t)return!0;if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r]&&!e[r].equals(t[r]))return!1;return!0}var Hash_1=Hash$6,Set_1=Set$7,Map_1=Map$4,BitSet_1=BitSet$4,AltDict_1=AltDict$1,DoubleDict_1=DoubleDict$1,hashStuff_1=hashStuff$2,escapeWhitespace_1=escapeWhitespace,arrayToString_1=arrayToString,titleCase_1=titleCase,equalArrays_1=equalArrays,Utils$2={Hash:Hash_1,Set:Set_1,Map:Map_1,BitSet:BitSet_1,AltDict:AltDict_1,DoubleDict:DoubleDict_1,hashStuff:hashStuff_1,escapeWhitespace:escapeWhitespace_1,arrayToString:arrayToString_1,titleCase:titleCase_1,equalArrays:equalArrays_1};/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
5
- * Use of this file is governed by the BSD 3-clause license that
6
- * can be found in the LICENSE.txt file in the project root.
7
- */ //
8
- // A token has properties: text, type, line, character position in the line
9
- // (so we can ignore tabs), token channel, index, and source from which
10
- // we obtained this token.
11
- function Token$h(){// text of the token.
12
- return this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null,this}Token$h.INVALID_TYPE=0,Token$h.EPSILON=-2,Token$h.MIN_USER_TOKEN_TYPE=1,Token$h.EOF=-1,Token$h.DEFAULT_CHANNEL=0,Token$h.HIDDEN_CHANNEL=1,Object.defineProperty(Token$h.prototype,"text",{get:function(){return this._text},set:function(e){this._text=e}}),Token$h.prototype.getTokenSource=function(){return this.source[0]},Token$h.prototype.getInputStream=function(){return this.source[1]};function CommonToken$2(e,t,r,o,n){return Token$h.call(this),this.source=void 0===e?CommonToken$2.EMPTY_SOURCE:e,this.type=void 0===t?null:t,this.channel=void 0===r?Token$h.DEFAULT_CHANNEL:r,this.start=void 0===o?-1:o,this.stop=void 0===n?-1:n,this.tokenIndex=-1,null===this.source[0]?this.column=-1:(this.line=e[0].line,this.column=e[0].column),this}CommonToken$2.prototype=Object.create(Token$h.prototype),CommonToken$2.prototype.constructor=CommonToken$2,CommonToken$2.EMPTY_SOURCE=[null,null],CommonToken$2.prototype.clone=function(){var e=new CommonToken$2(this.source,this.type,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,e.text=this.text,e},Object.defineProperty(CommonToken$2.prototype,"text",{get:function(){if(null!==this._text)return this._text;var e=this.getInputStream();if(null===e)return null;var t=e.size;return this.start<t&&this.stop<t?e.getText(this.start,this.stop):"<EOF>"},set:function(e){this._text=e}}),CommonToken$2.prototype.toString=function(){var e=this.text;return e=null===e?"<no text>":e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+(0<this.channel?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"};var Token_2=Token$h,CommonToken_1=CommonToken$2,Token_1={Token:Token_2,CommonToken:CommonToken_1};//
13
- function ATNState$3(){return this.atn=null,this.stateNumber=ATNState$3.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null,this}// constants for serialization
14
- ATNState$3.INVALID_TYPE=0,ATNState$3.BASIC=1,ATNState$3.RULE_START=2,ATNState$3.BLOCK_START=3,ATNState$3.PLUS_BLOCK_START=4,ATNState$3.STAR_BLOCK_START=5,ATNState$3.TOKEN_START=6,ATNState$3.RULE_STOP=7,ATNState$3.BLOCK_END=8,ATNState$3.STAR_LOOP_BACK=9,ATNState$3.STAR_LOOP_ENTRY=10,ATNState$3.PLUS_LOOP_BACK=11,ATNState$3.LOOP_END=12,ATNState$3.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],ATNState$3.INVALID_STATE_NUMBER=-1,ATNState$3.prototype.toString=function(){return this.stateNumber},ATNState$3.prototype.equals=function(e){return!!(e instanceof ATNState$3)&&this.stateNumber===e.stateNumber},ATNState$3.prototype.isNonGreedyExitState=function(){return!1},ATNState$3.prototype.addTransition=function(e,t){t===void 0&&(t=-1),0===this.transitions.length?this.epsilonOnlyTransitions=e.isEpsilon:this.epsilonOnlyTransitions!==e.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===t?this.transitions.push(e):this.transitions.splice(t,1,e)};function BasicState$1(){return ATNState$3.call(this),this.stateType=ATNState$3.BASIC,this}BasicState$1.prototype=Object.create(ATNState$3.prototype),BasicState$1.prototype.constructor=BasicState$1;function DecisionState$2(){return ATNState$3.call(this),this.decision=-1,this.nonGreedy=!1,this}DecisionState$2.prototype=Object.create(ATNState$3.prototype),DecisionState$2.prototype.constructor=DecisionState$2;// The start of a regular {@code (...)} block.
15
- function BlockStartState$1(){return DecisionState$2.call(this),this.endState=null,this}BlockStartState$1.prototype=Object.create(DecisionState$2.prototype),BlockStartState$1.prototype.constructor=BlockStartState$1;function BasicBlockStartState$1(){return BlockStartState$1.call(this),this.stateType=ATNState$3.BLOCK_START,this}BasicBlockStartState$1.prototype=Object.create(BlockStartState$1.prototype),BasicBlockStartState$1.prototype.constructor=BasicBlockStartState$1;// Terminal node of a simple {@code (a|b|c)} block.
16
- function BlockEndState$1(){return ATNState$3.call(this),this.stateType=ATNState$3.BLOCK_END,this.startState=null,this}BlockEndState$1.prototype=Object.create(ATNState$3.prototype),BlockEndState$1.prototype.constructor=BlockEndState$1;// The last node in the ATN for a rule, unless that rule is the start symbol.
17
- // In that case, there is one transition to EOF. Later, we might encode
18
- // references to all calls to this rule to compute FOLLOW sets for
19
- // error handling.
20
- //
21
- function RuleStopState$5(){return ATNState$3.call(this),this.stateType=ATNState$3.RULE_STOP,this}RuleStopState$5.prototype=Object.create(ATNState$3.prototype),RuleStopState$5.prototype.constructor=RuleStopState$5;function RuleStartState$1(){return ATNState$3.call(this),this.stateType=ATNState$3.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}RuleStartState$1.prototype=Object.create(ATNState$3.prototype),RuleStartState$1.prototype.constructor=RuleStartState$1;// Decision state for {@code A+} and {@code (A|B)+}. It has two transitions:
22
- // one to the loop back to start of the block and one to exit.
23
- //
24
- function PlusLoopbackState$1(){return DecisionState$2.call(this),this.stateType=ATNState$3.PLUS_LOOP_BACK,this}PlusLoopbackState$1.prototype=Object.create(DecisionState$2.prototype),PlusLoopbackState$1.prototype.constructor=PlusLoopbackState$1;// Start of {@code (A|B|...)+} loop. Technically a decision state, but
25
- // we don't use for code generation; somebody might need it, so I'm defining
26
- // it for completeness. In reality, the {@link PlusLoopbackState} node is the
27
- // real decision-making note for {@code A+}.
28
- //
29
- function PlusBlockStartState$1(){return BlockStartState$1.call(this),this.stateType=ATNState$3.PLUS_BLOCK_START,this.loopBackState=null,this}PlusBlockStartState$1.prototype=Object.create(BlockStartState$1.prototype),PlusBlockStartState$1.prototype.constructor=PlusBlockStartState$1;// The block that begins a closure loop.
30
- function StarBlockStartState$1(){return BlockStartState$1.call(this),this.stateType=ATNState$3.STAR_BLOCK_START,this}StarBlockStartState$1.prototype=Object.create(BlockStartState$1.prototype),StarBlockStartState$1.prototype.constructor=StarBlockStartState$1;function StarLoopbackState$1(){return ATNState$3.call(this),this.stateType=ATNState$3.STAR_LOOP_BACK,this}StarLoopbackState$1.prototype=Object.create(ATNState$3.prototype),StarLoopbackState$1.prototype.constructor=StarLoopbackState$1;function StarLoopEntryState$2(){return DecisionState$2.call(this),this.stateType=ATNState$3.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}StarLoopEntryState$2.prototype=Object.create(DecisionState$2.prototype),StarLoopEntryState$2.prototype.constructor=StarLoopEntryState$2;// Mark the end of a * or + loop.
31
- function LoopEndState$1(){return ATNState$3.call(this),this.stateType=ATNState$3.LOOP_END,this.loopBackState=null,this}LoopEndState$1.prototype=Object.create(ATNState$3.prototype),LoopEndState$1.prototype.constructor=LoopEndState$1;// The Tokens rule start state linking to each lexer rule start state */
32
- function TokensStartState$1(){return DecisionState$2.call(this),this.stateType=ATNState$3.TOKEN_START,this}TokensStartState$1.prototype=Object.create(DecisionState$2.prototype),TokensStartState$1.prototype.constructor=TokensStartState$1;var ATNState_2=ATNState$3,BasicState_1=BasicState$1,DecisionState_1=DecisionState$2,BlockStartState_1=BlockStartState$1,BlockEndState_1=BlockEndState$1,LoopEndState_1=LoopEndState$1,RuleStartState_1=RuleStartState$1,RuleStopState_1=RuleStopState$5,TokensStartState_1=TokensStartState$1,PlusLoopbackState_1=PlusLoopbackState$1,StarLoopbackState_1=StarLoopbackState$1,StarLoopEntryState_1=StarLoopEntryState$2,PlusBlockStartState_1=PlusBlockStartState$1,StarBlockStartState_1=StarBlockStartState$1,BasicBlockStartState_1=BasicBlockStartState$1,ATNState_1={ATNState:ATNState_2,BasicState:BasicState_1,DecisionState:DecisionState_1,BlockStartState:BlockStartState_1,BlockEndState:BlockEndState_1,LoopEndState:LoopEndState_1,RuleStartState:RuleStartState_1,RuleStopState:RuleStopState_1,TokensStartState:TokensStartState_1,PlusLoopbackState:PlusLoopbackState_1,StarLoopbackState:StarLoopbackState_1,StarLoopEntryState:StarLoopEntryState_1,PlusBlockStartState:PlusBlockStartState_1,StarBlockStartState:StarBlockStartState_1,BasicBlockStartState:BasicBlockStartState_1},Set$6=Utils$2.Set,Hash$5=Utils$2.Hash;function SemanticContext$4(){return this}SemanticContext$4.prototype.hashCode=function(){var e=new Hash$5;return this.updateHashCode(e),e.finish()},SemanticContext$4.prototype.evaluate=function(){},SemanticContext$4.prototype.evalPrecedence=function(){return this},SemanticContext$4.andContext=function(e,t){if(null===e||e===SemanticContext$4.NONE)return t;if(null===t||t===SemanticContext$4.NONE)return e;var r=new AND(e,t);return 1===r.opnds.length?r.opnds[0]:r},SemanticContext$4.orContext=function(e,t){if(null===e)return t;if(null===t)return e;if(e===SemanticContext$4.NONE||t===SemanticContext$4.NONE)return SemanticContext$4.NONE;var r=new OR(e,t);return 1===r.opnds.length?r.opnds[0]:r};function Predicate$1(e,t,r){// e.g., $i ref in pred
33
- return SemanticContext$4.call(this),this.ruleIndex=void 0===e?-1:e,this.predIndex=void 0===t?-1:t,this.isCtxDependent=void 0!==r&&r,this}Predicate$1.prototype=Object.create(SemanticContext$4.prototype),Predicate$1.prototype.constructor=Predicate$1,SemanticContext$4.NONE=new Predicate$1,Predicate$1.prototype.evaluate=function(e,t){var r=this.isCtxDependent?t:null;return e.sempred(r,this.ruleIndex,this.predIndex)},Predicate$1.prototype.updateHashCode=function(e){e.update(this.ruleIndex,this.predIndex,this.isCtxDependent)},Predicate$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof Predicate$1)&&this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent},Predicate$1.prototype.toString=function(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"};function PrecedencePredicate$1(e){SemanticContext$4.call(this),this.precedence=e===void 0?0:e}PrecedencePredicate$1.prototype=Object.create(SemanticContext$4.prototype),PrecedencePredicate$1.prototype.constructor=PrecedencePredicate$1,PrecedencePredicate$1.prototype.evaluate=function(e,t){return e.precpred(t,this.precedence)},PrecedencePredicate$1.prototype.evalPrecedence=function(e,t){return e.precpred(t,this.precedence)?SemanticContext$4.NONE:null},PrecedencePredicate$1.prototype.compareTo=function(e){return this.precedence-e.precedence},PrecedencePredicate$1.prototype.updateHashCode=function(e){e.update(31)},PrecedencePredicate$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof PrecedencePredicate$1)&&this.precedence===e.precedence},PrecedencePredicate$1.prototype.toString=function(){return"{"+this.precedence+">=prec}?"},PrecedencePredicate$1.filterPrecedencePredicates=function(e){var t=[];return e.values().map(function(e){e instanceof PrecedencePredicate$1&&t.push(e)}),t};// A semantic context which is true whenever none of the contained contexts
34
- // is false.
35
- //
36
- function AND(e,t){SemanticContext$4.call(this);var r=new Set$6;e instanceof AND?e.opnds.map(function(e){r.add(e)}):r.add(e),t instanceof AND?t.opnds.map(function(e){r.add(e)}):r.add(t);var o=PrecedencePredicate$1.filterPrecedencePredicates(r);if(0<o.length){// interested in the transition with the lowest precedence
37
- var n=null;o.map(function(e){(null===n||e.precedence<n.precedence)&&(n=e)}),r.add(n)}return this.opnds=r.values(),this}AND.prototype=Object.create(SemanticContext$4.prototype),AND.prototype.constructor=AND,AND.prototype.equals=function(e){return!(this!==e)||!!(e instanceof AND)&&this.opnds===e.opnds},AND.prototype.updateHashCode=function(e){e.update(this.opnds,"AND")},AND.prototype.evaluate=function(e,t){for(var r=0;r<this.opnds.length;r++)if(!this.opnds[r].evaluate(e,t))return!1;return!0},AND.prototype.evalPrecedence=function(e,t){for(var r=!1,o=[],n=0;n<this.opnds.length;n++){var a=this.opnds[n],p=a.evalPrecedence(e,t);if(r|=p!==a,null===p)// The AND context is false if any element is false
38
- return null;p!==SemanticContext$4.NONE&&// Reduce the result by skipping true elements
39
- o.push(p)}if(!r)return this;if(0===o.length)// all elements were true, so the AND context is true
40
- return SemanticContext$4.NONE;var s=null;return o.map(function(e){s=null===s?e:SemanticContext$4.andContext(s,e)}),s},AND.prototype.toString=function(){var e="";return this.opnds.map(function(t){e+="&& "+t.toString()}),3<e.length?e.slice(3):e};//
41
- // A semantic context which is true whenever at least one of the contained
42
- // contexts is true.
43
- //
44
- function OR(e,t){SemanticContext$4.call(this);var r=new Set$6;e instanceof OR?e.opnds.map(function(e){r.add(e)}):r.add(e),t instanceof OR?t.opnds.map(function(e){r.add(e)}):r.add(t);var o=PrecedencePredicate$1.filterPrecedencePredicates(r);if(0<o.length){// interested in the transition with the highest precedence
45
- var n=o.sort(function(e,t){return e.compareTo(t)}),a=n[n.length-1];r.add(a)}return this.opnds=r.values(),this}OR.prototype=Object.create(SemanticContext$4.prototype),OR.prototype.constructor=OR,OR.prototype.constructor=function(e){return!(this!==e)||!!(e instanceof OR)&&this.opnds===e.opnds},OR.prototype.updateHashCode=function(e){e.update(this.opnds,"OR")},OR.prototype.evaluate=function(e,t){for(var r=0;r<this.opnds.length;r++)if(this.opnds[r].evaluate(e,t))return!0;return!1},OR.prototype.evalPrecedence=function(e,t){for(var r=!1,o=[],n=0;n<this.opnds.length;n++){var a=this.opnds[n],p=a.evalPrecedence(e,t);if(r|=p!==a,p===SemanticContext$4.NONE)// The OR context is true if any element is true
46
- return SemanticContext$4.NONE;null!==p&&// Reduce the result by skipping false elements
47
- o.push(p)}if(!r)return this;if(0===o.length)// all elements were false, so the OR context is false
48
- return null;return null},OR.prototype.toString=function(){var e="";return this.opnds.map(function(t){e+="|| "+t.toString()}),3<e.length?e.slice(3):e};var SemanticContext_2=SemanticContext$4,PrecedencePredicate_1=PrecedencePredicate$1,Predicate_1=Predicate$1,SemanticContext_1={SemanticContext:SemanticContext_2,PrecedencePredicate:PrecedencePredicate_1,Predicate:Predicate_1},DecisionState$1=ATNState_1.DecisionState,SemanticContext$3=SemanticContext_1.SemanticContext,Hash$4=Utils$2.Hash;function checkParams(e,t){if(null===e){var r={state:null,alt:null,context:null,semanticContext:null};return t&&(r.reachesIntoOuterContext=0),r}var o={};return o.state=e.state||null,o.alt=void 0===e.alt?null:e.alt,o.context=e.context||null,o.semanticContext=e.semanticContext||null,t&&(o.reachesIntoOuterContext=e.reachesIntoOuterContext||0,o.precedenceFilterSuppressed=e.precedenceFilterSuppressed||!1),o}function ATNConfig$3(e,t){return this.checkContext(e,t),e=checkParams(e),t=checkParams(t,!0),this.state=null===e.state?t.state:e.state,this.alt=null===e.alt?t.alt:e.alt,this.context=null===e.context?t.context:e.context,this.semanticContext=null===e.semanticContext?null===t.semanticContext?SemanticContext$3.NONE:t.semanticContext:e.semanticContext,this.reachesIntoOuterContext=t.reachesIntoOuterContext,this.precedenceFilterSuppressed=t.precedenceFilterSuppressed,this}ATNConfig$3.prototype.checkContext=function(e,t){(null===e.context||e.context===void 0)&&(null===t||null===t.context||t.context===void 0)&&(this.context=null)},ATNConfig$3.prototype.hashCode=function(){var e=new Hash$4;return this.updateHashCode(e),e.finish()},ATNConfig$3.prototype.updateHashCode=function(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)},ATNConfig$3.prototype.equals=function(e){return!(this!==e)||!!(e instanceof ATNConfig$3)&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&(null===this.context?null===e.context:this.context.equals(e.context))&&this.semanticContext.equals(e.semanticContext)&&this.precedenceFilterSuppressed===e.precedenceFilterSuppressed},ATNConfig$3.prototype.hashCodeForConfigSet=function(){var e=new Hash$4;return e.update(this.state.stateNumber,this.alt,this.semanticContext),e.finish()},ATNConfig$3.prototype.equalsForConfigSet=function(e){return!(this!==e)||!!(e instanceof ATNConfig$3)&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.semanticContext.equals(e.semanticContext)},ATNConfig$3.prototype.toString=function(){return"("+this.state+","+this.alt+(null===this.context?"":",["+this.context.toString()+"]")+(this.semanticContext===SemanticContext$3.NONE?"":","+this.semanticContext.toString())+(0<this.reachesIntoOuterContext?",up="+this.reachesIntoOuterContext:"")+")"};function LexerATNConfig$1(e,t){ATNConfig$3.call(this,e,t);// This is the backing field for {@link //getLexerActionExecutor}.
49
- var r=e.lexerActionExecutor||null;return this.lexerActionExecutor=r||(null===t?null:t.lexerActionExecutor),this.passedThroughNonGreedyDecision=null!==t&&this.checkNonGreedyDecision(t,this.state),this}LexerATNConfig$1.prototype=Object.create(ATNConfig$3.prototype),LexerATNConfig$1.prototype.constructor=LexerATNConfig$1,LexerATNConfig$1.prototype.updateHashCode=function(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)},LexerATNConfig$1.prototype.equals=function(e){return this===e||e instanceof LexerATNConfig$1&&this.passedThroughNonGreedyDecision==e.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(e.lexerActionExecutor):!e.lexerActionExecutor)&&ATNConfig$3.prototype.equals.call(this,e)},LexerATNConfig$1.prototype.hashCodeForConfigSet=LexerATNConfig$1.prototype.hashCode,LexerATNConfig$1.prototype.equalsForConfigSet=LexerATNConfig$1.prototype.equals,LexerATNConfig$1.prototype.checkNonGreedyDecision=function(e,t){return e.passedThroughNonGreedyDecision||t instanceof DecisionState$1&&t.nonGreedy};var ATNConfig_2=ATNConfig$3,LexerATNConfig_1=LexerATNConfig$1,ATNConfig_1={ATNConfig:ATNConfig_2,LexerATNConfig:LexerATNConfig_1},Token$g=Token_1.Token;/* stop is not included! */function Interval$7(e,t){return this.start=e,this.stop=t,this}Interval$7.prototype.contains=function(e){return e>=this.start&&e<this.stop},Interval$7.prototype.toString=function(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()},Object.defineProperty(Interval$7.prototype,"length",{get:function(){return this.stop-this.start}});function IntervalSet$5(){this.intervals=null,this.readOnly=!1}IntervalSet$5.prototype.first=function(){return null===this.intervals||0===this.intervals.length?Token$g.INVALID_TYPE:this.intervals[0].start},IntervalSet$5.prototype.addOne=function(e){this.addInterval(new Interval$7(e,e+1))},IntervalSet$5.prototype.addRange=function(e,t){this.addInterval(new Interval$7(e,t+1))},IntervalSet$5.prototype.addInterval=function(e){var t=Math.max,r=Math.min;if(null===this.intervals)this.intervals=[],this.intervals.push(e);else{// find insert pos
50
- for(var o=0,n;o<this.intervals.length;o++){// distinct range -> insert
51
- if(n=this.intervals[o],e.stop<n.start)return void this.intervals.splice(o,0,e);// contiguous range -> adjust
52
- if(e.stop===n.start)return void(this.intervals[o].start=e.start);// overlapping range -> adjust and reduce
53
- if(e.start<=n.stop)return this.intervals[o]=new Interval$7(r(n.start,e.start),t(n.stop,e.stop)),void this.reduce(o)}// greater than any existing
54
- this.intervals.push(e)}},IntervalSet$5.prototype.addSet=function(e){if(null!==e.intervals)for(var t=0,r;t<e.intervals.length;t++)r=e.intervals[t],this.addInterval(new Interval$7(r.start,r.stop));return this},IntervalSet$5.prototype.reduce=function(e){// only need to reduce if k is not the last
55
- if(e<this.intervalslength-1){var t=this.intervals[e],o=this.intervals[e+1];t.stop>=o.stop?(this.intervals.pop(e+1),this.reduce(e)):t.stop>=o.start&&(this.intervals[e]=new Interval$7(t.start,o.stop),this.intervals.pop(e+1))}},IntervalSet$5.prototype.complement=function(e,t){var r=new IntervalSet$5;r.addInterval(new Interval$7(e,t+1));for(var o=0;o<this.intervals.length;o++)r.removeRange(this.intervals[o]);return r},IntervalSet$5.prototype.contains=function(e){if(null===this.intervals)return!1;for(var t=0;t<this.intervals.length;t++)if(this.intervals[t].contains(e))return!0;return!1},Object.defineProperty(IntervalSet$5.prototype,"length",{get:function(){var e=0;return this.intervals.map(function(t){e+=t.length}),e}}),IntervalSet$5.prototype.removeRange=function(e){if(e.start===e.stop-1)this.removeOne(e.start);else if(null!==this.intervals)for(var t=0,r=0,o;r<this.intervals.length;r++){// intervals are ordered
56
- if(o=this.intervals[t],e.stop<=o.start)return;// check for including range, split it
57
- if(e.start>o.start&&e.stop<o.stop){this.intervals[t]=new Interval$7(o.start,e.start);var a=new Interval$7(e.stop,o.stop);return void this.intervals.splice(t,0,a)}// check for included range, remove it
58
- e.start<=o.start&&e.stop>=o.stop?(this.intervals.splice(t,1),--t):e.start<o.stop?this.intervals[t]=new Interval$7(o.start,e.start):e.stop<o.stop&&(this.intervals[t]=new Interval$7(e.stop,o.stop)),t+=1}},IntervalSet$5.prototype.removeOne=function(e){if(null!==this.intervals)for(var t=0,r;t<this.intervals.length;t++){// intervals is ordered
59
- if(r=this.intervals[t],e<r.start)return;// check for single value range
60
- if(e===r.start&&e===r.stop-1)return void this.intervals.splice(t,1);// check for lower boundary
61
- if(e===r.start)return void(this.intervals[t]=new Interval$7(r.start+1,r.stop));// check for upper boundary
62
- if(e===r.stop-1)return void(this.intervals[t]=new Interval$7(r.start,r.stop-1));// split existing range
63
- if(e<r.stop-1){var o=new Interval$7(r.start,e);return r.start=e+1,void this.intervals.splice(t,0,o)}}},IntervalSet$5.prototype.toString=function(e,t,r){return e=e||null,t=t||null,r=r||!1,null===this.intervals?"{}":null!==e||null!==t?this.toTokenString(e,t):r?this.toCharString():this.toIndexString()},IntervalSet$5.prototype.toCharString=function(){for(var e=String.fromCharCode,t=[],r=0,o;r<this.intervals.length;r++)o=this.intervals[r],o.stop===o.start+1?o.start===Token$g.EOF?t.push("<EOF>"):t.push("'"+e(o.start)+"'"):t.push("'"+e(o.start)+"'..'"+e(o.stop-1)+"'");return 1<t.length?"{"+t.join(", ")+"}":t[0]},IntervalSet$5.prototype.toIndexString=function(){for(var e=[],t=0,r;t<this.intervals.length;t++)r=this.intervals[t],r.stop===r.start+1?r.start===Token$g.EOF?e.push("<EOF>"):e.push(r.start.toString()):e.push(r.start.toString()+".."+(r.stop-1).toString());return 1<e.length?"{"+e.join(", ")+"}":e[0]},IntervalSet$5.prototype.toTokenString=function(e,t){for(var r=[],o=0,n;o<this.intervals.length;o++){n=this.intervals[o];for(var a=n.start;a<n.stop;a++)r.push(this.elementName(e,t,a))}return 1<r.length?"{"+r.join(", ")+"}":r[0]},IntervalSet$5.prototype.elementName=function(e,t,r){return r===Token$g.EOF?"<EOF>":r===Token$g.EPSILON?"<EPSILON>":e[r]||t[r]};var Interval_1=Interval$7,IntervalSet_2=IntervalSet$5,IntervalSet_1={Interval:Interval_1,IntervalSet:IntervalSet_2},Token$f=Token_1.Token,IntervalSet$4=IntervalSet_1.IntervalSet,Predicate=SemanticContext_1.Predicate,PrecedencePredicate=SemanticContext_1.PrecedencePredicate;function Transition$3(e){// The target of this transition.
64
- if(void 0===e||null===e)throw"target cannot be null.";return this.target=e,this.isEpsilon=!1,this.label=null,this}// constants for serialization
65
- Transition$3.EPSILON=1,Transition$3.RANGE=2,Transition$3.RULE=3,Transition$3.PREDICATE=4,Transition$3.ATOM=5,Transition$3.ACTION=6,Transition$3.SET=7,Transition$3.NOT_SET=8,Transition$3.WILDCARD=9,Transition$3.PRECEDENCE=10,Transition$3.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],Transition$3.serializationTypes={EpsilonTransition:Transition$3.EPSILON,RangeTransition:Transition$3.RANGE,RuleTransition:Transition$3.RULE,PredicateTransition:Transition$3.PREDICATE,AtomTransition:Transition$3.ATOM,ActionTransition:Transition$3.ACTION,SetTransition:Transition$3.SET,NotSetTransition:Transition$3.NOT_SET,WildcardTransition:Transition$3.WILDCARD,PrecedencePredicateTransition:Transition$3.PRECEDENCE};// TODO: make all transitions sets? no, should remove set edges
66
- function AtomTransition$2(e,t){return Transition$3.call(this,e),this.label_=t,this.label=this.makeLabel(),this.serializationType=Transition$3.ATOM,this}AtomTransition$2.prototype=Object.create(Transition$3.prototype),AtomTransition$2.prototype.constructor=AtomTransition$2,AtomTransition$2.prototype.makeLabel=function(){var e=new IntervalSet$4;return e.addOne(this.label_),e},AtomTransition$2.prototype.matches=function(e){return this.label_===e},AtomTransition$2.prototype.toString=function(){return this.label_};function RuleTransition$3(e,t,r,o){return Transition$3.call(this,e),this.ruleIndex=t,this.precedence=r,this.followState=o,this.serializationType=Transition$3.RULE,this.isEpsilon=!0,this}RuleTransition$3.prototype=Object.create(Transition$3.prototype),RuleTransition$3.prototype.constructor=RuleTransition$3,RuleTransition$3.prototype.matches=function(){return!1};function EpsilonTransition$1(e,t){return Transition$3.call(this,e),this.serializationType=Transition$3.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=t,this}EpsilonTransition$1.prototype=Object.create(Transition$3.prototype),EpsilonTransition$1.prototype.constructor=EpsilonTransition$1,EpsilonTransition$1.prototype.matches=function(){return!1},EpsilonTransition$1.prototype.toString=function(){return"epsilon"};function RangeTransition$1(e,t,r){return Transition$3.call(this,e),this.serializationType=Transition$3.RANGE,this.start=t,this.stop=r,this.label=this.makeLabel(),this}RangeTransition$1.prototype=Object.create(Transition$3.prototype),RangeTransition$1.prototype.constructor=RangeTransition$1,RangeTransition$1.prototype.makeLabel=function(){var e=new IntervalSet$4;return e.addRange(this.start,this.stop),e},RangeTransition$1.prototype.matches=function(e){return e>=this.start&&e<=this.stop},RangeTransition$1.prototype.toString=function(){var e=String.fromCharCode;return"'"+e(this.start)+"'..'"+e(this.stop)+"'"};function AbstractPredicateTransition$1(e){return Transition$3.call(this,e),this}AbstractPredicateTransition$1.prototype=Object.create(Transition$3.prototype),AbstractPredicateTransition$1.prototype.constructor=AbstractPredicateTransition$1;function PredicateTransition$2(e,t,r,o){return AbstractPredicateTransition$1.call(this,e),this.serializationType=Transition$3.PREDICATE,this.ruleIndex=t,this.predIndex=r,this.isCtxDependent=o,this.isEpsilon=!0,this}PredicateTransition$2.prototype=Object.create(AbstractPredicateTransition$1.prototype),PredicateTransition$2.prototype.constructor=PredicateTransition$2,PredicateTransition$2.prototype.matches=function(){return!1},PredicateTransition$2.prototype.getPredicate=function(){return new Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)},PredicateTransition$2.prototype.toString=function(){return"pred_"+this.ruleIndex+":"+this.predIndex};function ActionTransition$2(e,t,r,o){return Transition$3.call(this,e),this.serializationType=Transition$3.ACTION,this.ruleIndex=t,this.actionIndex=void 0===r?-1:r,this.isCtxDependent=void 0!==o&&o,this.isEpsilon=!0,this}ActionTransition$2.prototype=Object.create(Transition$3.prototype),ActionTransition$2.prototype.constructor=ActionTransition$2,ActionTransition$2.prototype.matches=function(){return!1},ActionTransition$2.prototype.toString=function(){return"action_"+this.ruleIndex+":"+this.actionIndex};// A transition containing a set of values.
67
- function SetTransition$2(e,t){return Transition$3.call(this,e),this.serializationType=Transition$3.SET,void 0!==t&&null!==t?this.label=t:(this.label=new IntervalSet$4,this.label.addOne(Token$f.INVALID_TYPE)),this}SetTransition$2.prototype=Object.create(Transition$3.prototype),SetTransition$2.prototype.constructor=SetTransition$2,SetTransition$2.prototype.matches=function(e){return this.label.contains(e)},SetTransition$2.prototype.toString=function(){return this.label.toString()};function NotSetTransition$3(e,t){return SetTransition$2.call(this,e,t),this.serializationType=Transition$3.NOT_SET,this}NotSetTransition$3.prototype=Object.create(SetTransition$2.prototype),NotSetTransition$3.prototype.constructor=NotSetTransition$3,NotSetTransition$3.prototype.matches=function(e,t,r){return e>=t&&e<=r&&!SetTransition$2.prototype.matches.call(this,e,t,r)},NotSetTransition$3.prototype.toString=function(){return"~"+SetTransition$2.prototype.toString.call(this)};function WildcardTransition$2(e){return Transition$3.call(this,e),this.serializationType=Transition$3.WILDCARD,this}WildcardTransition$2.prototype=Object.create(Transition$3.prototype),WildcardTransition$2.prototype.constructor=WildcardTransition$2,WildcardTransition$2.prototype.matches=function(e,t,r){return e>=t&&e<=r},WildcardTransition$2.prototype.toString=function(){return"."};function PrecedencePredicateTransition$1(e,t){return AbstractPredicateTransition$1.call(this,e),this.serializationType=Transition$3.PRECEDENCE,this.precedence=t,this.isEpsilon=!0,this}PrecedencePredicateTransition$1.prototype=Object.create(AbstractPredicateTransition$1.prototype),PrecedencePredicateTransition$1.prototype.constructor=PrecedencePredicateTransition$1,PrecedencePredicateTransition$1.prototype.matches=function(){return!1},PrecedencePredicateTransition$1.prototype.getPredicate=function(){return new PrecedencePredicate(this.precedence)},PrecedencePredicateTransition$1.prototype.toString=function(){return this.precedence+" >= _p"};var Transition_2=Transition$3,AtomTransition_1=AtomTransition$2,SetTransition_1=SetTransition$2,NotSetTransition_1=NotSetTransition$3,RuleTransition_1=RuleTransition$3,ActionTransition_1=ActionTransition$2,EpsilonTransition_1=EpsilonTransition$1,RangeTransition_1=RangeTransition$1,WildcardTransition_1=WildcardTransition$2,PredicateTransition_1=PredicateTransition$2,PrecedencePredicateTransition_1=PrecedencePredicateTransition$1,AbstractPredicateTransition_1=AbstractPredicateTransition$1,Transition_1={Transition:Transition_2,AtomTransition:AtomTransition_1,SetTransition:SetTransition_1,NotSetTransition:NotSetTransition_1,RuleTransition:RuleTransition_1,ActionTransition:ActionTransition_1,EpsilonTransition:EpsilonTransition_1,RangeTransition:RangeTransition_1,WildcardTransition:WildcardTransition_1,PredicateTransition:PredicateTransition_1,PrecedencePredicateTransition:PrecedencePredicateTransition_1,AbstractPredicateTransition:AbstractPredicateTransition_1},Token$e=Token_1.Token,Interval$6=IntervalSet_1.Interval,INVALID_INTERVAL$2=new Interval$6(-1,-2);function Tree(){return this}function SyntaxTree(){return Tree.call(this),this}SyntaxTree.prototype=Object.create(Tree.prototype),SyntaxTree.prototype.constructor=SyntaxTree;function ParseTree(){return SyntaxTree.call(this),this}ParseTree.prototype=Object.create(SyntaxTree.prototype),ParseTree.prototype.constructor=ParseTree;function RuleNode$2(){return ParseTree.call(this),this}RuleNode$2.prototype=Object.create(ParseTree.prototype),RuleNode$2.prototype.constructor=RuleNode$2;function TerminalNode$3(){return ParseTree.call(this),this}TerminalNode$3.prototype=Object.create(ParseTree.prototype),TerminalNode$3.prototype.constructor=TerminalNode$3;function ErrorNode$2(){return TerminalNode$3.call(this),this}ErrorNode$2.prototype=Object.create(TerminalNode$3.prototype),ErrorNode$2.prototype.constructor=ErrorNode$2;function ParseTreeVisitor$1(){return this}ParseTreeVisitor$1.prototype.visit=function(e){return Array.isArray(e)?e.map(function(e){return e.accept(this)},this):e.accept(this)},ParseTreeVisitor$1.prototype.visitChildren=function(e){return e.children?this.visit(e.children):null},ParseTreeVisitor$1.prototype.visitTerminal=function(){},ParseTreeVisitor$1.prototype.visitErrorNode=function(){};function ParseTreeListener$2(){return this}ParseTreeListener$2.prototype.visitTerminal=function(){},ParseTreeListener$2.prototype.visitErrorNode=function(){},ParseTreeListener$2.prototype.enterEveryRule=function(){},ParseTreeListener$2.prototype.exitEveryRule=function(){};function TerminalNodeImpl$1(e){return TerminalNode$3.call(this),this.parentCtx=null,this.symbol=e,this}TerminalNodeImpl$1.prototype=Object.create(TerminalNode$3.prototype),TerminalNodeImpl$1.prototype.constructor=TerminalNodeImpl$1,TerminalNodeImpl$1.prototype.getChild=function(){return null},TerminalNodeImpl$1.prototype.getSymbol=function(){return this.symbol},TerminalNodeImpl$1.prototype.getParent=function(){return this.parentCtx},TerminalNodeImpl$1.prototype.getPayload=function(){return this.symbol},TerminalNodeImpl$1.prototype.getSourceInterval=function(){if(null===this.symbol)return INVALID_INTERVAL$2;var e=this.symbol.tokenIndex;return new Interval$6(e,e)},TerminalNodeImpl$1.prototype.getChildCount=function(){return 0},TerminalNodeImpl$1.prototype.accept=function(e){return e.visitTerminal(this)},TerminalNodeImpl$1.prototype.getText=function(){return this.symbol.text},TerminalNodeImpl$1.prototype.toString=function(){return this.symbol.type===Token$e.EOF?"<EOF>":this.symbol.text};// Represents a token that was consumed during resynchronization
68
- // rather than during a valid match operation. For example,
69
- // we will create this kind of a node during single token insertion
70
- // and deletion as well as during "consume until error recovery set"
71
- // upon no viable alternative exceptions.
72
- function ErrorNodeImpl$1(e){return TerminalNodeImpl$1.call(this,e),this}ErrorNodeImpl$1.prototype=Object.create(TerminalNodeImpl$1.prototype),ErrorNodeImpl$1.prototype.constructor=ErrorNodeImpl$1,ErrorNodeImpl$1.prototype.isErrorNode=function(){return!0},ErrorNodeImpl$1.prototype.accept=function(e){return e.visitErrorNode(this)};function ParseTreeWalker$1(){return this}ParseTreeWalker$1.prototype.walk=function(e,r){var t=r instanceof ErrorNode$2||r.isErrorNode!==void 0&&r.isErrorNode();if(t)e.visitErrorNode(r);else if(r instanceof TerminalNode$3)e.visitTerminal(r);else{this.enterRule(e,r);for(var o=0,n;o<r.getChildCount();o++)n=r.getChild(o),this.walk(e,n);this.exitRule(e,r)}},ParseTreeWalker$1.prototype.enterRule=function(e,t){var r=t.getRuleContext();e.enterEveryRule(r),r.enterRule(e)},ParseTreeWalker$1.prototype.exitRule=function(e,t){var r=t.getRuleContext();r.exitRule(e),e.exitEveryRule(r)},ParseTreeWalker$1.DEFAULT=new ParseTreeWalker$1;var RuleNode_1=RuleNode$2,ErrorNode_1=ErrorNode$2,TerminalNode_1=TerminalNode$3,ErrorNodeImpl_1=ErrorNodeImpl$1,TerminalNodeImpl_1=TerminalNodeImpl$1,ParseTreeListener_1=ParseTreeListener$2,ParseTreeVisitor_1=ParseTreeVisitor$1,ParseTreeWalker_1=ParseTreeWalker$1,INVALID_INTERVAL_1=INVALID_INTERVAL$2,Tree_1={RuleNode:RuleNode_1,ErrorNode:ErrorNode_1,TerminalNode:TerminalNode_1,ErrorNodeImpl:ErrorNodeImpl_1,TerminalNodeImpl:TerminalNodeImpl_1,ParseTreeListener:ParseTreeListener_1,ParseTreeVisitor:ParseTreeVisitor_1,ParseTreeWalker:ParseTreeWalker_1,INVALID_INTERVAL:INVALID_INTERVAL_1},RuleContext$4=(void 0).RuleContext,INVALID_INTERVAL$1=Tree_1.INVALID_INTERVAL,TerminalNode$2=Tree_1.TerminalNode,TerminalNodeImpl=Tree_1.TerminalNodeImpl,ErrorNodeImpl=Tree_1.ErrorNodeImpl,Interval$5=IntervalSet_1.Interval;function ParserRuleContext$2(e,t){// * If we are debugging or building a parse tree for a visitor,
73
- // we need to track all of the tokens and rule invocations associated
74
- // with this rule's context. This is empty for parsing w/o tree constr.
75
- // operation because we don't the need to track the details about
76
- // how we parse this rule.
77
- // /
78
- // The exception that forced this rule to return. If the rule successfully
79
- // completed, this is {@code null}.
80
- e=e||null,t=t||null,RuleContext$4.call(this,e,t),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null}ParserRuleContext$2.prototype=Object.create(RuleContext$4.prototype),ParserRuleContext$2.prototype.constructor=ParserRuleContext$2,ParserRuleContext$2.prototype.copyFrom=function(e){// from RuleContext
81
- this.parentCtx=e.parentCtx,this.invokingState=e.invokingState,this.children=null,this.start=e.start,this.stop=e.stop,e.children&&(this.children=[],e.children.map(function(e){e instanceof ErrorNodeImpl&&(this.children.push(e),e.parentCtx=this)},this))},ParserRuleContext$2.prototype.enterRule=function(){},ParserRuleContext$2.prototype.exitRule=function(){},ParserRuleContext$2.prototype.addChild=function(e){return null===this.children&&(this.children=[]),this.children.push(e),e},ParserRuleContext$2.prototype.removeLastChild=function(){null!==this.children&&this.children.pop()},ParserRuleContext$2.prototype.addTokenNode=function(e){var t=new TerminalNodeImpl(e);return this.addChild(t),t.parentCtx=this,t},ParserRuleContext$2.prototype.addErrorNode=function(e){var t=new ErrorNodeImpl(e);return this.addChild(t),t.parentCtx=this,t},ParserRuleContext$2.prototype.getChild=function(e,t){if(t=t||null,null===this.children||0>e||e>=this.children.length)return null;if(null===t)return this.children[e];for(var r=0,o;r<this.children.length;r++)if(o=this.children[r],o instanceof t){if(0===e)return o;e-=1}return null},ParserRuleContext$2.prototype.getToken=function(e,t){if(null===this.children||0>t||t>=this.children.length)return null;for(var r=0,o;r<this.children.length;r++)if(o=this.children[r],o instanceof TerminalNode$2&&o.symbol.type===e){if(0===t)return o;t-=1}return null},ParserRuleContext$2.prototype.getTokens=function(e){if(null===this.children)return[];for(var t=[],r=0,o;r<this.children.length;r++)o=this.children[r],o instanceof TerminalNode$2&&o.symbol.type===e&&t.push(o);return t},ParserRuleContext$2.prototype.getTypedRuleContext=function(e,t){return this.getChild(t,e)},ParserRuleContext$2.prototype.getTypedRuleContexts=function(e){if(null===this.children)return[];for(var t=[],r=0,o;r<this.children.length;r++)o=this.children[r],o instanceof e&&t.push(o);return t},ParserRuleContext$2.prototype.getChildCount=function(){return null===this.children?0:this.children.length},ParserRuleContext$2.prototype.getSourceInterval=function(){return null===this.start||null===this.stop?INVALID_INTERVAL$1:new Interval$5(this.start.tokenIndex,this.stop.tokenIndex)},RuleContext$4.EMPTY=new ParserRuleContext$2;function InterpreterRuleContext(e,t,r){return ParserRuleContext$2.call(e,t),this.ruleIndex=r,this}InterpreterRuleContext.prototype=Object.create(ParserRuleContext$2.prototype),InterpreterRuleContext.prototype.constructor=InterpreterRuleContext;var ParserRuleContext_2=ParserRuleContext$2,ParserRuleContext_1={ParserRuleContext:ParserRuleContext_2},Token$d=Token_1.Token,ErrorNode$1=Tree_1.ErrorNode,TerminalNode$1=Tree_1.TerminalNode,ParserRuleContext$1=ParserRuleContext_1.ParserRuleContext,RuleContext$3=(void 0).RuleContext,INVALID_ALT_NUMBER$1=(void 0).INVALID_ALT_NUMBER;/** A set of utility routines useful for all kinds of ANTLR trees. */function Trees$2(){}// Print out a whole tree in LISP form. {@link //getNodeText} is used on the
82
- // node payloads to get the text for the nodes. Detect
83
- // parse trees and extract data appropriately.
84
- Trees$2.toStringTree=function(e,t,r){t=t||null,r=r||null,null!==r&&(t=r.ruleNames);var o=Trees$2.getNodeText(e,t);o=Utils$2.escapeWhitespace(o,!1);var n=e.getChildCount();if(0===n)return o;var a="("+o+" ";0<n&&(o=Trees$2.toStringTree(e.getChild(0),t),a=a.concat(o));for(var p=1;p<n;p++)o=Trees$2.toStringTree(e.getChild(p),t),a=a.concat(" "+o);return a=a.concat(")"),a},Trees$2.getNodeText=function(e,t,r){if(t=t||null,r=r||null,null!==r&&(t=r.ruleNames),null!==t){if(e instanceof RuleContext$3){var o=e.getAltNumber();return o==INVALID_ALT_NUMBER$1?t[e.ruleIndex]:t[e.ruleIndex]+":"+o}if(e instanceof ErrorNode$1)return e.toString();if(e instanceof TerminalNode$1&&null!==e.symbol)return e.symbol.text}// no recog for rule names
85
- var n=e.getPayload();return n instanceof Token$d?n.text:e.getPayload().toString()},Trees$2.getChildren=function(e){for(var t=[],r=0;r<e.getChildCount();r++)t.push(e.getChild(r));return t},Trees$2.getAncestors=function(e){var r=[];for(e=e.getParent();null!==e;)r=[e].concat(r),e=e.getParent();return r},Trees$2.findAllTokenNodes=function(e,t){return Trees$2.findAllNodes(e,t,!0)},Trees$2.findAllRuleNodes=function(e,t){return Trees$2.findAllNodes(e,t,!1)},Trees$2.findAllNodes=function(e,t,r){var o=[];return Trees$2._findAllNodes(e,t,r,o),o},Trees$2._findAllNodes=function(e,t,r,o){r&&e instanceof TerminalNode$1?e.symbol.type===t&&o.push(e):!r&&e instanceof ParserRuleContext$1&&e.ruleIndex===t&&o.push(e);// check children
86
- for(var n=0;n<e.getChildCount();n++)Trees$2._findAllNodes(e.getChild(n),t,r,o)},Trees$2.descendants=function(e){for(var t=[e],r=0;r<e.getChildCount();r++)t=t.concat(Trees$2.descendants(e.getChild(r)));return t};var Trees_2=Trees$2,Trees_1={Trees:Trees_2},RuleNode$1=Tree_1.RuleNode,INVALID_INTERVAL=Tree_1.INVALID_INTERVAL,INVALID_ALT_NUMBER=(void 0).INVALID_ALT_NUMBER;function RuleContext$2(e,t){return RuleNode$1.call(this),this.parentCtx=e||null,this.invokingState=t||-1,this}RuleContext$2.prototype=Object.create(RuleNode$1.prototype),RuleContext$2.prototype.constructor=RuleContext$2,RuleContext$2.prototype.depth=function(){for(var e=0,t=this;null!==t;)t=t.parentCtx,e+=1;return e},RuleContext$2.prototype.isEmpty=function(){return-1===this.invokingState},RuleContext$2.prototype.getSourceInterval=function(){return INVALID_INTERVAL},RuleContext$2.prototype.getRuleContext=function(){return this},RuleContext$2.prototype.getPayload=function(){return this},RuleContext$2.prototype.getText=function(){return 0===this.getChildCount()?"":this.children.map(function(e){return e.getText()}).join("")},RuleContext$2.prototype.getAltNumber=function(){return INVALID_ALT_NUMBER},RuleContext$2.prototype.setAltNumber=function(){},RuleContext$2.prototype.getChild=function(){return null},RuleContext$2.prototype.getChildCount=function(){return 0},RuleContext$2.prototype.accept=function(e){return e.visitChildren(this)};//need to manage circular dependencies, so export now
87
- var RuleContext_2=RuleContext$2,Trees$1=Trees_1.Trees;RuleContext$2.prototype.toStringTree=function(e,t){return Trees$1.toStringTree(this,e,t)},RuleContext$2.prototype.toString=function(e,t){e=e||null,t=t||null;for(var r=this,o="[";null!==r&&r!==t;){if(null===e)r.isEmpty()||(o+=r.invokingState);else{var n=r.ruleIndex,a=0<=n&&n<e.length?e[n]:""+n;o+=a}null===r.parentCtx||null===e&&r.parentCtx.isEmpty()||(o+=" "),r=r.parentCtx}return o+="]",o};var RuleContext_1={RuleContext:RuleContext_2},RuleContext$1=RuleContext_1.RuleContext,Hash$3=Utils$2.Hash,Map$3=Utils$2.Map;//
88
- /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
89
- * Use of this file is governed by the BSD 3-clause license that
90
- * can be found in the LICENSE.txt file in the project root.
91
- */ ///
92
- function PredictionContext$3(e){this.cachedHashCode=e}// Represents {@code $} in local context prediction, which means wildcard.
93
- // {@code//+x =//}.
94
- // /
95
- PredictionContext$3.EMPTY=null,PredictionContext$3.EMPTY_RETURN_STATE=2147483647,PredictionContext$3.globalNodeCount=1,PredictionContext$3.id=PredictionContext$3.globalNodeCount,PredictionContext$3.prototype.isEmpty=function(){return this===PredictionContext$3.EMPTY},PredictionContext$3.prototype.hasEmptyPath=function(){return this.getReturnState(this.length-1)===PredictionContext$3.EMPTY_RETURN_STATE},PredictionContext$3.prototype.hashCode=function(){return this.cachedHashCode},PredictionContext$3.prototype.updateHashCode=function(e){e.update(this.cachedHashCode)};/*
96
- function calculateHashString(parent, returnState) {
97
- return "" + parent + returnState;
98
- }
99
- */ // Used to cache {@link PredictionContext} objects. Its used for the shared
100
- // context cash associated with contexts in DFA states. This cache
101
- // can be used for both lexers and parsers.
102
- function PredictionContextCache$1(){return this.cache=new Map$3,this}// Add a context to the cache and return it. If the context already exists,
103
- // return that one instead and do not add a new context to the cache.
104
- // Protect shared cache from unsafe thread access.
105
- //
106
- PredictionContextCache$1.prototype.add=function(e){if(e===PredictionContext$3.EMPTY)return PredictionContext$3.EMPTY;var t=this.cache.get(e)||null;return null===t?(this.cache.put(e,e),e):t},PredictionContextCache$1.prototype.get=function(e){return this.cache.get(e)||null},Object.defineProperty(PredictionContextCache$1.prototype,"length",{get:function(){return this.cache.length}});function SingletonPredictionContext$3(e,t){var r=0,o=new Hash$3;null===e?o.update(1):o.update(e,t),r=o.finish(),PredictionContext$3.call(this,r),this.parentCtx=e,this.returnState=t}SingletonPredictionContext$3.prototype=Object.create(PredictionContext$3.prototype),SingletonPredictionContext$3.prototype.contructor=SingletonPredictionContext$3,SingletonPredictionContext$3.create=function(e,t){return t===PredictionContext$3.EMPTY_RETURN_STATE&&null===e?PredictionContext$3.EMPTY:new SingletonPredictionContext$3(e,t)},Object.defineProperty(SingletonPredictionContext$3.prototype,"length",{get:function(){return 1}}),SingletonPredictionContext$3.prototype.getParent=function(){return this.parentCtx},SingletonPredictionContext$3.prototype.getReturnState=function(){return this.returnState},SingletonPredictionContext$3.prototype.equals=function(e){return!(this!==e)||!!(e instanceof SingletonPredictionContext$3)&&this.hashCode()===e.hashCode()&&this.returnState===e.returnState&&(null==this.parentCtx?null==e.parentCtx:this.parentCtx.equals(e.parentCtx))},SingletonPredictionContext$3.prototype.toString=function(){var e=null===this.parentCtx?"":this.parentCtx.toString();return 0===e.length?this.returnState===PredictionContext$3.EMPTY_RETURN_STATE?"$":""+this.returnState:""+this.returnState+" "+e};function EmptyPredictionContext(){return SingletonPredictionContext$3.call(this,null,PredictionContext$3.EMPTY_RETURN_STATE),this}EmptyPredictionContext.prototype=Object.create(SingletonPredictionContext$3.prototype),EmptyPredictionContext.prototype.constructor=EmptyPredictionContext,EmptyPredictionContext.prototype.isEmpty=function(){return!0},EmptyPredictionContext.prototype.getParent=function(){return null},EmptyPredictionContext.prototype.getReturnState=function(){return this.returnState},EmptyPredictionContext.prototype.equals=function(e){return this===e},EmptyPredictionContext.prototype.toString=function(){return"$"},PredictionContext$3.EMPTY=new EmptyPredictionContext;function ArrayPredictionContext(e,t){// Parent can be null only if full ctx mode and we make an array
107
- // from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using
108
- // null parent and
109
- // returnState == {@link //EMPTY_RETURN_STATE}.
110
- var r=new Hash$3;r.update(e,t);var o=r.finish();return PredictionContext$3.call(this,o),this.parents=e,this.returnStates=t,this}ArrayPredictionContext.prototype=Object.create(PredictionContext$3.prototype),ArrayPredictionContext.prototype.constructor=ArrayPredictionContext,ArrayPredictionContext.prototype.isEmpty=function(){// since EMPTY_RETURN_STATE can only appear in the last position, we
111
- // don't need to verify that size==1
112
- return this.returnStates[0]===PredictionContext$3.EMPTY_RETURN_STATE},Object.defineProperty(ArrayPredictionContext.prototype,"length",{get:function(){return this.returnStates.length}}),ArrayPredictionContext.prototype.getParent=function(e){return this.parents[e]},ArrayPredictionContext.prototype.getReturnState=function(e){return this.returnStates[e]},ArrayPredictionContext.prototype.equals=function(e){return!(this!==e)||!!(e instanceof ArrayPredictionContext)&&this.hashCode()===e.hashCode()&&this.returnStates===e.returnStates&&this.parents===e.parents},ArrayPredictionContext.prototype.toString=function(){if(this.isEmpty())return"[]";for(var e="[",t=0;t<this.returnStates.length;t++){if(0<t&&(e+=", "),this.returnStates[t]===PredictionContext$3.EMPTY_RETURN_STATE){e+="$";continue}e+=this.returnStates[t],null===this.parents[t]?e+="null":e=e+" "+this.parents[t]}return e+"]"};// Convert a {@link RuleContext} tree to a {@link PredictionContext} graph.
113
- // Return {@link //EMPTY} if {@code outerContext} is empty or null.
114
- // /
115
- function predictionContextFromRuleContext$2(e,t){// if we are in RuleContext of start rule, s, then PredictionContext
116
- // is EMPTY. Nobody called us. (if we are empty, return empty)
117
- if((void 0===t||null===t)&&(t=RuleContext$1.EMPTY),null===t.parentCtx||t===RuleContext$1.EMPTY)return PredictionContext$3.EMPTY;// If we have a parent, convert it to a PredictionContext graph
118
- var r=predictionContextFromRuleContext$2(e,t.parentCtx),o=e.states[t.invokingState],n=o.transitions[0];return SingletonPredictionContext$3.create(r,n.followState.stateNumber)}/*
119
- function calculateListsHashString(parents, returnStates) {
120
- var s = "";
121
- parents.map(function(p) {
122
- s = s + p;
123
- });
124
- returnStates.map(function(r) {
125
- s = s + r;
126
- });
127
- return s;
128
- }
129
- */function merge$1(e,t,r,o){// share same graph if both same
130
- if(e===t)return e;if(e instanceof SingletonPredictionContext$3&&t instanceof SingletonPredictionContext$3)return mergeSingletons(e,t,r,o);// At least one of a or b is array
131
- // If one is $ and rootIsWildcard, return $ as// wildcard
132
- if(r){if(e instanceof EmptyPredictionContext)return e;if(t instanceof EmptyPredictionContext)return t}// convert singleton so both are arrays to normalize
133
- return e instanceof SingletonPredictionContext$3&&(e=new ArrayPredictionContext([e.getParent()],[e.returnState])),t instanceof SingletonPredictionContext$3&&(t=new ArrayPredictionContext([t.getParent()],[t.returnState])),mergeArrays(e,t,r,o)}//
134
- // Merge two {@link SingletonPredictionContext} instances.
135
- //
136
- // <p>Stack tops equal, parents merge is same; return left graph.<br>
137
- // <embed src="images/SingletonMerge_SameRootSamePar.svg"
138
- // type="image/svg+xml"/></p>
139
- //
140
- // <p>Same stack top, parents differ; merge parents giving array node, then
141
- // remainders of those graphs. A new root node is created to point to the
142
- // merged parents.<br>
143
- // <embed src="images/SingletonMerge_SameRootDiffPar.svg"
144
- // type="image/svg+xml"/></p>
145
- //
146
- // <p>Different stack tops pointing to same parent. Make array node for the
147
- // root where both element in the root point to the same (original)
148
- // parent.<br>
149
- // <embed src="images/SingletonMerge_DiffRootSamePar.svg"
150
- // type="image/svg+xml"/></p>
151
- //
152
- // <p>Different stack tops pointing to different parents. Make array node for
153
- // the root where each element points to the corresponding original
154
- // parent.<br>
155
- // <embed src="images/SingletonMerge_DiffRootDiffPar.svg"
156
- // type="image/svg+xml"/></p>
157
- //
158
- // @param a the first {@link SingletonPredictionContext}
159
- // @param b the second {@link SingletonPredictionContext}
160
- // @param rootIsWildcard {@code true} if this is a local-context merge,
161
- // otherwise false to indicate a full-context merge
162
- // @param mergeCache
163
- // /
164
- function mergeSingletons(e,t,r,o){if(null!==o){var n=o.get(e,t);if(null!==n)return n;if(n=o.get(t,e),null!==n)return n}var a=mergeRoot(e,t,r);if(null!==a)return null!==o&&o.set(e,t,a),a;if(e.returnState===t.returnState){var i=merge$1(e.parentCtx,t.parentCtx,r,o);// if parent is same as existing a or b parent or reduced to a parent,
165
- // return it
166
- if(i===e.parentCtx)return e;// ax + bx = ax, if a=b
167
- if(i===t.parentCtx)return t;// ax + bx = bx, if a=b
168
- // else: ax + ay = a'[x,y]
169
- // merge parents x and y, giving array node with x,y then remainders
170
- // of those graphs. dup a, a' points at merged array
171
- // new joined parent so create new singleton pointing to it, a'
172
- var p=SingletonPredictionContext$3.create(i,e.returnState);return null!==o&&o.set(e,t,p),p}// a != b payloads differ
173
- // see if we can collapse parents due to $+x parents if local ctx
174
- var s=null;if((e===t||null!==e.parentCtx&&e.parentCtx===t.parentCtx)&&(s=e.parentCtx),null!==s){// parents are same
175
- // sort payloads and use same parent
176
- var l=[e.returnState,t.returnState];e.returnState>t.returnState&&(l[0]=t.returnState,l[1]=e.returnState);var d=[s,s],c=new ArrayPredictionContext(d,l);return null!==o&&o.set(e,t,c),c}// parents differ and can't merge them. Just pack together
177
- // into array; can't merge.
178
- // ax + by = [ax,by]
179
- var l=[e.returnState,t.returnState],d=[e.parentCtx,t.parentCtx];e.returnState>t.returnState&&(l[0]=t.returnState,l[1]=e.returnState,d=[t.parentCtx,e.parentCtx]);var u=new ArrayPredictionContext(d,l);return null!==o&&o.set(e,t,u),u}//
180
- // Handle case where at least one of {@code a} or {@code b} is
181
- // {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used
182
- // to represent {@link //EMPTY}.
183
- //
184
- // <h2>Local-Context Merges</h2>
185
- //
186
- // <p>These local-context merge operations are used when {@code rootIsWildcard}
187
- // is true.</p>
188
- //
189
- // <p>{@link //EMPTY} is superset of any graph; return {@link //EMPTY}.<br>
190
- // <embed src="images/LocalMerge_EmptyRoot.svg" type="image/svg+xml"/></p>
191
- //
192
- // <p>{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is
193
- // {@code //EMPTY}; return left graph.<br>
194
- // <embed src="images/LocalMerge_EmptyParent.svg" type="image/svg+xml"/></p>
195
- //
196
- // <p>Special case of last merge if local context.<br>
197
- // <embed src="images/LocalMerge_DiffRoots.svg" type="image/svg+xml"/></p>
198
- //
199
- // <h2>Full-Context Merges</h2>
200
- //
201
- // <p>These full-context merge operations are used when {@code rootIsWildcard}
202
- // is false.</p>
203
- //
204
- // <p><embed src="images/FullMerge_EmptyRoots.svg" type="image/svg+xml"/></p>
205
- //
206
- // <p>Must keep all contexts; {@link //EMPTY} in array is a special value (and
207
- // null parent).<br>
208
- // <embed src="images/FullMerge_EmptyRoot.svg" type="image/svg+xml"/></p>
209
- //
210
- // <p><embed src="images/FullMerge_SameRoot.svg" type="image/svg+xml"/></p>
211
- //
212
- // @param a the first {@link SingletonPredictionContext}
213
- // @param b the second {@link SingletonPredictionContext}
214
- // @param rootIsWildcard {@code true} if this is a local-context merge,
215
- // otherwise false to indicate a full-context merge
216
- // /
217
- function mergeRoot(e,t,r){if(r){if(e===PredictionContext$3.EMPTY)return PredictionContext$3.EMPTY;// // + b =//
218
- if(t===PredictionContext$3.EMPTY)return PredictionContext$3.EMPTY;// a +// =//
219
- }else{if(e===PredictionContext$3.EMPTY&&t===PredictionContext$3.EMPTY)return PredictionContext$3.EMPTY;// $ + $ = $
220
- if(e===PredictionContext$3.EMPTY){// $ + x = [$,x]
221
- var o=[t.returnState,PredictionContext$3.EMPTY_RETURN_STATE],n=[t.parentCtx,null];return new ArrayPredictionContext(n,o)}if(t===PredictionContext$3.EMPTY){// x + $ = [$,x] ($ is always first if present)
222
- var o=[e.returnState,PredictionContext$3.EMPTY_RETURN_STATE],n=[e.parentCtx,null];return new ArrayPredictionContext(n,o)}}return null}//
223
- // Merge two {@link ArrayPredictionContext} instances.
224
- //
225
- // <p>Different tops, different parents.<br>
226
- // <embed src="images/ArrayMerge_DiffTopDiffPar.svg" type="image/svg+xml"/></p>
227
- //
228
- // <p>Shared top, same parents.<br>
229
- // <embed src="images/ArrayMerge_ShareTopSamePar.svg" type="image/svg+xml"/></p>
230
- //
231
- // <p>Shared top, different parents.<br>
232
- // <embed src="images/ArrayMerge_ShareTopDiffPar.svg" type="image/svg+xml"/></p>
233
- //
234
- // <p>Shared top, all shared parents.<br>
235
- // <embed src="images/ArrayMerge_ShareTopSharePar.svg"
236
- // type="image/svg+xml"/></p>
237
- //
238
- // <p>Equal tops, merge parents and reduce top to
239
- // {@link SingletonPredictionContext}.<br>
240
- // <embed src="images/ArrayMerge_EqualTop.svg" type="image/svg+xml"/></p>
241
- // /
242
- function mergeArrays(e,t,r,o){if(null!==o){var n=o.get(e,t);if(null!==n)return n;if(n=o.get(t,e),null!==n)return n}// merge sorted payloads a + b => M
243
- // walk and merge to yield mergedParents, mergedReturnStates
244
- for(var a=0,s=0,l=0,d=[],c=[]// walks a
245
- ;a<e.returnStates.length&&s<t.returnStates.length;){var u=e.parents[a],y=t.parents[s];if(e.returnStates[a]===t.returnStates[s]){// same payload (stack tops are equal), must yield merged singleton
246
- var m=e.returnStates[a],g=m===PredictionContext$3.EMPTY_RETURN_STATE&&null===u&&null===y;// $+$ = $
247
- // ax+ax
248
- // ->
249
- // ax
250
- if(g||null!==u&&null!==y&&u===y)c[l]=u,d[l]=m;else{// ax+ay -> a'[x,y]
251
- var E=merge$1(u,y,r,o);c[l]=E,d[l]=m}a+=1,s+=1}else e.returnStates[a]<t.returnStates[s]?(// copy a[i] to M
252
- c[l]=u,d[l]=e.returnStates[a],a+=1):(// b > a, copy b[j] to M
253
- c[l]=y,d[l]=t.returnStates[s],s+=1);l+=1}// copy over any payloads remaining in either array
254
- if(a<e.returnStates.length)for(var f=a;f<e.returnStates.length;f++)c[l]=e.parents[f],d[l]=e.returnStates[f],l+=1;else for(var f=s;f<t.returnStates.length;f++)c[l]=t.parents[f],d[l]=t.returnStates[f],l+=1;// trim merged if we combined a few that had same stack tops
255
- if(l<c.length){// write index < last position; trim
256
- if(1===l){// for just one merged element, return singleton top
257
- var x=SingletonPredictionContext$3.create(c[0],d[0]);return null!==o&&o.set(e,t,x),x}c=c.slice(0,l),d=d.slice(0,l)}var T=new ArrayPredictionContext(c,d);// if we created same array as a or b, return that instead
258
- // TODO: track whether this is possible above during merge sort for speed
259
- return T===e?(null!==o&&o.set(e,t,e),e):T===t?(null!==o&&o.set(e,t,t),t):(combineCommonParents(c),null!==o&&o.set(e,t,T),T)}//
260
- // Make pass over all <em>M</em> {@code parents}; merge any {@code equals()}
261
- // ones.
262
- // /
263
- function combineCommonParents(e){for(var t=new Map$3,r=0,o;r<e.length;r++)o=e[r],t.containsKey(o)||t.put(o,o);for(var n=0;n<e.length;n++)e[n]=t.get(e[n])}function getCachedPredictionContext$1(e,t,r){if(e.isEmpty())return e;var o=r.get(e)||null;if(null!==o)return o;if(o=t.get(e),null!==o)return r.put(e,o),o;for(var n=!1,a=[],p=0,s;p<a.length;p++)if(s=getCachedPredictionContext$1(e.getParent(p),t,r),n||s!==e.getParent(p)){if(!n){a=[];for(var l=0;l<e.length;l++)a[l]=e.getParent(l);n=!0}a[p]=s}if(!n)return t.add(e),r.put(e,e),e;var d=null;return d=0===a.length?PredictionContext$3.EMPTY:1===a.length?SingletonPredictionContext$3.create(a[0],e.getReturnState(0)):new ArrayPredictionContext(a,e.returnStates),t.add(d),r.put(d,d),r.put(e,d),d}var merge_1=merge$1,PredictionContext_2=PredictionContext$3,PredictionContextCache_1=PredictionContextCache$1,SingletonPredictionContext_1=SingletonPredictionContext$3,predictionContextFromRuleContext_1=predictionContextFromRuleContext$2,getCachedPredictionContext_1=getCachedPredictionContext$1,PredictionContext_1={merge:merge_1,PredictionContext:PredictionContext_2,PredictionContextCache:PredictionContextCache_1,SingletonPredictionContext:SingletonPredictionContext_1,predictionContextFromRuleContext:predictionContextFromRuleContext_1,getCachedPredictionContext:getCachedPredictionContext_1},Set$5=Utils$2.Set,BitSet$3=Utils$2.BitSet,Token$c=Token_1.Token,ATNConfig$2=ATNConfig_1.ATNConfig,IntervalSet$3=IntervalSet_1.IntervalSet,RuleStopState$4=ATNState_1.RuleStopState,RuleTransition$2=Transition_1.RuleTransition,NotSetTransition$2=Transition_1.NotSetTransition,WildcardTransition$1=Transition_1.WildcardTransition,AbstractPredicateTransition=Transition_1.AbstractPredicateTransition,predictionContextFromRuleContext$1=PredictionContext_1.predictionContextFromRuleContext,PredictionContext$2=PredictionContext_1.PredictionContext,SingletonPredictionContext$2=PredictionContext_1.SingletonPredictionContext;function LL1Analyzer$1(e){this.atn=e}//* Special value added to the lookahead sets to indicate that we hit
264
- // a predicate during analysis if {@code seeThruPreds==false}.
265
- ///
266
- LL1Analyzer$1.HIT_PRED=Token$c.INVALID_TYPE,LL1Analyzer$1.prototype.getDecisionLookahead=function(e){if(null===e)return null;for(var t=e.transitions.length,r=[],o=0;o<t;o++){r[o]=new IntervalSet$3;var n=new Set$5;// fail to get lookahead upon pred
267
- this._LOOK(e.transition(o).target,null,PredictionContext$2.EMPTY,r[o],n,new BitSet$3,!1,!1),(0===r[o].length||r[o].contains(LL1Analyzer$1.HIT_PRED))&&(r[o]=null)}return r},LL1Analyzer$1.prototype.LOOK=function(e,t,o){var n=new IntervalSet$3;o=o||null;var r=null===o?null:predictionContextFromRuleContext$1(e.atn,o);return this._LOOK(e,t,r,n,new Set$5,new BitSet$3,!0,!0),n},LL1Analyzer$1.prototype._LOOK=function(e,r,o,n,a,p,s,l){var d=new ATNConfig$2({state:e,alt:0,context:o},null);if(!a.contains(d)){if(a.add(d),e===r){if(null===o)return void n.addOne(Token$c.EPSILON);if(o.isEmpty()&&l)return void n.addOne(Token$c.EOF)}if(e instanceof RuleStopState$4){if(null===o)return void n.addOne(Token$c.EPSILON);if(o.isEmpty()&&l)return void n.addOne(Token$c.EOF);if(o!==PredictionContext$2.EMPTY){// run thru all possible stack tops in ctx
268
- for(var c=0;c<o.length;c++){var u=this.atn.states[o.getReturnState(c)],y=p.contains(u.ruleIndex);try{p.remove(u.ruleIndex),this._LOOK(u,r,o.getParent(c),n,a,p,s,l)}finally{y&&p.add(u.ruleIndex)}}return}}for(var m=0,g;m<e.transitions.length;m++)if(g=e.transitions[m],g.constructor===RuleTransition$2){if(p.contains(g.target.ruleIndex))continue;var E=SingletonPredictionContext$2.create(o,g.followState.stateNumber);try{p.add(g.target.ruleIndex),this._LOOK(g.target,r,E,n,a,p,s,l)}finally{p.remove(g.target.ruleIndex)}}else if(g instanceof AbstractPredicateTransition)s?this._LOOK(g.target,r,o,n,a,p,s,l):n.addOne(LL1Analyzer$1.HIT_PRED);else if(g.isEpsilon)this._LOOK(g.target,r,o,n,a,p,s,l);else if(g.constructor===WildcardTransition$1)n.addRange(Token$c.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{var f=g.label;null!==f&&(g instanceof NotSetTransition$2&&(f=f.complement(Token$c.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),n.addSet(f))}}};var LL1Analyzer_2=LL1Analyzer$1,LL1Analyzer_1={LL1Analyzer:LL1Analyzer_2},LL1Analyzer=LL1Analyzer_1.LL1Analyzer,IntervalSet$2=IntervalSet_1.IntervalSet;function ATN$6(e,t){return this.grammarType=e,this.maxTokenType=t,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[],this}// Compute the set of valid tokens that can occur starting in state {@code s}.
269
- // If {@code ctx} is null, the set of tokens will not include what can follow
270
- // the rule surrounding {@code s}. In other words, the set will be
271
- // restricted to tokens reachable staying within {@code s}'s rule.
272
- ATN$6.prototype.nextTokensInContext=function(e,t){var r=new LL1Analyzer(this);return r.LOOK(e,null,t)},ATN$6.prototype.nextTokensNoContext=function(e){return null===e.nextTokenWithinRule?(e.nextTokenWithinRule=this.nextTokensInContext(e,null),e.nextTokenWithinRule.readOnly=!0,e.nextTokenWithinRule):e.nextTokenWithinRule},ATN$6.prototype.nextTokens=function(e,t){return void 0===t?this.nextTokensNoContext(e):this.nextTokensInContext(e,t)},ATN$6.prototype.addState=function(e){null!==e&&(e.atn=this,e.stateNumber=this.states.length),this.states.push(e)},ATN$6.prototype.removeState=function(e){this.states[e.stateNumber]=null},ATN$6.prototype.defineDecisionState=function(e){return this.decisionToState.push(e),e.decision=this.decisionToState.length-1,e.decision},ATN$6.prototype.getDecisionState=function(e){return 0===this.decisionToState.length?null:this.decisionToState[e]};// Computes the set of input symbols which could follow ATN state number
273
- // {@code stateNumber} in the specified full {@code context}. This method
274
- // considers the complete parser context, but does not evaluate semantic
275
- // predicates (i.e. all predicates encountered during the calculation are
276
- // assumed true). If a path in the ATN exists from the starting state to the
277
- // {@link RuleStopState} of the outermost context without matching any
278
- // symbols, {@link Token//EOF} is added to the returned set.
279
- //
280
- // <p>If {@code context} is {@code null}, it is treated as
281
- // {@link ParserRuleContext//EMPTY}.</p>
282
- //
283
- // @param stateNumber the ATN state number
284
- // @param context the full parse context
285
- // @return The set of potentially valid input symbols which could follow the
286
- // specified state in the specified context.
287
- // @throws IllegalArgumentException if the ATN does not contain a state with
288
- // number {@code stateNumber}
289
- var Token$b=Token_1.Token;ATN$6.prototype.getExpectedTokens=function(e,t){if(0>e||e>=this.states.length)throw"Invalid state number.";var r=this.states[e],o=this.nextTokens(r);if(!o.contains(Token$b.EPSILON))return o;var n=new IntervalSet$2;for(n.addSet(o),n.removeOne(Token$b.EPSILON);null!==t&&0<=t.invokingState&&o.contains(Token$b.EPSILON);){var a=this.states[t.invokingState],i=a.transitions[0];o=this.nextTokens(i.followState),n.addSet(o),n.removeOne(Token$b.EPSILON),t=t.parentCtx}return o.contains(Token$b.EPSILON)&&n.addOne(Token$b.EOF),n},ATN$6.INVALID_ALT_NUMBER=0;var ATN_2=ATN$6,ATN_1={ATN:ATN_2};/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
290
- * Use of this file is governed by the BSD 3-clause license that
291
- * can be found in the LICENSE.txt file in the project root.
292
- */ ///
293
- // Represents the type of recognizer an ATN applies to.
294
- function ATNType$1(){}ATNType$1.LEXER=0,ATNType$1.PARSER=1;var ATNType_2=ATNType$1,ATNType_1={ATNType:ATNType_2};/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
295
- * Use of this file is governed by the BSD 3-clause license that
296
- * can be found in the LICENSE.txt file in the project root.
297
- */function ATNDeserializationOptions$2(e){return void 0===e&&(e=null),this.readOnly=!1,this.verifyATN=null===e||e.verifyATN,this.generateRuleBypassTransitions=null!==e&&e.generateRuleBypassTransitions,this}ATNDeserializationOptions$2.defaultOptions=new ATNDeserializationOptions$2,ATNDeserializationOptions$2.defaultOptions.readOnly=!0;// def __setattr__(self, key, value):
298
- // if key!="readOnly" and self.readOnly:
299
- // raise Exception("The object is read only.")
300
- // super(type(self), self).__setattr__(key,value)
301
- var ATNDeserializationOptions_2=ATNDeserializationOptions$2,ATNDeserializationOptions_1={ATNDeserializationOptions:ATNDeserializationOptions_2};//
302
- /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
303
- * Use of this file is governed by the BSD 3-clause license that
304
- * can be found in the LICENSE.txt file in the project root.
305
- */ //
306
- function LexerActionType$1(){}LexerActionType$1.CHANNEL=0,LexerActionType$1.CUSTOM=1,LexerActionType$1.MODE=2,LexerActionType$1.MORE=3,LexerActionType$1.POP_MODE=4,LexerActionType$1.PUSH_MODE=5,LexerActionType$1.SKIP=6,LexerActionType$1.TYPE=7;//The type of a {@link LexerTypeAction} action.
307
- function LexerAction(e){return this.actionType=e,this.isPositionDependent=!1,this}LexerAction.prototype.hashCode=function(){var e=new Hash;return this.updateHashCode(e),e.finish()},LexerAction.prototype.updateHashCode=function(e){e.update(this.actionType)},LexerAction.prototype.equals=function(e){return this===e};//
308
- // Implements the {@code skip} lexer action by calling {@link Lexer//skip}.
309
- //
310
- // <p>The {@code skip} command does not have any parameters, so this action is
311
- // implemented as a singleton instance exposed by {@link //INSTANCE}.</p>
312
- function LexerSkipAction$1(){return LexerAction.call(this,LexerActionType$1.SKIP),this}LexerSkipAction$1.prototype=Object.create(LexerAction.prototype),LexerSkipAction$1.prototype.constructor=LexerSkipAction$1,LexerSkipAction$1.INSTANCE=new LexerSkipAction$1,LexerSkipAction$1.prototype.execute=function(e){e.skip()},LexerSkipAction$1.prototype.toString=function(){return"skip"};// Implements the {@code type} lexer action by calling {@link Lexer//setType}
313
- // with the assigned type.
314
- function LexerTypeAction$1(e){return LexerAction.call(this,LexerActionType$1.TYPE),this.type=e,this}LexerTypeAction$1.prototype=Object.create(LexerAction.prototype),LexerTypeAction$1.prototype.constructor=LexerTypeAction$1,LexerTypeAction$1.prototype.execute=function(e){e.type=this.type},LexerTypeAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.type)},LexerTypeAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerTypeAction$1)&&this.type===e.type},LexerTypeAction$1.prototype.toString=function(){return"type("+this.type+")"};// Implements the {@code pushMode} lexer action by calling
315
- // {@link Lexer//pushMode} with the assigned mode.
316
- function LexerPushModeAction$1(e){return LexerAction.call(this,LexerActionType$1.PUSH_MODE),this.mode=e,this}LexerPushModeAction$1.prototype=Object.create(LexerAction.prototype),LexerPushModeAction$1.prototype.constructor=LexerPushModeAction$1,LexerPushModeAction$1.prototype.execute=function(e){e.pushMode(this.mode)},LexerPushModeAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.mode)},LexerPushModeAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerPushModeAction$1)&&this.mode===e.mode},LexerPushModeAction$1.prototype.toString=function(){return"pushMode("+this.mode+")"};// Implements the {@code popMode} lexer action by calling {@link Lexer//popMode}.
317
- //
318
- // <p>The {@code popMode} command does not have any parameters, so this action is
319
- // implemented as a singleton instance exposed by {@link //INSTANCE}.</p>
320
- function LexerPopModeAction$1(){return LexerAction.call(this,LexerActionType$1.POP_MODE),this}LexerPopModeAction$1.prototype=Object.create(LexerAction.prototype),LexerPopModeAction$1.prototype.constructor=LexerPopModeAction$1,LexerPopModeAction$1.INSTANCE=new LexerPopModeAction$1,LexerPopModeAction$1.prototype.execute=function(e){e.popMode()},LexerPopModeAction$1.prototype.toString=function(){return"popMode"};// Implements the {@code more} lexer action by calling {@link Lexer//more}.
321
- //
322
- // <p>The {@code more} command does not have any parameters, so this action is
323
- // implemented as a singleton instance exposed by {@link //INSTANCE}.</p>
324
- function LexerMoreAction$1(){return LexerAction.call(this,LexerActionType$1.MORE),this}LexerMoreAction$1.prototype=Object.create(LexerAction.prototype),LexerMoreAction$1.prototype.constructor=LexerMoreAction$1,LexerMoreAction$1.INSTANCE=new LexerMoreAction$1,LexerMoreAction$1.prototype.execute=function(e){e.more()},LexerMoreAction$1.prototype.toString=function(){return"more"};// Implements the {@code mode} lexer action by calling {@link Lexer//mode} with
325
- // the assigned mode.
326
- function LexerModeAction$1(e){return LexerAction.call(this,LexerActionType$1.MODE),this.mode=e,this}LexerModeAction$1.prototype=Object.create(LexerAction.prototype),LexerModeAction$1.prototype.constructor=LexerModeAction$1,LexerModeAction$1.prototype.execute=function(e){e.mode(this.mode)},LexerModeAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.mode)},LexerModeAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerModeAction$1)&&this.mode===e.mode},LexerModeAction$1.prototype.toString=function(){return"mode("+this.mode+")"};// Executes a custom lexer action by calling {@link Recognizer//action} with the
327
- // rule and action indexes assigned to the custom action. The implementation of
328
- // a custom action is added to the generated code for the lexer in an override
329
- // of {@link Recognizer//action} when the grammar is compiled.
330
- //
331
- // <p>This class may represent embedded actions created with the <code>{...}</code>
332
- // syntax in ANTLR 4, as well as actions created for lexer commands where the
333
- // command argument could not be evaluated when the grammar was compiled.</p>
334
- // Constructs a custom lexer action with the specified rule and action
335
- // indexes.
336
- //
337
- // @param ruleIndex The rule index to use for calls to
338
- // {@link Recognizer//action}.
339
- // @param actionIndex The action index to use for calls to
340
- // {@link Recognizer//action}.
341
- function LexerCustomAction$1(e,t){return LexerAction.call(this,LexerActionType$1.CUSTOM),this.ruleIndex=e,this.actionIndex=t,this.isPositionDependent=!0,this}LexerCustomAction$1.prototype=Object.create(LexerAction.prototype),LexerCustomAction$1.prototype.constructor=LexerCustomAction$1,LexerCustomAction$1.prototype.execute=function(e){e.action(null,this.ruleIndex,this.actionIndex)},LexerCustomAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.ruleIndex,this.actionIndex)},LexerCustomAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerCustomAction$1)&&this.ruleIndex===e.ruleIndex&&this.actionIndex===e.actionIndex};// Implements the {@code channel} lexer action by calling
342
- // {@link Lexer//setChannel} with the assigned channel.
343
- // Constructs a new {@code channel} action with the specified channel value.
344
- // @param channel The channel value to pass to {@link Lexer//setChannel}.
345
- function LexerChannelAction$1(e){return LexerAction.call(this,LexerActionType$1.CHANNEL),this.channel=e,this}LexerChannelAction$1.prototype=Object.create(LexerAction.prototype),LexerChannelAction$1.prototype.constructor=LexerChannelAction$1,LexerChannelAction$1.prototype.execute=function(e){e._channel=this.channel},LexerChannelAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.channel)},LexerChannelAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerChannelAction$1)&&this.channel===e.channel},LexerChannelAction$1.prototype.toString=function(){return"channel("+this.channel+")"};// This implementation of {@link LexerAction} is used for tracking input offsets
346
- // for position-dependent actions within a {@link LexerActionExecutor}.
347
- //
348
- // <p>This action is not serialized as part of the ATN, and is only required for
349
- // position-dependent lexer actions which appear at a location other than the
350
- // end of a rule. For more information about DFA optimizations employed for
351
- // lexer actions, see {@link LexerActionExecutor//append} and
352
- // {@link LexerActionExecutor//fixOffsetBeforeMatch}.</p>
353
- // Constructs a new indexed custom action by associating a character offset
354
- // with a {@link LexerAction}.
355
- //
356
- // <p>Note: This class is only required for lexer actions for which
357
- // {@link LexerAction//isPositionDependent} returns {@code true}.</p>
358
- //
359
- // @param offset The offset into the input {@link CharStream}, relative to
360
- // the token start index, at which the specified lexer action should be
361
- // executed.
362
- // @param action The lexer action to execute at a particular offset in the
363
- // input {@link CharStream}.
364
- function LexerIndexedCustomAction$1(e,t){return LexerAction.call(this,t.actionType),this.offset=e,this.action=t,this.isPositionDependent=!0,this}LexerIndexedCustomAction$1.prototype=Object.create(LexerAction.prototype),LexerIndexedCustomAction$1.prototype.constructor=LexerIndexedCustomAction$1,LexerIndexedCustomAction$1.prototype.execute=function(e){// assume the input stream position was properly set by the calling code
365
- this.action.execute(e)},LexerIndexedCustomAction$1.prototype.updateHashCode=function(e){e.update(this.actionType,this.offset,this.action)},LexerIndexedCustomAction$1.prototype.equals=function(e){return!(this!==e)||!!(e instanceof LexerIndexedCustomAction$1)&&this.offset===e.offset&&this.action===e.action};var LexerActionType_1=LexerActionType$1,LexerSkipAction_1=LexerSkipAction$1,LexerChannelAction_1=LexerChannelAction$1,LexerCustomAction_1=LexerCustomAction$1,LexerIndexedCustomAction_1=LexerIndexedCustomAction$1,LexerMoreAction_1=LexerMoreAction$1,LexerTypeAction_1=LexerTypeAction$1,LexerPushModeAction_1=LexerPushModeAction$1,LexerPopModeAction_1=LexerPopModeAction$1,LexerModeAction_1=LexerModeAction$1,LexerAction_1={LexerActionType:LexerActionType_1,LexerSkipAction:LexerSkipAction_1,LexerChannelAction:LexerChannelAction_1,LexerCustomAction:LexerCustomAction_1,LexerIndexedCustomAction:LexerIndexedCustomAction_1,LexerMoreAction:LexerMoreAction_1,LexerTypeAction:LexerTypeAction_1,LexerPushModeAction:LexerPushModeAction_1,LexerPopModeAction:LexerPopModeAction_1,LexerModeAction:LexerModeAction_1},Token$a=Token_1.Token,ATN$5=ATN_1.ATN,ATNType=ATNType_1.ATNType,ATNState$2=ATNState_1.ATNState,BasicState=ATNState_1.BasicState,DecisionState=ATNState_1.DecisionState,BlockStartState=ATNState_1.BlockStartState,BlockEndState=ATNState_1.BlockEndState,LoopEndState=ATNState_1.LoopEndState,RuleStartState=ATNState_1.RuleStartState,RuleStopState$3=ATNState_1.RuleStopState,TokensStartState=ATNState_1.TokensStartState,PlusLoopbackState=ATNState_1.PlusLoopbackState,StarLoopbackState=ATNState_1.StarLoopbackState,StarLoopEntryState$1=ATNState_1.StarLoopEntryState,PlusBlockStartState=ATNState_1.PlusBlockStartState,StarBlockStartState=ATNState_1.StarBlockStartState,BasicBlockStartState=ATNState_1.BasicBlockStartState,Transition$2=Transition_1.Transition,AtomTransition$1=Transition_1.AtomTransition,SetTransition$1=Transition_1.SetTransition,NotSetTransition$1=Transition_1.NotSetTransition,RuleTransition$1=Transition_1.RuleTransition,RangeTransition=Transition_1.RangeTransition,ActionTransition$1=Transition_1.ActionTransition,EpsilonTransition=Transition_1.EpsilonTransition,WildcardTransition=Transition_1.WildcardTransition,PredicateTransition$1=Transition_1.PredicateTransition,PrecedencePredicateTransition=Transition_1.PrecedencePredicateTransition,IntervalSet$1=IntervalSet_1.IntervalSet,ATNDeserializationOptions$1=ATNDeserializationOptions_1.ATNDeserializationOptions,LexerActionType=LexerAction_1.LexerActionType,LexerSkipAction=LexerAction_1.LexerSkipAction,LexerChannelAction=LexerAction_1.LexerChannelAction,LexerCustomAction=LexerAction_1.LexerCustomAction,LexerMoreAction=LexerAction_1.LexerMoreAction,LexerTypeAction=LexerAction_1.LexerTypeAction,LexerPushModeAction=LexerAction_1.LexerPushModeAction,LexerPopModeAction=LexerAction_1.LexerPopModeAction,LexerModeAction=LexerAction_1.LexerModeAction,BASE_SERIALIZED_UUID="AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",ADDED_UNICODE_SMP="59627784-3BE5-417A-B9EB-8131A7286089",SUPPORTED_UUIDS=[BASE_SERIALIZED_UUID,ADDED_UNICODE_SMP],SERIALIZED_VERSION=3,SERIALIZED_UUID=ADDED_UNICODE_SMP;function initArray(e,t){var r=[];return r[e-1]=t,r.map(function(){return t})}function ATNDeserializer$2(e){return(void 0===e||null===e)&&(e=ATNDeserializationOptions$1.defaultOptions),this.deserializationOptions=e,this.stateFactories=null,this.actionFactories=null,this}// Determines if a particular serialized representation of an ATN supports
366
- // a particular feature, identified by the {@link UUID} used for serializing
367
- // the ATN at the time the feature was first introduced.
368
- //
369
- // @param feature The {@link UUID} marking the first time the feature was
370
- // supported in the serialized ATN.
371
- // @param actualUuid The {@link UUID} of the actual serialized ATN which is
372
- // currently being deserialized.
373
- // @return {@code true} if the {@code actualUuid} value represents a
374
- // serialized ATN at or after the feature identified by {@code feature} was
375
- // introduced; otherwise, {@code false}.
376
- ATNDeserializer$2.prototype.isFeatureSupported=function(e,t){var r=SUPPORTED_UUIDS.indexOf(e);if(0>r)return!1;var o=SUPPORTED_UUIDS.indexOf(t);return o>=r},ATNDeserializer$2.prototype.deserialize=function(e){this.reset(e),this.checkVersion(),this.checkUUID();var t=this.readATN();this.readStates(t),this.readRules(t),this.readModes(t);var r=[];// First, deserialize sets with 16-bit arguments <= U+FFFF.
377
- return this.readSets(t,r,this.readInt.bind(this)),this.isFeatureSupported(ADDED_UNICODE_SMP,this.uuid)&&this.readSets(t,r,this.readInt32.bind(this)),this.readEdges(t,r),this.readDecisions(t),this.readLexerActions(t),this.markPrecedenceDecisions(t),this.verifyATN(t),this.deserializationOptions.generateRuleBypassTransitions&&t.grammarType===ATNType.PARSER&&(this.generateRuleBypassTransitions(t),this.verifyATN(t)),t},ATNDeserializer$2.prototype.reset=function(e){var t=e.split("").map(function(e){var t=e.charCodeAt(0);return 1<t?t-2:t+65534});// don't adjust the first value since that's the version number
378
- t[0]=e.charCodeAt(0),this.data=t,this.pos=0},ATNDeserializer$2.prototype.checkVersion=function(){var e=this.readInt();if(e!==SERIALIZED_VERSION)throw"Could not deserialize ATN with version "+e+" (expected "+SERIALIZED_VERSION+")."},ATNDeserializer$2.prototype.checkUUID=function(){var e=this.readUUID();if(0>SUPPORTED_UUIDS.indexOf(e))throw SERIALIZED_UUID;this.uuid=e},ATNDeserializer$2.prototype.readATN=function(){var e=this.readInt(),t=this.readInt();return new ATN$5(e,t)},ATNDeserializer$2.prototype.readStates=function(e){for(var t=[],r=[],o=this.readInt(),n=0,a,p,l,d;n<o;n++){// ignore bad type of states
379
- if(d=this.readInt(),d===ATNState$2.INVALID_TYPE){e.addState(null);continue}var c=this.readInt();65535===c&&(c=-1);var u=this.stateFactory(d,c);if(d===ATNState$2.LOOP_END){// special case
380
- var s=this.readInt();t.push([u,s])}else if(u instanceof BlockStartState){var y=this.readInt();r.push([u,y])}e.addState(u)}// delay the assignment of loop back and end states until we know all the
381
- // state instances have been initialized
382
- for(a=0;a<t.length;a++)p=t[a],p[0].loopBackState=e.states[p[1]];for(a=0;a<r.length;a++)p=r[a],p[0].endState=e.states[p[1]];var m=this.readInt();for(a=0;a<m;a++)l=this.readInt(),e.states[l].nonGreedy=!0;var g=this.readInt();for(a=0;a<g;a++)l=this.readInt(),e.states[l].isPrecedenceRule=!0},ATNDeserializer$2.prototype.readRules=function(e){var t=this.readInt(),r;for(e.grammarType===ATNType.LEXER&&(e.ruleToTokenType=initArray(t,0)),e.ruleToStartState=initArray(t,0),r=0;r<t;r++){var o=this.readInt(),n=e.states[o];if(e.ruleToStartState[r]=n,e.grammarType===ATNType.LEXER){var a=this.readInt();65535===a&&(a=Token$a.EOF),e.ruleToTokenType[r]=a}}for(e.ruleToStopState=initArray(t,0),r=0;r<e.states.length;r++){var p=e.states[r];p instanceof RuleStopState$3&&(e.ruleToStopState[p.ruleIndex]=p,e.ruleToStartState[p.ruleIndex].stopState=p)}},ATNDeserializer$2.prototype.readModes=function(e){for(var t=this.readInt(),r=0,o;r<t;r++)o=this.readInt(),e.modeToStartState.push(e.states[o])},ATNDeserializer$2.prototype.readSets=function(e,t,r){for(var o=this.readInt(),a=0,p;a<o;a++){p=new IntervalSet$1,t.push(p);var s=this.readInt(),n=this.readInt();0!==n&&p.addOne(-1);for(var l=0;l<s;l++){var d=r(),c=r();p.addRange(d,c)}}},ATNDeserializer$2.prototype.readEdges=function(e,r){var o=this.readInt(),n,a,p,s,l;for(n=0;n<o;n++){var d=this.readInt(),c=this.readInt(),u=this.readInt(),y=this.readInt(),m=this.readInt(),g=this.readInt();s=this.edgeFactory(e,u,d,c,y,m,g,r);var E=e.states[d];E.addTransition(s)}// edges for rule stop states can be derived, so they aren't serialized
383
- for(n=0;n<e.states.length;n++)for(p=e.states[n],a=0;a<p.transitions.length;a++){var f=p.transitions[a];if(f instanceof RuleTransition$1){var t=-1;e.ruleToStartState[f.target.ruleIndex].isPrecedenceRule&&0===f.precedence&&(t=f.target.ruleIndex),s=new EpsilonTransition(f.followState,t),e.ruleToStopState[f.target.ruleIndex].addTransition(s)}}for(n=0;n<e.states.length;n++){if(p=e.states[n],p instanceof BlockStartState){// we need to know the end state to set its start state
384
- if(null===p.endState)throw"IllegalState";// block end states can only be associated to a single block start
385
- // state
386
- if(null!==p.endState.startState)throw"IllegalState";p.endState.startState=p}if(p instanceof PlusLoopbackState)for(a=0;a<p.transitions.length;a++)l=p.transitions[a].target,l instanceof PlusBlockStartState&&(l.loopBackState=p);else if(p instanceof StarLoopbackState)for(a=0;a<p.transitions.length;a++)l=p.transitions[a].target,l instanceof StarLoopEntryState$1&&(l.loopBackState=p)}},ATNDeserializer$2.prototype.readDecisions=function(e){for(var t=this.readInt(),r=0;r<t;r++){var o=this.readInt(),n=e.states[o];e.decisionToState.push(n),n.decision=r}},ATNDeserializer$2.prototype.readLexerActions=function(e){if(e.grammarType===ATNType.LEXER){var t=this.readInt();e.lexerActions=initArray(t,null);for(var r=0;r<t;r++){var o=this.readInt(),n=this.readInt();65535===n&&(n=-1);var a=this.readInt();65535===a&&(a=-1);var p=this.lexerActionFactory(o,n,a);e.lexerActions[r]=p}}},ATNDeserializer$2.prototype.generateRuleBypassTransitions=function(e){var t=e.ruleToStartState.length,r;for(r=0;r<t;r++)e.ruleToTokenType[r]=e.maxTokenType+r+1;for(r=0;r<t;r++)this.generateRuleBypassTransition(e,r)},ATNDeserializer$2.prototype.generateRuleBypassTransition=function(e,t){var r=new BasicBlockStartState,o,n;r.ruleIndex=t,e.addState(r);var a=new BlockEndState;a.ruleIndex=t,e.addState(a),r.endState=a,e.defineDecisionState(r),a.startState=r;var p=null,s=null;if(e.ruleToStartState[t].isPrecedenceRule){for(s=null,o=0;o<e.states.length;o++)if(n=e.states[o],this.stateIsEndStateFor(n,t)){s=n,p=n.loopBackState.transitions[0];break}if(null===p)throw"Couldn't identify final state of the precedence rule prefix section."}else s=e.ruleToStopState[t];// all non-excluded transitions that currently target end state need to
387
- // target blockEnd instead
388
- for(o=0;o<e.states.length;o++){n=e.states[o];for(var l=0,d;l<n.transitions.length;l++)(d=n.transitions[l],d!==p)&&d.target===s&&(d.target=a)}// all transitions leaving the rule start state need to leave blockStart
389
- // instead
390
- for(var c=e.ruleToStartState[t],u=c.transitions.length;0<u;)r.addTransition(c.transitions[u-1]),c.transitions=c.transitions.slice(-1);// link the new states
391
- e.ruleToStartState[t].addTransition(new EpsilonTransition(r)),a.addTransition(new EpsilonTransition(s));var y=new BasicState;e.addState(y),y.addTransition(new AtomTransition$1(a,e.ruleToTokenType[t])),r.addTransition(new EpsilonTransition(y))},ATNDeserializer$2.prototype.stateIsEndStateFor=function(e,t){if(e.ruleIndex!==t)return null;if(!(e instanceof StarLoopEntryState$1))return null;var r=e.transitions[e.transitions.length-1].target;return r instanceof LoopEndState?r.epsilonOnlyTransitions&&r.transitions[0].target instanceof RuleStopState$3?e:null:null},ATNDeserializer$2.prototype.markPrecedenceDecisions=function(e){for(var t=0,r;t<e.states.length;t++)if((r=e.states[t],!!(r instanceof StarLoopEntryState$1))&&e.ruleToStartState[r.ruleIndex].isPrecedenceRule)// We analyze the ATN to determine if this ATN decision state is the
392
- // decision for the closure block that determines whether a
393
- // precedence rule should continue or complete.
394
- //
395
- {var o=r.transitions[r.transitions.length-1].target;o instanceof LoopEndState&&o.epsilonOnlyTransitions&&o.transitions[0].target instanceof RuleStopState$3&&(r.isPrecedenceDecision=!0)}},ATNDeserializer$2.prototype.verifyATN=function(e){if(this.deserializationOptions.verifyATN)// verify assumptions
396
- for(var t=0,r;t<e.states.length;t++)if(r=e.states[t],null!==r)if(this.checkCondition(r.epsilonOnlyTransitions||1>=r.transitions.length),r instanceof PlusBlockStartState)this.checkCondition(null!==r.loopBackState);else if(!(r instanceof StarLoopEntryState$1))r instanceof StarLoopbackState?(this.checkCondition(1===r.transitions.length),this.checkCondition(r.transitions[0].target instanceof StarLoopEntryState$1)):r instanceof LoopEndState?this.checkCondition(null!==r.loopBackState):r instanceof RuleStartState?this.checkCondition(null!==r.stopState):r instanceof BlockStartState?this.checkCondition(null!==r.endState):r instanceof BlockEndState?this.checkCondition(null!==r.startState):r instanceof DecisionState?this.checkCondition(1>=r.transitions.length||0<=r.decision):this.checkCondition(1>=r.transitions.length||r instanceof RuleStopState$3);else if(this.checkCondition(null!==r.loopBackState),this.checkCondition(2===r.transitions.length),r.transitions[0].target instanceof StarBlockStartState)this.checkCondition(r.transitions[1].target instanceof LoopEndState),this.checkCondition(!r.nonGreedy);else if(r.transitions[0].target instanceof LoopEndState)this.checkCondition(r.transitions[1].target instanceof StarBlockStartState),this.checkCondition(r.nonGreedy);else throw"IllegalState"},ATNDeserializer$2.prototype.checkCondition=function(e,t){if(!e)throw(void 0===t||null===t)&&(t="IllegalState"),t},ATNDeserializer$2.prototype.readInt=function(){return this.data[this.pos++]},ATNDeserializer$2.prototype.readInt32=function(){var e=this.readInt(),t=this.readInt();return e|t<<16},ATNDeserializer$2.prototype.readLong=function(){var e=this.readInt32(),t=this.readInt32();return 4294967295&e|t<<32};function createByteToHex(){for(var e=[],t=0;256>t;t++)e[t]=(t+256).toString(16).substr(1).toUpperCase();return e}var byteToHex=createByteToHex();ATNDeserializer$2.prototype.readUUID=function(){for(var e=[],t=7,r;0<=t;t--)/* jshint bitwise: false */r=this.readInt(),e[2*t+1]=255&r,e[2*t]=255&r>>8;return byteToHex[e[0]]+byteToHex[e[1]]+byteToHex[e[2]]+byteToHex[e[3]]+"-"+byteToHex[e[4]]+byteToHex[e[5]]+"-"+byteToHex[e[6]]+byteToHex[e[7]]+"-"+byteToHex[e[8]]+byteToHex[e[9]]+"-"+byteToHex[e[10]]+byteToHex[e[11]]+byteToHex[e[12]]+byteToHex[e[13]]+byteToHex[e[14]]+byteToHex[e[15]]},ATNDeserializer$2.prototype.edgeFactory=function(e,t,r,o,n,a,i,p){var s=e.states[o];switch(t){case Transition$2.EPSILON:return new EpsilonTransition(s);case Transition$2.RANGE:return 0===i?new RangeTransition(s,n,a):new RangeTransition(s,Token$a.EOF,a);case Transition$2.RULE:return new RuleTransition$1(e.states[n],a,i,s);case Transition$2.PREDICATE:return new PredicateTransition$1(s,n,a,0!==i);case Transition$2.PRECEDENCE:return new PrecedencePredicateTransition(s,n);case Transition$2.ATOM:return 0===i?new AtomTransition$1(s,n):new AtomTransition$1(s,Token$a.EOF);case Transition$2.ACTION:return new ActionTransition$1(s,n,a,0!==i);case Transition$2.SET:return new SetTransition$1(s,p[n]);case Transition$2.NOT_SET:return new NotSetTransition$1(s,p[n]);case Transition$2.WILDCARD:return new WildcardTransition(s);default:throw"The specified transition type: "+t+" is not valid.";}},ATNDeserializer$2.prototype.stateFactory=function(e,t){if(null===this.stateFactories){var r=[];r[ATNState$2.INVALID_TYPE]=null,r[ATNState$2.BASIC]=function(){return new BasicState},r[ATNState$2.RULE_START]=function(){return new RuleStartState},r[ATNState$2.BLOCK_START]=function(){return new BasicBlockStartState},r[ATNState$2.PLUS_BLOCK_START]=function(){return new PlusBlockStartState},r[ATNState$2.STAR_BLOCK_START]=function(){return new StarBlockStartState},r[ATNState$2.TOKEN_START]=function(){return new TokensStartState},r[ATNState$2.RULE_STOP]=function(){return new RuleStopState$3},r[ATNState$2.BLOCK_END]=function(){return new BlockEndState},r[ATNState$2.STAR_LOOP_BACK]=function(){return new StarLoopbackState},r[ATNState$2.STAR_LOOP_ENTRY]=function(){return new StarLoopEntryState$1},r[ATNState$2.PLUS_LOOP_BACK]=function(){return new PlusLoopbackState},r[ATNState$2.LOOP_END]=function(){return new LoopEndState},this.stateFactories=r}if(e>this.stateFactories.length||null===this.stateFactories[e])throw"The specified state type "+e+" is not valid.";else{var o=this.stateFactories[e]();if(null!==o)return o.ruleIndex=t,o}},ATNDeserializer$2.prototype.lexerActionFactory=function(e,t,r){if(null===this.actionFactories){var o=[];o[LexerActionType.CHANNEL]=function(e){return new LexerChannelAction(e)},o[LexerActionType.CUSTOM]=function(e,t){return new LexerCustomAction(e,t)},o[LexerActionType.MODE]=function(e){return new LexerModeAction(e)},o[LexerActionType.MORE]=function(){return LexerMoreAction.INSTANCE},o[LexerActionType.POP_MODE]=function(){return LexerPopModeAction.INSTANCE},o[LexerActionType.PUSH_MODE]=function(e){return new LexerPushModeAction(e)},o[LexerActionType.SKIP]=function(){return LexerSkipAction.INSTANCE},o[LexerActionType.TYPE]=function(e){return new LexerTypeAction(e)},this.actionFactories=o}if(e>this.actionFactories.length||null===this.actionFactories[e])throw"The specified lexer action type "+e+" is not valid.";else return this.actionFactories[e](t,r)};var ATNDeserializer_2=ATNDeserializer$2,ATNDeserializer_1={ATNDeserializer:ATNDeserializer_2};//
397
- /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
398
- * Use of this file is governed by the BSD 3-clause license that
399
- * can be found in the LICENSE.txt file in the project root.
400
- */ // Provides an empty default implementation of {@link ANTLRErrorListener}. The
401
- // default implementation of each method does nothing, but can be overridden as
402
- // necessary.
403
- function ErrorListener$2(){return this}ErrorListener$2.prototype.syntaxError=function(){},ErrorListener$2.prototype.reportAmbiguity=function(){},ErrorListener$2.prototype.reportAttemptingFullContext=function(){},ErrorListener$2.prototype.reportContextSensitivity=function(){};function ConsoleErrorListener$1(){return ErrorListener$2.call(this),this}ConsoleErrorListener$1.prototype=Object.create(ErrorListener$2.prototype),ConsoleErrorListener$1.prototype.constructor=ConsoleErrorListener$1,ConsoleErrorListener$1.INSTANCE=new ConsoleErrorListener$1,ConsoleErrorListener$1.prototype.syntaxError=function(e,t,r,o,n){console.error("line "+r+":"+o+" "+n)};function ProxyErrorListener$1(e){if(ErrorListener$2.call(this),null===e)throw"delegates";return this.delegates=e,this}ProxyErrorListener$1.prototype=Object.create(ErrorListener$2.prototype),ProxyErrorListener$1.prototype.constructor=ProxyErrorListener$1,ProxyErrorListener$1.prototype.syntaxError=function(t,r,o,n,a,i){this.delegates.map(function(e){e.syntaxError(t,r,o,n,a,i)})},ProxyErrorListener$1.prototype.reportAmbiguity=function(e,t,r,o,n,a,i){this.delegates.map(function(p){p.reportAmbiguity(e,t,r,o,n,a,i)})},ProxyErrorListener$1.prototype.reportAttemptingFullContext=function(e,t,r,o,n,a){this.delegates.map(function(i){i.reportAttemptingFullContext(e,t,r,o,n,a)})},ProxyErrorListener$1.prototype.reportContextSensitivity=function(e,t,r,o,n,a){this.delegates.map(function(i){i.reportContextSensitivity(e,t,r,o,n,a)})};var ErrorListener_2=ErrorListener$2,ConsoleErrorListener_1=ConsoleErrorListener$1,ProxyErrorListener_1=ProxyErrorListener$1,ErrorListener_1={ErrorListener:ErrorListener_2,ConsoleErrorListener:ConsoleErrorListener_1,ProxyErrorListener:ProxyErrorListener_1},Token$9=Token_1.Token,ConsoleErrorListener=ErrorListener_1.ConsoleErrorListener,ProxyErrorListener=ErrorListener_1.ProxyErrorListener;function Recognizer$2(){return this._listeners=[ConsoleErrorListener.INSTANCE],this._interp=null,this._stateNumber=-1,this}Recognizer$2.tokenTypeMapCache={},Recognizer$2.ruleIndexMapCache={},Recognizer$2.prototype.checkVersion=function(e){"4.8"!==e&&console.log("ANTLR runtime and generated code versions disagree: 4.8!="+e)},Recognizer$2.prototype.addErrorListener=function(e){this._listeners.push(e)},Recognizer$2.prototype.removeErrorListeners=function(){this._listeners=[]},Recognizer$2.prototype.getTokenTypeMap=function(){var e=this.getTokenNames();if(null===e)throw"The current recognizer does not provide a list of token names.";var t=this.tokenTypeMapCache[e];return void 0===t&&(t=e.reduce(function(e,t,r){e[t]=r}),t.EOF=Token$9.EOF,this.tokenTypeMapCache[e]=t),t},Recognizer$2.prototype.getRuleIndexMap=function(){var e=this.ruleNames;if(null===e)throw"The current recognizer does not provide a list of rule names.";var t=this.ruleIndexMapCache[e];return void 0===t&&(t=e.reduce(function(e,t,r){e[t]=r}),this.ruleIndexMapCache[e]=t),t},Recognizer$2.prototype.getTokenType=function(e){var t=this.getTokenTypeMap()[e];return void 0===t?Token$9.INVALID_TYPE:t},Recognizer$2.prototype.getErrorHeader=function(t){var e=t.getOffendingToken().line,r=t.getOffendingToken().column;return"line "+e+":"+r},Recognizer$2.prototype.getTokenErrorDisplay=function(e){if(null===e)return"<no token>";var t=e.text;return null===t&&(e.type===Token$9.EOF?t="<EOF>":t="<"+e.type+">"),t=t.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+t+"'"},Recognizer$2.prototype.getErrorListenerDispatch=function(){return new ProxyErrorListener(this._listeners)},Recognizer$2.prototype.sempred=function(){return!0},Recognizer$2.prototype.precpred=function(){return!0},Object.defineProperty(Recognizer$2.prototype,"state",{get:function(){return this._stateNumber},set:function(e){this._stateNumber=e}});var Recognizer_2=Recognizer$2,Recognizer_1={Recognizer:Recognizer_2},CommonToken$1=Token_1.CommonToken;function TokenFactory(){return this}function CommonTokenFactory$1(e){return TokenFactory.call(this),this.copyText=void 0!==e&&e,this}CommonTokenFactory$1.prototype=Object.create(TokenFactory.prototype),CommonTokenFactory$1.prototype.constructor=CommonTokenFactory$1,CommonTokenFactory$1.DEFAULT=new CommonTokenFactory$1,CommonTokenFactory$1.prototype.create=function(e,r,o,n,a,i,p,s){var l=new CommonToken$1(e,r,n,a,i);return l.line=p,l.column=s,null===o?this.copyText&&null!==e[1]&&(l.text=e[1].getText(a,i)):l.text=o,l},CommonTokenFactory$1.prototype.createThin=function(e,r){var o=new CommonToken$1(null,e);return o.text=r,o};var CommonTokenFactory_2=CommonTokenFactory$1,CommonTokenFactory_1={CommonTokenFactory:CommonTokenFactory_2},PredicateTransition=Transition_1.PredicateTransition;function RecognitionException$2(e){return Error.call(this),!Error.captureStackTrace||Error.captureStackTrace(this,RecognitionException$2),this.message=e.message,this.recognizer=e.recognizer,this.input=e.input,this.ctx=e.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state),this}RecognitionException$2.prototype=Object.create(Error.prototype),RecognitionException$2.prototype.constructor=RecognitionException$2,RecognitionException$2.prototype.getExpectedTokens=function(){return null===this.recognizer?null:this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx)},RecognitionException$2.prototype.toString=function(){return this.message};function LexerNoViableAltException$3(e,t,r,o){return RecognitionException$2.call(this,{message:"",recognizer:e,input:t,ctx:null}),this.startIndex=r,this.deadEndConfigs=o,this}LexerNoViableAltException$3.prototype=Object.create(RecognitionException$2.prototype),LexerNoViableAltException$3.prototype.constructor=LexerNoViableAltException$3,LexerNoViableAltException$3.prototype.toString=function(){var e="";return 0<=this.startIndex&&this.startIndex<this.input.size&&(e=this.input.getText((this.startIndex,this.startIndex))),"LexerNoViableAltException"+e};// Indicates that the parser could not decide which of two or more paths
404
- // to take based upon the remaining input. It tracks the starting token
405
- // of the offending input and also knows where the parser was
406
- // in the various paths when the error. Reported by reportNoViableAlternative()
407
- //
408
- function NoViableAltException$3(e,t,r,o,n,a){// Which configurations did we try at input.index() that couldn't match
409
- // input.LT(1)?//
410
- // The token object at the start index; the input stream might
411
- // not be buffering tokens so get a reference to it. (At the
412
- // time the error occurred, of course the stream needs to keep a
413
- // buffer all of the tokens but later we might not have access to those.)
414
- a=a||e._ctx,o=o||e.getCurrentToken(),r=r||e.getCurrentToken(),t=t||e.getInputStream(),RecognitionException$2.call(this,{message:"",recognizer:e,input:t,ctx:a}),this.deadEndConfigs=n,this.startToken=r,this.offendingToken=o}NoViableAltException$3.prototype=Object.create(RecognitionException$2.prototype),NoViableAltException$3.prototype.constructor=NoViableAltException$3;// This signifies any kind of mismatched input exceptions such as
415
- // when the current input does not match the expected token.
416
- //
417
- function InputMismatchException$2(e){RecognitionException$2.call(this,{message:"",recognizer:e,input:e.getInputStream(),ctx:e._ctx}),this.offendingToken=e.getCurrentToken()}InputMismatchException$2.prototype=Object.create(RecognitionException$2.prototype),InputMismatchException$2.prototype.constructor=InputMismatchException$2;// A semantic predicate failed during validation. Validation of predicates
418
- // occurs when normally parsing the alternative just like matching a token.
419
- // Disambiguating predicate evaluation occurs when we test a predicate during
420
- // prediction.
421
- function FailedPredicateException$2(e,t,r){RecognitionException$2.call(this,{message:this.formatMessage(t,r||null),recognizer:e,input:e.getInputStream(),ctx:e._ctx});var o=e._interp.atn.states[e.state],n=o.transitions[0];return n instanceof PredicateTransition?(this.ruleIndex=n.ruleIndex,this.predicateIndex=n.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=t,this.offendingToken=e.getCurrentToken(),this}FailedPredicateException$2.prototype=Object.create(RecognitionException$2.prototype),FailedPredicateException$2.prototype.constructor=FailedPredicateException$2,FailedPredicateException$2.prototype.formatMessage=function(e,t){return null===t?"failed predicate: {"+e+"}?":t};function ParseCancellationException$1(){return Error.call(this),Error.captureStackTrace(this,ParseCancellationException$1),this}ParseCancellationException$1.prototype=Object.create(Error.prototype),ParseCancellationException$1.prototype.constructor=ParseCancellationException$1;var RecognitionException_1=RecognitionException$2,NoViableAltException_1=NoViableAltException$3,LexerNoViableAltException_1=LexerNoViableAltException$3,InputMismatchException_1=InputMismatchException$2,FailedPredicateException_1=FailedPredicateException$2,ParseCancellationException_1=ParseCancellationException$1,Errors={RecognitionException:RecognitionException_1,NoViableAltException:NoViableAltException_1,LexerNoViableAltException:LexerNoViableAltException_1,InputMismatchException:InputMismatchException_1,FailedPredicateException:FailedPredicateException_1,ParseCancellationException:ParseCancellationException_1},Token$8=Token_1.Token,Recognizer$1=Recognizer_1.Recognizer,CommonTokenFactory=CommonTokenFactory_1.CommonTokenFactory,RecognitionException$1=Errors.RecognitionException,LexerNoViableAltException$2=Errors.LexerNoViableAltException;function Lexer$4(e){return Recognizer$1.call(this),this._input=e,this._factory=CommonTokenFactory.DEFAULT,this._tokenFactorySourcePair=[this,e],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=Token$8.DEFAULT_CHANNEL,this._type=Token$8.INVALID_TYPE,this._modeStack=[],this._mode=Lexer$4.DEFAULT_MODE,this._text=null,this}Lexer$4.prototype=Object.create(Recognizer$1.prototype),Lexer$4.prototype.constructor=Lexer$4,Lexer$4.DEFAULT_MODE=0,Lexer$4.MORE=-2,Lexer$4.SKIP=-3,Lexer$4.DEFAULT_TOKEN_CHANNEL=Token$8.DEFAULT_CHANNEL,Lexer$4.HIDDEN=Token$8.HIDDEN_CHANNEL,Lexer$4.MIN_CHAR_VALUE=0,Lexer$4.MAX_CHAR_VALUE=1114111,Lexer$4.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._token=null,this._type=Token$8.INVALID_TYPE,this._channel=Token$8.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=Lexer$4.DEFAULT_MODE,this._modeStack=[],this._interp.reset()},Lexer$4.prototype.nextToken=function(){if(null===this._input)throw"nextToken requires a non-null input stream.";// Mark start location in char stream so unbuffered streams are
422
- // guaranteed at least have text of current token
423
- var e=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=Token$8.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;for(var t=!1;;){this._type=Token$8.INVALID_TYPE;var r=Lexer$4.SKIP;try{r=this._interp.match(this._input,this._mode)}catch(t){if(t instanceof RecognitionException$1)this.notifyListeners(t),this.recover(t);else throw console.log(t.stack),t}if(this._input.LA(1)===Token$8.EOF&&(this._hitEOF=!0),this._type===Token$8.INVALID_TYPE&&(this._type=r),this._type===Lexer$4.SKIP){t=!0;break}if(this._type!==Lexer$4.MORE)break}if(!t)return null===this._token&&this.emit(),this._token}}finally{// make sure we release marker after match or
424
- // unbuffered char stream will keep buffering
425
- this._input.release(e)}},Lexer$4.prototype.skip=function(){this._type=Lexer$4.SKIP},Lexer$4.prototype.more=function(){this._type=Lexer$4.MORE},Lexer$4.prototype.mode=function(e){this._mode=e},Lexer$4.prototype.pushMode=function(e){this._interp.debug&&console.log("pushMode "+e),this._modeStack.push(this._mode),this.mode(e)},Lexer$4.prototype.popMode=function(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode},Object.defineProperty(Lexer$4.prototype,"inputStream",{get:function(){return this._input},set:function(e){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=e,this._tokenFactorySourcePair=[this,this._input]}}),Object.defineProperty(Lexer$4.prototype,"sourceName",{get:function(){return this._input.sourceName}}),Lexer$4.prototype.emitToken=function(e){this._token=e},Lexer$4.prototype.emit=function(){var e=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(e),e},Lexer$4.prototype.emitEOF=function(){var e=this.column,t=this.line,r=this._factory.create(this._tokenFactorySourcePair,Token$8.EOF,null,Token$8.DEFAULT_CHANNEL,this._input.index,this._input.index-1,t,e);return this.emitToken(r),r},Object.defineProperty(Lexer$4.prototype,"type",{get:function(){return this.type},set:function(e){this._type=e}}),Object.defineProperty(Lexer$4.prototype,"line",{get:function(){return this._interp.line},set:function(e){this._interp.line=e}}),Object.defineProperty(Lexer$4.prototype,"column",{get:function(){return this._interp.column},set:function(e){this._interp.column=e}}),Lexer$4.prototype.getCharIndex=function(){return this._input.index},Object.defineProperty(Lexer$4.prototype,"text",{get:function(){return null===this._text?this._interp.getText(this._input):this._text},set:function(e){this._text=e}}),Lexer$4.prototype.getAllTokens=function(){for(var e=[],r=this.nextToken();r.type!==Token$8.EOF;)e.push(r),r=this.nextToken();return e},Lexer$4.prototype.notifyListeners=function(t){var e=this._tokenStartCharIndex,r=this._input.index,o=this._input.getText(e,r),n="token recognition error at: '"+this.getErrorDisplay(o)+"'",a=this.getErrorListenerDispatch();a.syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,n,t)},Lexer$4.prototype.getErrorDisplay=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t.join("")},Lexer$4.prototype.getErrorDisplayForChar=function(e){return e.charCodeAt(0)===Token$8.EOF?"<EOF>":"\n"===e?"\\n":"\t"===e?"\\t":"\r"===e?"\\r":e},Lexer$4.prototype.getCharErrorDisplay=function(e){return"'"+this.getErrorDisplayForChar(e)+"'"},Lexer$4.prototype.recover=function(e){this._input.LA(1)!==Token$8.EOF&&(e instanceof LexerNoViableAltException$2?this._interp.consume(this._input):this._input.consume())};var Lexer_2=Lexer$4,Lexer_1={Lexer:Lexer_2},ATN$4=ATN_1.ATN,Hash$2=Utils$2.Hash,Set$4=Utils$2.Set,SemanticContext$2=SemanticContext_1.SemanticContext,merge=PredictionContext_1.merge;function hashATNConfig(e){return e.hashCodeForConfigSet()}function equalATNConfigs(e,t){return!(e!==t)||null!==e&&null!==t&&e.equalsForConfigSet(t)}function ATNConfigSet$5(e){return this.configLookup=new Set$4(hashATNConfig,equalATNConfigs),this.fullCtx=void 0===e||e,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1,this}// Adding a new config means merging contexts with existing configs for
426
- // {@code (s, i, pi, _)}, where {@code s} is the
427
- // {@link ATNConfig//state}, {@code i} is the {@link ATNConfig//alt}, and
428
- // {@code pi} is the {@link ATNConfig//semanticContext}. We use
429
- // {@code (s,i,pi)} as key.
430
- //
431
- // <p>This method updates {@link //dipsIntoOuterContext} and
432
- // {@link //hasSemanticContext} when necessary.</p>
433
- // /
434
- ATNConfigSet$5.prototype.add=function(e,t){var r=Math.max;if(void 0===t&&(t=null),this.readOnly)throw"This set is readonly";e.semanticContext!==SemanticContext$2.NONE&&(this.hasSemanticContext=!0),0<e.reachesIntoOuterContext&&(this.dipsIntoOuterContext=!0);var o=this.configLookup.add(e);if(o===e)// track order here
435
- return this.cachedHashCode=-1,this.configs.push(e),!0;// a previous (s,i,pi,_), merge with it and save result
436
- var n=!this.fullCtx,a=merge(o.context,e.context,n,t);// replace context; no need to alt mapping
437
- return o.reachesIntoOuterContext=r(o.reachesIntoOuterContext,e.reachesIntoOuterContext),e.precedenceFilterSuppressed&&(o.precedenceFilterSuppressed=!0),o.context=a,!0},ATNConfigSet$5.prototype.getStates=function(){for(var e=new Set$4,t=0;t<this.configs.length;t++)e.add(this.configs[t].state);return e},ATNConfigSet$5.prototype.getPredicates=function(){for(var e=[],t=0,r;t<this.configs.length;t++)r=this.configs[t].semanticContext,r!==SemanticContext$2.NONE&&e.push(r.semanticContext);return e},Object.defineProperty(ATNConfigSet$5.prototype,"items",{get:function(){return this.configs}}),ATNConfigSet$5.prototype.optimizeConfigs=function(e){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(var t=0,r;t<this.configs.length;t++)r=this.configs[t],r.context=e.getCachedContext(r.context)},ATNConfigSet$5.prototype.addAll=function(e){for(var t=0;t<e.length;t++)this.add(e[t]);return!1},ATNConfigSet$5.prototype.equals=function(e){return this===e||e instanceof ATNConfigSet$5&&Utils$2.equalArrays(this.configs,e.configs)&&this.fullCtx===e.fullCtx&&this.uniqueAlt===e.uniqueAlt&&this.conflictingAlts===e.conflictingAlts&&this.hasSemanticContext===e.hasSemanticContext&&this.dipsIntoOuterContext===e.dipsIntoOuterContext},ATNConfigSet$5.prototype.hashCode=function(){var e=new Hash$2;return e.update(this.configs),e.finish()},ATNConfigSet$5.prototype.updateHashCode=function(e){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),e.update(this.cachedHashCode)):e.update(this.hashCode())},Object.defineProperty(ATNConfigSet$5.prototype,"length",{get:function(){return this.configs.length}}),ATNConfigSet$5.prototype.isEmpty=function(){return 0===this.configs.length},ATNConfigSet$5.prototype.contains=function(e){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(e)},ATNConfigSet$5.prototype.containsFast=function(e){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(e)},ATNConfigSet$5.prototype.clear=function(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new Set$4},ATNConfigSet$5.prototype.setReadonly=function(e){this.readOnly=e,e&&(this.configLookup=null)},ATNConfigSet$5.prototype.toString=function(){return Utils$2.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt===ATN$4.INVALID_ALT_NUMBER?"":",uniqueAlt="+this.uniqueAlt)+(null===this.conflictingAlts?"":",conflictingAlts="+this.conflictingAlts)+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")};function OrderedATNConfigSet$1(){return ATNConfigSet$5.call(this),this.configLookup=new Set$4,this}OrderedATNConfigSet$1.prototype=Object.create(ATNConfigSet$5.prototype),OrderedATNConfigSet$1.prototype.constructor=OrderedATNConfigSet$1;var ATNConfigSet_2=ATNConfigSet$5,OrderedATNConfigSet_1=OrderedATNConfigSet$1,ATNConfigSet_1={ATNConfigSet:ATNConfigSet_2,OrderedATNConfigSet:OrderedATNConfigSet_1},ATNConfigSet$4=ATNConfigSet_1.ATNConfigSet,Hash$1=Utils$2.Hash,Set$3=Utils$2.Set;// Map a predicate to a predicted alternative.///
438
- function PredPrediction$2(e,t){return this.alt=t,this.pred=e,this}PredPrediction$2.prototype.toString=function(){return"("+this.pred+", "+this.alt+")"};// A DFA state represents a set of possible ATN configurations.
439
- // As Aho, Sethi, Ullman p. 117 says "The DFA uses its state
440
- // to keep track of all possible states the ATN can be in after
441
- // reading each input symbol. That is to say, after reading
442
- // input a1a2..an, the DFA is in a state that represents the
443
- // subset T of the states of the ATN that are reachable from the
444
- // ATN's start state along some path labeled a1a2..an."
445
- // In conventional NFA&rarr;DFA conversion, therefore, the subset T
446
- // would be a bitset representing the set of states the
447
- // ATN could be in. We need to track the alt predicted by each
448
- // state as well, however. More importantly, we need to maintain
449
- // a stack of states, tracking the closure operations as they
450
- // jump from rule to rule, emulating rule invocations (method calls).
451
- // I have to add a stack to simulate the proper lookahead sequences for
452
- // the underlying LL grammar from which the ATN was derived.
453
- //
454
- // <p>I use a set of ATNConfig objects not simple states. An ATNConfig
455
- // is both a state (ala normal conversion) and a RuleContext describing
456
- // the chain of rules (if any) followed to arrive at that state.</p>
457
- //
458
- // <p>A DFA state may have multiple references to a particular state,
459
- // but with different ATN contexts (with same or different alts)
460
- // meaning that state was reached via a different set of rule invocations.</p>
461
- // /
462
- function DFAState$4(e,t){return null===e&&(e=-1),null===t&&(t=new ATNConfigSet$4),this.stateNumber=e,this.configs=t,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}// Get the set of all alts mentioned by all ATN configurations in this
463
- // DFA state.
464
- DFAState$4.prototype.getAltSet=function(){var e=new Set$3;if(null!==this.configs)for(var t=0,r;t<this.configs.length;t++)r=this.configs[t],e.add(r.alt);return 0===e.length?null:e},DFAState$4.prototype.equals=function(e){// compare set of ATN configurations in this set with other
465
- return this===e||e instanceof DFAState$4&&this.configs.equals(e.configs)},DFAState$4.prototype.toString=function(){var e=""+this.stateNumber+":"+this.configs;return this.isAcceptState&&(e+="=>",e+=null===this.predicates?this.prediction:this.predicates),e},DFAState$4.prototype.hashCode=function(){var e=new Hash$1;return e.update(this.configs),e.finish()};var DFAState_2=DFAState$4,PredPrediction_1=PredPrediction$2,DFAState_1={DFAState:DFAState_2,PredPrediction:PredPrediction_1},DFAState$3=DFAState_1.DFAState,ATNConfigSet$3=ATNConfigSet_1.ATNConfigSet,getCachedPredictionContext=PredictionContext_1.getCachedPredictionContext,Map$2=Utils$2.Map;function ATNSimulator$2(e,t){return this.atn=e,this.sharedContextCache=t,this}// Must distinguish between missing edge and edge we know leads nowhere///
466
- ATNSimulator$2.ERROR=new DFAState$3(2147483647,new ATNConfigSet$3()),ATNSimulator$2.prototype.getCachedContext=function(e){if(null===this.sharedContextCache)return e;var t=new Map$2;return getCachedPredictionContext(e,this.sharedContextCache,t)};var ATNSimulator_2=ATNSimulator$2,ATNSimulator_1={ATNSimulator:ATNSimulator_2},hashStuff$1=Utils$2.hashStuff,LexerIndexedCustomAction=LexerAction_1.LexerIndexedCustomAction;function LexerActionExecutor$1(e){// "".join([str(la) for la in
467
- // lexerActions]))
468
- return this.lexerActions=null===e?[]:e,this.cachedHashCode=hashStuff$1(e),this}// Creates a {@link LexerActionExecutor} which executes the actions for
469
- // the input {@code lexerActionExecutor} followed by a specified
470
- // {@code lexerAction}.
471
- //
472
- // @param lexerActionExecutor The executor for actions already traversed by
473
- // the lexer while matching a token within a particular
474
- // {@link LexerATNConfig}. If this is {@code null}, the method behaves as
475
- // though it were an empty executor.
476
- // @param lexerAction The lexer action to execute after the actions
477
- // specified in {@code lexerActionExecutor}.
478
- //
479
- // @return A {@link LexerActionExecutor} for executing the combine actions
480
- // of {@code lexerActionExecutor} and {@code lexerAction}.
481
- LexerActionExecutor$1.append=function(e,t){if(null===e)return new LexerActionExecutor$1([t]);var r=e.lexerActions.concat([t]);return new LexerActionExecutor$1(r)},LexerActionExecutor$1.prototype.fixOffsetBeforeMatch=function(e){for(var t=null,r=0;r<this.lexerActions.length;r++)this.lexerActions[r].isPositionDependent&&!(this.lexerActions[r]instanceof LexerIndexedCustomAction)&&(null===t&&(t=this.lexerActions.concat([])),t[r]=new LexerIndexedCustomAction(e,this.lexerActions[r]));return null===t?this:new LexerActionExecutor$1(t)},LexerActionExecutor$1.prototype.execute=function(e,t,r){var o=!1,n=t.index;try{for(var a=0,p;a<this.lexerActions.length;a++){if(p=this.lexerActions[a],p instanceof LexerIndexedCustomAction){var s=p.offset;t.seek(r+s),p=p.action,o=r+s!==n}else p.isPositionDependent&&(t.seek(n),o=!1);p.execute(e)}}finally{o&&t.seek(n)}},LexerActionExecutor$1.prototype.hashCode=function(){return this.cachedHashCode},LexerActionExecutor$1.prototype.updateHashCode=function(e){e.update(this.cachedHashCode)},LexerActionExecutor$1.prototype.equals=function(e){if(this===e)return!0;if(!(e instanceof LexerActionExecutor$1))return!1;if(this.cachedHashCode!=e.cachedHashCode)return!1;if(this.lexerActions.length!=e.lexerActions.length)return!1;for(var t=this.lexerActions.length,r=0;r<t;++r)if(!this.lexerActions[r].equals(e.lexerActions[r]))return!1;return!0};var LexerActionExecutor_2=LexerActionExecutor$1,LexerActionExecutor_1={LexerActionExecutor:LexerActionExecutor_2},Token$7=Token_1.Token,Lexer$3=Lexer_1.Lexer,ATN$3=ATN_1.ATN,ATNSimulator$1=ATNSimulator_1.ATNSimulator,DFAState$2=DFAState_1.DFAState,OrderedATNConfigSet=ATNConfigSet_1.OrderedATNConfigSet,PredictionContext$1=PredictionContext_1.PredictionContext,SingletonPredictionContext$1=PredictionContext_1.SingletonPredictionContext,RuleStopState$2=ATNState_1.RuleStopState,LexerATNConfig=ATNConfig_1.LexerATNConfig,Transition$1=Transition_1.Transition,LexerActionExecutor=LexerActionExecutor_1.LexerActionExecutor,LexerNoViableAltException$1=Errors.LexerNoViableAltException;function resetSimState(e){e.index=-1,e.line=0,e.column=-1,e.dfaState=null}function SimState(){return resetSimState(this),this}SimState.prototype.reset=function(){resetSimState(this)};function LexerATNSimulator$1(e,t,r,o){// done
482
- return ATNSimulator$1.call(this,t,o),this.decisionToDFA=r,this.recog=e,this.startIndex=-1,this.line=1,this.column=0,this.mode=Lexer$3.DEFAULT_MODE,this.prevAccept=new SimState,this}LexerATNSimulator$1.prototype=Object.create(ATNSimulator$1.prototype),LexerATNSimulator$1.prototype.constructor=LexerATNSimulator$1,LexerATNSimulator$1.debug=!1,LexerATNSimulator$1.dfa_debug=!1,LexerATNSimulator$1.MIN_DFA_EDGE=0,LexerATNSimulator$1.MAX_DFA_EDGE=127,LexerATNSimulator$1.match_calls=0,LexerATNSimulator$1.prototype.copyState=function(e){this.column=e.column,this.line=e.line,this.mode=e.mode,this.startIndex=e.startIndex},LexerATNSimulator$1.prototype.match=function(e,t){this.match_calls+=1,this.mode=t;var r=e.mark();try{this.startIndex=e.index,this.prevAccept.reset();var o=this.decisionToDFA[t];return null===o.s0?this.matchATN(e):this.execATN(e,o.s0)}finally{e.release(r)}},LexerATNSimulator$1.prototype.reset=function(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=Lexer$3.DEFAULT_MODE},LexerATNSimulator$1.prototype.matchATN=function(e){var t=this.atn.modeToStartState[this.mode];LexerATNSimulator$1.debug&&console.log("matchATN mode "+this.mode+" start: "+t);var r=this.mode,o=this.computeStartState(e,t),n=o.hasSemanticContext;o.hasSemanticContext=!1;var a=this.addDFAState(o);n||(this.decisionToDFA[this.mode].s0=a);var i=this.execATN(e,a);return LexerATNSimulator$1.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[r].toLexerString()),i},LexerATNSimulator$1.prototype.execATN=function(e,r){LexerATNSimulator$1.debug&&console.log("start state closure="+r.configs),r.isAcceptState&&this.captureSimState(this.prevAccept,e,r);// s is current/from DFA state
483
- for(var o=e.LA(1),n=r;;){LexerATNSimulator$1.debug&&console.log("execATN loop starting closure: "+n.configs);// As we move src->trg, src->trg, we keep track of the previous trg to
484
- // avoid looking up the DFA state again, which is expensive.
485
- // If the previous target was already part of the DFA, we might
486
- // be able to avoid doing a reach operation upon t. If s!=null,
487
- // it means that semantic predicates didn't prevent us from
488
- // creating a DFA state. Once we know s!=null, we check to see if
489
- // the DFA state has an edge already for t. If so, we can just reuse
490
- // it's configuration set; there's no point in re-computing it.
491
- // This is kind of like doing DFA simulation within the ATN
492
- // simulation because DFA simulation is really just a way to avoid
493
- // computing reach/closure sets. Technically, once we know that
494
- // we have a previously added DFA state, we could jump over to
495
- // the DFA simulator. But, that would mean popping back and forth
496
- // a lot and making things more complicated algorithmically.
497
- // This optimization makes a lot of sense for loops within DFA.
498
- // A character will take us back to an existing DFA state
499
- // that already has lots of edges out of it. e.g., .* in comments.
500
- // print("Target for:" + str(s) + " and:" + str(t))
501
- var a=this.getExistingTargetState(n,o);// print("Existing:" + str(target))
502
- if(null===a&&(a=this.computeTargetState(e,n,o)),a===ATNSimulator$1.ERROR)break;// If this is a consumable input element, make sure to consume before
503
- // capturing the accept state so the input index, line, and char
504
- // position accurately reflect the state of the interpreter at the
505
- // end of the token.
506
- if(o!==Token$7.EOF&&this.consume(e),a.isAcceptState&&(this.captureSimState(this.prevAccept,e,a),o===Token$7.EOF))break;o=e.LA(1),n=a}return this.failOrAccept(this.prevAccept,e,n.configs,o)},LexerATNSimulator$1.prototype.getExistingTargetState=function(e,r){if(null===e.edges||r<LexerATNSimulator$1.MIN_DFA_EDGE||r>LexerATNSimulator$1.MAX_DFA_EDGE)return null;var t=e.edges[r-LexerATNSimulator$1.MIN_DFA_EDGE];return void 0===t&&(t=null),LexerATNSimulator$1.debug&&null!==t&&console.log("reuse state "+e.stateNumber+" edge to "+t.stateNumber),t},LexerATNSimulator$1.prototype.computeTargetState=function(e,r,o){var t=new OrderedATNConfigSet;// if we don't find an existing DFA state
507
- // Fill reach starting from closure, following t transitions
508
- return this.getReachableConfigSet(e,r.configs,t,o),0===t.items.length?(t.hasSemanticContext||this.addDFAEdge(r,o,ATNSimulator$1.ERROR),ATNSimulator$1.ERROR):this.addDFAEdge(r,o,null,t);// Add an edge from s to target DFA found/created for reach
509
- },LexerATNSimulator$1.prototype.failOrAccept=function(e,r,o,n){if(null!==this.prevAccept.dfaState){var t=e.dfaState.lexerActionExecutor;return this.accept(r,t,this.startIndex,e.index,e.line,e.column),e.dfaState.prediction}// if no accept and EOF is first char, return EOF
510
- if(n===Token$7.EOF&&r.index===this.startIndex)return Token$7.EOF;throw new LexerNoViableAltException$1(this.recog,r,this.startIndex,o)},LexerATNSimulator$1.prototype.getReachableConfigSet=function(e,r,o,n){// this is used to skip processing for configs which have a lower priority
511
- // than a config that already reached an accept state for the same rule
512
- for(var t=ATN$3.INVALID_ALT_NUMBER,a=0;a<r.items.length;a++){var p=r.items[a],s=p.alt===t;if(!(s&&p.passedThroughNonGreedyDecision)){LexerATNSimulator$1.debug&&console.log("testing %s at %s\n",this.getTokenName(n),p.toString(this.recog,!0));for(var l=0;l<p.state.transitions.length;l++){var d=p.state.transitions[l],c=this.getReachableTarget(d,n);// for each transition
513
- if(null!==c){var u=p.lexerActionExecutor;null!==u&&(u=u.fixOffsetBeforeMatch(e.index-this.startIndex));var y=n===Token$7.EOF,m=new LexerATNConfig({state:c,lexerActionExecutor:u},p);this.closure(e,m,o,s,!0,y)&&(t=p.alt)}}}}},LexerATNSimulator$1.prototype.accept=function(e,t,r,o,n,a){// seek to after last char in token
514
- LexerATNSimulator$1.debug&&console.log("ACTION %s\n",t),e.seek(o),this.line=n,this.column=a,null!==t&&null!==this.recog&&t.execute(this.recog,e,r)},LexerATNSimulator$1.prototype.getReachableTarget=function(e,r){return e.matches(r,0,Lexer$3.MAX_CHAR_VALUE)?e.target:null},LexerATNSimulator$1.prototype.computeStartState=function(e,t){for(var r=PredictionContext$1.EMPTY,o=new OrderedATNConfigSet,n=0;n<t.transitions.length;n++){var a=t.transitions[n].target,p=new LexerATNConfig({state:a,alt:n+1,context:r},null);this.closure(e,p,o,!1,!1,!1)}return o},LexerATNSimulator$1.prototype.closure=function(e,t,r,o,n,a){var p=null;if(LexerATNSimulator$1.debug&&console.log("closure("+t.toString(this.recog,!0)+")"),t.state instanceof RuleStopState$2){if(LexerATNSimulator$1.debug&&(null===this.recog?console.log("closure at rule stop %s\n",t):console.log("closure at %s rule stop %s\n",this.recog.ruleNames[t.state.ruleIndex],t)),null===t.context||t.context.hasEmptyPath()){if(null===t.context||t.context.isEmpty())return r.add(t),!0;r.add(new LexerATNConfig({state:t.state,context:PredictionContext$1.EMPTY},t)),o=!0}if(null!==t.context&&!t.context.isEmpty())for(var s=0;s<t.context.length;s++)if(t.context.getReturnState(s)!==PredictionContext$1.EMPTY_RETURN_STATE){var l=t.context.getParent(s),d=this.atn.states[t.context.getReturnState(s)];// "pop" return state
515
- p=new LexerATNConfig({state:d,context:l},t),o=this.closure(e,p,r,o,n,a)}return o}// optimization
516
- t.state.epsilonOnlyTransitions||o&&t.passedThroughNonGreedyDecision||r.add(t);for(var c=0,u;c<t.state.transitions.length;c++)u=t.state.transitions[c],p=this.getEpsilonTarget(e,t,u,r,n,a),null!==p&&(o=this.closure(e,p,r,o,n,a));return o},LexerATNSimulator$1.prototype.getEpsilonTarget=function(e,t,r,o,n,a){var i=null;if(r.serializationType===Transition$1.RULE){var p=SingletonPredictionContext$1.create(t.context,r.followState.stateNumber);i=new LexerATNConfig({state:r.target,context:p},t)}else if(r.serializationType===Transition$1.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";else if(r.serializationType===Transition$1.PREDICATE)LexerATNSimulator$1.debug&&console.log("EVAL rule "+r.ruleIndex+":"+r.predIndex),o.hasSemanticContext=!0,this.evaluatePredicate(e,r.ruleIndex,r.predIndex,n)&&(i=new LexerATNConfig({state:r.target},t));else if(!(r.serializationType===Transition$1.ACTION))r.serializationType===Transition$1.EPSILON?i=new LexerATNConfig({state:r.target},t):(r.serializationType===Transition$1.ATOM||r.serializationType===Transition$1.RANGE||r.serializationType===Transition$1.SET)&&a&&r.matches(Token$7.EOF,0,Lexer$3.MAX_CHAR_VALUE)&&(i=new LexerATNConfig({state:r.target},t));else if(null===t.context||t.context.hasEmptyPath()){// execute actions anywhere in the start rule for a token.
517
- //
518
- // TODO: if the entry rule is invoked recursively, some
519
- // actions may be executed during the recursive call. The
520
- // problem can appear when hasEmptyPath() is true but
521
- // isEmpty() is false. In this case, the config needs to be
522
- // split into two contexts - one with just the empty path
523
- // and another with everything but the empty path.
524
- // Unfortunately, the current algorithm does not allow
525
- // getEpsilonTarget to return two configurations, so
526
- // additional modifications are needed before we can support
527
- // the split operation.
528
- var s=LexerActionExecutor.append(t.lexerActionExecutor,this.atn.lexerActions[r.actionIndex]);i=new LexerATNConfig({state:r.target,lexerActionExecutor:s},t)}else// ignore actions in referenced rules
529
- i=new LexerATNConfig({state:r.target},t);return i},LexerATNSimulator$1.prototype.evaluatePredicate=function(e,t,r,o){// assume true if no recognizer was provided
530
- if(null===this.recog)return!0;if(!o)return this.recog.sempred(null,t,r);var n=this.column,a=this.line,i=e.index,p=e.mark();try{return this.consume(e),this.recog.sempred(null,t,r)}finally{this.column=n,this.line=a,e.seek(i),e.release(p)}},LexerATNSimulator$1.prototype.captureSimState=function(e,t,r){e.index=t.index,e.line=this.line,e.column=this.column,e.dfaState=r},LexerATNSimulator$1.prototype.addDFAEdge=function(e,t,r,o){if(void 0===r&&(r=null),void 0===o&&(o=null),null===r&&null!==o){// leading to this call, ATNConfigSet.hasSemanticContext is used as a
531
- // marker indicating dynamic predicate evaluation makes this edge
532
- // dependent on the specific input sequence, so the static edge in the
533
- // DFA should be omitted. The target DFAState is still created since
534
- // execATN has the ability to resynchronize with the DFA state cache
535
- // following the predicate evaluation step.
536
- //
537
- // TJP notes: next time through the DFA, we see a pred again and eval.
538
- // If that gets us to a previously created (but dangling) DFA
539
- // state, we can continue in pure DFA mode from there.
540
- // /
541
- var n=o.hasSemanticContext;if(o.hasSemanticContext=!1,r=this.addDFAState(o),n)return r}// add the edge
542
- return t<LexerATNSimulator$1.MIN_DFA_EDGE||t>LexerATNSimulator$1.MAX_DFA_EDGE?r:(LexerATNSimulator$1.debug&&console.log("EDGE "+e+" -> "+r+" upon "+t),null===e.edges&&(e.edges=[]),e.edges[t-LexerATNSimulator$1.MIN_DFA_EDGE]=r,r)},LexerATNSimulator$1.prototype.addDFAState=function(e){for(var t=new DFAState$2(null,e),r=null,o=0,n;o<e.items.length;o++)if(n=e.items[o],n.state instanceof RuleStopState$2){r=n;break}null!==r&&(t.isAcceptState=!0,t.lexerActionExecutor=r.lexerActionExecutor,t.prediction=this.atn.ruleToTokenType[r.state.ruleIndex]);var a=this.decisionToDFA[this.mode],p=a.states.get(t);if(null!==p)return p;var s=t;return s.stateNumber=a.states.length,e.setReadonly(!0),s.configs=e,a.states.add(s),s},LexerATNSimulator$1.prototype.getDFA=function(e){return this.decisionToDFA[e]},LexerATNSimulator$1.prototype.getText=function(e){// index is first lookahead char, don't include.
543
- return e.getText(this.startIndex,e.index-1)},LexerATNSimulator$1.prototype.consume=function(e){var t=e.LA(1);t===10?(this.line+=1,this.column=0):this.column+=1,e.consume()},LexerATNSimulator$1.prototype.getTokenName=function(e){var t=String.fromCharCode;return-1===e?"EOF":"'"+t(e)+"'"};var LexerATNSimulator_2=LexerATNSimulator$1,LexerATNSimulator_1={LexerATNSimulator:LexerATNSimulator_2},Map$1=Utils$2.Map,BitSet$2=Utils$2.BitSet,AltDict=Utils$2.AltDict,ATN$2=ATN_1.ATN,RuleStopState$1=ATNState_1.RuleStopState,ATNConfigSet$2=ATNConfigSet_1.ATNConfigSet,ATNConfig$1=ATNConfig_1.ATNConfig,SemanticContext$1=SemanticContext_1.SemanticContext,hashStuff=Utils$2.hashStuff;function PredictionMode$2(){return this}//
544
- // The SLL(*) prediction mode. This prediction mode ignores the current
545
- // parser context when making predictions. This is the fastest prediction
546
- // mode, and provides correct results for many grammars. This prediction
547
- // mode is more powerful than the prediction mode provided by ANTLR 3, but
548
- // may result in syntax errors for grammar and input combinations which are
549
- // not SLL.
550
- //
551
- // <p>
552
- // When using this prediction mode, the parser will either return a correct
553
- // parse tree (i.e. the same parse tree that would be returned with the
554
- // {@link //LL} prediction mode), or it will report a syntax error. If a
555
- // syntax error is encountered when using the {@link //SLL} prediction mode,
556
- // it may be due to either an actual syntax error in the input or indicate
557
- // that the particular combination of grammar and input requires the more
558
- // powerful {@link //LL} prediction abilities to complete successfully.</p>
559
- //
560
- // <p>
561
- // This prediction mode does not provide any guarantees for prediction
562
- // behavior for syntactically-incorrect inputs.</p>
563
- //
564
- PredictionMode$2.SLL=0,PredictionMode$2.LL=1,PredictionMode$2.LL_EXACT_AMBIG_DETECTION=2,PredictionMode$2.hasSLLConflictTerminatingPrediction=function(e,t){// Configs in rule stop states indicate reaching the end of the decision
565
- // rule (local context) or end of start rule (full context). If all
566
- // configs meet this condition, then none of the configurations is able
567
- // to match additional input so we terminate prediction.
568
- //
569
- if(PredictionMode$2.allConfigsInRuleStopStates(t))return!0;// pure SLL mode parsing
570
- if(e===PredictionMode$2.SLL&&t.hasSemanticContext)// Don't bother with combining configs from different semantic
571
- // contexts if we can fail over to full LL; costs more time
572
- // since we'll often fail over anyway.
573
- {// dup configs, tossing out semantic predicates
574
- for(var r=new ATNConfigSet$2,o=0,n;o<t.items.length;o++)n=t.items[o],n=new ATNConfig$1({semanticContext:SemanticContext$1.NONE},n),r.add(n);t=r}// now we have combined contexts for configs with dissimilar preds
575
- // pure SLL or combined SLL+LL mode parsing
576
- var a=PredictionMode$2.getConflictingAltSubsets(t);return PredictionMode$2.hasConflictingAltSet(a)&&!PredictionMode$2.hasStateAssociatedWithOneAlt(t)},PredictionMode$2.hasConfigInRuleStopState=function(e){for(var t=0,r;t<e.items.length;t++)if(r=e.items[t],r.state instanceof RuleStopState$1)return!0;return!1},PredictionMode$2.allConfigsInRuleStopStates=function(e){for(var t=0,r;t<e.items.length;t++)if(r=e.items[t],!(r.state instanceof RuleStopState$1))return!1;return!0},PredictionMode$2.resolvesToJustOneViableAlt=function(e){return PredictionMode$2.getSingleViableAlt(e)},PredictionMode$2.allSubsetsConflict=function(e){return!PredictionMode$2.hasNonConflictingAltSet(e)},PredictionMode$2.hasNonConflictingAltSet=function(e){for(var t=0,r;t<e.length;t++)if(r=e[t],1===r.length)return!0;return!1},PredictionMode$2.hasConflictingAltSet=function(e){for(var t=0,r;t<e.length;t++)if(r=e[t],1<r.length)return!0;return!1},PredictionMode$2.allSubsetsEqual=function(e){for(var t=null,r=0,o;r<e.length;r++)if(o=e[r],null===t)t=o;else if(o!==t)return!1;return!0},PredictionMode$2.getUniqueAlt=function(e){var t=PredictionMode$2.getAlts(e);return 1===t.length?t.minValue():ATN$2.INVALID_ALT_NUMBER},PredictionMode$2.getAlts=function(e){var t=new BitSet$2;return e.map(function(e){t.or(e)}),t},PredictionMode$2.getConflictingAltSubsets=function(e){var t=new Map$1;return t.hashFunction=function(e){hashStuff(e.state.stateNumber,e.context)},t.equalsFunction=function(e,t){return e.state.stateNumber==t.state.stateNumber&&e.context.equals(t.context)},e.items.map(function(e){var r=t.get(e);null===r&&(r=new BitSet$2,t.put(e,r)),r.add(e.alt)}),t.getValues()},PredictionMode$2.getStateToAltMap=function(e){var t=new AltDict;return e.items.map(function(e){var r=t.get(e.state);null===r&&(r=new BitSet$2,t.put(e.state,r)),r.add(e.alt)}),t},PredictionMode$2.hasStateAssociatedWithOneAlt=function(e){for(var t=PredictionMode$2.getStateToAltMap(e).values(),r=0;r<t.length;r++)if(1===t[r].length)return!0;return!1},PredictionMode$2.getSingleViableAlt=function(e){for(var t=null,r=0;r<e.length;r++){var o=e[r],n=o.minValue();if(null===t)t=n;else if(t!==n)// more than 1 viable alt
577
- return ATN$2.INVALID_ALT_NUMBER}return t};var PredictionMode_2=PredictionMode$2,PredictionMode_1={PredictionMode:PredictionMode_2},Set$2=Utils$2.Set,BitSet$1=Utils$2.BitSet,DoubleDict=Utils$2.DoubleDict,ATN$1=ATN_1.ATN,ATNState$1=ATNState_1.ATNState,ATNConfig=ATNConfig_1.ATNConfig,ATNConfigSet$1=ATNConfigSet_1.ATNConfigSet,Token$6=Token_1.Token,DFAState$1=DFAState_1.DFAState,PredPrediction$1=DFAState_1.PredPrediction,ATNSimulator=ATNSimulator_1.ATNSimulator,PredictionMode$1=PredictionMode_1.PredictionMode,RuleContext=RuleContext_1.RuleContext,SemanticContext=SemanticContext_1.SemanticContext,RuleStopState=ATNState_1.RuleStopState,PredictionContext=PredictionContext_1.PredictionContext,Interval$4=IntervalSet_1.Interval,Transition=Transition_1.Transition,SetTransition=Transition_1.SetTransition,NotSetTransition=Transition_1.NotSetTransition,RuleTransition=Transition_1.RuleTransition,ActionTransition=Transition_1.ActionTransition,NoViableAltException$2=Errors.NoViableAltException,SingletonPredictionContext=PredictionContext_1.SingletonPredictionContext,predictionContextFromRuleContext=PredictionContext_1.predictionContextFromRuleContext;function ParserATNSimulator$1(e,t,r,o){return ATNSimulator.call(this,t,o),this.parser=e,this.decisionToDFA=r,this.predictionMode=PredictionMode$1.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this}ParserATNSimulator$1.prototype=Object.create(ATNSimulator.prototype),ParserATNSimulator$1.prototype.constructor=ParserATNSimulator$1,ParserATNSimulator$1.prototype.debug=!1,ParserATNSimulator$1.prototype.debug_closure=!1,ParserATNSimulator$1.prototype.debug_add=!1,ParserATNSimulator$1.prototype.debug_list_atn_decisions=!1,ParserATNSimulator$1.prototype.dfa_debug=!1,ParserATNSimulator$1.prototype.retry_debug=!1,ParserATNSimulator$1.prototype.reset=function(){},ParserATNSimulator$1.prototype.adaptivePredict=function(e,t,r){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+t+" exec LA(1)=="+this.getLookaheadName(e)+" line "+e.LT(1).line+":"+e.LT(1).column),this._input=e,this._startIndex=e.index,this._outerContext=r;var o=this.decisionToDFA[t];this._dfa=o;var n=e.mark(),a=e.index;// Now we are certain to have a specific decision's DFA
578
- // But, do we still need an initial state?
579
- try{var i;if(i=o.precedenceDfa?o.getPrecedenceStartState(this.parser.getPrecedence()):o.s0,null===i){null===r&&(r=RuleContext.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+o.decision+" exec LA(1)=="+this.getLookaheadName(e)+", outerContext="+r.toString(this.parser.ruleNames));var p=this.computeStartState(o.atnStartState,RuleContext.EMPTY,!1);o.precedenceDfa?(o.s0.configs=p,p=this.applyPrecedenceFilter(p),i=this.addDFAState(o,new DFAState$1(null,p)),o.setPrecedenceStartState(this.parser.getPrecedence(),i)):(i=this.addDFAState(o,new DFAState$1(null,p)),o.s0=i)}var s=this.execATN(o,i,e,a,r);return this.debug&&console.log("DFA after predictATN: "+o.toString(this.parser.literalNames)),s}finally{this._dfa=null,this.mergeCache=null,e.seek(a),e.release(n)}},ParserATNSimulator$1.prototype.execATN=function(r,o,n,a,i){(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+r.decision+" exec LA(1)=="+this.getLookaheadName(n)+" line "+n.LT(1).line+":"+n.LT(1).column);var p=o,s;this.debug&&console.log("s0 = "+o);for(var l=n.LA(1),d;;){if(d=this.getExistingTargetState(p,l),null===d&&(d=this.computeTargetState(r,p,l)),d===ATNSimulator.ERROR){// if any configs in previous dipped into outer context, that
580
- // means that input up to t actually finished entry rule
581
- // at least for SLL decision. Full LL doesn't dip into outer
582
- // so don't need special case.
583
- // We will get an error no matter what so delay until after
584
- // decision; better error message. Also, no reachable target
585
- // ATN states in SLL implies LL will also get nowhere.
586
- // If conflict in states that dip out, choose min since we
587
- // will get error no matter what.
588
- var c=this.noViableAlt(n,i,p.configs,a);if(n.seek(a),s=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(p.configs,i),s!==ATN$1.INVALID_ALT_NUMBER)return s;throw c}if(d.requiresFullContext&&this.predictionMode!==PredictionMode$1.SLL){// IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error)
589
- var e=null;if(null!==d.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");var u=n.index;if(u!==a&&n.seek(a),e=this.evalSemanticContext(d.predicates,i,!0),1===e.length)return this.debug&&console.log("Full LL avoided"),e.minValue();u!==a&&n.seek(u)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+d);var y=this.computeStartState(r.atnStartState,i,!0);return this.reportAttemptingFullContext(r,e,d.configs,a,n.index),s=this.execATNWithFullContext(r,d,y,n,a,i),s}if(d.isAcceptState){if(null===d.predicates)return d.prediction;var m=n.index;n.seek(a);var g=this.evalSemanticContext(d.predicates,i,!0);if(0===g.length)throw this.noViableAlt(n,i,d.configs,a);else return 1===g.length?g.minValue():(this.reportAmbiguity(r,d,a,m,!1,g,d.configs),g.minValue())}p=d,l!==Token$6.EOF&&(n.consume(),l=n.LA(1))}},ParserATNSimulator$1.prototype.getExistingTargetState=function(e,r){var t=e.edges;return null===t?null:t[r+1]||null},ParserATNSimulator$1.prototype.computeTargetState=function(e,r,o){var t=this.computeReachSet(r.configs,o,!1);if(null===t)return this.addDFAEdge(e,r,o,ATNSimulator.ERROR),ATNSimulator.ERROR;// create new target state; we'll add to DFA after it's complete
590
- var n=new DFAState$1(null,t),a=this.getUniqueAlt(t);if(this.debug){var i=PredictionMode$1.getConflictingAltSubsets(t);console.log("SLL altSubSets="+Utils$2.arrayToString(i)+", previous="+r.configs+", configs="+t+", predict="+a+", allSubsetsConflict="+PredictionMode$1.allSubsetsConflict(i)+", conflictingAlts="+this.getConflictingAlts(t))}return a===ATN$1.INVALID_ALT_NUMBER?PredictionMode$1.hasSLLConflictTerminatingPrediction(this.predictionMode,t)&&(n.configs.conflictingAlts=this.getConflictingAlts(t),n.requiresFullContext=!0,n.isAcceptState=!0,n.prediction=n.configs.conflictingAlts.minValue()):(n.isAcceptState=!0,n.configs.uniqueAlt=a,n.prediction=a),n.isAcceptState&&n.configs.hasSemanticContext&&(this.predicateDFAState(n,this.atn.getDecisionState(e.decision)),null!==n.predicates&&(n.prediction=ATN$1.INVALID_ALT_NUMBER)),n=this.addDFAEdge(e,r,o,n),n},ParserATNSimulator$1.prototype.predicateDFAState=function(e,t){// We need to test all predicates, even in DFA states that
591
- // uniquely predict alternative.
592
- var r=t.transitions.length,o=this.getConflictingAltsOrUniqueAlt(e.configs),n=this.getPredsForAmbigAlts(o,e.configs,r);// Update DFA so reach becomes accept state with (predicate,alt)
593
- // pairs if preds found for conflicting alts
594
- null===n?e.prediction=o.minValue():(e.predicates=this.getPredicatePredictions(o,n),e.prediction=ATN$1.INVALID_ALT_NUMBER)},ParserATNSimulator$1.prototype.execATNWithFullContext=function(r,o,// how far we got before failing over
595
- n,a,i,p){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+n);var s=!1,l=null,d=n;a.seek(i);for(var c=a.LA(1),u=-1;;){if(l=this.computeReachSet(d,c,!0),null===l){// if any configs in previous dipped into outer context, that
596
- // means that input up to t actually finished entry rule
597
- // at least for LL decision. Full LL doesn't dip into outer
598
- // so don't need special case.
599
- // We will get an error no matter what so delay until after
600
- // decision; better error message. Also, no reachable target
601
- // ATN states in SLL implies LL will also get nowhere.
602
- // If conflict in states that dip out, choose min since we
603
- // will get error no matter what.
604
- var y=this.noViableAlt(a,p,d,i);a.seek(i);var e=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(d,p);if(e!==ATN$1.INVALID_ALT_NUMBER)return e;throw y}var m=PredictionMode$1.getConflictingAltSubsets(l);// unique prediction?
605
- if(this.debug&&console.log("LL altSubSets="+m+", predict="+PredictionMode$1.getUniqueAlt(m)+", resolvesToJustOneViableAlt="+PredictionMode$1.resolvesToJustOneViableAlt(m)),l.uniqueAlt=this.getUniqueAlt(l),l.uniqueAlt!==ATN$1.INVALID_ALT_NUMBER){u=l.uniqueAlt;break}else if(this.predictionMode!==PredictionMode$1.LL_EXACT_AMBIG_DETECTION){if(u=PredictionMode$1.resolvesToJustOneViableAlt(m),u!==ATN$1.INVALID_ALT_NUMBER)break;}else// In exact ambiguity mode, we never try to terminate early.
606
- // Just keeps scarfing until we know what the conflict is
607
- if(PredictionMode$1.allSubsetsConflict(m)&&PredictionMode$1.allSubsetsEqual(m)){s=!0,u=PredictionMode$1.getSingleViableAlt(m);break}// else there are multiple non-conflicting subsets or
608
- // we're not sure what the ambiguity is yet.
609
- // So, keep going.
610
- d=l,c!==Token$6.EOF&&(a.consume(),c=a.LA(1))}// If the configuration set uniquely predicts an alternative,
611
- // without conflict, then we know that it's a full LL decision
612
- // not SLL.
613
- return l.uniqueAlt===ATN$1.INVALID_ALT_NUMBER?(this.reportAmbiguity(r,o,i,a.index,s,null,l),u):(this.reportContextSensitivity(r,u,l,i,a.index),u);// We do not check predicates here because we have checked them
614
- // on-the-fly when doing full context prediction.
615
- //
616
- // In non-exact ambiguity detection mode, we might actually be able to
617
- // detect an exact ambiguity, but I'm not going to spend the cycles
618
- // needed to check. We only emit ambiguity warnings in exact ambiguity
619
- // mode.
620
- //
621
- // For example, we might know that we have conflicting configurations.
622
- // But, that does not mean that there is no way forward without a
623
- // conflict. It's possible to have nonconflicting alt subsets as in:
624
- // altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}]
625
- // from
626
- //
627
- // [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]),
628
- // (13,2,[5 10 $]), (21,2,[5 10 $]), (11,2,[$])]
629
- //
630
- // In this case, (17,1,[5 $]) indicates there is some next sequence that
631
- // would resolve this without conflict to alternative 1. Any other viable
632
- // next sequence, however, is associated with a conflict. We stop
633
- // looking for input because no amount of further lookahead will alter
634
- // the fact that we should predict alternative 1. We just can't say for
635
- // sure that there is an ambiguity without looking further.
636
- },ParserATNSimulator$1.prototype.computeReachSet=function(e,r,t){this.debug&&console.log("in computeReachSet, starting closure: "+e),null===this.mergeCache&&(this.mergeCache=new DoubleDict);// First figure out where we can reach on input t
637
- for(var o=new ATNConfigSet$1(t),n=null,a=0,p;a<e.items.length;a++){if(p=e.items[a],this.debug_add&&console.log("testing "+this.getTokenName(r)+" at "+p),p.state instanceof RuleStopState){(t||r===Token$6.EOF)&&(null===n&&(n=[]),n.push(p),this.debug_add&&console.log("added "+p+" to skippedStopStates"));continue}for(var s=0;s<p.state.transitions.length;s++){var d=p.state.transitions[s],u=this.getReachableTarget(d,r);if(null!==u){var y=new ATNConfig({state:u},p);o.add(y,this.mergeCache),this.debug_add&&console.log("added "+y+" to intermediate")}}}// Now figure out where the reach operation can take us...
638
- var m=null;// This block optimizes the reach operation for intermediate sets which
639
- // trivially indicate a termination state for the overall
640
- // adaptivePredict operation.
641
- //
642
- // The conditions assume that intermediate
643
- // contains all configurations relevant to the reach set, but this
644
- // condition is not true when one or more configurations have been
645
- // withheld in skippedStopStates, or when the current symbol is EOF.
646
- //
647
- // If the reach set could not be trivially determined, perform a closure
648
- // operation on the intermediate set to compute its initial value.
649
- //
650
- if(null===n&&r!==Token$6.EOF&&(1===o.items.length?m=o:this.getUniqueAlt(o)!==ATN$1.INVALID_ALT_NUMBER&&(m=o)),null===m){m=new ATNConfigSet$1(t);for(var g=new Set$2,E=r===Token$6.EOF,f=0;f<o.items.length;f++)this.closure(o.items[f],m,g,!1,t,E)}// If skippedStopStates!==null, then it contains at least one
651
- // configuration. For full-context reach operations, these
652
- // configurations reached the end of the start rule, in which case we
653
- // only add them back to reach if no configuration during the current
654
- // closure operation reached such a state. This ensures adaptivePredict
655
- // chooses an alternative matching the longest overall sequence when
656
- // multiple alternatives are viable.
657
- //
658
- if(r===Token$6.EOF&&(m=this.removeAllConfigsNotInRuleStopState(m,m===o)),null!==n&&(!t||!PredictionMode$1.hasConfigInRuleStopState(m)))for(var x=0;x<n.length;x++)m.add(n[x],this.mergeCache);return 0===m.items.length?null:m},ParserATNSimulator$1.prototype.removeAllConfigsNotInRuleStopState=function(e,t){if(PredictionMode$1.allConfigsInRuleStopStates(e))return e;for(var r=new ATNConfigSet$1(e.fullCtx),o=0,n;o<e.items.length;o++){if(n=e.items[o],n.state instanceof RuleStopState){r.add(n,this.mergeCache);continue}if(t&&n.state.epsilonOnlyTransitions){var a=this.atn.nextTokens(n.state);if(a.contains(Token$6.EPSILON)){var p=this.atn.ruleToStopState[n.state.ruleIndex];r.add(new ATNConfig({state:p},n),this.mergeCache)}}}return r},ParserATNSimulator$1.prototype.computeStartState=function(e,t,r){// always at least the implicit call to start rule
659
- for(var o=predictionContextFromRuleContext(this.atn,t),n=new ATNConfigSet$1(r),a=0;a<e.transitions.length;a++){var p=e.transitions[a].target,s=new ATNConfig({state:p,alt:a+1,context:o},null),l=new Set$2;this.closure(s,n,l,!0,r,!1)}return n},ParserATNSimulator$1.prototype.applyPrecedenceFilter=function(e){for(var t=[],r=new ATNConfigSet$1(e.fullCtx),o=0,n;o<e.items.length;o++)// handle alt 1 first
660
- if(n=e.items[o],1===n.alt){var a=n.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==a&&(t[n.state.stateNumber]=n.context,a===n.semanticContext?r.add(n,this.mergeCache):r.add(new ATNConfig({semanticContext:a},n),this.mergeCache))}for(o=0;o<e.items.length;o++)if(n=e.items[o],1!==n.alt)// already handled
661
- {// In the future, this elimination step could be updated to also
662
- // filter the prediction context for alternatives predicting alt>1
663
- // (basically a graph subtraction algorithm).
664
- if(!n.precedenceFilterSuppressed){var p=t[n.state.stateNumber]||null;if(null!==p&&p.equals(n.context))// eliminated
665
- continue}r.add(n,this.mergeCache)}return r},ParserATNSimulator$1.prototype.getReachableTarget=function(e,t){return e.matches(t,0,this.atn.maxTokenType)?e.target:null},ParserATNSimulator$1.prototype.getPredsForAmbigAlts=function(e,t,r){// REACH=[1|1|[]|0:0, 1|2|[]|0:1]
666
- // altToPred starts as an array of all null contexts. The entry at index i
667
- // corresponds to alternative i. altToPred[i] may have one of three values:
668
- // 1. null: no ATNConfig c is found such that c.alt==i
669
- // 2. SemanticContext.NONE: At least one ATNConfig c exists such that
670
- // c.alt==i and c.semanticContext==SemanticContext.NONE. In other words,
671
- // alt i has at least one unpredicated config.
672
- // 3. Non-NONE Semantic Context: There exists at least one, and for all
673
- // ATNConfig c such that c.alt==i, c.semanticContext!=SemanticContext.NONE.
674
- //
675
- // From this, it is clear that NONE||anything==NONE.
676
- //
677
- for(var o=[],n=0,a;n<t.items.length;n++)a=t.items[n],e.contains(a.alt)&&(o[a.alt]=SemanticContext.orContext(o[a.alt]||null,a.semanticContext));var p=0;for(n=1;n<r+1;n++){var s=o[n]||null;null===s?o[n]=SemanticContext.NONE:s!==SemanticContext.NONE&&(p+=1)}// nonambig alts are null in altToPred
678
- return 0==p&&(o=null),this.debug&&console.log("getPredsForAmbigAlts result "+Utils$2.arrayToString(o)),o},ParserATNSimulator$1.prototype.getPredicatePredictions=function(e,t){for(var r=[],o=!1,n=1,a;n<t.length;n++)a=t[n],null!==e&&e.contains(n)&&r.push(new PredPrediction$1(a,n)),a!==SemanticContext.NONE&&(o=!0);return o?r:null},ParserATNSimulator$1.prototype.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule=function(e,t){var r=this.splitAccordingToSemanticValidity(e,t),o=r[0],n=r[1],a=this.getAltThatFinishedDecisionEntryRule(o);return a===ATN$1.INVALID_ALT_NUMBER?0<n.items.length&&(a=this.getAltThatFinishedDecisionEntryRule(n),a!==ATN$1.INVALID_ALT_NUMBER)?a:ATN$1.INVALID_ALT_NUMBER:a;// Is there a syntactically valid path with a failed pred?
679
- },ParserATNSimulator$1.prototype.getAltThatFinishedDecisionEntryRule=function(e){for(var t=Math.min,r=[],o=0,n;o<e.items.length;o++)n=e.items[o],(0<n.reachesIntoOuterContext||n.state instanceof RuleStopState&&n.context.hasEmptyPath())&&0>r.indexOf(n.alt)&&r.push(n.alt);return 0===r.length?ATN$1.INVALID_ALT_NUMBER:t.apply(null,r)},ParserATNSimulator$1.prototype.splitAccordingToSemanticValidity=function(e,t){for(var r=new ATNConfigSet$1(e.fullCtx),o=new ATNConfigSet$1(e.fullCtx),n=0,a;n<e.items.length;n++)if(a=e.items[n],a.semanticContext!==SemanticContext.NONE){var p=a.semanticContext.evaluate(this.parser,t);p?r.add(a):o.add(a)}else r.add(a);return[r,o]},ParserATNSimulator$1.prototype.evalSemanticContext=function(e,t,r){for(var o=new BitSet$1,n=0,a;n<e.length;n++){if(a=e[n],a.pred===SemanticContext.NONE){if(o.add(a.alt),!r)break;continue}var p=a.pred.evaluate(this.parser,t);if((this.debug||this.dfa_debug)&&console.log("eval pred "+a+"="+p),p&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+a.alt),o.add(a.alt),!r))break}return o},ParserATNSimulator$1.prototype.closure=function(e,t,r,o,n,a){this.closureCheckingStopState(e,t,r,o,n,0,a)},ParserATNSimulator$1.prototype.closureCheckingStopState=function(e,t,r,o,n,a,p){if((this.debug||this.debug_closure)&&(console.log("closure("+e.toString(this.parser,!0)+")"),50<e.reachesIntoOuterContext))// console.log("configs(" + configs.toString() + ")");
680
- throw"problem";if(e.state instanceof RuleStopState){// We hit rule end. If we have context info, use it
681
- // run thru all possible stack tops in ctx
682
- if(!e.context.isEmpty()){for(var s=0;s<e.context.length;s++){if(e.context.getReturnState(s)===PredictionContext.EMPTY_RETURN_STATE){if(n){t.add(new ATNConfig({state:e.state,context:PredictionContext.EMPTY},e),this.mergeCache);continue}else this.debug&&console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex)),this.closure_(e,t,r,o,n,a,p);continue}var l=this.atn.states[e.context.getReturnState(s)],d=e.context.getParent(s),u={state:l,alt:e.alt,context:d,semanticContext:e.semanticContext},y=new ATNConfig(u,null);y.reachesIntoOuterContext=e.reachesIntoOuterContext,this.closureCheckingStopState(y,t,r,o,n,a-1,p)}return}if(n)return void t.add(e,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex))}this.closure_(e,t,r,o,n,a,p)},ParserATNSimulator$1.prototype.closure_=function(e,r,o,n,a,s,l){var d=e.state;// optimization
683
- d.epsilonOnlyTransitions||r.add(e,this.mergeCache);for(var p=0;p<d.transitions.length;p++)if(!(0==p&&this.canDropLoopEntryEdgeInLeftRecursiveRule(e))){var u=d.transitions[p],t=n&&!(u instanceof ActionTransition),y=this.getEpsilonTarget(e,u,t,0===s,a,l);if(null!==y){var c=s;if(e.state instanceof RuleStopState){if(null!==this._dfa&&this._dfa.precedenceDfa&&u.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(y.precedenceFilterSuppressed=!0),y.reachesIntoOuterContext+=1,o.add(y)!==y)// avoid infinite recursion for right-recursive rules
684
- continue;r.dipsIntoOuterContext=!0,c-=1,this.debug&&console.log("dips into outer ctx: "+y)}else{if(!u.isEpsilon&&o.add(y)!==y)// avoid infinite recursion for EOF* and EOF+
685
- continue;u instanceof RuleTransition&&0<=c&&(c+=1)}this.closureCheckingStopState(y,r,o,t,a,c,l)}}},ParserATNSimulator$1.prototype.canDropLoopEntryEdgeInLeftRecursiveRule=function(e){// return False
686
- var t=e.state;// First check to see if we are in StarLoopEntryState generated during
687
- // left-recursion elimination. For efficiency, also check if
688
- // the context has an empty stack case. If so, it would mean
689
- // global FOLLOW so we can't perform optimization
690
- // Are we the special loop entry/exit state? or SLL wildcard
691
- if(t.stateType!=ATNState$1.STAR_LOOP_ENTRY)return!1;if(t.stateType!=ATNState$1.STAR_LOOP_ENTRY||!t.isPrecedenceDecision||e.context.isEmpty()||e.context.hasEmptyPath())return!1;// Require all return states to return back to the same rule that p is in.
692
- for(var r=e.context.length,o=0,n;o<r;o++)if(n=this.atn.states[e.context.getReturnState(o)],n.ruleIndex!=t.ruleIndex)return!1;// Verify that the top of each stack context leads to loop entry/exit
693
- // state through epsilon edges and w/o leaving rule.
694
- for(var a=t.transitions[0].target,p=a.endState.stateNumber,s=this.atn.states[p],o=0;o<r;o++){// for each stack context
695
- var l=e.context.getReturnState(o),n=this.atn.states[l];// all states must have single outgoing epsilon edge
696
- if(1!=n.transitions.length||!n.transitions[0].isEpsilon)return!1;// Look for prefix op case like 'not expr', (' type ')' expr
697
- var d=n.transitions[0].target;if((n.stateType!=ATNState$1.BLOCK_END||d!=t)&&n!=s&&d!=s&&!(d.stateType==ATNState$1.BLOCK_END&&1==d.transitions.length&&d.transitions[0].isEpsilon&&d.transitions[0].target==t))// anything else ain't conforming
698
- // Look for complex prefix 'between expr and expr' case where 2nd expr's
699
- // return state points at block end state of (...)* internal block
700
- // Look for ternary expr ? expr : expr. The return state points at block end,
701
- // which points at loop entry state
702
- // Look for 'expr op expr' or case where expr's return state is block end
703
- // of (...)* internal block; the block end points to loop back
704
- // which points to p but we don't need to check that
705
- return!1}return!0},ParserATNSimulator$1.prototype.getRuleName=function(e){return null!==this.parser&&0<=e?this.parser.ruleNames[e]:"<rule "+e+">"},ParserATNSimulator$1.prototype.getEpsilonTarget=function(e,r,t,o,n,a){switch(r.serializationType){case Transition.RULE:return this.ruleTransition(e,r);case Transition.PRECEDENCE:return this.precedenceTransition(e,r,t,o,n);case Transition.PREDICATE:return this.predTransition(e,r,t,o,n);case Transition.ACTION:return this.actionTransition(e,r);case Transition.EPSILON:return new ATNConfig({state:r.target},e);case Transition.ATOM:case Transition.RANGE:case Transition.SET:// EOF transitions act like epsilon transitions after the first EOF
706
- // transition is traversed
707
- return a&&r.matches(Token$6.EOF,0,1)?new ATNConfig({state:r.target},e):null;default:return null;}},ParserATNSimulator$1.prototype.actionTransition=function(e,r){if(this.debug){var t=-1==r.actionIndex?65535:r.actionIndex;console.log("ACTION edge "+r.ruleIndex+":"+t)}return new ATNConfig({state:r.target},e)},ParserATNSimulator$1.prototype.precedenceTransition=function(e,t,r,o,n){this.debug&&(console.log("PRED (collectPredicates="+r+") "+t.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+Utils$2.arrayToString(this.parser.getRuleInvocationStack())));var a=null;if(!(r&&o))a=new ATNConfig({state:t.target},e);else if(n){// In full context mode, we can evaluate predicates on-the-fly
708
- // during closure, which dramatically reduces the size of
709
- // the config sets. It also obviates the need to test predicates
710
- // later during conflict resolution.
711
- var i=this._input.index;this._input.seek(this._startIndex);var p=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(i),p&&(a=new ATNConfig({state:t.target},e))}else{var s=SemanticContext.andContext(e.semanticContext,t.getPredicate());a=new ATNConfig({state:t.target,semanticContext:s},e)}return this.debug&&console.log("config from pred transition="+a),a},ParserATNSimulator$1.prototype.predTransition=function(e,t,r,o,n){this.debug&&(console.log("PRED (collectPredicates="+r+") "+t.ruleIndex+":"+t.predIndex+", ctx dependent="+t.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+Utils$2.arrayToString(this.parser.getRuleInvocationStack())));var a=null;if(!(r&&(t.isCtxDependent&&o||!t.isCtxDependent)))a=new ATNConfig({state:t.target},e);else if(n){// In full context mode, we can evaluate predicates on-the-fly
712
- // during closure, which dramatically reduces the size of
713
- // the config sets. It also obviates the need to test predicates
714
- // later during conflict resolution.
715
- var i=this._input.index;this._input.seek(this._startIndex);var p=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(i),p&&(a=new ATNConfig({state:t.target},e))}else{var s=SemanticContext.andContext(e.semanticContext,t.getPredicate());a=new ATNConfig({state:t.target,semanticContext:s},e)}return this.debug&&console.log("config from pred transition="+a),a},ParserATNSimulator$1.prototype.ruleTransition=function(e,r){this.debug&&console.log("CALL rule "+this.getRuleName(r.target.ruleIndex)+", ctx="+e.context);var t=r.followState,o=SingletonPredictionContext.create(e.context,t.stateNumber);return new ATNConfig({state:r.target,context:o},e)},ParserATNSimulator$1.prototype.getConflictingAlts=function(e){var t=PredictionMode$1.getConflictingAltSubsets(e);return PredictionMode$1.getAlts(t)},ParserATNSimulator$1.prototype.getConflictingAltsOrUniqueAlt=function(e){var t=null;return e.uniqueAlt===ATN$1.INVALID_ALT_NUMBER?t=e.conflictingAlts:(t=new BitSet$1,t.add(e.uniqueAlt)),t},ParserATNSimulator$1.prototype.getTokenName=function(e){if(e===Token$6.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames)if(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length)console.log(""+e+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens());else{var t=this.parser.literalNames[e]||this.parser.symbolicNames[e];return t+"<"+e+">"}return""+e},ParserATNSimulator$1.prototype.getLookaheadName=function(e){return this.getTokenName(e.LA(1))},ParserATNSimulator$1.prototype.dumpDeadEndConfigs=function(e){console.log("dead end configs: ");for(var r=e.getDeadEndConfigs(),o=0;o<r.length;o++){var n=r[o],a="no edges";if(0<n.state.transitions.length){var p=n.state.transitions[0];if(p instanceof AtomTransition)a="Atom "+this.getTokenName(p.label);else if(p instanceof SetTransition){a=(p instanceof NotSetTransition?"~":"")+"Set "+p.set}}console.error(n.toString(this.parser,!0)+":"+a)}},ParserATNSimulator$1.prototype.noViableAlt=function(e,t,r,o){return new NoViableAltException$2(this.parser,e,e.get(o),e.LT(1),r,t)},ParserATNSimulator$1.prototype.getUniqueAlt=function(e){for(var t=ATN$1.INVALID_ALT_NUMBER,r=0,o;r<e.items.length;r++)if(o=e.items[r],t===ATN$1.INVALID_ALT_NUMBER)t=o.alt;else if(o.alt!==t)return ATN$1.INVALID_ALT_NUMBER;return t},ParserATNSimulator$1.prototype.addDFAEdge=function(e,r,o,t){if(this.debug&&console.log("EDGE "+r+" -> "+t+" upon "+this.getTokenName(o)),null===t)return null;// used existing if possible not incoming
716
- if(t=this.addDFAState(e,t),null===r||-1>o||o>this.atn.maxTokenType)return t;// connect
717
- if(null===r.edges&&(r.edges=[]),r.edges[o+1]=t,this.debug){var n=null===this.parser?null:this.parser.literalNames,a=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+e.toString(n,a))}return t},ParserATNSimulator$1.prototype.addDFAState=function(e,t){if(t==ATNSimulator.ERROR)return t;var r=e.states.get(t);return null===r?(t.stateNumber=e.states.length,t.configs.readOnly||(t.configs.optimizeConfigs(this),t.configs.setReadonly(!0)),e.states.add(t),this.debug&&console.log("adding new DFA state: "+t),t):r},ParserATNSimulator$1.prototype.reportAttemptingFullContext=function(e,t,r,o,n){if(this.debug||this.retry_debug){var a=new Interval$4(o,n+1);console.log("reportAttemptingFullContext decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(a))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,e,o,n,t,r)},ParserATNSimulator$1.prototype.reportContextSensitivity=function(e,t,r,o,n){if(this.debug||this.retry_debug){var a=new Interval$4(o,n+1);console.log("reportContextSensitivity decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(a))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,e,o,n,t,r)},ParserATNSimulator$1.prototype.reportAmbiguity=function(e,t,r,o,n,a,i){if(this.debug||this.retry_debug){var p=new Interval$4(r,o+1);console.log("reportAmbiguity "+a+":"+i+", input="+this.parser.getTokenStream().getText(p))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,e,r,o,n,a,i)};var ParserATNSimulator_2=ParserATNSimulator$1,ParserATNSimulator_1={ParserATNSimulator:ParserATNSimulator_2},ATN=ATN_1.ATN,ATNDeserializer$1=ATNDeserializer_1.ATNDeserializer,LexerATNSimulator=LexerATNSimulator_1.LexerATNSimulator,ParserATNSimulator=ParserATNSimulator_1.ParserATNSimulator,PredictionMode=PredictionMode_1.PredictionMode,atn$1={ATN:ATN,ATNDeserializer:ATNDeserializer$1,LexerATNSimulator:LexerATNSimulator,ParserATNSimulator:ParserATNSimulator,PredictionMode:PredictionMode};String.prototype.codePointAt||function(){var e=function(){// IE 8 only supports `Object.defineProperty` on DOM elements
718
- try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t=function(e){if(null==this)throw TypeError();var t=this+"",r=t.length,o=e?+e:0;// Account for out-of-bounds indices:
719
- if(o!=o&&(o=0),!(0>o||o>=r)){// Get the first code unit
720
- var n=t.charCodeAt(o),a;return(// check if it’s the start of a surrogate pair
721
- 55296<=n&&56319>=n&&// high surrogate
722
- r>o+1&&(a=t.charCodeAt(o+1),56320<=a&&57343>=a)// there is a next code unit
723
- ?1024*(n-55296)+a-56320+65536:n)}};e?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}();var codepointat$1=/*#__PURE__*/Object.freeze({__proto__:null});/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
724
- * Use of this file is governed by the BSD 3-clause license that
725
- * can be found in the LICENSE.txt file in the project root.
726
- */ // A DFA walker that knows how to dump them to serialized strings.#/
727
- function DFASerializer$2(e,t,r){return this.dfa=e,this.literalNames=t||[],this.symbolicNames=r||[],this}DFASerializer$2.prototype.toString=function(){if(null===this.dfa.s0)return null;for(var e="",r=this.dfa.sortedStates(),o=0,a;o<r.length;o++)if(a=r[o],null!==a.edges)for(var p=a.edges.length,n=0,l;n<p;n++)l=a.edges[n]||null,null!==l&&2147483647!==l.stateNumber&&(e=e.concat(this.getStateString(a)),e=e.concat("-"),e=e.concat(this.getEdgeLabel(n)),e=e.concat("->"),e=e.concat(this.getStateString(l)),e=e.concat("\n"));return 0===e.length?null:e},DFASerializer$2.prototype.getEdgeLabel=function(e){var t=String.fromCharCode;return 0===e?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[e-1]||this.symbolicNames[e-1]:t(e-1)},DFASerializer$2.prototype.getStateString=function(e){var t=(e.isAcceptState?":":"")+"s"+e.stateNumber+(e.requiresFullContext?"^":"");return e.isAcceptState?null===e.predicates?t+"=>"+e.prediction.toString():t+"=>"+e.predicates.toString():t};function LexerDFASerializer$2(e){return DFASerializer$2.call(this,e,null),this}LexerDFASerializer$2.prototype=Object.create(DFASerializer$2.prototype),LexerDFASerializer$2.prototype.constructor=LexerDFASerializer$2,LexerDFASerializer$2.prototype.getEdgeLabel=function(e){return"'"+String.fromCharCode(e)+"'"};var DFASerializer_2=DFASerializer$2,LexerDFASerializer_1=LexerDFASerializer$2,DFASerializer_1={DFASerializer:DFASerializer_2,LexerDFASerializer:LexerDFASerializer_1},Set$1=Utils$2.Set,DFAState=DFAState_1.DFAState,StarLoopEntryState=ATNState_1.StarLoopEntryState,ATNConfigSet=ATNConfigSet_1.ATNConfigSet,DFASerializer$1=DFASerializer_1.DFASerializer,LexerDFASerializer$1=DFASerializer_1.LexerDFASerializer;function DFA$1(e,t){if(void 0===t&&(t=0),this.atnStartState=e,this.decision=t,this._states=new Set$1,this.s0=null,this.precedenceDfa=!1,e instanceof StarLoopEntryState&&e.isPrecedenceDecision){this.precedenceDfa=!0;var r=new DFAState(null,new ATNConfigSet());r.edges=[],r.isAcceptState=!1,r.requiresFullContext=!1,this.s0=r}return this}// Get the start state for a specific precedence value.
728
- //
729
- // @param precedence The current precedence.
730
- // @return The start state corresponding to the specified precedence, or
731
- // {@code null} if no start state exists for the specified precedence.
732
- //
733
- // @throws IllegalStateException if this is not a precedence DFA.
734
- // @see //isPrecedenceDfa()
735
- DFA$1.prototype.getPrecedenceStartState=function(e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";// s0.edges is never null for a precedence DFA
736
- return 0>e||e>=this.s0.edges.length?null:this.s0.edges[e]||null},DFA$1.prototype.setPrecedenceStartState=function(e,t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";0>e||(// synchronization on s0 here is ok. when the DFA is turned into a
737
- // precedence DFA, s0 will be initialized once and not updated again
738
- // s0.edges is never null for a precedence DFA
739
- this.s0.edges[e]=t)},DFA$1.prototype.setPrecedenceDfa=function(e){if(this.precedenceDfa!==e){if(this._states=new DFAStatesSet,e){var t=new DFAState(null,new ATNConfigSet());t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=e}},Object.defineProperty(DFA$1.prototype,"states",{get:function(){return this._states}}),DFA$1.prototype.sortedStates=function(){var e=this._states.values();return e.sort(function(e,t){return e.stateNumber-t.stateNumber})},DFA$1.prototype.toString=function(e,t){if(e=e||null,t=t||null,null===this.s0)return"";var r=new DFASerializer$1(this,e,t);return r.toString()},DFA$1.prototype.toLexerString=function(){if(null===this.s0)return"";var e=new LexerDFASerializer$1(this);return e.toString()};var DFA_2=DFA$1,DFA_1={DFA:DFA_2},DFA=DFA_1.DFA,DFASerializer=DFASerializer_1.DFASerializer,LexerDFASerializer=DFASerializer_1.LexerDFASerializer,PredPrediction=DFAState_1.PredPrediction,dfa$1={DFA:DFA,DFASerializer:DFASerializer,LexerDFASerializer:LexerDFASerializer,PredPrediction:PredPrediction};String.fromCodePoint||function(){var e=function(){// IE 8 only supports `Object.defineProperty` on DOM elements
740
- try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t=String.fromCharCode,r=Math.floor,o=function(){var e=[],o=-1,n=arguments.length,a,i;if(!n)return"";for(var p="";++o<n;){var s=+arguments[o];if(!isFinite(s)||// `NaN`, `+Infinity`, or `-Infinity`
741
- 0>s||// not a valid Unicode code point
742
- 1114111<s||// not a valid Unicode code point
743
- r(s)!=s// not an integer
744
- )throw RangeError("Invalid code point: "+s);65535>=s?e.push(s):(s-=65536,a=(s>>10)+55296,i=s%1024+56320,e.push(a,i)),(o+1==n||e.length>16384)&&(p+=t.apply(null,e),e.length=0)}return p};e?e(String,"fromCodePoint",{value:o,configurable:!0,writable:!0}):String.fromCodePoint=o}();var fromcodepoint$1=/*#__PURE__*/Object.freeze({__proto__:null}),Trees=Trees_1.Trees,RuleNode=Tree_1.RuleNode,ParseTreeListener$1=Tree_1.ParseTreeListener,ParseTreeVisitor=Tree_1.ParseTreeVisitor,ParseTreeWalker=Tree_1.ParseTreeWalker,tree$1={Trees:Trees,RuleNode:RuleNode,ParseTreeListener:ParseTreeListener$1,ParseTreeVisitor:ParseTreeVisitor,ParseTreeWalker:ParseTreeWalker},BitSet=Utils$2.BitSet,ErrorListener$1=ErrorListener_1.ErrorListener,Interval$3=IntervalSet_1.Interval;/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
745
- * Use of this file is governed by the BSD 3-clause license that
746
- * can be found in the LICENSE.txt file in the project root.
747
- */function DiagnosticErrorListener$1(e){return ErrorListener$1.call(this),e=e||!0,this.exactOnly=e,this}DiagnosticErrorListener$1.prototype=Object.create(ErrorListener$1.prototype),DiagnosticErrorListener$1.prototype.constructor=DiagnosticErrorListener$1,DiagnosticErrorListener$1.prototype.reportAmbiguity=function(e,t,r,o,n,a,i){if(!this.exactOnly||n){var p="reportAmbiguity d="+this.getDecisionDescription(e,t)+": ambigAlts="+this.getConflictingAlts(a,i)+", input='"+e.getTokenStream().getText(new Interval$3(r,o))+"'";e.notifyErrorListeners(p)}},DiagnosticErrorListener$1.prototype.reportAttemptingFullContext=function(e,t,r,o){var n="reportAttemptingFullContext d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new Interval$3(r,o))+"'";e.notifyErrorListeners(n)},DiagnosticErrorListener$1.prototype.reportContextSensitivity=function(e,t,r,o){var n="reportContextSensitivity d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new Interval$3(r,o))+"'";e.notifyErrorListeners(n)},DiagnosticErrorListener$1.prototype.getDecisionDescription=function(e,t){var r=t.decision,o=t.atnStartState.ruleIndex,n=e.ruleNames;if(0>o||o>=n.length)return""+r;var a=n[o]||null;return null===a||0===a.length?""+r:""+r+" ("+a+")"},DiagnosticErrorListener$1.prototype.getConflictingAlts=function(e,t){if(null!==e)return e;for(var r=new BitSet,o=0;o<t.items.length;o++)r.add(t.items[o].alt);return"{"+r.values().join(", ")+"}"};var DiagnosticErrorListener_2=DiagnosticErrorListener$1,DiagnosticErrorListener_1={DiagnosticErrorListener:DiagnosticErrorListener_2},Token$5=Token_1.Token,NoViableAltException$1=Errors.NoViableAltException,InputMismatchException$1=Errors.InputMismatchException,FailedPredicateException$1=Errors.FailedPredicateException,ParseCancellationException=Errors.ParseCancellationException,ATNState=ATNState_1.ATNState,Interval$2=IntervalSet_1.Interval,IntervalSet=IntervalSet_1.IntervalSet;function ErrorStrategy(){}ErrorStrategy.prototype.reset=function(){},ErrorStrategy.prototype.recoverInline=function(){},ErrorStrategy.prototype.recover=function(){},ErrorStrategy.prototype.sync=function(){},ErrorStrategy.prototype.inErrorRecoveryMode=function(){},ErrorStrategy.prototype.reportError=function(){};// This is the default implementation of {@link ANTLRErrorStrategy} used for
748
- // error reporting and recovery in ANTLR parsers.
749
- //
750
- function DefaultErrorStrategy$1(){return ErrorStrategy.call(this),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this}DefaultErrorStrategy$1.prototype=Object.create(ErrorStrategy.prototype),DefaultErrorStrategy$1.prototype.constructor=DefaultErrorStrategy$1,DefaultErrorStrategy$1.prototype.reset=function(e){this.endErrorCondition(e)},DefaultErrorStrategy$1.prototype.beginErrorCondition=function(){this.errorRecoveryMode=!0},DefaultErrorStrategy$1.prototype.inErrorRecoveryMode=function(){return this.errorRecoveryMode},DefaultErrorStrategy$1.prototype.endErrorCondition=function(){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1},DefaultErrorStrategy$1.prototype.reportMatch=function(e){this.endErrorCondition(e)},DefaultErrorStrategy$1.prototype.reportError=function(t,r){// if we've already reported an error and have not matched a token
751
- // yet successfully, don't report any errors.
752
- this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),r instanceof NoViableAltException$1?this.reportNoViableAlternative(t,r):r instanceof InputMismatchException$1?this.reportInputMismatch(t,r):r instanceof FailedPredicateException$1?this.reportFailedPredicate(t,r):(console.log("unknown recognition error type: "+r.constructor.name),console.log(r.stack),t.notifyErrorListeners(r.getOffendingToken(),r.getMessage(),r)))},DefaultErrorStrategy$1.prototype.recover=function(e){this.lastErrorIndex===e.getInputStream().index&&null!==this.lastErrorStates&&0<=this.lastErrorStates.indexOf(e.state)&&e.consume(),this.lastErrorIndex=e._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(e.state);var t=this.getErrorRecoverySet(e);this.consumeUntil(e,t)},DefaultErrorStrategy$1.prototype.sync=function(e){// If already recovering, don't try to sync
753
- if(!this.inErrorRecoveryMode(e)){var t=e._interp.atn.states[e.state],r=e.getTokenStream().LA(1),o=e.atn.nextTokens(t);if(!(o.contains(Token$5.EPSILON)||o.contains(r)))switch(t.stateType){case ATNState.BLOCK_START:case ATNState.STAR_BLOCK_START:case ATNState.PLUS_BLOCK_START:case ATNState.STAR_LOOP_ENTRY:// report error and recover if possible
754
- if(null!==this.singleTokenDeletion(e))return;throw new InputMismatchException$1(e);case ATNState.PLUS_LOOP_BACK:case ATNState.STAR_LOOP_BACK:this.reportUnwantedToken(e);var n=new IntervalSet;n.addSet(e.getExpectedTokens());var a=n.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,a);// do nothing if we can't identify the exact kind of ATN state
755
- }}},DefaultErrorStrategy$1.prototype.reportNoViableAlternative=function(t,r){var e=t.getTokenStream(),o;o=null===e?"<unknown input>":r.startToken.type===Token$5.EOF?"<EOF>":e.getText(new Interval$2(r.startToken.tokenIndex,r.offendingToken.tokenIndex));var n="no viable alternative at input "+this.escapeWSAndQuote(o);t.notifyErrorListeners(n,r.offendingToken,r)},DefaultErrorStrategy$1.prototype.reportInputMismatch=function(t,r){var e="mismatched input "+this.getTokenErrorDisplay(r.offendingToken)+" expecting "+r.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(e,r.offendingToken,r)},DefaultErrorStrategy$1.prototype.reportFailedPredicate=function(t,r){var e=t.ruleNames[t._ctx.ruleIndex],o="rule "+e+" "+r.message;t.notifyErrorListeners(o,r.offendingToken,r)},DefaultErrorStrategy$1.prototype.reportUnwantedToken=function(e){if(!this.inErrorRecoveryMode(e)){this.beginErrorCondition(e);var r=e.getCurrentToken(),t=this.getTokenErrorDisplay(r),o=this.getExpectedTokens(e),n="extraneous input "+t+" expecting "+o.toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(n,r,null)}},DefaultErrorStrategy$1.prototype.reportMissingToken=function(e){if(!this.inErrorRecoveryMode(e)){this.beginErrorCondition(e);var r=e.getCurrentToken(),t=this.getExpectedTokens(e),o="missing "+t.toString(e.literalNames,e.symbolicNames)+" at "+this.getTokenErrorDisplay(r);e.notifyErrorListeners(o,r,null)}},DefaultErrorStrategy$1.prototype.recoverInline=function(e){// SINGLE TOKEN DELETION
756
- var t=this.singleTokenDeletion(e);if(null!==t)return e.consume(),t;// SINGLE TOKEN INSERTION
757
- if(this.singleTokenInsertion(e))return this.getMissingSymbol(e);// even that didn't work; must throw the exception
758
- throw new InputMismatchException$1(e)},DefaultErrorStrategy$1.prototype.singleTokenInsertion=function(e){var t=e.getTokenStream().LA(1),r=e._interp.atn,o=r.states[e.state],n=o.transitions[0].target,a=r.nextTokens(n,e._ctx);// if current token is consistent with what could come after current
759
- // ATN state, then we know we're missing a token; error recovery
760
- // is free to conjure up and insert the missing token
761
- return!!a.contains(t)&&(this.reportMissingToken(e),!0)},DefaultErrorStrategy$1.prototype.singleTokenDeletion=function(e){var t=e.getTokenStream().LA(2),r=this.getExpectedTokens(e);if(r.contains(t)){this.reportUnwantedToken(e),e.consume();// simply delete extra token
762
- // we want to return the token we're actually matching
763
- var o=e.getCurrentToken();// we know current token is correct
764
- return this.reportMatch(e),o}return null},DefaultErrorStrategy$1.prototype.getMissingSymbol=function(e){var t=e.getCurrentToken(),r=this.getExpectedTokens(e),o=r.first(),n;n=o===Token$5.EOF?"<missing EOF>":"<missing "+e.literalNames[o]+">";var a=t,i=e.getTokenStream().LT(-1);return a.type===Token$5.EOF&&null!==i&&(a=i),e.getTokenFactory().create(a.source,o,n,Token$5.DEFAULT_CHANNEL,-1,-1,a.line,a.column)},DefaultErrorStrategy$1.prototype.getExpectedTokens=function(e){return e.getExpectedTokens()},DefaultErrorStrategy$1.prototype.getTokenErrorDisplay=function(e){if(null===e)return"<no token>";var t=e.text;return null===t&&(e.type===Token$5.EOF?t="<EOF>":t="<"+e.type+">"),this.escapeWSAndQuote(t)},DefaultErrorStrategy$1.prototype.escapeWSAndQuote=function(e){return e=e.replace(/\n/g,"\\n"),e=e.replace(/\r/g,"\\r"),e=e.replace(/\t/g,"\\t"),"'"+e+"'"},DefaultErrorStrategy$1.prototype.getErrorRecoverySet=function(e){for(var t=e._interp.atn,r=e._ctx,o=new IntervalSet;null!==r&&0<=r.invokingState;){// compute what follows who invoked us
765
- var n=t.states[r.invokingState],a=n.transitions[0],i=t.nextTokens(a.followState);o.addSet(i),r=r.parentCtx}return o.removeOne(Token$5.EPSILON),o},DefaultErrorStrategy$1.prototype.consumeUntil=function(e,t){for(var r=e.getTokenStream().LA(1);r!==Token$5.EOF&&!t.contains(r);)e.consume(),r=e.getTokenStream().LA(1)};//
766
- // This implementation of {@link ANTLRErrorStrategy} responds to syntax errors
767
- // by immediately canceling the parse operation with a
768
- // {@link ParseCancellationException}. The implementation ensures that the
769
- // {@link ParserRuleContext//exception} field is set for all parse tree nodes
770
- // that were not completed prior to encountering the error.
771
- //
772
- // <p>
773
- // This error strategy is useful in the following scenarios.</p>
774
- //
775
- // <ul>
776
- // <li><strong>Two-stage parsing:</strong> This error strategy allows the first
777
- // stage of two-stage parsing to immediately terminate if an error is
778
- // encountered, and immediately fall back to the second stage. In addition to
779
- // avoiding wasted work by attempting to recover from errors here, the empty
780
- // implementation of {@link BailErrorStrategy//sync} improves the performance of
781
- // the first stage.</li>
782
- // <li><strong>Silent validation:</strong> When syntax errors are not being
783
- // reported or logged, and the parse result is simply ignored if errors occur,
784
- // the {@link BailErrorStrategy} avoids wasting work on recovering from errors
785
- // when the result will be ignored either way.</li>
786
- // </ul>
787
- //
788
- // <p>
789
- // {@code myparser.setErrorHandler(new BailErrorStrategy());}</p>
790
- //
791
- // @see Parser//setErrorHandler(ANTLRErrorStrategy)
792
- //
793
- function BailErrorStrategy$1(){return DefaultErrorStrategy$1.call(this),this}BailErrorStrategy$1.prototype=Object.create(DefaultErrorStrategy$1.prototype),BailErrorStrategy$1.prototype.constructor=BailErrorStrategy$1,BailErrorStrategy$1.prototype.recover=function(t,r){for(var e=t._ctx;null!==e;)e.exception=r,e=e.parentCtx;throw new ParseCancellationException(r)},BailErrorStrategy$1.prototype.recoverInline=function(e){this.recover(e,new InputMismatchException$1(e))},BailErrorStrategy$1.prototype.sync=function(){// pass
794
- };var BailErrorStrategy_1=BailErrorStrategy$1,DefaultErrorStrategy_1=DefaultErrorStrategy$1,ErrorStrategy_1={BailErrorStrategy:BailErrorStrategy_1,DefaultErrorStrategy:DefaultErrorStrategy_1},RecognitionException=Errors.RecognitionException,NoViableAltException=Errors.NoViableAltException,LexerNoViableAltException=Errors.LexerNoViableAltException,InputMismatchException=Errors.InputMismatchException,FailedPredicateException=Errors.FailedPredicateException,DiagnosticErrorListener=DiagnosticErrorListener_1.DiagnosticErrorListener,BailErrorStrategy=ErrorStrategy_1.BailErrorStrategy,ErrorListener=ErrorListener_1.ErrorListener,error$1={RecognitionException:RecognitionException,NoViableAltException:NoViableAltException,LexerNoViableAltException:LexerNoViableAltException,InputMismatchException:InputMismatchException,FailedPredicateException:FailedPredicateException,DiagnosticErrorListener:DiagnosticErrorListener,BailErrorStrategy:BailErrorStrategy,ErrorListener:ErrorListener},Token$4=Token_1.Token;// Vacuum all input from a string and then treat it like a buffer.
795
- function _loadString(e){if(e._index=0,e.data=[],e.decodeToUnicodeCodePoints)for(var t=0,r;t<e.strdata.length;)r=e.strdata.codePointAt(t),e.data.push(r),t+=65535>=r?1:2;else for(var t=0,o;t<e.strdata.length;t++)o=e.strdata.charCodeAt(t),e.data.push(o);e._size=e.data.length}// If decodeToUnicodeCodePoints is true, the input is treated
796
- // as a series of Unicode code points.
797
- //
798
- // Otherwise, the input is treated as a series of 16-bit UTF-16 code
799
- // units.
800
- function InputStream$3(e,t){return this.name="<empty>",this.strdata=e,this.decodeToUnicodeCodePoints=t||!1,_loadString(this),this}Object.defineProperty(InputStream$3.prototype,"index",{get:function(){return this._index}}),Object.defineProperty(InputStream$3.prototype,"size",{get:function(){return this._size}}),InputStream$3.prototype.reset=function(){this._index=0},InputStream$3.prototype.consume=function(){if(this._index>=this._size)// assert this.LA(1) == Token.EOF
801
- throw"cannot consume EOF";this._index+=1},InputStream$3.prototype.LA=function(e){if(0===e)return 0;// undefined
802
- 0>e&&(e+=1);var t=this._index+e-1;return 0>t||t>=this._size?Token$4.EOF:this.data[t]},InputStream$3.prototype.LT=function(e){return this.LA(e)},InputStream$3.prototype.mark=function(){return-1},InputStream$3.prototype.release=function(){},InputStream$3.prototype.seek=function(e){return e<=this._index?void(this._index=e):void(// seek forward
803
- this._index=Math.min(e,this._size))},InputStream$3.prototype.getText=function(e,t){var r=String.fromCodePoint;if(t>=this._size&&(t=this._size-1),e>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var o="",n=e;n<=t;n++)o+=r(this.data[n]);return o}return this.strdata.slice(e,t+1)},InputStream$3.prototype.toString=function(){return this.strdata};var InputStream_2=InputStream$3,InputStream_1={InputStream:InputStream_2},InputStream$2=InputStream_1.InputStream,isNodeJs$1="undefined"==typeof window&&"undefined"==typeof importScripts,fs$1=isNodeJs$1?fs__default["default"]:null,CharStreams$1={// Creates an InputStream from a string.
804
- fromString:function(e){return new InputStream$2(e,!0)},// Asynchronously creates an InputStream from a blob given the
805
- // encoding of the bytes in that blob (defaults to 'utf8' if
806
- // encoding is null).
807
- //
808
- // Invokes onLoad(result) on success, onError(error) on
809
- // failure.
810
- fromBlob:function(e,t,r,o){var n=FileReader();n.onload=function(t){var e=new InputStream$2(t.target.result,!0);r(e)},n.onerror=o,n.readAsText(e,t)},// Creates an InputStream from a Buffer given the
811
- // encoding of the bytes in that buffer (defaults to 'utf8' if
812
- // encoding is null).
813
- fromBuffer:function(e,t){return new InputStream$2(e.toString(t),!0)},// Asynchronously creates an InputStream from a file on disk given
814
- // the encoding of the bytes in that file (defaults to 'utf8' if
815
- // encoding is null).
816
- //
817
- // Invokes callback(error, result) on completion.
818
- fromPath:function(e,t,r){fs$1.readFile(e,t,function(e,t){var o=null;null!==t&&(o=new InputStream$2(t,!0)),r(e,o)})},// Synchronously creates an InputStream given a path to a file
819
- // on disk and the encoding of the bytes in that file (defaults to
820
- // 'utf8' if encoding is null).
821
- fromPathSync:function(e,t){var r=fs$1.readFileSync(e,t);return new InputStream$2(r,!0)}},CharStreams_2=CharStreams$1,CharStreams_1={CharStreams:CharStreams_2},InputStream$1=InputStream_1.InputStream,isNodeJs="undefined"==typeof window&&"undefined"==typeof importScripts,fs=isNodeJs?fs__default["default"]:null;function FileStream$1(e,t){var r=fs.readFileSync(e,"utf8");return InputStream$1.call(this,r,t),this.fileName=e,this}FileStream$1.prototype=Object.create(InputStream$1.prototype),FileStream$1.prototype.constructor=FileStream$1;var FileStream_2=FileStream$1,FileStream_1={FileStream:FileStream_2},Token$3=Token_1.Token,Lexer$2=Lexer_1.Lexer,Interval$1=IntervalSet_1.Interval;// this is just to keep meaningful parameter types to Parser
822
- function TokenStream(){return this}function BufferedTokenStream$1(e){return TokenStream.call(this),this.tokenSource=e,this.tokens=[],this.index=-1,this.fetchedEOF=!1,this}BufferedTokenStream$1.prototype=Object.create(TokenStream.prototype),BufferedTokenStream$1.prototype.constructor=BufferedTokenStream$1,BufferedTokenStream$1.prototype.mark=function(){return 0},BufferedTokenStream$1.prototype.release=function(){// no resources to release
823
- },BufferedTokenStream$1.prototype.reset=function(){this.seek(0)},BufferedTokenStream$1.prototype.seek=function(e){this.lazyInit(),this.index=this.adjustSeekIndex(e)},BufferedTokenStream$1.prototype.get=function(e){return this.lazyInit(),this.tokens[e]},BufferedTokenStream$1.prototype.consume=function(){var e=!1;if(e=!!(0<=this.index)&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length),!e&&this.LA(1)===Token$3.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))},BufferedTokenStream$1.prototype.sync=function(e){var t=e-this.tokens.length+1;// how many more elements we need?
824
- if(0<t){var r=this.fetch(t);return r>=t}return!0},BufferedTokenStream$1.prototype.fetch=function(e){if(this.fetchedEOF)return 0;for(var r=0,o;r<e;r++)if(o=this.tokenSource.nextToken(),o.tokenIndex=this.tokens.length,this.tokens.push(o),o.type===Token$3.EOF)return this.fetchedEOF=!0,r+1;return e},BufferedTokenStream$1.prototype.getTokens=function(e,r,o){if(void 0===o&&(o=null),0>e||0>r)return null;this.lazyInit();var n=[];r>=this.tokens.length&&(r=this.tokens.length-1);for(var a=e,p;a<r&&(p=this.tokens[a],p.type!==Token$3.EOF);a++)(null===o||o.contains(p.type))&&n.push(p);return n},BufferedTokenStream$1.prototype.LA=function(e){return this.LT(e).type},BufferedTokenStream$1.prototype.LB=function(e){return 0>this.index-e?null:this.tokens[this.index-e]},BufferedTokenStream$1.prototype.LT=function(e){if(this.lazyInit(),0===e)return null;if(0>e)return this.LB(-e);var t=this.index+e-1;return this.sync(t),t>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[t]},BufferedTokenStream$1.prototype.adjustSeekIndex=function(e){return e},BufferedTokenStream$1.prototype.lazyInit=function(){-1===this.index&&this.setup()},BufferedTokenStream$1.prototype.setup=function(){this.sync(0),this.index=this.adjustSeekIndex(0)},BufferedTokenStream$1.prototype.setTokenSource=function(e){this.tokenSource=e,this.tokens=[],this.index=-1,this.fetchedEOF=!1},BufferedTokenStream$1.prototype.nextTokenOnChannel=function(e){if(this.sync(e),e>=this.tokens.length)return-1;for(var t=this.tokens[e];t.channel!==this.channel;){if(t.type===Token$3.EOF)return-1;e+=1,this.sync(e),t=this.tokens[e]}return e},BufferedTokenStream$1.prototype.previousTokenOnChannel=function(e,t){for(;0<=e&&this.tokens[e].channel!==t;)e-=1;return e},BufferedTokenStream$1.prototype.getHiddenTokensToRight=function(e,t){if(void 0===t&&(t=-1),this.lazyInit(),0>e||e>=this.tokens.length)throw""+e+" not in 0.."+this.tokens.length-1;var r=this.nextTokenOnChannel(e+1,Lexer$2.DEFAULT_TOKEN_CHANNEL),o=-1===r?this.tokens.length-1:r;return this.filterForChannel(e+1,o,t)},BufferedTokenStream$1.prototype.getHiddenTokensToLeft=function(e,t){if(void 0===t&&(t=-1),this.lazyInit(),0>e||e>=this.tokens.length)throw""+e+" not in 0.."+this.tokens.length-1;var r=this.previousTokenOnChannel(e-1,Lexer$2.DEFAULT_TOKEN_CHANNEL);if(r===e-1)return null;// if none on channel to left, prevOnChannel=-1 then from=0
825
- return this.filterForChannel(r+1,e-1,t)},BufferedTokenStream$1.prototype.filterForChannel=function(e,r,o){for(var n=[],a=e,p;a<r+1;a++)p=this.tokens[a],-1===o?p.channel!==Lexer$2.DEFAULT_TOKEN_CHANNEL&&n.push(p):p.channel===o&&n.push(p);return 0===n.length?null:n},BufferedTokenStream$1.prototype.getSourceName=function(){return this.tokenSource.getSourceName()},BufferedTokenStream$1.prototype.getText=function(e){this.lazyInit(),this.fill(),(void 0===e||null===e)&&(e=new Interval$1(0,this.tokens.length-1));var r=e.start;r instanceof Token$3&&(r=r.tokenIndex);var o=e.stop;if(o instanceof Token$3&&(o=o.tokenIndex),null===r||null===o||0>r||0>o)return"";o>=this.tokens.length&&(o=this.tokens.length-1);for(var n="",a=r,p;a<o+1&&(p=this.tokens[a],p.type!==Token$3.EOF);a++)n+=p.text;return n},BufferedTokenStream$1.prototype.fill=function(){for(this.lazyInit();1e3===this.fetch(1e3);)continue};var BufferedTokenStream_2=BufferedTokenStream$1,BufferedTokenStream_1={BufferedTokenStream:BufferedTokenStream_2},Token$2=Token_1.Token,BufferedTokenStream=BufferedTokenStream_1.BufferedTokenStream;function CommonTokenStream$1(e,t){return BufferedTokenStream.call(this,e),this.channel=void 0===t?Token$2.DEFAULT_CHANNEL:t,this}CommonTokenStream$1.prototype=Object.create(BufferedTokenStream.prototype),CommonTokenStream$1.prototype.constructor=CommonTokenStream$1,CommonTokenStream$1.prototype.adjustSeekIndex=function(e){return this.nextTokenOnChannel(e,this.channel)},CommonTokenStream$1.prototype.LB=function(e){if(0===e||0>this.index-e)return null;// find k good tokens looking backwards
826
- for(var t=this.index,r=1;r<=e;)// skip off-channel tokens
827
- t=this.previousTokenOnChannel(t-1,this.channel),r+=1;return 0>t?null:this.tokens[t]},CommonTokenStream$1.prototype.LT=function(e){if(this.lazyInit(),0===e)return null;if(0>e)return this.LB(-e);// we know tokens[pos] is a good one
828
- // find k good tokens
829
- for(var t=this.index,r=1;r<e;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),r+=1;return this.tokens[t]},CommonTokenStream$1.prototype.getNumberOfOnChannelTokens=function(){var e=0;this.fill();for(var r=0,o;r<this.tokens.length&&(o=this.tokens[r],o.channel===this.channel&&(e+=1),o.type!==Token$2.EOF);r++);return e};var CommonTokenStream_2=CommonTokenStream$1,CommonTokenStream_1={CommonTokenStream:CommonTokenStream_2},Token$1=Token_1.Token,ParseTreeListener=Tree_1.ParseTreeListener,Recognizer=Recognizer_1.Recognizer,DefaultErrorStrategy=ErrorStrategy_1.DefaultErrorStrategy,ATNDeserializer=ATNDeserializer_1.ATNDeserializer,ATNDeserializationOptions=ATNDeserializationOptions_1.ATNDeserializationOptions,TerminalNode=Tree_1.TerminalNode,ErrorNode=Tree_1.ErrorNode;function TraceListener(e){return ParseTreeListener.call(this),this.parser=e,this}TraceListener.prototype=Object.create(ParseTreeListener.prototype),TraceListener.prototype.constructor=TraceListener,TraceListener.prototype.enterEveryRule=function(e){console.log("enter "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)},TraceListener.prototype.visitTerminal=function(e){console.log("consume "+e.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])},TraceListener.prototype.exitEveryRule=function(e){console.log("exit "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)};// this is all the parsing support code essentially; most of it is error
830
- // recovery stuff.//
831
- function Parser$1(e){return Recognizer.call(this),this._input=null,this._errHandler=new DefaultErrorStrategy,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(e),this}Parser$1.prototype=Object.create(Recognizer.prototype),Parser$1.prototype.contructor=Parser$1,Parser$1.bypassAltsAtnCache={},Parser$1.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()},Parser$1.prototype.match=function(e){var r=this.getCurrentToken();return r.type===e?(this._errHandler.reportMatch(this),this.consume()):(r=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===r.tokenIndex&&this._ctx.addErrorNode(r)),r},Parser$1.prototype.matchWildcard=function(){var e=this.getCurrentToken();return 0<e.type?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this._buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e},Parser$1.prototype.getParseListeners=function(){return this._parseListeners||[]},Parser$1.prototype.addParseListener=function(e){if(null===e)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(e)},Parser$1.prototype.removeParseListener=function(e){if(null!==this._parseListeners){var t=this._parseListeners.indexOf(e);0<=t&&this._parseListeners.splice(t,1),0===this._parseListeners.length&&(this._parseListeners=null)}},Parser$1.prototype.removeParseListeners=function(){this._parseListeners=null},Parser$1.prototype.triggerEnterRuleEvent=function(){if(null!==this._parseListeners){var e=this._ctx;this._parseListeners.map(function(t){t.enterEveryRule(e),e.enterRule(t)})}},Parser$1.prototype.triggerExitRuleEvent=function(){if(null!==this._parseListeners){// reverse order walk of listeners
832
- var e=this._ctx;this._parseListeners.slice(0).reverse().map(function(t){e.exitRule(t),t.exitEveryRule(e)})}},Parser$1.prototype.getTokenFactory=function(){return this._input.tokenSource._factory},Parser$1.prototype.setTokenFactory=function(e){this._input.tokenSource._factory=e},Parser$1.prototype.getATNWithBypassAlts=function(){var e=this.getSerializedATN();if(null===e)throw"The current parser does not support an ATN with bypass alternatives.";var t=this.bypassAltsAtnCache[e];if(null===t){var r=new ATNDeserializationOptions;r.generateRuleBypassTransitions=!0,t=new ATNDeserializer(r).deserialize(e),this.bypassAltsAtnCache[e]=t}return t};// The preferred method of getting a tree pattern. For example, here's a
833
- // sample use:
834
- //
835
- // <pre>
836
- // ParseTree t = parser.expr();
837
- // ParseTreePattern p = parser.compileParseTreePattern("&lt;ID&gt;+0",
838
- // MyParser.RULE_expr);
839
- // ParseTreeMatch m = p.match(t);
840
- // String id = m.get("ID");
841
- // </pre>
842
- var Lexer$1=Lexer_1.Lexer;Parser$1.prototype.compileParseTreePattern=function(e,t,r){if(r=r||null,null===r&&null!==this.getTokenStream()){var o=this.getTokenStream().tokenSource;o instanceof Lexer$1&&(r=o)}if(null===r)throw"Parser can't discover a lexer to use";var n=new ParseTreePatternMatcher(r,this);return n.compile(e,t)},Parser$1.prototype.getInputStream=function(){return this.getTokenStream()},Parser$1.prototype.setInputStream=function(e){this.setTokenStream(e)},Parser$1.prototype.getTokenStream=function(){return this._input},Parser$1.prototype.setTokenStream=function(e){this._input=null,this.reset(),this._input=e},Parser$1.prototype.getCurrentToken=function(){return this._input.LT(1)},Parser$1.prototype.notifyErrorListeners=function(e,t,r){t=t||null,r=r||null,null===t&&(t=this.getCurrentToken()),this._syntaxErrors+=1;var o=t.line,n=t.column,a=this.getErrorListenerDispatch();a.syntaxError(this,t,o,n,e,r)},Parser$1.prototype.consume=function(){var e=this.getCurrentToken();e.type!==Token$1.EOF&&this.getInputStream().consume();var t=null!==this._parseListeners&&0<this._parseListeners.length;if(this.buildParseTrees||t){var r;r=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(e):this._ctx.addTokenNode(e),r.invokingState=this.state,t&&this._parseListeners.map(function(e){r instanceof ErrorNode||r.isErrorNode!==void 0&&r.isErrorNode()?e.visitErrorNode(r):r instanceof TerminalNode&&e.visitTerminal(r)})}return e},Parser$1.prototype.addContextToParseTree=function(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)},Parser$1.prototype.enterRule=function(e,t){this.state=t,this._ctx=e,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),null!==this._parseListeners&&this.triggerEnterRuleEvent()},Parser$1.prototype.exitRule=function(){this._ctx.stop=this._input.LT(-1),null!==this._parseListeners&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx},Parser$1.prototype.enterOuterAlt=function(e,t){e.setAltNumber(t),this.buildParseTrees&&this._ctx!==e&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(e)),this._ctx=e},Parser$1.prototype.getPrecedence=function(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]},Parser$1.prototype.enterRecursionRule=function(e,t,r,o){this.state=t,this._precedenceStack.push(o),this._ctx=e,this._ctx.start=this._input.LT(1),null!==this._parseListeners&&this.triggerEnterRuleEvent()},Parser$1.prototype.pushNewRecursionContext=function(e,t){var r=this._ctx;r.parentCtx=e,r.invokingState=t,r.stop=this._input.LT(-1),this._ctx=e,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),null!==this._parseListeners&&this.triggerEnterRuleEvent()},Parser$1.prototype.unrollRecursionContexts=function(e){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var t=this._ctx;// save current ctx (return value)
843
- // unroll so _ctx is as it was before call to recursive method
844
- if(null!==this._parseListeners)for(;this._ctx!==e;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=e;// hook into tree
845
- t.parentCtx=e,this.buildParseTrees&&null!==e&&e.addChild(t)},Parser$1.prototype.getInvokingContext=function(e){for(var t=this._ctx;null!==t;){if(t.ruleIndex===e)return t;t=t.parentCtx}return null},Parser$1.prototype.precpred=function(e,t){return t>=this._precedenceStack[this._precedenceStack.length-1]},Parser$1.prototype.inContext=function(){// TODO: useful in parser?
846
- return!1},Parser$1.prototype.isExpectedToken=function(e){var t=this._interp.atn,r=this._ctx,o=t.states[this.state],n=t.nextTokens(o);if(n.contains(e))return!0;if(!n.contains(Token$1.EPSILON))return!1;for(;null!==r&&0<=r.invokingState&&n.contains(Token$1.EPSILON);){var a=t.states[r.invokingState],i=a.transitions[0];if(n=t.nextTokens(i.followState),n.contains(e))return!0;r=r.parentCtx}return!!(n.contains(Token$1.EPSILON)&&e===Token$1.EOF)},Parser$1.prototype.getExpectedTokens=function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)},Parser$1.prototype.getExpectedTokensWithinCurrentRule=function(){var e=this._interp.atn,t=e.states[this.state];return e.nextTokens(t)},Parser$1.prototype.getRuleIndex=function(e){var t=this.getRuleIndexMap()[e];return null===t?-1:t},Parser$1.prototype.getRuleInvocationStack=function(e){e=e||null,null===e&&(e=this._ctx);for(var t=[];null!==e;){// compute what follows who invoked us
847
- var r=e.ruleIndex;0>r?t.push("n/a"):t.push(this.ruleNames[r]),e=e.parentCtx}return t},Parser$1.prototype.getDFAStrings=function(){return this._interp.decisionToDFA.toString()},Parser$1.prototype.dumpDFA=function(){for(var e=!1,t=0,r;t<this._interp.decisionToDFA.length;t++)r=this._interp.decisionToDFA[t],0<r.states.length&&(e&&console.log(),this.printer.println("Decision "+r.decision+":"),this.printer.print(r.toString(this.literalNames,this.symbolicNames)),e=!0)},Parser$1.prototype.getSourceName=function(){return this._input.sourceName},Parser$1.prototype.setTrace=function(e){e?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new TraceListener(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)};var Parser_2=Parser$1,Parser_1={Parser:Parser_2},atn=atn$1,codepointat=codepointat$1,dfa=dfa$1,fromcodepoint=fromcodepoint$1,tree=tree$1,error=error$1,Token=Token_1.Token,CharStreams=CharStreams_1.CharStreams,CommonToken=Token_1.CommonToken,InputStream=InputStream_1.InputStream,FileStream=FileStream_1.FileStream,CommonTokenStream=CommonTokenStream_1.CommonTokenStream,Lexer=Lexer_1.Lexer,Parser=Parser_1.Parser,PredictionContextCache=PredictionContext_1.PredictionContextCache,ParserRuleContext=ParserRuleContext_1.ParserRuleContext,Interval=IntervalSet_1.Interval,Utils$1=Utils$2,antlr4={atn:atn,codepointat:codepointat,dfa:dfa,fromcodepoint:fromcodepoint,tree:tree,error:error,Token:Token,CharStreams:CharStreams,CommonToken:CommonToken,InputStream:InputStream,FileStream:FileStream,CommonTokenStream:CommonTokenStream,Lexer:Lexer,Parser:Parser,PredictionContextCache:PredictionContextCache,ParserRuleContext:ParserRuleContext,Interval:Interval,Utils:Utils$1},commonjsGlobal="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function createCommonjsModule$1(e,t){return t={exports:{}},e(t,t.exports),t.exports}var lib$2=createCommonjsModule$1(function(e,o){function u(r){return kr.Lexer.call(this,r),this._interp=new kr.atn.LexerATNSimulator(this,t,i,new kr.PredictionContextCache()),this}function r(){return n.tree.ParseTreeListener.call(this),this}function p(){return h.tree.ParseTreeVisitor.call(this),this}function c(e){return l.Parser.call(this,e),this._interp=new l.atn.ParserATNSimulator(this,E,T,C),this.ruleNames=O,this.literalNames=x,this.symbolicNames=d,this}function y(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_start,this}function A(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_statement,this}function _(r,t){return A.call(this,r),A.prototype.copyFrom.call(this,t),this}function I(r,t){return A.call(this,r),A.prototype.copyFrom.call(this,t),this}function m(r,t){return A.call(this,r),A.prototype.copyFrom.call(this,t),this}function g(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_expr,this}function L(r,t){return g.call(this,r),g.prototype.copyFrom.call(this,t),this}function S(r,t){return g.call(this,r),g.prototype.copyFrom.call(this,t),this}function v(r,t){return g.call(this,r),this.left=null,this.op=null,g.prototype.copyFrom.call(this,t),this}function P(r,t){return g.call(this,r),this.left=null,this.op=null,this.right=null,g.prototype.copyFrom.call(this,t),this}function D(r,t){return g.call(this,r),this.left=null,this.op=null,this.right=null,g.prototype.copyFrom.call(this,t),this}function M(r,t){return g.call(this,r),this.op=null,this.right=null,g.prototype.copyFrom.call(this,t),this}function k(r,t){return g.call(this,r),g.prototype.copyFrom.call(this,t),this}function U(r,t){return g.call(this,r),this.conditionalExpr=null,this.thenExpr=null,this.elseExpr=null,g.prototype.copyFrom.call(this,t),this}function F(r,t){return g.call(this,r),this.dataset=null,this.clause=null,g.prototype.copyFrom.call(this,t),this}function w(r,t){return g.call(this,r),this.left=null,this.op=null,this.right=null,g.prototype.copyFrom.call(this,t),this}function b(r,t){return g.call(this,r),g.prototype.copyFrom.call(this,t),this}function H(r,t){return g.call(this,r),g.prototype.copyFrom.call(this,t),this}function V(r,t){return g.call(this,r),this.left=null,this.op=null,this.right=null,g.prototype.copyFrom.call(this,t),this}function B(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_functions,this}function G(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function Y(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function j(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function W(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function q(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function K(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function J(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function X(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function $(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function z(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function Q(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function Z(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function et(r,t){return B.call(this,r),B.prototype.copyFrom.call(this,t),this}function tt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_datasetClause,this}function rt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_renameClause,this}function ot(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_aggrClause,this}function nt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_filterClause,this}function it(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_calcClause,this}function pt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_keepOrDropClause,this.op=null,this}function st(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_pivotOrUnpivotClause,this.op=null,this.id_=null,this.mea=null,this}function at(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_customPivotClause,this.id_=null,this.mea=null,this}function ct(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_subspaceClause,this}function lt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinOperators,this}function ut(r,t){return lt.call(this,r),this.joinKeyword=null,lt.prototype.copyFrom.call(this,t),this}function yt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_defOperators,this}function ft(r,t){return yt.call(this,r),yt.prototype.copyFrom.call(this,t),this}function Et(r,t){return yt.call(this,r),yt.prototype.copyFrom.call(this,t),this}function Rt(r,t){return yt.call(this,r),yt.prototype.copyFrom.call(this,t),this}function Tt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_genericOperators,this}function ht(r,t){return Tt.call(this,r),Tt.prototype.copyFrom.call(this,t),this}function xt(r,t){return Tt.call(this,r),Tt.prototype.copyFrom.call(this,t),this}function dt(r,t){return Tt.call(this,r),Tt.prototype.copyFrom.call(this,t),this}function Ct(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_parameter,this}function At(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_stringOperators,this}function Nt(r,t){return At.call(this,r),this.pattern=null,this.startParameter=null,this.occurrenceParameter=null,At.prototype.copyFrom.call(this,t),this}function _t(r,t){return At.call(this,r),this.op=null,At.prototype.copyFrom.call(this,t),this}function Ot(r,t){return At.call(this,r),this.startParameter=null,this.endParameter=null,At.prototype.copyFrom.call(this,t),this}function It(r,t){return At.call(this,r),this.param=null,At.prototype.copyFrom.call(this,t),this}function mt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_numericOperators,this}function gt(r,t){return mt.call(this,r),this.op=null,mt.prototype.copyFrom.call(this,t),this}function Lt(r,t){return mt.call(this,r),this.op=null,mt.prototype.copyFrom.call(this,t),this}function St(r,t){return mt.call(this,r),this.op=null,this.left=null,this.right=null,mt.prototype.copyFrom.call(this,t),this}function vt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_comparisonOperators,this}function Pt(r,t){return vt.call(this,r),this.op=null,this.from_=null,this.to_=null,vt.prototype.copyFrom.call(this,t),this}function Dt(r,t){return vt.call(this,r),this.op=null,this.pattern=null,vt.prototype.copyFrom.call(this,t),this}function Mt(r,t){return vt.call(this,r),vt.prototype.copyFrom.call(this,t),this}function kt(r,t){return vt.call(this,r),this.left=null,this.right=null,vt.prototype.copyFrom.call(this,t),this}function Ut(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_timeOperators,this}function Ft(r,t){return Ut.call(this,r),this.op=null,Ut.prototype.copyFrom.call(this,t),this}function wt(r,t){return Ut.call(this,r),Ut.prototype.copyFrom.call(this,t),this}function bt(r,t){return Ut.call(this,r),this.periodIndTo=null,this.periodIndFrom=null,this.op=null,Ut.prototype.copyFrom.call(this,t),this}function Ht(r,t){return Ut.call(this,r),Ut.prototype.copyFrom.call(this,t),this}function Vt(r,t){return Ut.call(this,r),Ut.prototype.copyFrom.call(this,t),this}function Bt(r,t){return Ut.call(this,r),Ut.prototype.copyFrom.call(this,t),this}function Gt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_setOperators,this}function Yt(r,t){return Gt.call(this,r),this.op=null,this.left=null,this.right=null,Gt.prototype.copyFrom.call(this,t),this}function jt(r,t){return Gt.call(this,r),this.left=null,Gt.prototype.copyFrom.call(this,t),this}function Wt(r,t){return Gt.call(this,r),this.left=null,Gt.prototype.copyFrom.call(this,t),this}function qt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_hierarchyOperators,this.op=null,this.hrName=null,this.ruleComponent=null,this}function Kt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_validationOperators,this}function Jt(r,t){return Kt.call(this,r),this.op=null,this.hrName=null,Kt.prototype.copyFrom.call(this,t),this}function Xt(r,t){return Kt.call(this,r),this.op=null,this.dpName=null,Kt.prototype.copyFrom.call(this,t),this}function $t(r,t){return Kt.call(this,r),this.op=null,this.codeErr=null,this.levelCode=null,this.output=null,Kt.prototype.copyFrom.call(this,t),this}function zt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_conditionalOperators,this}function te(r,t){return zt.call(this,r),this.left=null,this.right=null,zt.prototype.copyFrom.call(this,t),this}function ee(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_aggrOperatorsGrouping,this}function ie(r,t){return ee.call(this,r),this.op=null,ee.prototype.copyFrom.call(this,t),this}function ne(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_anFunction,this}function re(r,t){return ne.call(this,r),this.op=null,this.offet=null,this.defaultValue=null,this.partition=null,this.orderBy=null,ne.prototype.copyFrom.call(this,t),this}function oe(r,t){return ne.call(this,r),this.op=null,this.partition=null,ne.prototype.copyFrom.call(this,t),this}function se(r,t){return ne.call(this,r),this.op=null,this.partition=null,this.orderBy=null,this.windowing=null,ne.prototype.copyFrom.call(this,t),this}function pe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_distanceOperators,this}function he(r,t){return pe.call(this,r),this.left=null,this.right=null,pe.prototype.copyFrom.call(this,t),this}function ue(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_renameClauseItem,this.fromName=null,this.toName=null,this}function ae(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_aggregateClause,this}function ce(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_aggrFunctionClause,this}function le(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_calcClauseItem,this}function ye(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_subspaceClauseItem,this}function Re(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinClauseWithoutUsing,this}function fe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinClause,this}function Ee(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinClauseItem,this}function Ae(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinBody,this}function Te(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_joinApplyClause,this}function Ce(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_partitionByClause,this}function xe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_orderByClause,this}function de(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_orderByItem,this}function Oe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_windowingClause,this.from_=null,this.to_=null,this}function Ne(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_signedInteger,this}function Ie(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_limitClauseItem,this}function _e(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_groupingClause,this}function Le(r,t){return _e.call(this,r),_e.prototype.copyFrom.call(this,t),this}function ve(r,t){return _e.call(this,r),this.op=null,_e.prototype.copyFrom.call(this,t),this}function me(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_havingClause,this}function ge(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_parameterItem,this}function Pe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_outputParameterType,this}function Se(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_outputParameterTypeComponent,this}function Me(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_inputParameterType,this}function De(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_rulesetType,this}function Ue(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_scalarType,this}function He(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_componentType,this}function ke(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_datasetType,this}function Fe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_scalarSetType,this}function we(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_dpRuleset,this}function Ve(r,t){return we.call(this,r),we.prototype.copyFrom.call(this,t),this}function be(r,t){return we.call(this,r),we.prototype.copyFrom.call(this,t),this}function Ge(r,t){return we.call(this,r),we.prototype.copyFrom.call(this,t),this}function Be(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_hrRuleset,this}function je(r,t){return Be.call(this,r),this.vdName=null,Be.prototype.copyFrom.call(this,t),this}function Ye(r,t){return Be.call(this,r),this.varName=null,Be.prototype.copyFrom.call(this,t),this}function We(r,t){return Be.call(this,r),Be.prototype.copyFrom.call(this,t),this}function qe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_valueDomainName,this}function Je(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_rulesetID,this}function Ke(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_rulesetSignature,this}function Xe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_signature,this}function Qe(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_ruleClauseDatapoint,this}function Ze(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_ruleItemDatapoint,this.ruleName=null,this.antecedentContiditon=null,this.consequentCondition=null,this}function $e(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_ruleClauseHierarchical,this}function ze(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_ruleItemHierarchical,this.ruleName=null,this}function Qt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_hierRuleSignature,this}function Zt(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_valueDomainSignature,this}function er(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_codeItemRelation,this.codetemRef=null,this}function tr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_codeItemRelationClause,this.opAdd=null,this.rightCodeItem=null,this.rightCondition=null,this}function rr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_valueDomainValue,this}function or(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_scalarTypeConstraint,this}function nr(r,t){return or.call(this,r),or.prototype.copyFrom.call(this,t),this}function ar(r,t){return or.call(this,r),or.prototype.copyFrom.call(this,t),this}function ir(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_compConstraint,this}function pr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_multModifier,this}function sr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_validationOutput,this}function lr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_validationMode,this}function dr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_conditionClause,this}function cr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_inputMode,this}function ur(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_imbalanceExpr,this}function yr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_inputModeHierarchy,this}function mr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_outputModeHierarchy,this}function gr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_alias,this}function Er(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_varID,this}function fr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_simpleComponentId,this}function xr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_componentID,this}function Tr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_lists,this}function Rr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_erCode,this}function hr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_erLevel,this}function Cr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_comparisonOperand,this}function Ar(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_optionalExpr,this}function _r(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_componentRole,this}function Nr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_viralAttribute,this}function Or(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_valueDomainID,this}function Ir(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_operatorID,this}function Sr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_routineName,this}function Lr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_constant,this}function vr(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_basicScalarType,this}function br(r,t,o){return void 0===t&&(t=null),null==o&&(o=-1),l.ParserRuleContext.call(this,t,o),this.parser=r,this.ruleIndex=c.RULE_retainType,this}Object.defineProperty(o,"__esModule",{value:!0});var kr=require("antlr4/index"),t=new kr.atn.ATNDeserializer().deserialize("\x03\u608B\uA72A\u8133\uB9ED\u417C\u3BE7\u7786\u5964\x02\xF0\u08E5\b\x01\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\x0B\t\x0B\x04\f\t\f\x04\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04'\t'\x04(\t(\x04)\t)\x04*\t*\x04+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x044\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04<\t<\x04=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x04F\tF\x04G\tG\x04H\tH\x04I\tI\x04J\tJ\x04K\tK\x04L\tL\x04M\tM\x04N\tN\x04O\tO\x04P\tP\x04Q\tQ\x04R\tR\x04S\tS\x04T\tT\x04U\tU\x04V\tV\x04W\tW\x04X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x04]\t]\x04^\t^\x04_\t_\x04`\t`\x04a\ta\x04b\tb\x04c\tc\x04d\td\x04e\te\x04f\tf\x04g\tg\x04h\th\x04i\ti\x04j\tj\x04k\tk\x04l\tl\x04m\tm\x04n\tn\x04o\to\x04p\tp\x04q\tq\x04r\tr\x04s\ts\x04t\tt\x04u\tu\x04v\tv\x04w\tw\x04x\tx\x04y\ty\x04z\tz\x04{\t{\x04|\t|\x04}\t}\x04~\t~\x04\x7F\t\x7F\x04\x80\t\x80\x04\x81\t\x81\x04\x82\t\x82\x04\x83\t\x83\x04\x84\t\x84\x04\x85\t\x85\x04\x86\t\x86\x04\x87\t\x87\x04\x88\t\x88\x04\x89\t\x89\x04\x8A\t\x8A\x04\x8B\t\x8B\x04\x8C\t\x8C\x04\x8D\t\x8D\x04\x8E\t\x8E\x04\x8F\t\x8F\x04\x90\t\x90\x04\x91\t\x91\x04\x92\t\x92\x04\x93\t\x93\x04\x94\t\x94\x04\x95\t\x95\x04\x96\t\x96\x04\x97\t\x97\x04\x98\t\x98\x04\x99\t\x99\x04\x9A\t\x9A\x04\x9B\t\x9B\x04\x9C\t\x9C\x04\x9D\t\x9D\x04\x9E\t\x9E\x04\x9F\t\x9F\x04\xA0\t\xA0\x04\xA1\t\xA1\x04\xA2\t\xA2\x04\xA3\t\xA3\x04\xA4\t\xA4\x04\xA5\t\xA5\x04\xA6\t\xA6\x04\xA7\t\xA7\x04\xA8\t\xA8\x04\xA9\t\xA9\x04\xAA\t\xAA\x04\xAB\t\xAB\x04\xAC\t\xAC\x04\xAD\t\xAD\x04\xAE\t\xAE\x04\xAF\t\xAF\x04\xB0\t\xB0\x04\xB1\t\xB1\x04\xB2\t\xB2\x04\xB3\t\xB3\x04\xB4\t\xB4\x04\xB5\t\xB5\x04\xB6\t\xB6\x04\xB7\t\xB7\x04\xB8\t\xB8\x04\xB9\t\xB9\x04\xBA\t\xBA\x04\xBB\t\xBB\x04\xBC\t\xBC\x04\xBD\t\xBD\x04\xBE\t\xBE\x04\xBF\t\xBF\x04\xC0\t\xC0\x04\xC1\t\xC1\x04\xC2\t\xC2\x04\xC3\t\xC3\x04\xC4\t\xC4\x04\xC5\t\xC5\x04\xC6\t\xC6\x04\xC7\t\xC7\x04\xC8\t\xC8\x04\xC9\t\xC9\x04\xCA\t\xCA\x04\xCB\t\xCB\x04\xCC\t\xCC\x04\xCD\t\xCD\x04\xCE\t\xCE\x04\xCF\t\xCF\x04\xD0\t\xD0\x04\xD1\t\xD1\x04\xD2\t\xD2\x04\xD3\t\xD3\x04\xD4\t\xD4\x04\xD5\t\xD5\x04\xD6\t\xD6\x04\xD7\t\xD7\x04\xD8\t\xD8\x04\xD9\t\xD9\x04\xDA\t\xDA\x04\xDB\t\xDB\x04\xDC\t\xDC\x04\xDD\t\xDD\x04\xDE\t\xDE\x04\xDF\t\xDF\x04\xE0\t\xE0\x04\xE1\t\xE1\x04\xE2\t\xE2\x04\xE3\t\xE3\x04\xE4\t\xE4\x04\xE5\t\xE5\x04\xE6\t\xE6\x04\xE7\t\xE7\x04\xE8\t\xE8\x04\xE9\t\xE9\x04\xEA\t\xEA\x04\xEB\t\xEB\x04\xEC\t\xEC\x04\xED\t\xED\x04\xEE\t\xEE\x04\xEF\t\xEF\x04\xF0\t\xF0\x04\xF1\t\xF1\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\x0B\x03\x0B\x03\x0B\x03\f\x03\f\x03\f\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03$\x03$\x03$\x03%\x03%\x03%\x03%\x03&\x03&\x03&\x03'\x03'\x03'\x03'\x03(\x03(\x03(\x03(\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03*\x03*\x03*\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03,\x03,\x03,\x03,\x03,\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03.\x03.\x03.\x03/\x03/\x03/\x03/\x03/\x03/\x030\x030\x030\x030\x030\x031\x031\x031\x031\x031\x031\x031\x031\x032\x032\x032\x032\x032\x032\x032\x032\x032\x032\x033\x033\x033\x033\x033\x034\x034\x034\x034\x034\x034\x034\x034\x035\x035\x035\x035\x035\x035\x035\x035\x035\x036\x036\x036\x036\x036\x036\x036\x037\x037\x037\x037\x037\x037\x038\x038\x038\x038\x038\x038\x038\x038\x038\x038\x039\x039\x039\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03<\x03<\x03<\x03<\x03<\x03<\x03<\x03<\x03<\x03<\x03=\x03=\x03=\x03=\x03>\x03>\x03>\x03>\x03>\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03@\x03@\x03@\x03@\x03@\x03@\x03A\x03A\x03A\x03B\x03B\x03B\x03B\x03B\x03C\x03C\x03C\x03C\x03D\x03D\x03D\x03D\x03D\x03E\x03E\x03E\x03E\x03F\x03F\x03F\x03F\x03G\x03G\x03G\x03G\x03G\x03G\x03H\x03H\x03H\x03H\x03H\x03I\x03I\x03I\x03I\x03I\x03I\x03I\x03I\x03J\x03J\x03J\x03J\x03K\x03K\x03K\x03K\x03L\x03L\x03L\x03M\x03M\x03M\x03M\x03N\x03N\x03N\x03N\x03N\x03N\x03O\x03O\x03O\x03O\x03O\x03O\x03P\x03P\x03P\x03P\x03P\x03P\x03Q\x03Q\x03Q\x03Q\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03S\x03S\x03S\x03T\x03T\x03T\x03T\x03T\x03U\x03U\x03U\x03U\x03U\x03U\x03V\x03V\x03V\x03V\x03V\x03V\x03W\x03W\x03W\x03W\x03W\x03W\x03W\x03X\x03X\x03X\x03X\x03Y\x03Y\x03Y\x03Y\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03[\x03[\x03[\x03[\x03[\x03[\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03]\x03]\x03]\x03]\x03]\x03]\x03]\x03]\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03_\x03_\x03_\x03_\x03_\x03_\x03_\x03`\x03`\x03`\x03`\x03`\x03`\x03a\x03a\x03a\x03a\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03b\x03c\x03c\x03c\x03c\x03c\x03c\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03e\x03e\x03e\x03e\x03e\x03f\x03f\x03f\x03f\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03h\x03h\x03i\x03i\x03i\x03i\x03i\x03i\x03i\x03i\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03j\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03k\x03l\x03l\x03l\x03l\x03l\x03l\x03l\x03l\x03l\x03m\x03m\x03m\x03m\x03m\x03n\x03n\x03n\x03n\x03n\x03n\x03n\x03n\x03n\x03n\x03o\x03o\x03o\x03o\x03o\x03o\x03o\x03o\x03p\x03p\x03p\x03p\x03p\x03p\x03p\x03p\x03p\x03q\x03q\x03q\x03q\x03q\x03q\x03q\x03r\x03r\x03r\x03s\x03s\x03s\x03s\x03s\x03s\x03s\x03s\x03s\x03s\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03t\x03u\x03u\x03u\x03u\x03u\x03u\x03u\x03u\x03v\x03v\x03v\x03v\x03v\x03w\x03w\x03w\x03w\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03x\x03y\x03y\x03y\x03y\x03y\x03y\x03z\x03z\x03z\x03z\x03z\x03z\x03{\x03{\x03{\x03{\x03{\x03{\x03|\x03|\x03|\x03|\x03|\x03|\x03|\x03|\x03}\x03}\x03}\x03}\x03}\x03~\x03~\x03~\x03~\x03~\x03~\x03\x7F\x03\x7F\x03\x7F\x03\x7F\x03\x7F\x03\x80\x03\x80\x03\x80\x03\x80\x03\x81\x03\x81\x03\x81\x03\x81\x03\x81\x03\x81\x03\x81\x03\x81\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x85\x03\x85\x03\x85\x03\x85\x03\x85\x03\x85\x03\x85\x03\x85\x03\x85\x03\x86\x03\x86\x03\x86\x03\x86\x03\x86\x03\x86\x03\x87\x03\x87\x03\x87\x03\x87\x03\x87\x03\x87\x03\x87\x03\x88\x03\x88\x03\x88\x03\x88\x03\x88\x03\x88\x03\x88\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8A\x03\x8B\x03\x8B\x03\x8B\x03\x8B\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8D\x03\x8E\x03\x8E\x03\x8E\x03\x8E\x03\x8E\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x93\x03\x93\x03\x93\x03\x93\x03\x93\x03\x94\x03\x94\x03\x94\x03\x94\x03\x94\x03\x94\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x96\x03\x96\x03\x96\x03\x96\x03\x96\x03\x96\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA1\x03\xA1\x03\xA1\x03\xA1\x03\xA1\x03\xA1\x03\xA1\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA3\x03\xA3\x03\xA3\x03\xA3\x03\xA3\x03\xA4\x03\xA4\x03\xA4\x03\xA4\x03\xA4\x03\xA4\x03\xA4\x03\xA4\x03\xA5\x03\xA5\x03\xA5\x03\xA5\x03\xA5\x03\xA5\x03\xA6\x03\xA6\x03\xA6\x03\xA6\x03\xA6\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA8\x03\xA9\x03\xA9\x03\xA9\x03\xA9\x03\xA9\x03\xAA\x03\xAA\x03\xAA\x03\xAB\x03\xAB\x03\xAB\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAC\x03\xAD\x03\xAD\x03\xAD\x03\xAD\x03\xAD\x03\xAD\x03\xAD\x03\xAE\x03\xAE\x03\xAE\x03\xAF\x03\xAF\x03\xAF\x03\xAF\x03\xAF\x03\xB0\x03\xB0\x03\xB0\x03\xB0\x03\xB0\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB2\x03\xB2\x03\xB2\x03\xB2\x03\xB2\x03\xB2\x03\xB2\x03\xB3\x03\xB3\x03\xB3\x03\xB3\x03\xB3\x03\xB3\x03\xB4\x03\xB4\x03\xB4\x03\xB4\x03\xB4\x03\xB4\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB6\x03\xB6\x03\xB6\x03\xB6\x03\xB6\x03\xB6\x03\xB6\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBA\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBC\x03\xBC\x03\xBC\x03\xBC\x03\xBC\x03\xBC\x03\xBC\x03\xBC\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBE\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC2\x03\xC2\x03\xC2\x03\xC2\x03\xC2\x03\xC2\x03\xC2\x03\xC2\x03\xC3\x03\xC3\x03\xC3\x03\xC3\x03\xC4\x03\xC4\x03\xC4\x03\xC4\x03\xC4\x03\xC4\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xCA\x03\xCA\x03\xCA\x03\xCA\x03\xCA\x03\xCB\x03\xCB\x03\xCB\x03\xCB\x03\xCB\x03\xCB\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xD9\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDE\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE7\x03\xE7\x03\xE8\x03\xE8\x03\xE9\x05\xE9\u0888\n\xE9\x03\xE9\x06\xE9\u088B\n\xE9\r\xE9\x0E\xE9\u088C\x03\xEA\x03\xEA\x03\xEA\x07\xEA\u0892\n\xEA\f\xEA\x0E\xEA\u0895\x0B\xEA\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x03\xEB\x05\xEB\u08A0\n\xEB\x03\xEC\x03\xEC\x07\xEC\u08A4\n\xEC\f\xEC\x0E\xEC\u08A7\x0B\xEC\x03\xEC\x03\xEC\x03\xED\x03\xED\x07\xED\u08AD\n\xED\f\xED\x0E\xED\u08B0\x0B\xED\x03\xED\x03\xED\x06\xED\u08B4\n\xED\r\xED\x0E\xED\u08B5\x03\xED\x03\xED\x07\xED\u08BA\n\xED\f\xED\x0E\xED\u08BD\x0B\xED\x03\xED\x05\xED\u08C0\n\xED\x03\xEE\x06\xEE\u08C3\n\xEE\r\xEE\x0E\xEE\u08C4\x03\xEE\x03\xEE\x03\xEF\x03\xEF\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x07\xF0\u08CF\n\xF0\f\xF0\x0E\xF0\u08D2\x0B\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF1\x03\xF1\x03\xF1\x03\xF1\x07\xF1\u08DD\n\xF1\f\xF1\x0E\xF1\u08E0\x0B\xF1\x03\xF1\x03\xF1\x03\xF1\x03\xF1\x05\u08BB\u08D0\u08DE\x02\xF2\x03\x03\x05\x04\x07\x05\t\x06\x0B\x07\r\b\x0F\t\x11\n\x13\x0B\x15\f\x17\r\x19\x0E\x1B\x0F\x1D\x10\x1F\x11!\x12#\x13%\x14'\x15)\x16+\x17-\x18/\x191\x1A3\x1B5\x1C7\x1D9\x1E;\x1F= ?!A\"C#E$G%I&K'M(O)Q*S+U,W-Y.[/]0_1a2c3e4g5i6k7m8o9q:s;u<w=y>{?}@\x7FA\x81B\x83C\x85D\x87E\x89F\x8BG\x8DH\x8FI\x91J\x93K\x95L\x97M\x99N\x9BO\x9DP\x9FQ\xA1R\xA3S\xA5T\xA7U\xA9V\xABW\xADX\xAFY\xB1Z\xB3[\xB5\\\xB7]\xB9^\xBB_\xBD`\xBFa\xC1b\xC3c\xC5d\xC7e\xC9f\xCBg\xCDh\xCFi\xD1j\xD3k\xD5l\xD7m\xD9n\xDBo\xDDp\xDFq\xE1r\xE3s\xE5t\xE7u\xE9v\xEBw\xEDx\xEFy\xF1z\xF3{\xF5|\xF7}\xF9~\xFB\x7F\xFD\x80\xFF\x81\u0101\x82\u0103\x83\u0105\x84\u0107\x85\u0109\x86\u010B\x87\u010D\x88\u010F\x89\u0111\x8A\u0113\x8B\u0115\x8C\u0117\x8D\u0119\x8E\u011B\x8F\u011D\x90\u011F\x91\u0121\x92\u0123\x93\u0125\x94\u0127\x95\u0129\x96\u012B\x97\u012D\x98\u012F\x99\u0131\x9A\u0133\x9B\u0135\x9C\u0137\x9D\u0139\x9E\u013B\x9F\u013D\xA0\u013F\xA1\u0141\xA2\u0143\xA3\u0145\xA4\u0147\xA5\u0149\xA6\u014B\xA7\u014D\xA8\u014F\xA9\u0151\xAA\u0153\xAB\u0155\xAC\u0157\xAD\u0159\xAE\u015B\xAF\u015D\xB0\u015F\xB1\u0161\xB2\u0163\xB3\u0165\xB4\u0167\xB5\u0169\xB6\u016B\xB7\u016D\xB8\u016F\xB9\u0171\xBA\u0173\xBB\u0175\xBC\u0177\xBD\u0179\xBE\u017B\xBF\u017D\xC0\u017F\xC1\u0181\xC2\u0183\xC3\u0185\xC4\u0187\xC5\u0189\xC6\u018B\xC7\u018D\xC8\u018F\xC9\u0191\xCA\u0193\xCB\u0195\xCC\u0197\xCD\u0199\xCE\u019B\xCF\u019D\xD0\u019F\xD1\u01A1\xD2\u01A3\xD3\u01A5\xD4\u01A7\xD5\u01A9\xD6\u01AB\xD7\u01AD\xD8\u01AF\xD9\u01B1\xDA\u01B3\xDB\u01B5\xDC\u01B7\xDD\u01B9\xDE\u01BB\xDF\u01BD\xE0\u01BF\xE1\u01C1\xE2\u01C3\xE3\u01C5\xE4\u01C7\xE5\u01C9\xE6\u01CB\xE7\u01CD\x02\u01CF\x02\u01D1\xE8\u01D3\xE9\u01D5\xEA\u01D7\xEB\u01D9\xEC\u01DB\xED\u01DD\xEE\u01DF\xEF\u01E1\xF0\x03\x02\x06\x04\x02C\\c|\x03\x02$$\x07\x02002;C\\aac|\x05\x02\x0B\f\x0E\x0F\"\"\x02\u08EF\x02\x03\x03\x02\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02\x0B\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02'\x03\x02\x02\x02\x02)\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02\x02\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02K\x03\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03\x02\x02\x02\x02S\x03\x02\x02\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02\x02\x02Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02_\x03\x02\x02\x02\x02a\x03\x02\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02\x02\x02\x02g\x03\x02\x02\x02\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02\x02m\x03\x02\x02\x02\x02o\x03\x02\x02\x02\x02q\x03\x02\x02\x02\x02s\x03\x02\x02\x02\x02u\x03\x02\x02\x02\x02w\x03\x02\x02\x02\x02y\x03\x02\x02\x02\x02{\x03\x02\x02\x02\x02}\x03\x02\x02\x02\x02\x7F\x03\x02\x02\x02\x02\x81\x03\x02\x02\x02\x02\x83\x03\x02\x02\x02\x02\x85\x03\x02\x02\x02\x02\x87\x03\x02\x02\x02\x02\x89\x03\x02\x02\x02\x02\x8B\x03\x02\x02\x02\x02\x8D\x03\x02\x02\x02\x02\x8F\x03\x02\x02\x02\x02\x91\x03\x02\x02\x02\x02\x93\x03\x02\x02\x02\x02\x95\x03\x02\x02\x02\x02\x97\x03\x02\x02\x02\x02\x99\x03\x02\x02\x02\x02\x9B\x03\x02\x02\x02\x02\x9D\x03\x02\x02\x02\x02\x9F\x03\x02\x02\x02\x02\xA1\x03\x02\x02\x02\x02\xA3\x03\x02\x02\x02\x02\xA5\x03\x02\x02\x02\x02\xA7\x03\x02\x02\x02\x02\xA9\x03\x02\x02\x02\x02\xAB\x03\x02\x02\x02\x02\xAD\x03\x02\x02\x02\x02\xAF\x03\x02\x02\x02\x02\xB1\x03\x02\x02\x02\x02\xB3\x03\x02\x02\x02\x02\xB5\x03\x02\x02\x02\x02\xB7\x03\x02\x02\x02\x02\xB9\x03\x02\x02\x02\x02\xBB\x03\x02\x02\x02\x02\xBD\x03\x02\x02\x02\x02\xBF\x03\x02\x02\x02\x02\xC1\x03\x02\x02\x02\x02\xC3\x03\x02\x02\x02\x02\xC5\x03\x02\x02\x02\x02\xC7\x03\x02\x02\x02\x02\xC9\x03\x02\x02\x02\x02\xCB\x03\x02\x02\x02\x02\xCD\x03\x02\x02\x02\x02\xCF\x03\x02\x02\x02\x02\xD1\x03\x02\x02\x02\x02\xD3\x03\x02\x02\x02\x02\xD5\x03\x02\x02\x02\x02\xD7\x03\x02\x02\x02\x02\xD9\x03\x02\x02\x02\x02\xDB\x03\x02\x02\x02\x02\xDD\x03\x02\x02\x02\x02\xDF\x03\x02\x02\x02\x02\xE1\x03\x02\x02\x02\x02\xE3\x03\x02\x02\x02\x02\xE5\x03\x02\x02\x02\x02\xE7\x03\x02\x02\x02\x02\xE9\x03\x02\x02\x02\x02\xEB\x03\x02\x02\x02\x02\xED\x03\x02\x02\x02\x02\xEF\x03\x02\x02\x02\x02\xF1\x03\x02\x02\x02\x02\xF3\x03\x02\x02\x02\x02\xF5\x03\x02\x02\x02\x02\xF7\x03\x02\x02\x02\x02\xF9\x03\x02\x02\x02\x02\xFB\x03\x02\x02\x02\x02\xFD\x03\x02\x02\x02\x02\xFF\x03\x02\x02\x02\x02\u0101\x03\x02\x02\x02\x02\u0103\x03\x02\x02\x02\x02\u0105\x03\x02\x02\x02\x02\u0107\x03\x02\x02\x02\x02\u0109\x03\x02\x02\x02\x02\u010B\x03\x02\x02\x02\x02\u010D\x03\x02\x02\x02\x02\u010F\x03\x02\x02\x02\x02\u0111\x03\x02\x02\x02\x02\u0113\x03\x02\x02\x02\x02\u0115\x03\x02\x02\x02\x02\u0117\x03\x02\x02\x02\x02\u0119\x03\x02\x02\x02\x02\u011B\x03\x02\x02\x02\x02\u011D\x03\x02\x02\x02\x02\u011F\x03\x02\x02\x02\x02\u0121\x03\x02\x02\x02\x02\u0123\x03\x02\x02\x02\x02\u0125\x03\x02\x02\x02\x02\u0127\x03\x02\x02\x02\x02\u0129\x03\x02\x02\x02\x02\u012B\x03\x02\x02\x02\x02\u012D\x03\x02\x02\x02\x02\u012F\x03\x02\x02\x02\x02\u0131\x03\x02\x02\x02\x02\u0133\x03\x02\x02\x02\x02\u0135\x03\x02\x02\x02\x02\u0137\x03\x02\x02\x02\x02\u0139\x03\x02\x02\x02\x02\u013B\x03\x02\x02\x02\x02\u013D\x03\x02\x02\x02\x02\u013F\x03\x02\x02\x02\x02\u0141\x03\x02\x02\x02\x02\u0143\x03\x02\x02\x02\x02\u0145\x03\x02\x02\x02\x02\u0147\x03\x02\x02\x02\x02\u0149\x03\x02\x02\x02\x02\u014B\x03\x02\x02\x02\x02\u014D\x03\x02\x02\x02\x02\u014F\x03\x02\x02\x02\x02\u0151\x03\x02\x02\x02\x02\u0153\x03\x02\x02\x02\x02\u0155\x03\x02\x02\x02\x02\u0157\x03\x02\x02\x02\x02\u0159\x03\x02\x02\x02\x02\u015B\x03\x02\x02\x02\x02\u015D\x03\x02\x02\x02\x02\u015F\x03\x02\x02\x02\x02\u0161\x03\x02\x02\x02\x02\u0163\x03\x02\x02\x02\x02\u0165\x03\x02\x02\x02\x02\u0167\x03\x02\x02\x02\x02\u0169\x03\x02\x02\x02\x02\u016B\x03\x02\x02\x02\x02\u016D\x03\x02\x02\x02\x02\u016F\x03\x02\x02\x02\x02\u0171\x03\x02\x02\x02\x02\u0173\x03\x02\x02\x02\x02\u0175\x03\x02\x02\x02\x02\u0177\x03\x02\x02\x02\x02\u0179\x03\x02\x02\x02\x02\u017B\x03\x02\x02\x02\x02\u017D\x03\x02\x02\x02\x02\u017F\x03\x02\x02\x02\x02\u0181\x03\x02\x02\x02\x02\u0183\x03\x02\x02\x02\x02\u0185\x03\x02\x02\x02\x02\u0187\x03\x02\x02\x02\x02\u0189\x03\x02\x02\x02\x02\u018B\x03\x02\x02\x02\x02\u018D\x03\x02\x02\x02\x02\u018F\x03\x02\x02\x02\x02\u0191\x03\x02\x02\x02\x02\u0193\x03\x02\x02\x02\x02\u0195\x03\x02\x02\x02\x02\u0197\x03\x02\x02\x02\x02\u0199\x03\x02\x02\x02\x02\u019B\x03\x02\x02\x02\x02\u019D\x03\x02\x02\x02\x02\u019F\x03\x02\x02\x02\x02\u01A1\x03\x02\x02\x02\x02\u01A3\x03\x02\x02\x02\x02\u01A5\x03\x02\x02\x02\x02\u01A7\x03\x02\x02\x02\x02\u01A9\x03\x02\x02\x02\x02\u01AB\x03\x02\x02\x02\x02\u01AD\x03\x02\x02\x02\x02\u01AF\x03\x02\x02\x02\x02\u01B1\x03\x02\x02\x02\x02\u01B3\x03\x02\x02\x02\x02\u01B5\x03\x02\x02\x02\x02\u01B7\x03\x02\x02\x02\x02\u01B9\x03\x02\x02\x02\x02\u01BB\x03\x02\x02\x02\x02\u01BD\x03\x02\x02\x02\x02\u01BF\x03\x02\x02\x02\x02\u01C1\x03\x02\x02\x02\x02\u01C3\x03\x02\x02\x02\x02\u01C5\x03\x02\x02\x02\x02\u01C7\x03\x02\x02\x02\x02\u01C9\x03\x02\x02\x02\x02\u01CB\x03\x02\x02\x02\x02\u01D1\x03\x02\x02\x02\x02\u01D3\x03\x02\x02\x02\x02\u01D5\x03\x02\x02\x02\x02\u01D7\x03\x02\x02\x02\x02\u01D9\x03\x02\x02\x02\x02\u01DB\x03\x02\x02\x02\x02\u01DD\x03\x02\x02\x02\x02\u01DF\x03\x02\x02\x02\x02\u01E1\x03\x02\x02\x02\x03\u01E3\x03\x02\x02\x02\x05\u01E5\x03\x02\x02\x02\x07\u01E7\x03\x02\x02\x02\t\u01E9\x03\x02\x02\x02\x0B\u01EB\x03\x02\x02\x02\r\u01ED\x03\x02\x02\x02\x0F\u01EF\x03\x02\x02\x02\x11\u01F1\x03\x02\x02\x02\x13\u01F3\x03\x02\x02\x02\x15\u01F5\x03\x02\x02\x02\x17\u01F8\x03\x02\x02\x02\x19\u01FB\x03\x02\x02\x02\x1B\u01FE\x03\x02\x02\x02\x1D\u0200\x03\x02\x02\x02\x1F\u0202\x03\x02\x02\x02!\u0204\x03\x02\x02\x02#\u0206\x03\x02\x02\x02%\u0208\x03\x02\x02\x02'\u020B\x03\x02\x02\x02)\u020D\x03\x02\x02\x02+\u0210\x03\x02\x02\x02-\u0212\x03\x02\x02\x02/\u0217\x03\x02\x02\x021\u021A\x03\x02\x02\x023\u021F\x03\x02\x02\x025\u0224\x03\x02\x02\x027\u022A\x03\x02\x02\x029\u022F\x03\x02\x02\x02;\u023C\x03\x02\x02\x02=\u023F\x03\x02\x02\x02?\u0244\x03\x02\x02\x02A\u0249\x03\x02\x02\x02C\u024E\x03\x02\x02\x02E\u0257\x03\x02\x02\x02G\u025E\x03\x02\x02\x02I\u0261\x03\x02\x02\x02K\u0265\x03\x02\x02\x02M\u0268\x03\x02\x02\x02O\u026C\x03\x02\x02\x02Q\u0270\x03\x02\x02\x02S\u0278\x03\x02\x02\x02U\u027B\x03\x02\x02\x02W\u0282\x03\x02\x02\x02Y\u0287\x03\x02\x02\x02[\u028E\x03\x02\x02\x02]\u0291\x03\x02\x02\x02_\u0297\x03\x02\x02\x02a\u029C\x03\x02\x02\x02c\u02A4\x03\x02\x02\x02e\u02AE\x03\x02\x02\x02g\u02B3\x03\x02\x02\x02i\u02BB\x03\x02\x02\x02k\u02C4\x03\x02\x02\x02m\u02CB\x03\x02\x02\x02o\u02D1\x03\x02\x02\x02q\u02DB\x03\x02\x02\x02s\u02DE\x03\x02\x02\x02u\u02E5\x03\x02\x02\x02w\u02EF\x03\x02\x02\x02y\u02F9\x03\x02\x02\x02{\u02FD\x03\x02\x02\x02}\u0302\x03\x02\x02\x02\x7F\u030D\x03\x02\x02\x02\x81\u0313\x03\x02\x02\x02\x83\u0316\x03\x02\x02\x02\x85\u031B\x03\x02\x02\x02\x87\u031F\x03\x02\x02\x02\x89\u0324\x03\x02\x02\x02\x8B\u0328\x03\x02\x02\x02\x8D\u032C\x03\x02\x02\x02\x8F\u0332\x03\x02\x02\x02\x91\u0337\x03\x02\x02\x02\x93\u033F\x03\x02\x02\x02\x95\u0343\x03\x02\x02\x02\x97\u0347\x03\x02\x02\x02\x99\u034A\x03\x02\x02\x02\x9B\u034E\x03\x02\x02\x02\x9D\u0354\x03\x02\x02\x02\x9F\u035A\x03\x02\x02\x02\xA1\u0360\x03\x02\x02\x02\xA3\u0364\x03\x02\x02\x02\xA5\u036B\x03\x02\x02\x02\xA7\u036E\x03\x02\x02\x02\xA9\u0373\x03\x02\x02\x02\xAB\u0379\x03\x02\x02\x02\xAD\u037F\x03\x02\x02\x02\xAF\u0386\x03\x02\x02\x02\xB1\u038A\x03\x02\x02\x02\xB3\u038E\x03\x02\x02\x02\xB5\u0395\x03\x02\x02\x02\xB7\u039B\x03\x02\x02\x02\xB9\u03A6\x03\x02\x02\x02\xBB\u03AE\x03\x02\x02\x02\xBD\u03B8\x03\x02\x02\x02\xBF\u03BF\x03\x02\x02\x02\xC1\u03C5\x03\x02\x02\x02\xC3\u03C9\x03\x02\x02\x02\xC5\u03D7\x03\x02\x02\x02\xC7\u03DD\x03\x02\x02\x02\xC9\u03EE\x03\x02\x02\x02\xCB\u03F3\x03\x02\x02\x02\xCD\u03F7\x03\x02\x02\x02\xCF\u0401\x03\x02\x02\x02\xD1\u0403\x03\x02\x02\x02\xD3\u040B\x03\x02\x02\x02\xD5\u0417\x03\x02\x02\x02\xD7\u0423\x03\x02\x02\x02\xD9\u042C\x03\x02\x02\x02\xDB\u0431\x03\x02\x02\x02\xDD\u043B\x03\x02\x02\x02\xDF\u0443\x03\x02\x02\x02\xE1\u044C\x03\x02\x02\x02\xE3\u0453\x03\x02\x02\x02\xE5\u0456\x03\x02\x02\x02\xE7\u0460\x03\x02\x02\x02\xE9\u046D\x03\x02\x02\x02\xEB\u0475\x03\x02\x02\x02\xED\u047A\x03\x02\x02\x02\xEF\u047E\x03\x02\x02\x02\xF1\u048B\x03\x02\x02\x02\xF3\u0491\x03\x02\x02\x02\xF5\u0497\x03\x02\x02\x02\xF7\u049D\x03\x02\x02\x02\xF9\u04A5\x03\x02\x02\x02\xFB\u04AA\x03\x02\x02\x02\xFD\u04B0\x03\x02\x02\x02\xFF\u04B5\x03\x02\x02\x02\u0101\u04B9\x03\x02\x02\x02\u0103\u04C1\x03\x02\x02\x02\u0105\u04CC\x03\x02\x02\x02\u0107\u04D8\x03\x02\x02\x02\u0109\u04E0\x03\x02\x02\x02\u010B\u04E9\x03\x02\x02\x02\u010D\u04EF\x03\x02\x02\x02\u010F\u04F6\x03\x02\x02\x02\u0111\u04FD\x03\x02\x02\x02\u0113\u0509\x03\x02\x02\x02\u0115\u0514\x03\x02\x02\x02\u0117\u0518\x03\x02\x02\x02\u0119\u051D\x03\x02\x02\x02\u011B\u052D\x03\x02\x02\x02\u011D\u0532\x03\x02\x02\x02\u011F\u053C\x03\x02\x02\x02\u0121\u0546\x03\x02\x02\x02\u0123\u0550\x03\x02\x02\x02\u0125\u055A\x03\x02\x02\x02\u0127\u055F\x03\x02\x02\x02\u0129\u0565\x03\x02\x02\x02\u012B\u056D\x03\x02\x02\x02\u012D\u0573\x03\x02\x02\x02\u012F\u0584\x03\x02\x02\x02\u0131\u0592\x03\x02\x02\x02\u0133\u05A0\x03\x02\x02\x02\u0135\u05AA\x03\x02\x02\x02\u0137\u05B3\x03\x02\x02\x02\u0139\u05BF\x03\x02\x02\x02\u013B\u05C9\x03\x02\x02\x02\u013D\u05D1\x03\x02\x02\x02\u013F\u05D6\x03\x02\x02\x02\u0141\u05E2\x03\x02\x02\x02\u0143\u05E9\x03\x02\x02\x02\u0145\u05F0\x03\x02\x02\x02\u0147\u05F5\x03\x02\x02\x02\u0149\u05FD\x03\x02\x02\x02\u014B\u0603\x03\x02\x02\x02\u014D\u0608\x03\x02\x02\x02\u014F\u060F\x03\x02\x02\x02\u0151\u0618\x03\x02\x02\x02\u0153\u061D\x03\x02\x02\x02\u0155\u0620\x03\x02\x02\x02\u0157\u0623\x03\x02\x02\x02\u0159\u062D\x03\x02\x02\x02\u015B\u0634\x03\x02\x02\x02\u015D\u0637\x03\x02\x02\x02\u015F\u063C\x03\x02\x02\x02\u0161\u0641\x03\x02\x02\x02\u0163\u064C\x03\x02\x02\x02\u0165\u0653\x03\x02\x02\x02\u0167\u0659\x03\x02\x02\x02\u0169\u065F\x03\x02\x02\x02\u016B\u0667\x03\x02\x02\x02\u016D\u066E\x03\x02\x02\x02\u016F\u0679\x03\x02\x02\x02\u0171\u0683\x03\x02\x02\x02\u0173\u068E\x03\x02\x02\x02\u0175\u0698\x03\x02\x02\x02\u0177\u06A2\x03\x02\x02\x02\u0179\u06AA\x03\x02\x02\x02\u017B\u06B1\x03\x02\x02\x02\u017D\u06BA\x03\x02\x02\x02\u017F\u06C2\x03\x02\x02\x02\u0181\u06C8\x03\x02\x02\x02\u0183\u06D4\x03\x02\x02\x02\u0185\u06DC\x03\x02\x02\x02\u0187\u06E0\x03\x02\x02\x02\u0189\u06E6\x03\x02\x02\x02\u018B\u06F2\x03\x02\x02\x02\u018D\u0703\x03\x02\x02\x02\u018F\u070A\x03\x02\x02\x02\u0191\u0713\x03\x02\x02\x02\u0193\u071C\x03\x02\x02\x02\u0195\u0721\x03\x02\x02\x02\u0197\u0727\x03\x02\x02\x02\u0199\u0734\x03\x02\x02\x02\u019B\u073E\x03\x02\x02\x02\u019D\u0744\x03\x02\x02\x02\u019F\u074B\x03\x02\x02\x02\u01A1\u0750\x03\x02\x02\x02\u01A3\u075E\x03\x02\x02\x02\u01A5\u076F\x03\x02\x02\x02\u01A7\u0777\x03\x02\x02\x02\u01A9\u0787\x03\x02\x02\x02\u01AB\u0797\x03\x02\x02\x02\u01AD\u07A0\x03\x02\x02\x02\u01AF\u07A9\x03\x02\x02\x02\u01B1\u07B2\x03\x02\x02\x02\u01B3\u07BF\x03\x02\x02\x02\u01B5\u07CC\x03\x02\x02\x02\u01B7\u07D8\x03\x02\x02\x02\u01B9\u07E4\x03\x02\x02\x02\u01BB\u07EF\x03\x02\x02\x02\u01BD\u07FC\x03\x02\x02\x02\u01BF\u0803\x03\x02\x02\x02\u01C1\u080D\x03\x02\x02\x02\u01C3\u0827\x03\x02\x02\x02\u01C5\u083E\x03\x02\x02\x02\u01C7\u085B\x03\x02\x02\x02\u01C9\u0875\x03\x02\x02\x02\u01CB\u0879\x03\x02\x02\x02\u01CD\u0882\x03\x02\x02\x02\u01CF\u0884\x03\x02\x02\x02\u01D1\u0887\x03\x02\x02\x02\u01D3\u088E\x03\x02\x02\x02\u01D5\u089F\x03\x02\x02\x02\u01D7\u08A1\x03\x02\x02\x02\u01D9\u08BF\x03\x02\x02\x02\u01DB\u08C2\x03\x02\x02\x02\u01DD\u08C8\x03\x02\x02\x02\u01DF\u08CA\x03\x02\x02\x02\u01E1\u08D8\x03\x02\x02\x02\u01E3\u01E4\x07*\x02\x02\u01E4\x04\x03\x02\x02\x02\u01E5\u01E6\x07+\x02\x02\u01E6\x06\x03\x02\x02\x02\u01E7\u01E8\x07]\x02\x02\u01E8\b\x03\x02\x02\x02\u01E9\u01EA\x07_\x02\x02\u01EA\n\x03\x02\x02\x02\u01EB\u01EC\x07}\x02\x02\u01EC\f\x03\x02\x02\x02\u01ED\u01EE\x07\x7F\x02\x02\u01EE\x0E\x03\x02\x02\x02\u01EF\u01F0\x07?\x02\x02\u01F0\x10\x03\x02\x02\x02\u01F1\u01F2\x07>\x02\x02\u01F2\x12\x03\x02\x02\x02\u01F3\u01F4\x07@\x02\x02\u01F4\x14\x03\x02\x02\x02\u01F5\u01F6\x07@\x02\x02\u01F6\u01F7\x07?\x02\x02\u01F7\x16\x03\x02\x02\x02\u01F8\u01F9\x07>\x02\x02\u01F9\u01FA\x07@\x02\x02\u01FA\x18\x03\x02\x02\x02\u01FB\u01FC\x07>\x02\x02\u01FC\u01FD\x07?\x02\x02\u01FD\x1A\x03\x02\x02\x02\u01FE\u01FF\x07-\x02\x02\u01FF\x1C\x03\x02\x02\x02\u0200\u0201\x07/\x02\x02\u0201\x1E\x03\x02\x02\x02\u0202\u0203\x07,\x02\x02\u0203 \x03\x02\x02\x02\u0204\u0205\x071\x02\x02\u0205\"\x03\x02\x02\x02\u0206\u0207\x07.\x02\x02\u0207$\x03\x02\x02\x02\u0208\u0209\x07/\x02\x02\u0209\u020A\x07@\x02\x02\u020A&\x03\x02\x02\x02\u020B\u020C\x07<\x02\x02\u020C(\x03\x02\x02\x02\u020D\u020E\x07<\x02\x02\u020E\u020F\x07?\x02\x02\u020F*\x03\x02\x02\x02\u0210\u0211\x07%\x02\x02\u0211,\x03\x02\x02\x02\u0212\u0213\x07g\x02\x02\u0213\u0214\x07x\x02\x02\u0214\u0215\x07c\x02\x02\u0215\u0216\x07n\x02\x02\u0216.\x03\x02\x02\x02\u0217\u0218\x07k\x02\x02\u0218\u0219\x07h\x02\x02\u02190\x03\x02\x02\x02\u021A\u021B\x07v\x02\x02\u021B\u021C\x07j\x02\x02\u021C\u021D\x07g\x02\x02\u021D\u021E\x07p\x02\x02\u021E2\x03\x02\x02\x02\u021F\u0220\x07g\x02\x02\u0220\u0221\x07n\x02\x02\u0221\u0222\x07u\x02\x02\u0222\u0223\x07g\x02\x02\u02234\x03\x02\x02\x02\u0224\u0225\x07w\x02\x02\u0225\u0226\x07u\x02\x02\u0226\u0227\x07k\x02\x02\u0227\u0228\x07p\x02\x02\u0228\u0229\x07i\x02\x02\u02296\x03\x02\x02\x02\u022A\u022B\x07y\x02\x02\u022B\u022C\x07k\x02\x02\u022C\u022D\x07v\x02\x02\u022D\u022E\x07j\x02\x02\u022E8\x03\x02\x02\x02\u022F\u0230\x07e\x02\x02\u0230\u0231\x07w\x02\x02\u0231\u0232\x07t\x02\x02\u0232\u0233\x07t\x02\x02\u0233\u0234\x07g\x02\x02\u0234\u0235\x07p\x02\x02\u0235\u0236\x07v\x02\x02\u0236\u0237\x07a\x02\x02\u0237\u0238\x07f\x02\x02\u0238\u0239\x07c\x02\x02\u0239\u023A\x07v\x02\x02\u023A\u023B\x07g\x02\x02\u023B:\x03\x02\x02\x02\u023C\u023D\x07q\x02\x02\u023D\u023E\x07p\x02\x02\u023E<\x03\x02\x02\x02\u023F\u0240\x07f\x02\x02\u0240\u0241\x07t\x02\x02\u0241\u0242\x07q\x02\x02\u0242\u0243\x07r\x02\x02\u0243>\x03\x02\x02\x02\u0244\u0245\x07m\x02\x02\u0245\u0246\x07g\x02\x02\u0246\u0247\x07g\x02\x02\u0247\u0248\x07r\x02\x02\u0248@\x03\x02\x02\x02\u0249\u024A\x07e\x02\x02\u024A\u024B\x07c\x02\x02\u024B\u024C\x07n\x02\x02\u024C\u024D\x07e\x02\x02\u024DB\x03\x02\x02\x02\u024E\u024F\x07c\x02\x02\u024F\u0250\x07v\x02\x02\u0250\u0251\x07v\x02\x02\u0251\u0252\x07t\x02\x02\u0252\u0253\x07e\x02\x02\u0253\u0254\x07c\x02\x02\u0254\u0255\x07n\x02\x02\u0255\u0256\x07e\x02\x02\u0256D\x03\x02\x02\x02\u0257\u0258\x07t\x02\x02\u0258\u0259\x07g\x02\x02\u0259\u025A\x07p\x02\x02\u025A\u025B\x07c\x02\x02\u025B\u025C\x07o\x02\x02\u025C\u025D\x07g\x02\x02\u025DF\x03\x02\x02\x02\u025E\u025F\x07c\x02\x02\u025F\u0260\x07u\x02\x02\u0260H\x03\x02\x02\x02\u0261\u0262\x07c\x02\x02\u0262\u0263\x07p\x02\x02\u0263\u0264\x07f\x02\x02\u0264J\x03\x02\x02\x02\u0265\u0266\x07q\x02\x02\u0266\u0267\x07t\x02\x02\u0267L\x03\x02\x02\x02\u0268\u0269\x07z\x02\x02\u0269\u026A\x07q\x02\x02\u026A\u026B\x07t\x02\x02\u026BN\x03\x02\x02\x02\u026C\u026D\x07p\x02\x02\u026D\u026E\x07q\x02\x02\u026E\u026F\x07v\x02\x02\u026FP\x03\x02\x02\x02\u0270\u0271\x07d\x02\x02\u0271\u0272\x07g\x02\x02\u0272\u0273\x07v\x02\x02\u0273\u0274\x07y\x02\x02\u0274\u0275\x07g\x02\x02\u0275\u0276\x07g\x02\x02\u0276\u0277\x07p\x02\x02\u0277R\x03\x02\x02\x02\u0278\u0279\x07k\x02\x02\u0279\u027A\x07p\x02\x02\u027AT\x03\x02\x02\x02\u027B\u027C\x07p\x02\x02\u027C\u027D\x07q\x02\x02\u027D\u027E\x07v\x02\x02\u027E\u027F\x07a\x02\x02\u027F\u0280\x07k\x02\x02\u0280\u0281\x07p\x02\x02\u0281V\x03\x02\x02\x02\u0282\u0283\x07p\x02\x02\u0283\u0284\x07w\x02\x02\u0284\u0285\x07n\x02\x02\u0285\u0286\x07n\x02\x02\u0286X\x03\x02\x02\x02\u0287\u0288\x07k\x02\x02\u0288\u0289\x07u\x02\x02\u0289\u028A\x07p\x02\x02\u028A\u028B\x07w\x02\x02\u028B\u028C\x07n\x02\x02\u028C\u028D\x07n\x02\x02\u028DZ\x03\x02\x02\x02\u028E\u028F\x07g\x02\x02\u028F\u0290\x07z\x02\x02\u0290\\\x03\x02\x02\x02\u0291\u0292\x07w\x02\x02\u0292\u0293\x07p\x02\x02\u0293\u0294\x07k\x02\x02\u0294\u0295\x07q\x02\x02\u0295\u0296\x07p\x02\x02\u0296^\x03\x02\x02\x02\u0297\u0298\x07f\x02\x02\u0298\u0299\x07k\x02\x02\u0299\u029A\x07h\x02\x02\u029A\u029B\x07h\x02\x02\u029B`\x03\x02\x02\x02\u029C\u029D\x07u\x02\x02\u029D\u029E\x07{\x02\x02\u029E\u029F\x07o\x02\x02\u029F\u02A0\x07f\x02\x02\u02A0\u02A1\x07k\x02\x02\u02A1\u02A2\x07h\x02\x02\u02A2\u02A3\x07h\x02\x02\u02A3b\x03\x02\x02\x02\u02A4\u02A5\x07k\x02\x02\u02A5\u02A6\x07p\x02\x02\u02A6\u02A7\x07v\x02\x02\u02A7\u02A8\x07g\x02\x02\u02A8\u02A9\x07t\x02\x02\u02A9\u02AA\x07u\x02\x02\u02AA\u02AB\x07g\x02\x02\u02AB\u02AC\x07e\x02\x02\u02AC\u02AD\x07v\x02\x02\u02ADd\x03\x02\x02\x02\u02AE\u02AF\x07m\x02\x02\u02AF\u02B0\x07g\x02\x02\u02B0\u02B1\x07{\x02\x02\u02B1\u02B2\x07u\x02\x02\u02B2f\x03\x02\x02\x02\u02B3\u02B4\x07k\x02\x02\u02B4\u02B5\x07p\x02\x02\u02B5\u02B6\x07v\x02\x02\u02B6\u02B7\x07{\x02\x02\u02B7\u02B8\x07g\x02\x02\u02B8\u02B9\x07c\x02\x02\u02B9\u02BA\x07t\x02\x02\u02BAh\x03\x02\x02\x02\u02BB\u02BC\x07k\x02\x02\u02BC\u02BD\x07p\x02\x02\u02BD\u02BE\x07v\x02\x02\u02BE\u02BF\x07o\x02\x02\u02BF\u02C0\x07q\x02\x02\u02C0\u02C1\x07p\x02\x02\u02C1\u02C2\x07v\x02\x02\u02C2\u02C3\x07j\x02\x02\u02C3j\x03\x02\x02\x02\u02C4\u02C5\x07k\x02\x02\u02C5\u02C6\x07p\x02\x02\u02C6\u02C7\x07v\x02\x02\u02C7\u02C8\x07f\x02\x02\u02C8\u02C9\x07c\x02\x02\u02C9\u02CA\x07{\x02\x02\u02CAl\x03\x02\x02\x02\u02CB\u02CC\x07e\x02\x02\u02CC\u02CD\x07j\x02\x02\u02CD\u02CE\x07g\x02\x02\u02CE\u02CF\x07e\x02\x02\u02CF\u02D0\x07m\x02\x02\u02D0n\x03\x02\x02\x02\u02D1\u02D2\x07g\x02\x02\u02D2\u02D3\x07z\x02\x02\u02D3\u02D4\x07k\x02\x02\u02D4\u02D5\x07u\x02\x02\u02D5\u02D6\x07v\x02\x02\u02D6\u02D7\x07u\x02\x02\u02D7\u02D8\x07a\x02\x02\u02D8\u02D9\x07k\x02\x02\u02D9\u02DA\x07p\x02\x02\u02DAp\x03\x02\x02\x02\u02DB\u02DC\x07v\x02\x02\u02DC\u02DD\x07q\x02\x02\u02DDr\x03\x02\x02\x02\u02DE\u02DF\x07t\x02\x02\u02DF\u02E0\x07g\x02\x02\u02E0\u02E1\x07v\x02\x02\u02E1\u02E2\x07w\x02\x02\u02E2\u02E3\x07t\x02\x02\u02E3\u02E4\x07p\x02\x02\u02E4t\x03\x02\x02\x02\u02E5\u02E6\x07k\x02\x02\u02E6\u02E7\x07o\x02\x02\u02E7\u02E8\x07d\x02\x02\u02E8\u02E9\x07c\x02\x02\u02E9\u02EA\x07n\x02\x02\u02EA\u02EB\x07c\x02\x02\u02EB\u02EC\x07p\x02\x02\u02EC\u02ED\x07e\x02\x02\u02ED\u02EE\x07g\x02\x02\u02EEv\x03\x02\x02\x02\u02EF\u02F0\x07g\x02\x02\u02F0\u02F1\x07t\x02\x02\u02F1\u02F2\x07t\x02\x02\u02F2\u02F3\x07q\x02\x02\u02F3\u02F4\x07t\x02\x02\u02F4\u02F5\x07e\x02\x02\u02F5\u02F6\x07q\x02\x02\u02F6\u02F7\x07f\x02\x02\u02F7\u02F8\x07g\x02\x02\u02F8x\x03\x02\x02\x02\u02F9\u02FA\x07c\x02\x02\u02FA\u02FB\x07n\x02\x02\u02FB\u02FC\x07n\x02\x02\u02FCz\x03\x02\x02\x02\u02FD\u02FE\x07c\x02\x02\u02FE\u02FF\x07i\x02\x02\u02FF\u0300\x07i\x02\x02\u0300\u0301\x07t\x02\x02\u0301|\x03\x02\x02\x02\u0302\u0303\x07g\x02\x02\u0303\u0304\x07t\x02\x02\u0304\u0305\x07t\x02\x02\u0305\u0306\x07q\x02\x02\u0306\u0307\x07t\x02\x02\u0307\u0308\x07n\x02\x02\u0308\u0309\x07g\x02\x02\u0309\u030A\x07x\x02\x02\u030A\u030B\x07g\x02\x02\u030B\u030C\x07n\x02\x02\u030C~\x03\x02\x02\x02\u030D\u030E\x07q\x02\x02\u030E\u030F\x07t\x02\x02\u030F\u0310\x07f\x02\x02\u0310\u0311\x07g\x02\x02\u0311\u0312\x07t\x02\x02\u0312\x80\x03\x02\x02\x02\u0313\u0314\x07d\x02\x02\u0314\u0315\x07{\x02\x02\u0315\x82\x03\x02\x02\x02\u0316\u0317\x07t\x02\x02\u0317\u0318\x07c\x02\x02\u0318\u0319\x07p\x02\x02\u0319\u031A\x07m\x02\x02\u031A\x84\x03\x02\x02\x02\u031B\u031C\x07c\x02\x02\u031C\u031D\x07u\x02\x02\u031D\u031E\x07e\x02\x02\u031E\x86\x03\x02\x02\x02\u031F\u0320\x07f\x02\x02\u0320\u0321\x07g\x02\x02\u0321\u0322\x07u\x02\x02\u0322\u0323\x07e\x02\x02\u0323\x88\x03\x02\x02\x02\u0324\u0325\x07o\x02\x02\u0325\u0326\x07k\x02\x02\u0326\u0327\x07p\x02\x02\u0327\x8A\x03\x02\x02\x02\u0328\u0329\x07o\x02\x02\u0329\u032A\x07c\x02\x02\u032A\u032B\x07z\x02\x02\u032B\x8C\x03\x02\x02\x02\u032C\u032D\x07h\x02\x02\u032D\u032E\x07k\x02\x02\u032E\u032F\x07t\x02\x02\u032F\u0330\x07u\x02\x02\u0330\u0331\x07v\x02\x02\u0331\x8E\x03\x02\x02\x02\u0332\u0333\x07n\x02\x02\u0333\u0334\x07c\x02\x02\u0334\u0335\x07u\x02\x02\u0335\u0336\x07v\x02\x02\u0336\x90\x03\x02\x02\x02\u0337\u0338\x07k\x02\x02\u0338\u0339\x07p\x02\x02\u0339\u033A\x07f\x02\x02\u033A\u033B\x07g\x02\x02\u033B\u033C\x07z\x02\x02\u033C\u033D\x07q\x02\x02\u033D\u033E\x07h\x02\x02\u033E\x92\x03\x02\x02\x02\u033F\u0340\x07c\x02\x02\u0340\u0341\x07d\x02\x02\u0341\u0342\x07u\x02\x02\u0342\x94\x03\x02\x02\x02\u0343\u0344\x07m\x02\x02\u0344\u0345\x07g\x02\x02\u0345\u0346\x07{\x02\x02\u0346\x96\x03\x02\x02\x02\u0347\u0348\x07n\x02\x02\u0348\u0349\x07p\x02\x02\u0349\x98\x03\x02\x02\x02\u034A\u034B\x07n\x02\x02\u034B\u034C\x07q\x02\x02\u034C\u034D\x07i\x02\x02\u034D\x9A\x03\x02\x02\x02\u034E\u034F\x07v\x02\x02\u034F\u0350\x07t\x02\x02\u0350\u0351\x07w\x02\x02\u0351\u0352\x07p\x02\x02\u0352\u0353\x07e\x02\x02\u0353\x9C\x03\x02\x02\x02\u0354\u0355\x07t\x02\x02\u0355\u0356\x07q\x02\x02\u0356\u0357\x07w\x02\x02\u0357\u0358\x07p\x02\x02\u0358\u0359\x07f\x02\x02\u0359\x9E\x03\x02\x02\x02\u035A\u035B\x07r\x02\x02\u035B\u035C\x07q\x02\x02\u035C\u035D\x07y\x02\x02\u035D\u035E\x07g\x02\x02\u035E\u035F\x07t\x02\x02\u035F\xA0\x03\x02\x02\x02\u0360\u0361\x07o\x02\x02\u0361\u0362\x07q\x02\x02\u0362\u0363\x07f\x02\x02\u0363\xA2\x03\x02\x02\x02\u0364\u0365\x07n\x02\x02\u0365\u0366\x07g\x02\x02\u0366\u0367\x07p\x02\x02\u0367\u0368\x07i\x02\x02\u0368\u0369\x07v\x02\x02\u0369\u036A\x07j\x02\x02\u036A\xA4\x03\x02\x02\x02\u036B\u036C\x07~\x02\x02\u036C\u036D\x07~\x02\x02\u036D\xA6\x03\x02\x02\x02\u036E\u036F\x07v\x02\x02\u036F\u0370\x07t\x02\x02\u0370\u0371\x07k\x02\x02\u0371\u0372\x07o\x02\x02\u0372\xA8\x03\x02\x02\x02\u0373\u0374\x07w\x02\x02\u0374\u0375\x07r\x02\x02\u0375\u0376\x07r\x02\x02\u0376\u0377\x07g\x02\x02\u0377\u0378\x07t\x02\x02\u0378\xAA\x03\x02\x02\x02\u0379\u037A\x07n\x02\x02\u037A\u037B\x07q\x02\x02\u037B\u037C\x07y\x02\x02\u037C\u037D\x07g\x02\x02\u037D\u037E\x07t\x02\x02\u037E\xAC\x03\x02\x02\x02\u037F\u0380\x07u\x02\x02\u0380\u0381\x07w\x02\x02\u0381\u0382\x07d\x02\x02\u0382\u0383\x07u\x02\x02\u0383\u0384\x07v\x02\x02\u0384\u0385\x07t\x02\x02\u0385\xAE\x03\x02\x02\x02\u0386\u0387\x07u\x02\x02\u0387\u0388\x07w\x02\x02\u0388\u0389\x07o\x02\x02\u0389\xB0\x03\x02\x02\x02\u038A\u038B\x07c\x02\x02\u038B\u038C\x07x\x02\x02\u038C\u038D\x07i\x02\x02\u038D\xB2\x03\x02\x02\x02\u038E\u038F\x07o\x02\x02\u038F\u0390\x07g\x02\x02\u0390\u0391\x07f\x02\x02\u0391\u0392\x07k\x02\x02\u0392\u0393\x07c\x02\x02\u0393\u0394\x07p\x02\x02\u0394\xB4\x03\x02\x02\x02\u0395\u0396\x07e\x02\x02\u0396\u0397\x07q\x02\x02\u0397\u0398\x07w\x02\x02\u0398\u0399\x07p\x02\x02\u0399\u039A\x07v\x02\x02\u039A\xB6\x03\x02\x02\x02\u039B\u039C\x07k\x02\x02\u039C\u039D\x07f\x02\x02\u039D\u039E\x07g\x02\x02\u039E\u039F\x07p\x02\x02\u039F\u03A0\x07v\x02\x02\u03A0\u03A1\x07k\x02\x02\u03A1\u03A2\x07h\x02\x02\u03A2\u03A3\x07k\x02\x02\u03A3\u03A4\x07g\x02\x02\u03A4\u03A5\x07t\x02\x02\u03A5\xB8\x03\x02\x02\x02\u03A6\u03A7\x07o\x02\x02\u03A7\u03A8\x07g\x02\x02\u03A8\u03A9\x07c\x02\x02\u03A9\u03AA\x07u\x02\x02\u03AA\u03AB\x07w\x02\x02\u03AB\u03AC\x07t\x02\x02\u03AC\u03AD\x07g\x02\x02\u03AD\xBA\x03\x02\x02\x02\u03AE\u03AF\x07c\x02\x02\u03AF\u03B0\x07v\x02\x02\u03B0\u03B1\x07v\x02\x02\u03B1\u03B2\x07t\x02\x02\u03B2\u03B3\x07k\x02\x02\u03B3\u03B4\x07d\x02\x02\u03B4\u03B5\x07w\x02\x02\u03B5\u03B6\x07v\x02\x02\u03B6\u03B7\x07g\x02\x02\u03B7\xBC\x03\x02\x02\x02\u03B8\u03B9\x07h\x02\x02\u03B9\u03BA\x07k\x02\x02\u03BA\u03BB\x07n\x02\x02\u03BB\u03BC\x07v\x02\x02\u03BC\u03BD\x07g\x02\x02\u03BD\u03BE\x07t\x02\x02\u03BE\xBE\x03\x02\x02\x02\u03BF\u03C0\x07o\x02\x02\u03C0\u03C1\x07g\x02\x02\u03C1\u03C2\x07t\x02\x02\u03C2\u03C3\x07i\x02\x02\u03C3\u03C4\x07g\x02\x02\u03C4\xC0\x03\x02\x02\x02\u03C5\u03C6\x07g\x02\x02\u03C6\u03C7\x07z\x02\x02\u03C7\u03C8\x07r\x02\x02\u03C8\xC2\x03\x02\x02\x02\u03C9\u03CA\x07e\x02\x02\u03CA\u03CB\x07q\x02\x02\u03CB\u03CC\x07o\x02\x02\u03CC\u03CD\x07r\x02\x02\u03CD\u03CE\x07q\x02\x02\u03CE\u03CF\x07p\x02\x02\u03CF\u03D0\x07g\x02\x02\u03D0\u03D1\x07p\x02\x02\u03D1\u03D2\x07v\x02\x02\u03D2\u03D3\x07T\x02\x02\u03D3\u03D4\x07q\x02\x02\u03D4\u03D5\x07n\x02\x02\u03D5\u03D6\x07g\x02\x02\u03D6\xC4\x03\x02\x02\x02\u03D7\u03D8\x07x\x02\x02\u03D8\u03D9\x07k\x02\x02\u03D9\u03DA\x07t\x02\x02\u03DA\u03DB\x07c\x02\x02\u03DB\u03DC\x07n\x02\x02\u03DC\xC6\x03\x02\x02\x02\u03DD\u03DE\x07o\x02\x02\u03DE\u03DF\x07c\x02\x02\u03DF\u03E0\x07v\x02\x02\u03E0\u03E1\x07e\x02\x02\u03E1\u03E2\x07j\x02\x02\u03E2\u03E3\x07a\x02\x02\u03E3\u03E4\x07e\x02\x02\u03E4\u03E5\x07j\x02\x02\u03E5\u03E6\x07c\x02\x02\u03E6\u03E7\x07t\x02\x02\u03E7\u03E8\x07c\x02\x02\u03E8\u03E9\x07e\x02\x02\u03E9\u03EA\x07v\x02\x02\u03EA\u03EB\x07g\x02\x02\u03EB\u03EC\x07t\x02\x02\u03EC\u03ED\x07u\x02\x02\u03ED\xC8\x03\x02\x02\x02\u03EE\u03EF\x07v\x02\x02\u03EF\u03F0\x07{\x02\x02\u03F0\u03F1\x07r\x02\x02\u03F1\u03F2\x07g\x02\x02\u03F2\xCA\x03\x02\x02\x02\u03F3\u03F4\x07p\x02\x02\u03F4\u03F5\x07x\x02\x02\u03F5\u03F6\x07n\x02\x02\u03F6\xCC\x03\x02\x02\x02\u03F7\u03F8\x07j\x02\x02\u03F8\u03F9\x07k\x02\x02\u03F9\u03FA\x07g\x02\x02\u03FA\u03FB\x07t\x02\x02\u03FB\u03FC\x07c\x02\x02\u03FC\u03FD\x07t\x02\x02\u03FD\u03FE\x07e\x02\x02\u03FE\u03FF\x07j\x02\x02\u03FF\u0400\x07{\x02\x02\u0400\xCE\x03\x02\x02\x02\u0401\u0402\x07a\x02\x02\u0402\xD0\x03\x02\x02\x02\u0403\u0404\x07k\x02\x02\u0404\u0405\x07p\x02\x02\u0405\u0406\x07x\x02\x02\u0406\u0407\x07c\x02\x02\u0407\u0408\x07n\x02\x02\u0408\u0409\x07k\x02\x02\u0409\u040A\x07f\x02\x02\u040A\xD2\x03\x02\x02\x02\u040B\u040C\x07n\x02\x02\u040C\u040D\x07g\x02\x02\u040D\u040E\x07x\x02\x02\u040E\u040F\x07g\x02\x02\u040F\u0410\x07p\x02\x02\u0410\u0411\x07u\x02\x02\u0411\u0412\x07j\x02\x02\u0412\u0413\x07v\x02\x02\u0413\u0414\x07g\x02\x02\u0414\u0415\x07k\x02\x02\u0415\u0416\x07p\x02\x02\u0416\xD4\x03\x02\x02\x02\u0417\u0418\x07x\x02\x02\u0418\u0419\x07c\x02\x02\u0419\u041A\x07n\x02\x02\u041A\u041B\x07w\x02\x02\u041B\u041C\x07g\x02\x02\u041C\u041D\x07f\x02\x02\u041D\u041E\x07q\x02\x02\u041E\u041F\x07o\x02\x02\u041F\u0420\x07c\x02\x02\u0420\u0421\x07k\x02\x02\u0421\u0422\x07p\x02\x02\u0422\xD6\x03\x02\x02\x02\u0423\u0424\x07x\x02\x02\u0424\u0425\x07c\x02\x02\u0425\u0426\x07t\x02\x02\u0426\u0427\x07k\x02\x02\u0427\u0428\x07c\x02\x02\u0428\u0429\x07d\x02\x02\u0429\u042A\x07n\x02\x02\u042A\u042B\x07g\x02\x02\u042B\xD8\x03\x02\x02\x02\u042C\u042D\x07f\x02\x02\u042D\u042E\x07c\x02\x02\u042E\u042F\x07v\x02\x02\u042F\u0430\x07c\x02\x02\u0430\xDA\x03\x02\x02\x02\u0431\u0432\x07u\x02\x02\u0432\u0433\x07v\x02\x02\u0433\u0434\x07t\x02\x02\u0434\u0435\x07w\x02\x02\u0435\u0436\x07e\x02\x02\u0436\u0437\x07v\x02\x02\u0437\u0438\x07w\x02\x02\u0438\u0439\x07t\x02\x02\u0439\u043A\x07g\x02\x02\u043A\xDC\x03\x02\x02\x02\u043B\u043C\x07f\x02\x02\u043C\u043D\x07c\x02\x02\u043D\u043E\x07v\x02\x02\u043E\u043F\x07c\x02\x02\u043F\u0440\x07u\x02\x02\u0440\u0441\x07g\x02\x02\u0441\u0442\x07v\x02\x02\u0442\xDE\x03\x02\x02\x02\u0443\u0444\x07q\x02\x02\u0444\u0445\x07r\x02\x02\u0445\u0446\x07g\x02\x02\u0446\u0447\x07t\x02\x02\u0447\u0448\x07c\x02\x02\u0448\u0449\x07v\x02\x02\u0449\u044A\x07q\x02\x02\u044A\u044B\x07t\x02\x02\u044B\xE0\x03\x02\x02\x02\u044C\u044D\x07f\x02\x02\u044D\u044E\x07g\x02\x02\u044E\u044F\x07h\x02\x02\u044F\u0450\x07k\x02\x02\u0450\u0451\x07p\x02\x02\u0451\u0452\x07g\x02\x02\u0452\xE2\x03\x02\x02\x02\u0453\u0454\x07>\x02\x02\u0454\u0455\x07/\x02\x02\u0455\xE4\x03\x02\x02\x02\u0456\u0457\x07f\x02\x02\u0457\u0458\x07c\x02\x02\u0458\u0459\x07v\x02\x02\u0459\u045A\x07c\x02\x02\u045A\u045B\x07r\x02\x02\u045B\u045C\x07q\x02\x02\u045C\u045D\x07k\x02\x02\u045D\u045E\x07p\x02\x02\u045E\u045F\x07v\x02\x02\u045F\xE6\x03\x02\x02\x02\u0460\u0461\x07j\x02\x02\u0461\u0462\x07k\x02\x02\u0462\u0463\x07g\x02\x02\u0463\u0464\x07t\x02\x02\u0464\u0465\x07c\x02\x02\u0465\u0466\x07t\x02\x02\u0466\u0467\x07e\x02\x02\u0467\u0468\x07j\x02\x02\u0468\u0469\x07k\x02\x02\u0469\u046A\x07e\x02\x02\u046A\u046B\x07c\x02\x02\u046B\u046C\x07n\x02\x02\u046C\xE8\x03\x02\x02\x02\u046D\u046E\x07t\x02\x02\u046E\u046F\x07w\x02\x02\u046F\u0470\x07n\x02\x02\u0470\u0471\x07g\x02\x02\u0471\u0472\x07u\x02\x02\u0472\u0473\x07g\x02\x02\u0473\u0474\x07v\x02\x02\u0474\xEA\x03\x02\x02\x02\u0475\u0476\x07t\x02\x02\u0476\u0477\x07w\x02\x02\u0477\u0478\x07n\x02\x02\u0478\u0479\x07g\x02\x02\u0479\xEC\x03\x02\x02\x02\u047A\u047B\x07g\x02\x02\u047B\u047C\x07p\x02\x02\u047C\u047D\x07f\x02\x02\u047D\xEE\x03\x02\x02\x02\u047E\u047F\x07c\x02\x02\u047F\u0480\x07n\x02\x02\u0480\u0481\x07v\x02\x02\u0481\u0482\x07g\x02\x02\u0482\u0483\x07t\x02\x02\u0483\u0484\x07F\x02\x02\u0484\u0485\x07c\x02\x02\u0485\u0486\x07v\x02\x02\u0486\u0487\x07c\x02\x02\u0487\u0488\x07u\x02\x02\u0488\u0489\x07g\x02\x02\u0489\u048A\x07v\x02\x02\u048A\xF0\x03\x02\x02\x02\u048B\u048C\x07n\x02\x02\u048C\u048D\x07v\x02\x02\u048D\u048E\x07t\x02\x02\u048E\u048F\x07k\x02\x02\u048F\u0490\x07o\x02\x02\u0490\xF2\x03\x02\x02\x02\u0491\u0492\x07t\x02\x02\u0492\u0493\x07v\x02\x02\u0493\u0494\x07t\x02\x02\u0494\u0495\x07k\x02\x02\u0495\u0496\x07o\x02\x02\u0496\xF4\x03\x02\x02\x02\u0497\u0498\x07k\x02\x02\u0498\u0499\x07p\x02\x02\u0499\u049A\x07u\x02\x02\u049A\u049B\x07v\x02\x02\u049B\u049C\x07t\x02\x02\u049C\xF6\x03\x02\x02\x02\u049D\u049E\x07t\x02\x02\u049E\u049F\x07g\x02\x02\u049F\u04A0\x07r\x02\x02\u04A0\u04A1\x07n\x02\x02\u04A1\u04A2\x07c\x02\x02\u04A2\u04A3\x07e\x02\x02\u04A3\u04A4\x07g\x02\x02\u04A4\xF8\x03\x02\x02\x02\u04A5\u04A6\x07e\x02\x02\u04A6\u04A7\x07g\x02\x02\u04A7\u04A8\x07k\x02\x02\u04A8\u04A9\x07n\x02\x02\u04A9\xFA\x03\x02\x02\x02\u04AA\u04AB\x07h\x02\x02\u04AB\u04AC\x07n\x02\x02\u04AC\u04AD\x07q\x02\x02\u04AD\u04AE\x07q\x02\x02\u04AE\u04AF\x07t\x02\x02\u04AF\xFC\x03\x02\x02\x02\u04B0\u04B1\x07u\x02\x02\u04B1\u04B2\x07s\x02\x02\u04B2\u04B3\x07t\x02\x02\u04B3\u04B4\x07v\x02\x02\u04B4\xFE\x03\x02\x02\x02\u04B5\u04B6\x07c\x02\x02\u04B6\u04B7\x07p\x02\x02\u04B7\u04B8\x07{\x02\x02\u04B8\u0100\x03\x02\x02\x02\u04B9\u04BA\x07u\x02\x02\u04BA\u04BB\x07g\x02\x02\u04BB\u04BC\x07v\x02\x02\u04BC\u04BD\x07f\x02\x02\u04BD\u04BE\x07k\x02\x02\u04BE\u04BF\x07h\x02\x02\u04BF\u04C0\x07h\x02\x02\u04C0\u0102\x03\x02\x02\x02\u04C1\u04C2\x07u\x02\x02\u04C2\u04C3\x07v\x02\x02\u04C3\u04C4\x07f\x02\x02\u04C4\u04C5\x07f\x02\x02\u04C5\u04C6\x07g\x02\x02\u04C6\u04C7\x07x\x02\x02\u04C7\u04C8\x07a\x02\x02\u04C8\u04C9\x07r\x02\x02\u04C9\u04CA\x07q\x02\x02\u04CA\u04CB\x07r\x02\x02\u04CB\u0104\x03\x02\x02\x02\u04CC\u04CD\x07u\x02\x02\u04CD\u04CE\x07v\x02\x02\u04CE\u04CF\x07f\x02\x02\u04CF\u04D0\x07f\x02\x02\u04D0\u04D1\x07g\x02\x02\u04D1\u04D2\x07x\x02\x02\u04D2\u04D3\x07a\x02\x02\u04D3\u04D4\x07u\x02\x02\u04D4\u04D5\x07c\x02\x02\u04D5\u04D6\x07o\x02\x02\u04D6\u04D7\x07r\x02\x02\u04D7\u0106\x03\x02\x02\x02\u04D8\u04D9\x07x\x02\x02\u04D9\u04DA\x07c\x02\x02\u04DA\u04DB\x07t\x02\x02\u04DB\u04DC\x07a\x02\x02\u04DC\u04DD\x07r\x02\x02\u04DD\u04DE\x07q\x02\x02\u04DE\u04DF\x07r\x02\x02\u04DF\u0108\x03\x02\x02\x02\u04E0\u04E1\x07x\x02\x02\u04E1\u04E2\x07c\x02\x02\u04E2\u04E3\x07t\x02\x02\u04E3\u04E4\x07a\x02\x02\u04E4\u04E5\x07u\x02\x02\u04E5\u04E6\x07c\x02\x02\u04E6\u04E7\x07o\x02\x02\u04E7\u04E8\x07r\x02\x02\u04E8\u010A\x03\x02\x02\x02\u04E9\u04EA\x07i\x02\x02\u04EA\u04EB\x07t\x02\x02\u04EB\u04EC\x07q\x02\x02\u04EC\u04ED\x07w\x02\x02\u04ED\u04EE\x07r\x02\x02\u04EE\u010C\x03\x02\x02\x02\u04EF\u04F0\x07g\x02\x02\u04F0\u04F1\x07z\x02\x02\u04F1\u04F2\x07e\x02\x02\u04F2\u04F3\x07g\x02\x02\u04F3\u04F4\x07r\x02\x02\u04F4\u04F5\x07v\x02\x02\u04F5\u010E\x03\x02\x02\x02\u04F6\u04F7\x07j\x02\x02\u04F7\u04F8\x07c\x02\x02\u04F8\u04F9\x07x\x02\x02\u04F9\u04FA\x07k\x02\x02\u04FA\u04FB\x07p\x02\x02\u04FB\u04FC\x07i\x02\x02\u04FC\u0110\x03\x02\x02\x02\u04FD\u04FE\x07h\x02\x02\u04FE\u04FF\x07k\x02\x02\u04FF\u0500\x07t\x02\x02\u0500\u0501\x07u\x02\x02\u0501\u0502\x07v\x02\x02\u0502\u0503\x07a\x02\x02\u0503\u0504\x07x\x02\x02\u0504\u0505\x07c\x02\x02\u0505\u0506\x07n\x02\x02\u0506\u0507\x07w\x02\x02\u0507\u0508\x07g\x02\x02\u0508\u0112\x03\x02\x02\x02\u0509\u050A\x07n\x02\x02\u050A\u050B\x07c\x02\x02\u050B\u050C\x07u\x02\x02\u050C\u050D\x07v\x02\x02\u050D\u050E\x07a\x02\x02\u050E\u050F\x07x\x02\x02\u050F\u0510\x07c\x02\x02\u0510\u0511\x07n\x02\x02\u0511\u0512\x07w\x02\x02\u0512\u0513\x07g\x02\x02\u0513\u0114\x03\x02\x02\x02\u0514\u0515\x07n\x02\x02\u0515\u0516\x07c\x02\x02\u0516\u0517\x07i\x02\x02\u0517\u0116\x03\x02\x02\x02\u0518\u0519\x07n\x02\x02\u0519\u051A\x07g\x02\x02\u051A\u051B\x07c\x02\x02\u051B\u051C\x07f\x02\x02\u051C\u0118\x03\x02\x02\x02\u051D\u051E\x07t\x02\x02\u051E\u051F\x07c\x02\x02\u051F\u0520\x07v\x02\x02\u0520\u0521\x07k\x02\x02\u0521\u0522\x07q\x02\x02\u0522\u0523\x07a\x02\x02\u0523\u0524\x07v\x02\x02\u0524\u0525\x07q\x02\x02\u0525\u0526\x07a\x02\x02\u0526\u0527\x07t\x02\x02\u0527\u0528\x07g\x02\x02\u0528\u0529\x07r\x02\x02\u0529\u052A\x07q\x02\x02\u052A\u052B\x07t\x02\x02\u052B\u052C\x07v\x02\x02\u052C\u011A\x03\x02\x02\x02\u052D\u052E\x07q\x02\x02\u052E\u052F\x07x\x02\x02\u052F\u0530\x07g\x02\x02\u0530\u0531\x07t\x02\x02\u0531\u011C\x03\x02\x02\x02\u0532\u0533\x07r\x02\x02\u0533\u0534\x07t\x02\x02\u0534\u0535\x07g\x02\x02\u0535\u0536\x07e\x02\x02\u0536\u0537\x07g\x02\x02\u0537\u0538\x07f\x02\x02\u0538\u0539\x07k\x02\x02\u0539\u053A\x07p\x02\x02\u053A\u053B\x07i\x02\x02\u053B\u011E\x03\x02\x02\x02\u053C\u053D\x07h\x02\x02\u053D\u053E\x07q\x02\x02\u053E\u053F\x07n\x02\x02\u053F\u0540\x07n\x02\x02\u0540\u0541\x07q\x02\x02\u0541\u0542\x07y\x02\x02\u0542\u0543\x07k\x02\x02\u0543\u0544\x07p\x02\x02\u0544\u0545\x07i\x02\x02\u0545\u0120\x03\x02\x02\x02\u0546\u0547\x07w\x02\x02\u0547\u0548\x07p\x02\x02\u0548\u0549\x07d\x02\x02\u0549\u054A\x07q\x02\x02\u054A\u054B\x07w\x02\x02\u054B\u054C\x07p\x02\x02\u054C\u054D\x07f\x02\x02\u054D\u054E\x07g\x02\x02\u054E\u054F\x07f\x02\x02\u054F\u0122\x03\x02\x02\x02\u0550\u0551\x07r\x02\x02\u0551\u0552\x07c\x02\x02\u0552\u0553\x07t\x02\x02\u0553\u0554\x07v\x02\x02\u0554\u0555\x07k\x02\x02\u0555\u0556\x07v\x02\x02\u0556\u0557\x07k\x02\x02\u0557\u0558\x07q\x02\x02\u0558\u0559\x07p\x02\x02\u0559\u0124\x03\x02\x02\x02\u055A\u055B\x07t\x02\x02\u055B\u055C\x07q\x02\x02\u055C\u055D\x07y\x02\x02\u055D\u055E\x07u\x02\x02\u055E\u0126\x03\x02\x02\x02\u055F\u0560\x07t\x02\x02\u0560\u0561\x07c\x02\x02\u0561\u0562\x07p\x02\x02\u0562\u0563\x07i\x02\x02\u0563\u0564\x07g\x02\x02\u0564\u0128\x03\x02\x02\x02\u0565\u0566\x07e\x02\x02\u0566\u0567\x07w\x02\x02\u0567\u0568\x07t\x02\x02\u0568\u0569\x07t\x02\x02\u0569\u056A\x07g\x02\x02\u056A\u056B\x07p\x02\x02\u056B\u056C\x07v\x02\x02\u056C\u012A\x03\x02\x02\x02\u056D\u056E\x07x\x02\x02\u056E\u056F\x07c\x02\x02\u056F\u0570\x07n\x02\x02\u0570\u0571\x07k\x02\x02\u0571\u0572\x07f\x02\x02\u0572\u012C\x03\x02\x02\x02\u0573\u0574\x07h\x02\x02\u0574\u0575\x07k\x02\x02\u0575\u0576\x07n\x02\x02\u0576\u0577\x07n\x02\x02\u0577\u0578\x07a\x02\x02\u0578\u0579\x07v\x02\x02\u0579\u057A\x07k\x02\x02\u057A\u057B\x07o\x02\x02\u057B\u057C\x07g\x02\x02\u057C\u057D\x07a\x02\x02\u057D\u057E\x07u\x02\x02\u057E\u057F\x07g\x02\x02\u057F\u0580\x07t\x02\x02\u0580\u0581\x07k\x02\x02\u0581\u0582\x07g\x02\x02\u0582\u0583\x07u\x02\x02\u0583\u012E\x03\x02\x02\x02\u0584\u0585\x07h\x02\x02\u0585\u0586\x07n\x02\x02\u0586\u0587\x07q\x02\x02\u0587\u0588\x07y\x02\x02\u0588\u0589\x07a\x02\x02\u0589\u058A\x07v\x02\x02\u058A\u058B\x07q\x02\x02\u058B\u058C\x07a\x02\x02\u058C\u058D\x07u\x02\x02\u058D\u058E\x07v\x02\x02\u058E\u058F\x07q\x02\x02\u058F\u0590\x07e\x02\x02\u0590\u0591\x07m\x02\x02\u0591\u0130\x03\x02\x02\x02\u0592\u0593\x07u\x02\x02\u0593\u0594\x07v\x02\x02\u0594\u0595\x07q\x02\x02\u0595\u0596\x07e\x02\x02\u0596\u0597\x07m\x02\x02\u0597\u0598\x07a\x02\x02\u0598\u0599\x07v\x02\x02\u0599\u059A\x07q\x02\x02\u059A\u059B\x07a\x02\x02\u059B\u059C\x07h\x02\x02\u059C\u059D\x07n\x02\x02\u059D\u059E\x07q\x02\x02\u059E\u059F\x07y\x02\x02\u059F\u0132\x03\x02\x02\x02\u05A0\u05A1\x07v\x02\x02\u05A1\u05A2\x07k\x02\x02\u05A2\u05A3\x07o\x02\x02\u05A3\u05A4\x07g\x02\x02\u05A4\u05A5\x07u\x02\x02\u05A5\u05A6\x07j\x02\x02\u05A6\u05A7\x07k\x02\x02\u05A7\u05A8\x07h\x02\x02\u05A8\u05A9\x07v\x02\x02\u05A9\u0134\x03\x02\x02\x02\u05AA\u05AB\x07o\x02\x02\u05AB\u05AC\x07g\x02\x02\u05AC\u05AD\x07c\x02\x02\u05AD\u05AE\x07u\x02\x02\u05AE\u05AF\x07w\x02\x02\u05AF\u05B0\x07t\x02\x02\u05B0\u05B1\x07g\x02\x02\u05B1\u05B2\x07u\x02\x02\u05B2\u0136\x03\x02\x02\x02\u05B3\u05B4\x07p\x02\x02\u05B4\u05B5\x07q\x02\x02\u05B5\u05B6\x07a\x02\x02\u05B6\u05B7\x07o\x02\x02\u05B7\u05B8\x07g\x02\x02\u05B8\u05B9\x07c\x02\x02\u05B9\u05BA\x07u\x02\x02\u05BA\u05BB\x07w\x02\x02\u05BB\u05BC\x07t\x02\x02\u05BC\u05BD\x07g\x02\x02\u05BD\u05BE\x07u\x02\x02\u05BE\u0138\x03\x02\x02\x02\u05BF\u05C0\x07e\x02\x02\u05C0\u05C1\x07q\x02\x02\u05C1\u05C2\x07p\x02\x02\u05C2\u05C3\x07f\x02\x02\u05C3\u05C4\x07k\x02\x02\u05C4\u05C5\x07v\x02\x02\u05C5\u05C6\x07k\x02\x02\u05C6\u05C7\x07q\x02\x02\u05C7\u05C8\x07p\x02\x02\u05C8\u013A\x03\x02\x02\x02\u05C9\u05CA\x07d\x02\x02\u05CA\u05CB\x07q\x02\x02\u05CB\u05CC\x07q\x02\x02\u05CC\u05CD\x07n\x02\x02\u05CD\u05CE\x07g\x02\x02\u05CE\u05CF\x07c\x02\x02\u05CF\u05D0\x07p\x02\x02\u05D0\u013C\x03\x02\x02\x02\u05D1\u05D2\x07f\x02\x02\u05D2\u05D3\x07c\x02\x02\u05D3\u05D4\x07v\x02\x02\u05D4\u05D5\x07g\x02\x02\u05D5\u013E\x03\x02\x02\x02\u05D6\u05D7\x07v\x02\x02\u05D7\u05D8\x07k\x02\x02\u05D8\u05D9\x07o\x02\x02\u05D9\u05DA\x07g\x02\x02\u05DA\u05DB\x07a\x02\x02\u05DB\u05DC\x07r\x02\x02\u05DC\u05DD\x07g\x02\x02\u05DD\u05DE\x07t\x02\x02\u05DE\u05DF\x07k\x02\x02\u05DF\u05E0\x07q\x02\x02\u05E0\u05E1\x07f\x02\x02\u05E1\u0140\x03\x02\x02\x02\u05E2\u05E3\x07p\x02\x02\u05E3\u05E4\x07w\x02\x02\u05E4\u05E5\x07o\x02\x02\u05E5\u05E6\x07d\x02\x02\u05E6\u05E7\x07g\x02\x02\u05E7\u05E8\x07t\x02\x02\u05E8\u0142\x03\x02\x02\x02\u05E9\u05EA\x07u\x02\x02\u05EA\u05EB\x07v\x02\x02\u05EB\u05EC\x07t\x02\x02\u05EC\u05ED\x07k\x02\x02\u05ED\u05EE\x07p\x02\x02\u05EE\u05EF\x07i\x02\x02\u05EF\u0144\x03\x02\x02\x02\u05F0\u05F1\x07v\x02\x02\u05F1\u05F2\x07k\x02\x02\u05F2\u05F3\x07o\x02\x02\u05F3\u05F4\x07g\x02\x02\u05F4\u0146\x03\x02\x02\x02\u05F5\u05F6\x07k\x02\x02\u05F6\u05F7\x07p\x02\x02\u05F7\u05F8\x07v\x02\x02\u05F8\u05F9\x07g\x02\x02\u05F9\u05FA\x07i\x02\x02\u05FA\u05FB\x07g\x02\x02\u05FB\u05FC\x07t\x02\x02\u05FC\u0148\x03\x02\x02\x02\u05FD\u05FE\x07h\x02\x02\u05FE\u05FF\x07n\x02\x02\u05FF\u0600\x07q\x02\x02\u0600\u0601\x07c\x02\x02\u0601\u0602\x07v\x02\x02\u0602\u014A\x03\x02\x02\x02\u0603\u0604\x07n\x02\x02\u0604\u0605\x07k\x02\x02\u0605\u0606\x07u\x02\x02\u0606\u0607\x07v\x02\x02\u0607\u014C\x03\x02\x02\x02\u0608\u0609\x07t\x02\x02\u0609\u060A\x07g\x02\x02\u060A\u060B\x07e\x02\x02\u060B\u060C\x07q\x02\x02\u060C\u060D\x07t\x02\x02\u060D\u060E\x07f\x02\x02\u060E\u014E\x03\x02\x02\x02\u060F\u0610\x07t\x02\x02\u0610\u0611\x07g\x02\x02\u0611\u0612\x07u\x02\x02\u0612\u0613\x07v\x02\x02\u0613\u0614\x07t\x02\x02\u0614\u0615\x07k\x02\x02\u0615\u0616\x07e\x02\x02\u0616\u0617\x07v\x02\x02\u0617\u0150\x03\x02\x02\x02\u0618\u0619\x07{\x02\x02\u0619\u061A\x07{\x02\x02\u061A\u061B\x07{\x02\x02\u061B\u061C\x07{\x02\x02\u061C\u0152\x03\x02\x02\x02\u061D\u061E\x07o\x02\x02\u061E\u061F\x07o\x02\x02\u061F\u0154\x03\x02\x02\x02\u0620\u0621\x07f\x02\x02\u0621\u0622\x07f\x02\x02\u0622\u0156\x03\x02\x02\x02\u0623\u0624\x07o\x02\x02\u0624\u0625\x07c\x02\x02\u0625\u0626\x07z\x02\x02\u0626\u0627\x07N\x02\x02\u0627\u0628\x07g\x02\x02\u0628\u0629\x07p\x02\x02\u0629\u062A\x07i\x02\x02\u062A\u062B\x07v\x02\x02\u062B\u062C\x07j\x02\x02\u062C\u0158\x03\x02\x02\x02\u062D\u062E\x07t\x02\x02\u062E\u062F\x07g\x02\x02\u062F\u0630\x07i\x02\x02\u0630\u0631\x07g\x02\x02\u0631\u0632\x07z\x02\x02\u0632\u0633\x07r\x02\x02\u0633\u015A\x03\x02\x02\x02\u0634\u0635\x07k\x02\x02\u0635\u0636\x07u\x02\x02\u0636\u015C\x03\x02\x02\x02\u0637\u0638\x07y\x02\x02\u0638\u0639\x07j\x02\x02\u0639\u063A\x07g\x02\x02\u063A\u063B\x07p\x02\x02\u063B\u015E\x03\x02\x02\x02\u063C\u063D\x07h\x02\x02\u063D\u063E\x07t\x02\x02\u063E\u063F\x07q\x02\x02\u063F\u0640\x07o\x02\x02\u0640\u0160\x03\x02\x02\x02\u0641\u0642\x07c\x02\x02\u0642\u0643\x07i\x02\x02\u0643\u0644\x07i\x02\x02\u0644\u0645\x07t\x02\x02\u0645\u0646\x07g\x02\x02\u0646\u0647\x07i\x02\x02\u0647\u0648\x07c\x02\x02\u0648\u0649\x07v\x02\x02\u0649\u064A\x07g\x02\x02\u064A\u064B\x07u\x02\x02\u064B\u0162\x03\x02\x02\x02\u064C\u064D\x07r\x02\x02\u064D\u064E\x07q\x02\x02\u064E\u064F\x07k\x02\x02\u064F\u0650\x07p\x02\x02\u0650\u0651\x07v\x02\x02\u0651\u0652\x07u\x02\x02\u0652\u0164\x03\x02\x02\x02\u0653\u0654\x07r\x02\x02\u0654\u0655\x07q\x02\x02\u0655\u0656\x07k\x02\x02\u0656\u0657\x07p\x02\x02\u0657\u0658\x07v\x02\x02\u0658\u0166\x03\x02\x02\x02\u0659\u065A\x07v\x02\x02\u065A\u065B\x07q\x02\x02\u065B\u065C\x07v\x02\x02\u065C\u065D\x07c\x02\x02\u065D\u065E\x07n\x02\x02\u065E\u0168\x03\x02\x02\x02\u065F\u0660\x07r\x02\x02\u0660\u0661\x07c\x02\x02\u0661\u0662\x07t\x02\x02\u0662\u0663\x07v\x02\x02\u0663\u0664\x07k\x02\x02\u0664\u0665\x07c\x02\x02\u0665\u0666\x07n\x02\x02\u0666\u016A\x03\x02\x02\x02\u0667\u0668\x07c\x02\x02\u0668\u0669\x07n\x02\x02\u0669\u066A\x07y\x02\x02\u066A\u066B\x07c\x02\x02\u066B\u066C\x07{\x02\x02\u066C\u066D\x07u\x02\x02\u066D\u016C\x03\x02\x02\x02\u066E\u066F\x07k\x02\x02\u066F\u0670\x07p\x02\x02\u0670\u0671\x07p\x02\x02\u0671\u0672\x07g\x02\x02\u0672\u0673\x07t\x02\x02\u0673\u0674\x07a\x02\x02\u0674\u0675\x07l\x02\x02\u0675\u0676\x07q\x02\x02\u0676\u0677\x07k\x02\x02\u0677\u0678\x07p\x02\x02\u0678\u016E\x03\x02\x02\x02\u0679\u067A\x07n\x02\x02\u067A\u067B\x07g\x02\x02\u067B\u067C\x07h\x02\x02\u067C\u067D\x07v\x02\x02\u067D\u067E\x07a\x02\x02\u067E\u067F\x07l\x02\x02\u067F\u0680\x07q\x02\x02\u0680\u0681\x07k\x02\x02\u0681\u0682\x07p\x02\x02\u0682\u0170\x03\x02\x02\x02\u0683\u0684\x07e\x02\x02\u0684\u0685\x07t\x02\x02\u0685\u0686\x07q\x02\x02\u0686\u0687\x07u\x02\x02\u0687\u0688\x07u\x02\x02\u0688\u0689\x07a\x02\x02\u0689\u068A\x07l\x02\x02\u068A\u068B\x07q\x02\x02\u068B\u068C\x07k\x02\x02\u068C\u068D\x07p\x02\x02\u068D\u0172\x03\x02\x02\x02\u068E\u068F\x07h\x02\x02\u068F\u0690\x07w\x02\x02\u0690\u0691\x07n\x02\x02\u0691\u0692\x07n\x02\x02\u0692\u0693\x07a\x02\x02\u0693\u0694\x07l\x02\x02\u0694\u0695\x07q\x02\x02\u0695\u0696\x07k\x02\x02\u0696\u0697\x07p\x02\x02\u0697\u0174\x03\x02\x02\x02\u0698\u0699\x07o\x02\x02\u0699\u069A\x07c\x02\x02\u069A\u069B\x07r\x02\x02\u069B\u069C\x07u\x02\x02\u069C\u069D\x07a\x02\x02\u069D\u069E\x07h\x02\x02\u069E\u069F\x07t\x02\x02\u069F\u06A0\x07q\x02\x02\u06A0\u06A1\x07o\x02\x02\u06A1\u0176\x03\x02\x02\x02\u06A2\u06A3\x07o\x02\x02\u06A3\u06A4\x07c\x02\x02\u06A4\u06A5\x07r\x02\x02\u06A5\u06A6\x07u\x02\x02\u06A6\u06A7\x07a\x02\x02\u06A7\u06A8\x07v\x02\x02\u06A8\u06A9\x07q\x02\x02\u06A9\u0178\x03\x02\x02\x02\u06AA\u06AB\x07o\x02\x02\u06AB\u06AC\x07c\x02\x02\u06AC\u06AD\x07r\x02\x02\u06AD\u06AE\x07a\x02\x02\u06AE\u06AF\x07v\x02\x02\u06AF\u06B0\x07q\x02\x02\u06B0\u017A\x03\x02\x02\x02\u06B1\u06B2\x07o\x02\x02\u06B2\u06B3\x07c\x02\x02\u06B3\u06B4\x07r\x02\x02\u06B4\u06B5\x07a\x02\x02\u06B5\u06B6\x07h\x02\x02\u06B6\u06B7\x07t\x02\x02\u06B7\u06B8\x07q\x02\x02\u06B8\u06B9\x07o\x02\x02\u06B9\u017C\x03\x02\x02\x02\u06BA\u06BB\x07t\x02\x02\u06BB\u06BC\x07g\x02\x02\u06BC\u06BD\x07v\x02\x02\u06BD\u06BE\x07w\x02\x02\u06BE\u06BF\x07t\x02\x02\u06BF\u06C0\x07p\x02\x02\u06C0\u06C1\x07u\x02\x02\u06C1\u017E\x03\x02\x02\x02\u06C2\u06C3\x07r\x02\x02\u06C3\u06C4\x07k\x02\x02\u06C4\u06C5\x07x\x02\x02\u06C5\u06C6\x07q\x02\x02\u06C6\u06C7\x07v\x02\x02\u06C7\u0180\x03\x02\x02\x02\u06C8\u06C9\x07e\x02\x02\u06C9\u06CA\x07w\x02\x02\u06CA\u06CB\x07u\x02\x02\u06CB\u06CC\x07v\x02\x02\u06CC\u06CD\x07q\x02\x02\u06CD\u06CE\x07o\x02\x02\u06CE\u06CF\x07R\x02\x02\u06CF\u06D0\x07k\x02\x02\u06D0\u06D1\x07x\x02\x02\u06D1\u06D2\x07q\x02\x02\u06D2\u06D3\x07v\x02\x02\u06D3\u0182\x03\x02\x02\x02\u06D4\u06D5\x07w\x02\x02\u06D5\u06D6\x07p\x02\x02\u06D6\u06D7\x07r\x02\x02\u06D7\u06D8\x07k\x02\x02\u06D8\u06D9\x07x\x02\x02\u06D9\u06DA\x07q\x02\x02\u06DA\u06DB\x07v\x02\x02\u06DB\u0184\x03\x02\x02\x02\u06DC\u06DD\x07u\x02\x02\u06DD\u06DE\x07w\x02\x02\u06DE\u06DF\x07d\x02\x02\u06DF\u0186\x03\x02\x02\x02\u06E0\u06E1\x07c\x02\x02\u06E1\u06E2\x07r\x02\x02\u06E2\u06E3\x07r\x02\x02\u06E3\u06E4\x07n\x02\x02\u06E4\u06E5\x07{\x02\x02\u06E5\u0188\x03\x02\x02\x02\u06E6\u06E7\x07e\x02\x02\u06E7\u06E8\x07q\x02\x02\u06E8\u06E9\x07p\x02\x02\u06E9\u06EA\x07f\x02\x02\u06EA\u06EB\x07k\x02\x02\u06EB\u06EC\x07v\x02\x02\u06EC\u06ED\x07k\x02\x02\u06ED\u06EE\x07q\x02\x02\u06EE\u06EF\x07p\x02\x02\u06EF\u06F0\x07g\x02\x02\u06F0\u06F1\x07f\x02\x02\u06F1\u018A\x03\x02\x02\x02\u06F2\u06F3\x07r\x02\x02\u06F3\u06F4\x07g\x02\x02\u06F4\u06F5\x07t\x02\x02\u06F5\u06F6\x07k\x02\x02\u06F6\u06F7\x07q\x02\x02\u06F7\u06F8\x07f\x02\x02\u06F8\u06F9\x07a\x02\x02\u06F9\u06FA\x07k\x02\x02\u06FA\u06FB\x07p\x02\x02\u06FB\u06FC\x07f\x02\x02\u06FC\u06FD\x07k\x02\x02\u06FD\u06FE\x07e\x02\x02\u06FE\u06FF\x07c\x02\x02\u06FF\u0700\x07v\x02\x02\u0700\u0701\x07q\x02\x02\u0701\u0702\x07t\x02\x02\u0702\u018C\x03\x02\x02\x02\u0703\u0704\x07u\x02\x02\u0704\u0705\x07k\x02\x02\u0705\u0706\x07p\x02\x02\u0706\u0707\x07i\x02\x02\u0707\u0708\x07n\x02\x02\u0708\u0709\x07g\x02\x02\u0709\u018E\x03\x02\x02\x02\u070A\u070B\x07f\x02\x02\u070B\u070C\x07w\x02\x02\u070C\u070D\x07t\x02\x02\u070D\u070E\x07c\x02\x02\u070E\u070F\x07v\x02\x02\u070F\u0710\x07k\x02\x02\u0710\u0711\x07q\x02\x02\u0711\u0712\x07p\x02\x02\u0712\u0190\x03\x02\x02\x02\u0713\u0714\x07v\x02\x02\u0714\u0715\x07k\x02\x02\u0715\u0716\x07o\x02\x02\u0716\u0717\x07g\x02\x02\u0717\u0718\x07a\x02\x02\u0718\u0719\x07c\x02\x02\u0719\u071A\x07i\x02\x02\u071A\u071B\x07i\x02\x02\u071B\u0192\x03\x02\x02\x02\u071C\u071D\x07w\x02\x02\u071D\u071E\x07p\x02\x02\u071E\u071F\x07k\x02\x02\u071F\u0720\x07v\x02\x02\u0720\u0194\x03\x02\x02\x02\u0721\u0722\x07X\x02\x02\u0722\u0723\x07c\x02\x02\u0723\u0724\x07n\x02\x02\u0724\u0725\x07w\x02\x02\u0725\u0726\x07g\x02\x02\u0726\u0196\x03\x02\x02\x02\u0727\u0728\x07x\x02\x02\u0728\u0729\x07c\x02\x02\u0729\u072A\x07n\x02\x02\u072A\u072B\x07w\x02\x02\u072B\u072C\x07g\x02\x02\u072C\u072D\x07f\x02\x02\u072D\u072E\x07q\x02\x02\u072E\u072F\x07o\x02\x02\u072F\u0730\x07c\x02\x02\u0730\u0731\x07k\x02\x02\u0731\u0732\x07p\x02\x02\u0732\u0733\x07u\x02\x02\u0733\u0198\x03\x02\x02\x02\u0734\u0735\x07x\x02\x02\u0735\u0736\x07c\x02\x02\u0736\u0737\x07t\x02\x02\u0737\u0738\x07k\x02\x02\u0738\u0739\x07c\x02\x02\u0739\u073A\x07d\x02\x02\u073A\u073B\x07n\x02\x02\u073B\u073C\x07g\x02\x02\u073C\u073D\x07u\x02\x02\u073D\u019A\x03\x02\x02\x02\u073E\u073F\x07k\x02\x02\u073F\u0740\x07p\x02\x02\u0740\u0741\x07r\x02\x02\u0741\u0742\x07w\x02\x02\u0742\u0743\x07v\x02\x02\u0743\u019C\x03\x02\x02\x02\u0744\u0745\x07q\x02\x02\u0745\u0746\x07w\x02\x02\u0746\u0747\x07v\x02\x02\u0747\u0748\x07r\x02\x02\u0748\u0749\x07w\x02\x02\u0749\u074A\x07v\x02\x02\u074A\u019E\x03\x02\x02\x02\u074B\u074C\x07e\x02\x02\u074C\u074D\x07c\x02\x02\u074D\u074E\x07u\x02\x02\u074E\u074F\x07v\x02\x02\u074F\u01A0\x03\x02\x02\x02\u0750\u0751\x07t\x02\x02\u0751\u0752\x07w\x02\x02\u0752\u0753\x07n\x02\x02\u0753\u0754\x07g\x02\x02\u0754\u0755\x07a\x02\x02\u0755\u0756\x07r\x02\x02\u0756\u0757\x07t\x02\x02\u0757\u0758\x07k\x02\x02\u0758\u0759\x07q\x02\x02\u0759\u075A\x07t\x02\x02\u075A\u075B\x07k\x02\x02\u075B\u075C\x07v\x02\x02\u075C\u075D\x07{\x02\x02\u075D\u01A2\x03\x02\x02\x02\u075E\u075F\x07f\x02\x02\u075F\u0760\x07c\x02\x02\u0760\u0761\x07v\x02\x02\u0761\u0762\x07c\x02\x02\u0762\u0763\x07u\x02\x02\u0763\u0764\x07g\x02\x02\u0764\u0765\x07v\x02\x02\u0765\u0766\x07a\x02\x02\u0766\u0767\x07r\x02\x02\u0767\u0768\x07t\x02\x02\u0768\u0769\x07k\x02\x02\u0769\u076A\x07q\x02\x02\u076A\u076B\x07t\x02\x02\u076B\u076C\x07k\x02\x02\u076C\u076D\x07v\x02\x02\u076D\u076E\x07{\x02\x02\u076E\u01A4\x03\x02\x02\x02\u076F\u0770\x07f\x02\x02\u0770\u0771\x07g\x02\x02\u0771\u0772\x07h\x02\x02\u0772\u0773\x07c\x02\x02\u0773\u0774\x07w\x02\x02\u0774\u0775\x07n\x02\x02\u0775\u0776\x07v\x02\x02\u0776\u01A6\x03\x02\x02\x02\u0777\u0778\x07e\x02\x02\u0778\u0779\x07j\x02\x02\u0779\u077A\x07g\x02\x02\u077A\u077B\x07e\x02\x02\u077B\u077C\x07m\x02\x02\u077C\u077D\x07a\x02\x02\u077D\u077E\x07f\x02\x02\u077E\u077F\x07c\x02\x02\u077F\u0780\x07v\x02\x02\u0780\u0781\x07c\x02\x02\u0781\u0782\x07r\x02\x02\u0782\u0783\x07q\x02\x02\u0783\u0784\x07k\x02\x02\u0784\u0785\x07p\x02\x02\u0785\u0786\x07v\x02\x02\u0786\u01A8\x03\x02\x02\x02\u0787\u0788\x07e\x02\x02\u0788\u0789\x07j\x02\x02\u0789\u078A\x07g\x02\x02\u078A\u078B\x07e\x02\x02\u078B\u078C\x07m\x02\x02\u078C\u078D\x07a\x02\x02\u078D\u078E\x07j\x02\x02\u078E\u078F\x07k\x02\x02\u078F\u0790\x07g\x02\x02\u0790\u0791\x07t\x02\x02\u0791\u0792\x07c\x02\x02\u0792\u0793\x07t\x02\x02\u0793\u0794\x07e\x02\x02\u0794\u0795\x07j\x02\x02\u0795\u0796\x07{\x02\x02\u0796\u01AA\x03\x02\x02\x02\u0797\u0798\x07e\x02\x02\u0798\u0799\x07q\x02\x02\u0799\u079A\x07o\x02\x02\u079A\u079B\x07r\x02\x02\u079B\u079C\x07w\x02\x02\u079C\u079D\x07v\x02\x02\u079D\u079E\x07g\x02\x02\u079E\u079F\x07f\x02\x02\u079F\u01AC\x03\x02\x02\x02\u07A0\u07A1\x07p\x02\x02\u07A1\u07A2\x07q\x02\x02\u07A2\u07A3\x07p\x02\x02\u07A3\u07A4\x07a\x02\x02\u07A4\u07A5\x07p\x02\x02\u07A5\u07A6\x07w\x02\x02\u07A6\u07A7\x07n\x02\x02\u07A7\u07A8\x07n\x02\x02\u07A8\u01AE\x03\x02\x02\x02\u07A9\u07AA\x07p\x02\x02\u07AA\u07AB\x07q\x02\x02\u07AB\u07AC\x07p\x02\x02\u07AC\u07AD\x07a\x02\x02\u07AD\u07AE\x07|\x02\x02\u07AE\u07AF\x07g\x02\x02\u07AF\u07B0\x07t\x02\x02\u07B0\u07B1\x07q\x02\x02\u07B1\u01B0\x03\x02\x02\x02\u07B2\u07B3\x07r\x02\x02\u07B3\u07B4\x07c\x02\x02\u07B4\u07B5\x07t\x02\x02\u07B5\u07B6\x07v\x02\x02\u07B6\u07B7\x07k\x02\x02\u07B7\u07B8\x07c\x02\x02\u07B8\u07B9\x07n\x02\x02\u07B9\u07BA\x07a\x02\x02\u07BA\u07BB\x07p\x02\x02\u07BB\u07BC\x07w\x02\x02\u07BC\u07BD\x07n\x02\x02\u07BD\u07BE\x07n\x02\x02\u07BE\u01B2\x03\x02\x02\x02\u07BF\u07C0\x07r\x02\x02\u07C0\u07C1\x07c\x02\x02\u07C1\u07C2\x07t\x02\x02\u07C2\u07C3\x07v\x02\x02\u07C3\u07C4\x07k\x02\x02\u07C4\u07C5\x07c\x02\x02\u07C5\u07C6\x07n\x02\x02\u07C6\u07C7\x07a\x02\x02\u07C7\u07C8\x07|\x02\x02\u07C8\u07C9\x07g\x02\x02\u07C9\u07CA\x07t\x02\x02\u07CA\u07CB\x07q\x02\x02\u07CB\u01B4\x03\x02\x02\x02\u07CC\u07CD\x07c\x02\x02\u07CD\u07CE\x07n\x02\x02\u07CE\u07CF\x07y\x02\x02\u07CF\u07D0\x07c\x02\x02\u07D0\u07D1\x07{\x02\x02\u07D1\u07D2\x07u\x02\x02\u07D2\u07D3\x07a\x02\x02\u07D3\u07D4\x07p\x02\x02\u07D4\u07D5\x07w\x02\x02\u07D5\u07D6\x07n\x02\x02\u07D6\u07D7\x07n\x02\x02\u07D7\u01B6\x03\x02\x02\x02\u07D8\u07D9\x07c\x02\x02\u07D9\u07DA\x07n\x02\x02\u07DA\u07DB\x07y\x02\x02\u07DB\u07DC\x07c\x02\x02\u07DC\u07DD\x07{\x02\x02\u07DD\u07DE\x07u\x02\x02\u07DE\u07DF\x07a\x02\x02\u07DF\u07E0\x07|\x02\x02\u07E0\u07E1\x07g\x02\x02\u07E1\u07E2\x07t\x02\x02\u07E2\u07E3\x07q\x02\x02\u07E3\u01B8\x03\x02\x02\x02\u07E4\u07E5\x07e\x02\x02\u07E5\u07E6\x07q\x02\x02\u07E6\u07E7\x07o\x02\x02\u07E7\u07E8\x07r\x02\x02\u07E8\u07E9\x07q\x02\x02\u07E9\u07EA\x07p\x02\x02\u07EA\u07EB\x07g\x02\x02\u07EB\u07EC\x07p\x02\x02\u07EC\u07ED\x07v\x02\x02\u07ED\u07EE\x07u\x02\x02\u07EE\u01BA\x03\x02\x02\x02\u07EF\u07F0\x07c\x02\x02\u07F0\u07F1\x07n\x02\x02\u07F1\u07F2\x07n\x02\x02\u07F2\u07F3\x07a\x02\x02\u07F3\u07F4\x07o\x02\x02\u07F4\u07F5\x07g\x02\x02\u07F5\u07F6\x07c\x02\x02\u07F6\u07F7\x07u\x02\x02\u07F7\u07F8\x07w\x02\x02\u07F8\u07F9\x07t\x02\x02\u07F9\u07FA\x07g\x02\x02\u07FA\u07FB\x07u\x02\x02\u07FB\u01BC\x03\x02\x02\x02\u07FC\u07FD\x07u\x02\x02\u07FD\u07FE\x07e\x02\x02\u07FE\u07FF\x07c\x02\x02\u07FF\u0800\x07n\x02\x02\u0800\u0801\x07c\x02\x02\u0801\u0802\x07t\x02\x02\u0802\u01BE\x03\x02\x02\x02\u0803\u0804\x07e\x02\x02\u0804\u0805\x07q\x02\x02\u0805\u0806\x07o\x02\x02\u0806\u0807\x07r\x02\x02\u0807\u0808\x07q\x02\x02\u0808\u0809\x07p\x02\x02\u0809\u080A\x07g\x02\x02\u080A\u080B\x07p\x02\x02\u080B\u080C\x07v\x02\x02\u080C\u01C0\x03\x02\x02\x02\u080D\u080E\x07f\x02\x02\u080E\u080F\x07c\x02\x02\u080F\u0810\x07v\x02\x02\u0810\u0811\x07c\x02\x02\u0811\u0812\x07r\x02\x02\u0812\u0813\x07q\x02\x02\u0813\u0814\x07k\x02\x02\u0814\u0815\x07p\x02\x02\u0815\u0816\x07v\x02\x02\u0816\u0817\x07a\x02\x02\u0817\u0818\x07q\x02\x02\u0818\u0819\x07p\x02\x02\u0819\u081A\x07a\x02\x02\u081A\u081B\x07x\x02\x02\u081B\u081C\x07c\x02\x02\u081C\u081D\x07n\x02\x02\u081D\u081E\x07w\x02\x02\u081E\u081F\x07g\x02\x02\u081F\u0820\x07f\x02\x02\u0820\u0821\x07q\x02\x02\u0821\u0822\x07o\x02\x02\u0822\u0823\x07c\x02\x02\u0823\u0824\x07k\x02\x02\u0824\u0825\x07p\x02\x02\u0825\u0826\x07u\x02\x02\u0826\u01C2\x03\x02\x02\x02\u0827\u0828\x07f\x02\x02\u0828\u0829\x07c\x02\x02\u0829\u082A\x07v\x02\x02\u082A\u082B\x07c\x02\x02\u082B\u082C\x07r\x02\x02\u082C\u082D\x07q\x02\x02\u082D\u082E\x07k\x02\x02\u082E\u082F\x07p\x02\x02\u082F\u0830\x07v\x02\x02\u0830\u0831\x07a\x02\x02\u0831\u0832\x07q\x02\x02\u0832\u0833\x07p\x02\x02\u0833\u0834\x07a\x02\x02\u0834\u0835\x07x\x02\x02\u0835\u0836\x07c\x02\x02\u0836\u0837\x07t\x02\x02\u0837\u0838\x07k\x02\x02\u0838\u0839\x07c\x02\x02\u0839\u083A\x07d\x02\x02\u083A\u083B\x07n\x02\x02\u083B\u083C\x07g\x02\x02\u083C\u083D\x07u\x02\x02\u083D\u01C4\x03\x02\x02\x02\u083E\u083F\x07j\x02\x02\u083F\u0840\x07k\x02\x02\u0840\u0841\x07g\x02\x02\u0841\u0842\x07t\x02\x02\u0842\u0843\x07c\x02\x02\u0843\u0844\x07t\x02\x02\u0844\u0845\x07e\x02\x02\u0845\u0846\x07j\x02\x02\u0846\u0847\x07k\x02\x02\u0847\u0848\x07e\x02\x02\u0848\u0849\x07c\x02\x02\u0849\u084A\x07n\x02\x02\u084A\u084B\x07a\x02\x02\u084B\u084C\x07q\x02\x02\u084C\u084D\x07p\x02\x02\u084D\u084E\x07a\x02\x02\u084E\u084F\x07x\x02\x02\u084F\u0850\x07c\x02\x02\u0850\u0851\x07n\x02\x02\u0851\u0852\x07w\x02\x02\u0852\u0853\x07g\x02\x02\u0853\u0854\x07f\x02\x02\u0854\u0855\x07q\x02\x02\u0855\u0856\x07o\x02\x02\u0856\u0857\x07c\x02\x02\u0857\u0858\x07k\x02\x02\u0858\u0859\x07p\x02\x02\u0859\u085A\x07u\x02\x02\u085A\u01C6\x03\x02\x02\x02\u085B\u085C\x07j\x02\x02\u085C\u085D\x07k\x02\x02\u085D\u085E\x07g\x02\x02\u085E\u085F\x07t\x02\x02\u085F\u0860\x07c\x02\x02\u0860\u0861\x07t\x02\x02\u0861\u0862\x07e\x02\x02\u0862\u0863\x07j\x02\x02\u0863\u0864\x07k\x02\x02\u0864\u0865\x07e\x02\x02\u0865\u0866\x07c\x02\x02\u0866\u0867\x07n\x02\x02\u0867\u0868\x07a\x02\x02\u0868\u0869\x07q\x02\x02\u0869\u086A\x07p\x02\x02\u086A\u086B\x07a\x02\x02\u086B\u086C\x07x\x02\x02\u086C\u086D\x07c\x02\x02\u086D\u086E\x07t\x02\x02\u086E\u086F\x07k\x02\x02\u086F\u0870\x07c\x02\x02\u0870\u0871\x07d\x02\x02\u0871\u0872\x07n\x02\x02\u0872\u0873\x07g\x02\x02\u0873\u0874\x07u\x02\x02\u0874\u01C8\x03\x02\x02\x02\u0875\u0876\x07u\x02\x02\u0876\u0877\x07g\x02\x02\u0877\u0878\x07v\x02\x02\u0878\u01CA\x03\x02\x02\x02\u0879\u087A\x07n\x02\x02\u087A\u087B\x07c\x02\x02\u087B\u087C\x07p\x02\x02\u087C\u087D\x07i\x02\x02\u087D\u087E\x07w\x02\x02\u087E\u087F\x07c\x02\x02\u087F\u0880\x07i\x02\x02\u0880\u0881\x07g\x02\x02\u0881\u01CC\x03\x02\x02\x02\u0882\u0883\t\x02\x02\x02\u0883\u01CE\x03\x02\x02\x02\u0884\u0885\x042;\x02\u0885\u01D0\x03\x02\x02\x02\u0886\u0888\x05\x1D\x0F\x02\u0887\u0886\x03\x02\x02\x02\u0887\u0888\x03\x02\x02\x02\u0888\u088A\x03\x02\x02\x02\u0889\u088B\x05\u01CF\xE8\x02\u088A\u0889\x03\x02\x02\x02\u088B\u088C\x03\x02\x02\x02\u088C\u088A\x03\x02\x02\x02\u088C\u088D\x03\x02\x02\x02\u088D\u01D2\x03\x02\x02\x02\u088E\u088F\x05\u01D1\xE9\x02\u088F\u0893\x070\x02\x02\u0890\u0892\x05\u01D1\xE9\x02\u0891\u0890\x03\x02\x02\x02\u0892\u0895\x03\x02\x02\x02\u0893\u0891\x03\x02\x02\x02\u0893\u0894\x03\x02\x02\x02\u0894\u01D4\x03\x02\x02\x02\u0895\u0893\x03\x02\x02\x02\u0896\u0897\x07v\x02\x02\u0897\u0898\x07t\x02\x02\u0898\u0899\x07w\x02\x02\u0899\u08A0\x07g\x02\x02\u089A\u089B\x07h\x02\x02\u089B\u089C\x07c\x02\x02\u089C\u089D\x07n\x02\x02\u089D\u089E\x07u\x02\x02\u089E\u08A0\x07g\x02\x02\u089F\u0896\x03\x02\x02\x02\u089F\u089A\x03\x02\x02\x02\u08A0\u01D6\x03\x02\x02\x02\u08A1\u08A5\x07$\x02\x02\u08A2\u08A4\n\x03\x02\x02\u08A3\u08A2\x03\x02\x02\x02\u08A4\u08A7\x03\x02\x02\x02\u08A5\u08A3\x03\x02\x02\x02\u08A5\u08A6\x03\x02\x02\x02\u08A6\u08A8\x03\x02\x02\x02\u08A7\u08A5\x03\x02\x02\x02\u08A8\u08A9\x07$\x02\x02\u08A9\u01D8\x03\x02\x02\x02\u08AA\u08AE\x05\u01CD\xE7\x02\u08AB\u08AD\t\x04\x02\x02\u08AC\u08AB\x03\x02\x02\x02\u08AD\u08B0\x03\x02\x02\x02\u08AE\u08AC\x03\x02\x02\x02\u08AE\u08AF\x03\x02\x02\x02\u08AF\u08C0\x03\x02\x02\x02\u08B0\u08AE\x03\x02\x02\x02\u08B1\u08B3\x05\u01CF\xE8\x02\u08B2\u08B4\t\x04\x02\x02\u08B3\u08B2\x03\x02\x02\x02\u08B4\u08B5\x03\x02\x02\x02\u08B5\u08B3\x03\x02\x02\x02\u08B5\u08B6\x03\x02\x02\x02\u08B6\u08C0\x03\x02\x02\x02\u08B7\u08BB\x07)\x02\x02\u08B8\u08BA\x0B\x02\x02\x02\u08B9\u08B8\x03\x02\x02\x02\u08BA\u08BD\x03\x02\x02\x02\u08BB\u08BC\x03\x02\x02\x02\u08BB\u08B9\x03\x02\x02\x02\u08BC\u08BE\x03\x02\x02\x02\u08BD\u08BB\x03\x02\x02\x02\u08BE\u08C0\x07)\x02\x02\u08BF\u08AA\x03\x02\x02\x02\u08BF\u08B1\x03\x02\x02\x02\u08BF\u08B7\x03\x02\x02\x02\u08C0\u01DA\x03\x02\x02\x02\u08C1\u08C3\t\x05\x02\x02\u08C2\u08C1\x03\x02\x02\x02\u08C3\u08C4\x03\x02\x02\x02\u08C4\u08C2\x03\x02\x02\x02\u08C4\u08C5\x03\x02\x02\x02\u08C5\u08C6\x03\x02\x02\x02\u08C6\u08C7\b\xEE\x02\x02\u08C7\u01DC\x03\x02\x02\x02\u08C8\u08C9\x07=\x02\x02\u08C9\u01DE\x03\x02\x02\x02\u08CA\u08CB\x071\x02\x02\u08CB\u08CC\x07,\x02\x02\u08CC\u08D0\x03\x02\x02\x02\u08CD\u08CF\x0B\x02\x02\x02\u08CE\u08CD\x03\x02\x02\x02\u08CF\u08D2\x03\x02\x02\x02\u08D0\u08D1\x03\x02\x02\x02\u08D0\u08CE\x03\x02\x02\x02\u08D1\u08D3\x03\x02\x02\x02\u08D2\u08D0\x03\x02\x02\x02\u08D3\u08D4\x07,\x02\x02\u08D4\u08D5\x071\x02\x02\u08D5\u08D6\x03\x02\x02\x02\u08D6\u08D7\b\xF0\x03\x02\u08D7\u01E0\x03\x02\x02\x02\u08D8\u08D9\x071\x02\x02\u08D9\u08DA\x071\x02\x02\u08DA\u08DE\x03\x02\x02\x02\u08DB\u08DD\x0B\x02\x02\x02\u08DC\u08DB\x03\x02\x02\x02\u08DD\u08E0\x03\x02\x02\x02\u08DE\u08DF\x03\x02\x02\x02\u08DE\u08DC\x03\x02\x02\x02\u08DF\u08E1\x03\x02\x02\x02\u08E0\u08DE\x03\x02\x02\x02\u08E1\u08E2\x07\f\x02\x02\u08E2\u08E3\x03\x02\x02\x02\u08E3\u08E4\b\xF1\x03\x02\u08E4\u01E2\x03\x02\x02\x02\x0F\x02\u0887\u088C\u0893\u089F\u08A5\u08AE\u08B5\u08BB\u08BF\u08C4\u08D0\u08DE\x04\x02\x03\x02\x02\x04\x02"),i=t.decisionToState.map(function(t,e){return new kr.dfa.DFA(t,e)});u.prototype=Object.create(kr.Lexer.prototype),u.prototype.constructor=u,Object.defineProperty(u.prototype,"atn",{get:function(){return t}}),u.EOF=kr.Token.EOF,u.LPAREN=1,u.RPAREN=2,u.QLPAREN=3,u.QRPAREN=4,u.GLPAREN=5,u.GRPAREN=6,u.EQ=7,u.LT=8,u.MT=9,u.ME=10,u.NEQ=11,u.LE=12,u.PLUS=13,u.MINUS=14,u.MUL=15,u.DIV=16,u.COMMA=17,u.POINTER=18,u.COLON=19,u.ASSIGN=20,u.MEMBERSHIP=21,u.EVAL=22,u.IF=23,u.THEN=24,u.ELSE=25,u.USING=26,u.WITH=27,u.CURRENT_DATE=28,u.ON=29,u.DROP=30,u.KEEP=31,u.CALC=32,u.ATTRCALC=33,u.RENAME=34,u.AS=35,u.AND=36,u.OR=37,u.XOR=38,u.NOT=39,u.BETWEEN=40,u.IN=41,u.NOT_IN=42,u.NULL_CONSTANT=43,u.ISNULL=44,u.EX=45,u.UNION=46,u.DIFF=47,u.SYMDIFF=48,u.INTERSECT=49,u.KEYS=50,u.INTYEAR=51,u.INTMONTH=52,u.INTDAY=53,u.CHECK=54,u.EXISTS_IN=55,u.TO=56,u.RETURN=57,u.IMBALANCE=58,u.ERRORCODE=59,u.ALL=60,u.AGGREGATE=61,u.ERRORLEVEL=62,u.ORDER=63,u.BY=64,u.RANK=65,u.ASC=66,u.DESC=67,u.MIN=68,u.MAX=69,u.FIRST=70,u.LAST=71,u.INDEXOF=72,u.ABS=73,u.KEY=74,u.LN=75,u.LOG=76,u.TRUNC=77,u.ROUND=78,u.POWER=79,u.MOD=80,u.LEN=81,u.CONCAT=82,u.TRIM=83,u.UCASE=84,u.LCASE=85,u.SUBSTR=86,u.SUM=87,u.AVG=88,u.MEDIAN=89,u.COUNT=90,u.DIMENSION=91,u.MEASURE=92,u.ATTRIBUTE=93,u.FILTER=94,u.MERGE=95,u.EXP=96,u.ROLE=97,u.VIRAL=98,u.CHARSET_MATCH=99,u.TYPE=100,u.NVL=101,u.HIERARCHY=102,u.OPTIONAL=103,u.INVALID=104,u.LEVENSHTEIN=105,u.VALUE_DOMAIN=106,u.VARIABLE=107,u.DATA=108,u.STRUCTURE=109,u.DATASET=110,u.OPERATOR=111,u.DEFINE=112,u.PUT_SYMBOL=113,u.DATAPOINT=114,u.HIERARCHICAL=115,u.RULESET=116,u.RULE=117,u.END=118,u.ALTER_DATASET=119,u.LTRIM=120,u.RTRIM=121,u.INSTR=122,u.REPLACE=123,u.CEIL=124,u.FLOOR=125,u.SQRT=126,u.ANY=127,u.SETDIFF=128,u.STDDEV_POP=129,u.STDDEV_SAMP=130,u.VAR_POP=131,u.VAR_SAMP=132,u.GROUP=133,u.EXCEPT=134,u.HAVING=135,u.FIRST_VALUE=136,u.LAST_VALUE=137,u.LAG=138,u.LEAD=139,u.RATIO_TO_REPORT=140,u.OVER=141,u.PRECEDING=142,u.FOLLOWING=143,u.UNBOUNDED=144,u.PARTITION=145,u.ROWS=146,u.RANGE=147,u.CURRENT=148,u.VALID=149,u.FILL_TIME_SERIES=150,u.FLOW_TO_STOCK=151,u.STOCK_TO_FLOW=152,u.TIMESHIFT=153,u.MEASURES=154,u.NO_MEASURES=155,u.CONDITION=156,u.BOOLEAN=157,u.DATE=158,u.TIME_PERIOD=159,u.NUMBER=160,u.STRING=161,u.TIME=162,u.INTEGER=163,u.FLOAT=164,u.LIST=165,u.RECORD=166,u.RESTRICT=167,u.YYYY=168,u.MM=169,u.DD=170,u.MAX_LENGTH=171,u.REGEXP=172,u.IS=173,u.WHEN=174,u.FROM=175,u.AGGREGATES=176,u.POINTS=177,u.POINT=178,u.TOTAL=179,u.PARTIAL=180,u.ALWAYS=181,u.INNER_JOIN=182,u.LEFT_JOIN=183,u.CROSS_JOIN=184,u.FULL_JOIN=185,u.MAPS_FROM=186,u.MAPS_TO=187,u.MAP_TO=188,u.MAP_FROM=189,u.RETURNS=190,u.PIVOT=191,u.CUSTOMPIVOT=192,u.UNPIVOT=193,u.SUBSPACE=194,u.APPLY=195,u.CONDITIONED=196,u.PERIOD_INDICATOR=197,u.SINGLE=198,u.DURATION=199,u.TIME_AGG=200,u.UNIT=201,u.VALUE=202,u.VALUEDOMAINS=203,u.VARIABLES=204,u.INPUT=205,u.OUTPUT=206,u.CAST=207,u.RULE_PRIORITY=208,u.DATASET_PRIORITY=209,u.DEFAULT=210,u.CHECK_DATAPOINT=211,u.CHECK_HIERARCHY=212,u.COMPUTED=213,u.NON_NULL=214,u.NON_ZERO=215,u.PARTIAL_NULL=216,u.PARTIAL_ZERO=217,u.ALWAYS_NULL=218,u.ALWAYS_ZERO=219,u.COMPONENTS=220,u.ALL_MEASURES=221,u.SCALAR=222,u.COMPONENT=223,u.DATAPOINT_ON_VD=224,u.DATAPOINT_ON_VAR=225,u.HIERARCHICAL_ON_VD=226,u.HIERARCHICAL_ON_VAR=227,u.SET=228,u.LANGUAGE=229,u.INTEGER_CONSTANT=230,u.NUMBER_CONSTANT=231,u.BOOLEAN_CONSTANT=232,u.STRING_CONSTANT=233,u.IDENTIFIER=234,u.WS=235,u.EOL=236,u.ML_COMMENT=237,u.SL_COMMENT=238,u.prototype.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],u.prototype.modeNames=["DEFAULT_MODE"],u.prototype.literalNames=[null,"'('","')'","'['","']'","'{'","'}'","'='","'<'","'>'","'>='","'<>'","'<='","'+'","'-'","'*'","'/'","','","'->'","':'","':='","'#'","'eval'","'if'","'then'","'else'","'using'","'with'","'current_date'","'on'","'drop'","'keep'","'calc'","'attrcalc'","'rename'","'as'","'and'","'or'","'xor'","'not'","'between'","'in'","'not_in'","'null'","'isnull'","'ex'","'union'","'diff'","'symdiff'","'intersect'","'keys'","'intyear'","'intmonth'","'intday'","'check'","'exists_in'","'to'","'return'","'imbalance'","'errorcode'","'all'","'aggr'","'errorlevel'","'order'","'by'","'rank'","'asc'","'desc'","'min'","'max'","'first'","'last'","'indexof'","'abs'","'key'","'ln'","'log'","'trunc'","'round'","'power'","'mod'","'length'","'||'","'trim'","'upper'","'lower'","'substr'","'sum'","'avg'","'median'","'count'","'identifier'","'measure'","'attribute'","'filter'","'merge'","'exp'","'componentRole'","'viral'","'match_characters'","'type'","'nvl'","'hierarchy'","'_'","'invalid'","'levenshtein'","'valuedomain'","'variable'","'data'","'structure'","'dataset'","'operator'","'define'","'<-'","'datapoint'","'hierarchical'","'ruleset'","'rule'","'end'","'alterDataset'","'ltrim'","'rtrim'","'instr'","'replace'","'ceil'","'floor'","'sqrt'","'any'","'setdiff'","'stddev_pop'","'stddev_samp'","'var_pop'","'var_samp'","'group'","'except'","'having'","'first_value'","'last_value'","'lag'","'lead'","'ratio_to_report'","'over'","'preceding'","'following'","'unbounded'","'partition'","'rows'","'range'","'current'","'valid'","'fill_time_series'","'flow_to_stock'","'stock_to_flow'","'timeshift'","'measures'","'no_measures'","'condition'","'boolean'","'date'","'time_period'","'number'","'string'","'time'","'integer'","'float'","'list'","'record'","'restrict'","'yyyy'","'mm'","'dd'","'maxLength'","'regexp'","'is'","'when'","'from'","'aggregates'","'points'","'point'","'total'","'partial'","'always'","'inner_join'","'left_join'","'cross_join'","'full_join'","'maps_from'","'maps_to'","'map_to'","'map_from'","'returns'","'pivot'","'customPivot'","'unpivot'","'sub'","'apply'","'conditioned'","'period_indicator'","'single'","'duration'","'time_agg'","'unit'","'Value'","'valuedomains'","'variables'","'input'","'output'","'cast'","'rule_priority'","'dataset_priority'","'default'","'check_datapoint'","'check_hierarchy'","'computed'","'non_null'","'non_zero'","'partial_null'","'partial_zero'","'always_null'","'always_zero'","'components'","'all_measures'","'scalar'","'component'","'datapoint_on_valuedomains'","'datapoint_on_variables'","'hierarchical_on_valuedomains'","'hierarchical_on_variables'","'set'","'language'",null,null,null,null,null,null,"';'"],u.prototype.symbolicNames=[null,"LPAREN","RPAREN","QLPAREN","QRPAREN","GLPAREN","GRPAREN","EQ","LT","MT","ME","NEQ","LE","PLUS","MINUS","MUL","DIV","COMMA","POINTER","COLON","ASSIGN","MEMBERSHIP","EVAL","IF","THEN","ELSE","USING","WITH","CURRENT_DATE","ON","DROP","KEEP","CALC","ATTRCALC","RENAME","AS","AND","OR","XOR","NOT","BETWEEN","IN","NOT_IN","NULL_CONSTANT","ISNULL","EX","UNION","DIFF","SYMDIFF","INTERSECT","KEYS","INTYEAR","INTMONTH","INTDAY","CHECK","EXISTS_IN","TO","RETURN","IMBALANCE","ERRORCODE","ALL","AGGREGATE","ERRORLEVEL","ORDER","BY","RANK","ASC","DESC","MIN","MAX","FIRST","LAST","INDEXOF","ABS","KEY","LN","LOG","TRUNC","ROUND","POWER","MOD","LEN","CONCAT","TRIM","UCASE","LCASE","SUBSTR","SUM","AVG","MEDIAN","COUNT","DIMENSION","MEASURE","ATTRIBUTE","FILTER","MERGE","EXP","ROLE","VIRAL","CHARSET_MATCH","TYPE","NVL","HIERARCHY","OPTIONAL","INVALID","LEVENSHTEIN","VALUE_DOMAIN","VARIABLE","DATA","STRUCTURE","DATASET","OPERATOR","DEFINE","PUT_SYMBOL","DATAPOINT","HIERARCHICAL","RULESET","RULE","END","ALTER_DATASET","LTRIM","RTRIM","INSTR","REPLACE","CEIL","FLOOR","SQRT","ANY","SETDIFF","STDDEV_POP","STDDEV_SAMP","VAR_POP","VAR_SAMP","GROUP","EXCEPT","HAVING","FIRST_VALUE","LAST_VALUE","LAG","LEAD","RATIO_TO_REPORT","OVER","PRECEDING","FOLLOWING","UNBOUNDED","PARTITION","ROWS","RANGE","CURRENT","VALID","FILL_TIME_SERIES","FLOW_TO_STOCK","STOCK_TO_FLOW","TIMESHIFT","MEASURES","NO_MEASURES","CONDITION","BOOLEAN","DATE","TIME_PERIOD","NUMBER","STRING","TIME","INTEGER","FLOAT","LIST","RECORD","RESTRICT","YYYY","MM","DD","MAX_LENGTH","REGEXP","IS","WHEN","FROM","AGGREGATES","POINTS","POINT","TOTAL","PARTIAL","ALWAYS","INNER_JOIN","LEFT_JOIN","CROSS_JOIN","FULL_JOIN","MAPS_FROM","MAPS_TO","MAP_TO","MAP_FROM","RETURNS","PIVOT","CUSTOMPIVOT","UNPIVOT","SUBSPACE","APPLY","CONDITIONED","PERIOD_INDICATOR","SINGLE","DURATION","TIME_AGG","UNIT","VALUE","VALUEDOMAINS","VARIABLES","INPUT","OUTPUT","CAST","RULE_PRIORITY","DATASET_PRIORITY","DEFAULT","CHECK_DATAPOINT","CHECK_HIERARCHY","COMPUTED","NON_NULL","NON_ZERO","PARTIAL_NULL","PARTIAL_ZERO","ALWAYS_NULL","ALWAYS_ZERO","COMPONENTS","ALL_MEASURES","SCALAR","COMPONENT","DATAPOINT_ON_VD","DATAPOINT_ON_VAR","HIERARCHICAL_ON_VD","HIERARCHICAL_ON_VAR","SET","LANGUAGE","INTEGER_CONSTANT","NUMBER_CONSTANT","BOOLEAN_CONSTANT","STRING_CONSTANT","IDENTIFIER","WS","EOL","ML_COMMENT","SL_COMMENT"],u.prototype.ruleNames=["LPAREN","RPAREN","QLPAREN","QRPAREN","GLPAREN","GRPAREN","EQ","LT","MT","ME","NEQ","LE","PLUS","MINUS","MUL","DIV","COMMA","POINTER","COLON","ASSIGN","MEMBERSHIP","EVAL","IF","THEN","ELSE","USING","WITH","CURRENT_DATE","ON","DROP","KEEP","CALC","ATTRCALC","RENAME","AS","AND","OR","XOR","NOT","BETWEEN","IN","NOT_IN","NULL_CONSTANT","ISNULL","EX","UNION","DIFF","SYMDIFF","INTERSECT","KEYS","INTYEAR","INTMONTH","INTDAY","CHECK","EXISTS_IN","TO","RETURN","IMBALANCE","ERRORCODE","ALL","AGGREGATE","ERRORLEVEL","ORDER","BY","RANK","ASC","DESC","MIN","MAX","FIRST","LAST","INDEXOF","ABS","KEY","LN","LOG","TRUNC","ROUND","POWER","MOD","LEN","CONCAT","TRIM","UCASE","LCASE","SUBSTR","SUM","AVG","MEDIAN","COUNT","DIMENSION","MEASURE","ATTRIBUTE","FILTER","MERGE","EXP","ROLE","VIRAL","CHARSET_MATCH","TYPE","NVL","HIERARCHY","OPTIONAL","INVALID","LEVENSHTEIN","VALUE_DOMAIN","VARIABLE","DATA","STRUCTURE","DATASET","OPERATOR","DEFINE","PUT_SYMBOL","DATAPOINT","HIERARCHICAL","RULESET","RULE","END","ALTER_DATASET","LTRIM","RTRIM","INSTR","REPLACE","CEIL","FLOOR","SQRT","ANY","SETDIFF","STDDEV_POP","STDDEV_SAMP","VAR_POP","VAR_SAMP","GROUP","EXCEPT","HAVING","FIRST_VALUE","LAST_VALUE","LAG","LEAD","RATIO_TO_REPORT","OVER","PRECEDING","FOLLOWING","UNBOUNDED","PARTITION","ROWS","RANGE","CURRENT","VALID","FILL_TIME_SERIES","FLOW_TO_STOCK","STOCK_TO_FLOW","TIMESHIFT","MEASURES","NO_MEASURES","CONDITION","BOOLEAN","DATE","TIME_PERIOD","NUMBER","STRING","TIME","INTEGER","FLOAT","LIST","RECORD","RESTRICT","YYYY","MM","DD","MAX_LENGTH","REGEXP","IS","WHEN","FROM","AGGREGATES","POINTS","POINT","TOTAL","PARTIAL","ALWAYS","INNER_JOIN","LEFT_JOIN","CROSS_JOIN","FULL_JOIN","MAPS_FROM","MAPS_TO","MAP_TO","MAP_FROM","RETURNS","PIVOT","CUSTOMPIVOT","UNPIVOT","SUBSPACE","APPLY","CONDITIONED","PERIOD_INDICATOR","SINGLE","DURATION","TIME_AGG","UNIT","VALUE","VALUEDOMAINS","VARIABLES","INPUT","OUTPUT","CAST","RULE_PRIORITY","DATASET_PRIORITY","DEFAULT","CHECK_DATAPOINT","CHECK_HIERARCHY","COMPUTED","NON_NULL","NON_ZERO","PARTIAL_NULL","PARTIAL_ZERO","ALWAYS_NULL","ALWAYS_ZERO","COMPONENTS","ALL_MEASURES","SCALAR","COMPONENT","DATAPOINT_ON_VD","DATAPOINT_ON_VAR","HIERARCHICAL_ON_VD","HIERARCHICAL_ON_VAR","SET","LANGUAGE","LETTER","DIGITS0_9","INTEGER_CONSTANT","NUMBER_CONSTANT","BOOLEAN_CONSTANT","STRING_CONSTANT","IDENTIFIER","WS","EOL","ML_COMMENT","SL_COMMENT"],u.prototype.grammarFileName="Vtl.g4";var n=require("antlr4/index");r.prototype=Object.create(n.tree.ParseTreeListener.prototype),r.prototype.constructor=r,r.prototype.enterStart=function(){},r.prototype.exitStart=function(){},r.prototype.enterTemporaryAssignment=function(){},r.prototype.exitTemporaryAssignment=function(){},r.prototype.enterPersistAssignment=function(){},r.prototype.exitPersistAssignment=function(){},r.prototype.enterDefineExpression=function(){},r.prototype.exitDefineExpression=function(){},r.prototype.enterVarIdExpr=function(){},r.prototype.exitVarIdExpr=function(){},r.prototype.enterMembershipExpr=function(){},r.prototype.exitMembershipExpr=function(){},r.prototype.enterInNotInExpr=function(){},r.prototype.exitInNotInExpr=function(){},r.prototype.enterBooleanExpr=function(){},r.prototype.exitBooleanExpr=function(){},r.prototype.enterComparisonExpr=function(){},r.prototype.exitComparisonExpr=function(){},r.prototype.enterUnaryExpr=function(){},r.prototype.exitUnaryExpr=function(){},r.prototype.enterFunctionsExpression=function(){},r.prototype.exitFunctionsExpression=function(){},r.prototype.enterIfExpr=function(){},r.prototype.exitIfExpr=function(){},r.prototype.enterClauseExpr=function(){},r.prototype.exitClauseExpr=function(){},r.prototype.enterArithmeticExpr=function(){},r.prototype.exitArithmeticExpr=function(){},r.prototype.enterParenthesisExpr=function(){},r.prototype.exitParenthesisExpr=function(){},r.prototype.enterConstantExpr=function(){},r.prototype.exitConstantExpr=function(){},r.prototype.enterArithmeticExprOrConcat=function(){},r.prototype.exitArithmeticExprOrConcat=function(){},r.prototype.enterJoinFunctions=function(){},r.prototype.exitJoinFunctions=function(){},r.prototype.enterGenericFunctions=function(){},r.prototype.exitGenericFunctions=function(){},r.prototype.enterStringFunctions=function(){},r.prototype.exitStringFunctions=function(){},r.prototype.enterNumericFunctions=function(){},r.prototype.exitNumericFunctions=function(){},r.prototype.enterComparisonFunctions=function(){},r.prototype.exitComparisonFunctions=function(){},r.prototype.enterTimeFunctions=function(){},r.prototype.exitTimeFunctions=function(){},r.prototype.enterSetFunctions=function(){},r.prototype.exitSetFunctions=function(){},r.prototype.enterHierarchyFunctions=function(){},r.prototype.exitHierarchyFunctions=function(){},r.prototype.enterValidationFunctions=function(){},r.prototype.exitValidationFunctions=function(){},r.prototype.enterConditionalFunctions=function(){},r.prototype.exitConditionalFunctions=function(){},r.prototype.enterAggregateFunctions=function(){},r.prototype.exitAggregateFunctions=function(){},r.prototype.enterAnalyticFunctions=function(){},r.prototype.exitAnalyticFunctions=function(){},r.prototype.enterDistanceFunctions=function(){},r.prototype.exitDistanceFunctions=function(){},r.prototype.enterDatasetClause=function(){},r.prototype.exitDatasetClause=function(){},r.prototype.enterRenameClause=function(){},r.prototype.exitRenameClause=function(){},r.prototype.enterAggrClause=function(){},r.prototype.exitAggrClause=function(){},r.prototype.enterFilterClause=function(){},r.prototype.exitFilterClause=function(){},r.prototype.enterCalcClause=function(){},r.prototype.exitCalcClause=function(){},r.prototype.enterKeepOrDropClause=function(){},r.prototype.exitKeepOrDropClause=function(){},r.prototype.enterPivotOrUnpivotClause=function(){},r.prototype.exitPivotOrUnpivotClause=function(){},r.prototype.enterCustomPivotClause=function(){},r.prototype.exitCustomPivotClause=function(){},r.prototype.enterSubspaceClause=function(){},r.prototype.exitSubspaceClause=function(){},r.prototype.enterJoinExpr=function(){},r.prototype.exitJoinExpr=function(){},r.prototype.enterDefOperator=function(){},r.prototype.exitDefOperator=function(){},r.prototype.enterDefDatapointRuleset=function(){},r.prototype.exitDefDatapointRuleset=function(){},r.prototype.enterDefHierarchical=function(){},r.prototype.exitDefHierarchical=function(){},r.prototype.enterCallDataset=function(){},r.prototype.exitCallDataset=function(){},r.prototype.enterEvalAtom=function(){},r.prototype.exitEvalAtom=function(){},r.prototype.enterCastExprDataset=function(){},r.prototype.exitCastExprDataset=function(){},r.prototype.enterParameter=function(){},r.prototype.exitParameter=function(){},r.prototype.enterUnaryStringFunction=function(){},r.prototype.exitUnaryStringFunction=function(){},r.prototype.enterSubstrAtom=function(){},r.prototype.exitSubstrAtom=function(){},r.prototype.enterReplaceAtom=function(){},r.prototype.exitReplaceAtom=function(){},r.prototype.enterInstrAtom=function(){},r.prototype.exitInstrAtom=function(){},r.prototype.enterUnaryNumeric=function(){},r.prototype.exitUnaryNumeric=function(){},r.prototype.enterUnaryWithOptionalNumeric=function(){},r.prototype.exitUnaryWithOptionalNumeric=function(){},r.prototype.enterBinaryNumeric=function(){},r.prototype.exitBinaryNumeric=function(){},r.prototype.enterBetweenAtom=function(){},r.prototype.exitBetweenAtom=function(){},r.prototype.enterCharsetMatchAtom=function(){},r.prototype.exitCharsetMatchAtom=function(){},r.prototype.enterIsNullAtom=function(){},r.prototype.exitIsNullAtom=function(){},r.prototype.enterExistInAtom=function(){},r.prototype.exitExistInAtom=function(){},r.prototype.enterPeriodAtom=function(){},r.prototype.exitPeriodAtom=function(){},r.prototype.enterFillTimeAtom=function(){},r.prototype.exitFillTimeAtom=function(){},r.prototype.enterFlowAtom=function(){},r.prototype.exitFlowAtom=function(){},r.prototype.enterTimeShiftAtom=function(){},r.prototype.exitTimeShiftAtom=function(){},r.prototype.enterTimeAggAtom=function(){},r.prototype.exitTimeAggAtom=function(){},r.prototype.enterCurrentDateAtom=function(){},r.prototype.exitCurrentDateAtom=function(){},r.prototype.enterUnionAtom=function(){},r.prototype.exitUnionAtom=function(){},r.prototype.enterIntersectAtom=function(){},r.prototype.exitIntersectAtom=function(){},r.prototype.enterSetOrSYmDiffAtom=function(){},r.prototype.exitSetOrSYmDiffAtom=function(){},r.prototype.enterHierarchyOperators=function(){},r.prototype.exitHierarchyOperators=function(){},r.prototype.enterValidateDPruleset=function(){},r.prototype.exitValidateDPruleset=function(){},r.prototype.enterValidateHRruleset=function(){},r.prototype.exitValidateHRruleset=function(){},r.prototype.enterValidationSimple=function(){},r.prototype.exitValidationSimple=function(){},r.prototype.enterNvlAtom=function(){},r.prototype.exitNvlAtom=function(){},r.prototype.enterAggrDataset=function(){},r.prototype.exitAggrDataset=function(){},r.prototype.enterAnSimpleFunction=function(){},r.prototype.exitAnSimpleFunction=function(){},r.prototype.enterLagOrLeadAn=function(){},r.prototype.exitLagOrLeadAn=function(){},r.prototype.enterRatioToReportAn=function(){},r.prototype.exitRatioToReportAn=function(){},r.prototype.enterLevenshteinAtom=function(){},r.prototype.exitLevenshteinAtom=function(){},r.prototype.enterRenameClauseItem=function(){},r.prototype.exitRenameClauseItem=function(){},r.prototype.enterAggregateClause=function(){},r.prototype.exitAggregateClause=function(){},r.prototype.enterAggrFunctionClause=function(){},r.prototype.exitAggrFunctionClause=function(){},r.prototype.enterCalcClauseItem=function(){},r.prototype.exitCalcClauseItem=function(){},r.prototype.enterSubspaceClauseItem=function(){},r.prototype.exitSubspaceClauseItem=function(){},r.prototype.enterJoinClauseWithoutUsing=function(){},r.prototype.exitJoinClauseWithoutUsing=function(){},r.prototype.enterJoinClause=function(){},r.prototype.exitJoinClause=function(){},r.prototype.enterJoinClauseItem=function(){},r.prototype.exitJoinClauseItem=function(){},r.prototype.enterJoinBody=function(){},r.prototype.exitJoinBody=function(){},r.prototype.enterJoinApplyClause=function(){},r.prototype.exitJoinApplyClause=function(){},r.prototype.enterPartitionByClause=function(){},r.prototype.exitPartitionByClause=function(){},r.prototype.enterOrderByClause=function(){},r.prototype.exitOrderByClause=function(){},r.prototype.enterOrderByItem=function(){},r.prototype.exitOrderByItem=function(){},r.prototype.enterWindowingClause=function(){},r.prototype.exitWindowingClause=function(){},r.prototype.enterSignedInteger=function(){},r.prototype.exitSignedInteger=function(){},r.prototype.enterLimitClauseItem=function(){},r.prototype.exitLimitClauseItem=function(){},r.prototype.enterGroupByOrExcept=function(){},r.prototype.exitGroupByOrExcept=function(){},r.prototype.enterGroupAll=function(){},r.prototype.exitGroupAll=function(){},r.prototype.enterHavingClause=function(){},r.prototype.exitHavingClause=function(){},r.prototype.enterParameterItem=function(){},r.prototype.exitParameterItem=function(){},r.prototype.enterOutputParameterType=function(){},r.prototype.exitOutputParameterType=function(){},r.prototype.enterOutputParameterTypeComponent=function(){},r.prototype.exitOutputParameterTypeComponent=function(){},r.prototype.enterInputParameterType=function(){},r.prototype.exitInputParameterType=function(){},r.prototype.enterRulesetType=function(){},r.prototype.exitRulesetType=function(){},r.prototype.enterScalarType=function(){},r.prototype.exitScalarType=function(){},r.prototype.enterComponentType=function(){},r.prototype.exitComponentType=function(){},r.prototype.enterDatasetType=function(){},r.prototype.exitDatasetType=function(){},r.prototype.enterScalarSetType=function(){},r.prototype.exitScalarSetType=function(){},r.prototype.enterDataPoint=function(){},r.prototype.exitDataPoint=function(){},r.prototype.enterDataPointVd=function(){},r.prototype.exitDataPointVd=function(){},r.prototype.enterDataPointVar=function(){},r.prototype.exitDataPointVar=function(){},r.prototype.enterHrRulesetType=function(){},r.prototype.exitHrRulesetType=function(){},r.prototype.enterHrRulesetVdType=function(){},r.prototype.exitHrRulesetVdType=function(){},r.prototype.enterHrRulesetVarType=function(){},r.prototype.exitHrRulesetVarType=function(){},r.prototype.enterValueDomainName=function(){},r.prototype.exitValueDomainName=function(){},r.prototype.enterRulesetID=function(){},r.prototype.exitRulesetID=function(){},r.prototype.enterRulesetSignature=function(){},r.prototype.exitRulesetSignature=function(){},r.prototype.enterSignature=function(){},r.prototype.exitSignature=function(){},r.prototype.enterRuleClauseDatapoint=function(){},r.prototype.exitRuleClauseDatapoint=function(){},r.prototype.enterRuleItemDatapoint=function(){},r.prototype.exitRuleItemDatapoint=function(){},r.prototype.enterRuleClauseHierarchical=function(){},r.prototype.exitRuleClauseHierarchical=function(){},r.prototype.enterRuleItemHierarchical=function(){},r.prototype.exitRuleItemHierarchical=function(){},r.prototype.enterHierRuleSignature=function(){},r.prototype.exitHierRuleSignature=function(){},r.prototype.enterValueDomainSignature=function(){},r.prototype.exitValueDomainSignature=function(){},r.prototype.enterCodeItemRelation=function(){},r.prototype.exitCodeItemRelation=function(){},r.prototype.enterCodeItemRelationClause=function(){},r.prototype.exitCodeItemRelationClause=function(){},r.prototype.enterValueDomainValue=function(){},r.prototype.exitValueDomainValue=function(){},r.prototype.enterConditionConstraint=function(){},r.prototype.exitConditionConstraint=function(){},r.prototype.enterRangeConstraint=function(){},r.prototype.exitRangeConstraint=function(){},r.prototype.enterCompConstraint=function(){},r.prototype.exitCompConstraint=function(){},r.prototype.enterMultModifier=function(){},r.prototype.exitMultModifier=function(){},r.prototype.enterValidationOutput=function(){},r.prototype.exitValidationOutput=function(){},r.prototype.enterValidationMode=function(){},r.prototype.exitValidationMode=function(){},r.prototype.enterConditionClause=function(){},r.prototype.exitConditionClause=function(){},r.prototype.enterInputMode=function(){},r.prototype.exitInputMode=function(){},r.prototype.enterImbalanceExpr=function(){},r.prototype.exitImbalanceExpr=function(){},r.prototype.enterInputModeHierarchy=function(){},r.prototype.exitInputModeHierarchy=function(){},r.prototype.enterOutputModeHierarchy=function(){},r.prototype.exitOutputModeHierarchy=function(){},r.prototype.enterAlias=function(){},r.prototype.exitAlias=function(){},r.prototype.enterVarID=function(){},r.prototype.exitVarID=function(){},r.prototype.enterSimpleComponentId=function(){},r.prototype.exitSimpleComponentId=function(){},r.prototype.enterComponentID=function(){},r.prototype.exitComponentID=function(){},r.prototype.enterLists=function(){},r.prototype.exitLists=function(){},r.prototype.enterErCode=function(){},r.prototype.exitErCode=function(){},r.prototype.enterErLevel=function(){},r.prototype.exitErLevel=function(){},r.prototype.enterComparisonOperand=function(){},r.prototype.exitComparisonOperand=function(){},r.prototype.enterOptionalExpr=function(){},r.prototype.exitOptionalExpr=function(){},r.prototype.enterComponentRole=function(){},r.prototype.exitComponentRole=function(){},r.prototype.enterViralAttribute=function(){},r.prototype.exitViralAttribute=function(){},r.prototype.enterValueDomainID=function(){},r.prototype.exitValueDomainID=function(){},r.prototype.enterOperatorID=function(){},r.prototype.exitOperatorID=function(){},r.prototype.enterRoutineName=function(){},r.prototype.exitRoutineName=function(){},r.prototype.enterConstant=function(){},r.prototype.exitConstant=function(){},r.prototype.enterBasicScalarType=function(){},r.prototype.exitBasicScalarType=function(){},r.prototype.enterRetainType=function(){},r.prototype.exitRetainType=function(){};var s=r,h=require("antlr4/index");p.prototype=Object.create(h.tree.ParseTreeVisitor.prototype),p.prototype.constructor=p,p.prototype.visitStart=function(e){return this.visitChildren(e)},p.prototype.visitTemporaryAssignment=function(e){return this.visitChildren(e)},p.prototype.visitPersistAssignment=function(e){return this.visitChildren(e)},p.prototype.visitDefineExpression=function(e){return this.visitChildren(e)},p.prototype.visitVarIdExpr=function(e){return this.visitChildren(e)},p.prototype.visitMembershipExpr=function(e){return this.visitChildren(e)},p.prototype.visitInNotInExpr=function(e){return this.visitChildren(e)},p.prototype.visitBooleanExpr=function(e){return this.visitChildren(e)},p.prototype.visitComparisonExpr=function(e){return this.visitChildren(e)},p.prototype.visitUnaryExpr=function(e){return this.visitChildren(e)},p.prototype.visitFunctionsExpression=function(e){return this.visitChildren(e)},p.prototype.visitIfExpr=function(e){return this.visitChildren(e)},p.prototype.visitClauseExpr=function(e){return this.visitChildren(e)},p.prototype.visitArithmeticExpr=function(e){return this.visitChildren(e)},p.prototype.visitParenthesisExpr=function(e){return this.visitChildren(e)},p.prototype.visitConstantExpr=function(e){return this.visitChildren(e)},p.prototype.visitArithmeticExprOrConcat=function(e){return this.visitChildren(e)},p.prototype.visitJoinFunctions=function(e){return this.visitChildren(e)},p.prototype.visitGenericFunctions=function(e){return this.visitChildren(e)},p.prototype.visitStringFunctions=function(e){return this.visitChildren(e)},p.prototype.visitNumericFunctions=function(e){return this.visitChildren(e)},p.prototype.visitComparisonFunctions=function(e){return this.visitChildren(e)},p.prototype.visitTimeFunctions=function(e){return this.visitChildren(e)},p.prototype.visitSetFunctions=function(e){return this.visitChildren(e)},p.prototype.visitHierarchyFunctions=function(e){return this.visitChildren(e)},p.prototype.visitValidationFunctions=function(e){return this.visitChildren(e)},p.prototype.visitConditionalFunctions=function(e){return this.visitChildren(e)},p.prototype.visitAggregateFunctions=function(e){return this.visitChildren(e)},p.prototype.visitAnalyticFunctions=function(e){return this.visitChildren(e)},p.prototype.visitDistanceFunctions=function(e){return this.visitChildren(e)},p.prototype.visitDatasetClause=function(e){return this.visitChildren(e)},p.prototype.visitRenameClause=function(e){return this.visitChildren(e)},p.prototype.visitAggrClause=function(e){return this.visitChildren(e)},p.prototype.visitFilterClause=function(e){return this.visitChildren(e)},p.prototype.visitCalcClause=function(e){return this.visitChildren(e)},p.prototype.visitKeepOrDropClause=function(e){return this.visitChildren(e)},p.prototype.visitPivotOrUnpivotClause=function(e){return this.visitChildren(e)},p.prototype.visitCustomPivotClause=function(e){return this.visitChildren(e)},p.prototype.visitSubspaceClause=function(e){return this.visitChildren(e)},p.prototype.visitJoinExpr=function(e){return this.visitChildren(e)},p.prototype.visitDefOperator=function(e){return this.visitChildren(e)},p.prototype.visitDefDatapointRuleset=function(e){return this.visitChildren(e)},p.prototype.visitDefHierarchical=function(e){return this.visitChildren(e)},p.prototype.visitCallDataset=function(e){return this.visitChildren(e)},p.prototype.visitEvalAtom=function(e){return this.visitChildren(e)},p.prototype.visitCastExprDataset=function(e){return this.visitChildren(e)},p.prototype.visitParameter=function(e){return this.visitChildren(e)},p.prototype.visitUnaryStringFunction=function(e){return this.visitChildren(e)},p.prototype.visitSubstrAtom=function(e){return this.visitChildren(e)},p.prototype.visitReplaceAtom=function(e){return this.visitChildren(e)},p.prototype.visitInstrAtom=function(e){return this.visitChildren(e)},p.prototype.visitUnaryNumeric=function(e){return this.visitChildren(e)},p.prototype.visitUnaryWithOptionalNumeric=function(e){return this.visitChildren(e)},p.prototype.visitBinaryNumeric=function(e){return this.visitChildren(e)},p.prototype.visitBetweenAtom=function(e){return this.visitChildren(e)},p.prototype.visitCharsetMatchAtom=function(e){return this.visitChildren(e)},p.prototype.visitIsNullAtom=function(e){return this.visitChildren(e)},p.prototype.visitExistInAtom=function(e){return this.visitChildren(e)},p.prototype.visitPeriodAtom=function(e){return this.visitChildren(e)},p.prototype.visitFillTimeAtom=function(e){return this.visitChildren(e)},p.prototype.visitFlowAtom=function(e){return this.visitChildren(e)},p.prototype.visitTimeShiftAtom=function(e){return this.visitChildren(e)},p.prototype.visitTimeAggAtom=function(e){return this.visitChildren(e)},p.prototype.visitCurrentDateAtom=function(e){return this.visitChildren(e)},p.prototype.visitUnionAtom=function(e){return this.visitChildren(e)},p.prototype.visitIntersectAtom=function(e){return this.visitChildren(e)},p.prototype.visitSetOrSYmDiffAtom=function(e){return this.visitChildren(e)},p.prototype.visitHierarchyOperators=function(e){return this.visitChildren(e)},p.prototype.visitValidateDPruleset=function(e){return this.visitChildren(e)},p.prototype.visitValidateHRruleset=function(e){return this.visitChildren(e)},p.prototype.visitValidationSimple=function(e){return this.visitChildren(e)},p.prototype.visitNvlAtom=function(e){return this.visitChildren(e)},p.prototype.visitAggrDataset=function(e){return this.visitChildren(e)},p.prototype.visitAnSimpleFunction=function(e){return this.visitChildren(e)},p.prototype.visitLagOrLeadAn=function(e){return this.visitChildren(e)},p.prototype.visitRatioToReportAn=function(e){return this.visitChildren(e)},p.prototype.visitLevenshteinAtom=function(e){return this.visitChildren(e)},p.prototype.visitRenameClauseItem=function(e){return this.visitChildren(e)},p.prototype.visitAggregateClause=function(e){return this.visitChildren(e)},p.prototype.visitAggrFunctionClause=function(e){return this.visitChildren(e)},p.prototype.visitCalcClauseItem=function(e){return this.visitChildren(e)},p.prototype.visitSubspaceClauseItem=function(e){return this.visitChildren(e)},p.prototype.visitJoinClauseWithoutUsing=function(e){return this.visitChildren(e)},p.prototype.visitJoinClause=function(e){return this.visitChildren(e)},p.prototype.visitJoinClauseItem=function(e){return this.visitChildren(e)},p.prototype.visitJoinBody=function(e){return this.visitChildren(e)},p.prototype.visitJoinApplyClause=function(e){return this.visitChildren(e)},p.prototype.visitPartitionByClause=function(e){return this.visitChildren(e)},p.prototype.visitOrderByClause=function(e){return this.visitChildren(e)},p.prototype.visitOrderByItem=function(e){return this.visitChildren(e)},p.prototype.visitWindowingClause=function(e){return this.visitChildren(e)},p.prototype.visitSignedInteger=function(e){return this.visitChildren(e)},p.prototype.visitLimitClauseItem=function(e){return this.visitChildren(e)},p.prototype.visitGroupByOrExcept=function(e){return this.visitChildren(e)},p.prototype.visitGroupAll=function(e){return this.visitChildren(e)},p.prototype.visitHavingClause=function(e){return this.visitChildren(e)},p.prototype.visitParameterItem=function(e){return this.visitChildren(e)},p.prototype.visitOutputParameterType=function(e){return this.visitChildren(e)},p.prototype.visitOutputParameterTypeComponent=function(e){return this.visitChildren(e)},p.prototype.visitInputParameterType=function(e){return this.visitChildren(e)},p.prototype.visitRulesetType=function(e){return this.visitChildren(e)},p.prototype.visitScalarType=function(e){return this.visitChildren(e)},p.prototype.visitComponentType=function(e){return this.visitChildren(e)},p.prototype.visitDatasetType=function(e){return this.visitChildren(e)},p.prototype.visitScalarSetType=function(e){return this.visitChildren(e)},p.prototype.visitDataPoint=function(e){return this.visitChildren(e)},p.prototype.visitDataPointVd=function(e){return this.visitChildren(e)},p.prototype.visitDataPointVar=function(e){return this.visitChildren(e)},p.prototype.visitHrRulesetType=function(e){return this.visitChildren(e)},p.prototype.visitHrRulesetVdType=function(e){return this.visitChildren(e)},p.prototype.visitHrRulesetVarType=function(e){return this.visitChildren(e)},p.prototype.visitValueDomainName=function(e){return this.visitChildren(e)},p.prototype.visitRulesetID=function(e){return this.visitChildren(e)},p.prototype.visitRulesetSignature=function(e){return this.visitChildren(e)},p.prototype.visitSignature=function(e){return this.visitChildren(e)},p.prototype.visitRuleClauseDatapoint=function(e){return this.visitChildren(e)},p.prototype.visitRuleItemDatapoint=function(e){return this.visitChildren(e)},p.prototype.visitRuleClauseHierarchical=function(e){return this.visitChildren(e)},p.prototype.visitRuleItemHierarchical=function(e){return this.visitChildren(e)},p.prototype.visitHierRuleSignature=function(e){return this.visitChildren(e)},p.prototype.visitValueDomainSignature=function(e){return this.visitChildren(e)},p.prototype.visitCodeItemRelation=function(e){return this.visitChildren(e)},p.prototype.visitCodeItemRelationClause=function(e){return this.visitChildren(e)},p.prototype.visitValueDomainValue=function(e){return this.visitChildren(e)},p.prototype.visitConditionConstraint=function(e){return this.visitChildren(e)},p.prototype.visitRangeConstraint=function(e){return this.visitChildren(e)},p.prototype.visitCompConstraint=function(e){return this.visitChildren(e)},p.prototype.visitMultModifier=function(e){return this.visitChildren(e)},p.prototype.visitValidationOutput=function(e){return this.visitChildren(e)},p.prototype.visitValidationMode=function(e){return this.visitChildren(e)},p.prototype.visitConditionClause=function(e){return this.visitChildren(e)},p.prototype.visitInputMode=function(e){return this.visitChildren(e)},p.prototype.visitImbalanceExpr=function(e){return this.visitChildren(e)},p.prototype.visitInputModeHierarchy=function(e){return this.visitChildren(e)},p.prototype.visitOutputModeHierarchy=function(e){return this.visitChildren(e)},p.prototype.visitAlias=function(e){return this.visitChildren(e)},p.prototype.visitVarID=function(e){return this.visitChildren(e)},p.prototype.visitSimpleComponentId=function(e){return this.visitChildren(e)},p.prototype.visitComponentID=function(e){return this.visitChildren(e)},p.prototype.visitLists=function(e){return this.visitChildren(e)},p.prototype.visitErCode=function(e){return this.visitChildren(e)},p.prototype.visitErLevel=function(e){return this.visitChildren(e)},p.prototype.visitComparisonOperand=function(e){return this.visitChildren(e)},p.prototype.visitOptionalExpr=function(e){return this.visitChildren(e)},p.prototype.visitComponentRole=function(e){return this.visitChildren(e)},p.prototype.visitViralAttribute=function(e){return this.visitChildren(e)},p.prototype.visitValueDomainID=function(e){return this.visitChildren(e)},p.prototype.visitOperatorID=function(e){return this.visitChildren(e)},p.prototype.visitRoutineName=function(e){return this.visitChildren(e)},p.prototype.visitConstant=function(e){return this.visitChildren(e)},p.prototype.visitBasicScalarType=function(e){return this.visitChildren(e)},p.prototype.visitRetainType=function(e){return this.visitChildren(e)};var a=p,l=require("antlr4/index"),R={VtlListener:s}.VtlListener,f={VtlVisitor:a}.VtlVisitor,E=new l.atn.ATNDeserializer().deserialize("\x03\u608B\uA72A\u8133\uB9ED\u417C\u3BE7\u7786\u5964\x03\xF0\u0537\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\x0B\t\x0B\x04\f\t\f\x04\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04'\t'\x04(\t(\x04)\t)\x04*\t*\x04+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x044\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04<\t<\x04=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x04F\tF\x04G\tG\x04H\tH\x04I\tI\x04J\tJ\x04K\tK\x04L\tL\x04M\tM\x04N\tN\x04O\tO\x04P\tP\x04Q\tQ\x04R\tR\x04S\tS\x04T\tT\x04U\tU\x04V\tV\x04W\tW\x04X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x04]\t]\x04^\t^\x04_\t_\x04`\t`\x04a\ta\x04b\tb\x03\x02\x03\x02\x03\x02\x07\x02\xC8\n\x02\f\x02\x0E\x02\xCB\x0B\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x05\x03\xD8\n\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x05\x04\xEB\n\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x05\x04\u0109\n\x04\x07\x04\u010B\n\x04\f\x04\x0E\x04\u010E\x0B\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x05\x05\u011D\n\x05\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x05\x06\u0127\n\x06\x03\x07\x03\x07\x03\x07\x03\x07\x07\x07\u012D\n\x07\f\x07\x0E\x07\u0130\x0B\x07\x03\b\x03\b\x03\b\x03\b\x05\b\u0136\n\b\x05\b\u0138\n\b\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x07\n\u0141\n\n\f\n\x0E\n\u0144\x0B\n\x03\x0B\x03\x0B\x03\x0B\x03\x0B\x07\x0B\u014A\n\x0B\f\x0B\x0E\x0B\u014D\x0B\x0B\x03\f\x03\f\x03\f\x03\f\x03\f\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x07\r\u015C\n\r\f\r\x0E\r\u015F\x0B\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x07\x0E\u0165\n\x0E\f\x0E\x0E\x0E\u0168\x0B\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x05\x0F\u0176\n\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x07\x10\u017F\n\x10\f\x10\x0E\x10\u0182\x0B\x10\x05\x10\u0184\n\x10\x03\x10\x03\x10\x03\x10\x05\x10\u0189\n\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x05\x10\u01AA\n\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x07\x11\u01B1\n\x11\f\x11\x0E\x11\u01B4\x0B\x11\x05\x11\u01B6\n\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x05\x11\u01C0\n\x11\x03\x11\x03\x11\x03\x11\x05\x11\u01C5\n\x11\x07\x11\u01C7\n\x11\f\x11\x0E\x11\u01CA\x0B\x11\x03\x11\x03\x11\x03\x11\x05\x11\u01CF\n\x11\x03\x11\x03\x11\x05\x11\u01D3\n\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x05\x11\u01DD\n\x11\x03\x11\x03\x11\x05\x11\u01E1\n\x11\x03\x11\x03\x11\x05\x11\u01E5\n\x11\x03\x12\x03\x12\x03\x12\x05\x12\u01EA\n\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x05\x13\u01FA\n\x13\x03\x13\x03\x13\x05\x13\u01FE\n\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x05\x13\u0209\n\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x05\x13\u0214\n\x13\x03\x13\x03\x13\x05\x13\u0218\n\x13\x03\x13\x03\x13\x05\x13\u021C\n\x13\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x05\x14\u0228\n\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x05\x14\u0233\n\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x05\x15\u0251\n\x15\x03\x15\x03\x15\x05\x15\u0255\n\x15\x03\x16\x03\x16\x03\x16\x05\x16\u025A\n\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x05\x16\u0262\n\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x05\x16\u0277\n\x16\x03\x16\x03\x16\x05\x16\u027B\n\x16\x03\x16\x03\x16\x05\x16\u027F\n\x16\x03\x16\x03\x16\x03\x16\x03\x16\x05\x16\u0285\n\x16\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x06\x17\u028C\n\x17\r\x17\x0E\x17\u028D\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x06\x17\u0297\n\x17\r\x17\x0E\x17\u0298\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x05\x17\u02A4\n\x17\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\u02AC\n\x18\x03\x18\x03\x18\x05\x18\u02B0\n\x18\x03\x18\x05\x18\u02B3\n\x18\x03\x18\x05\x18\u02B6\n\x18\x03\x18\x05\x18\u02B9\n\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x07\x19\u02C6\n\x19\f\x19\x0E\x19\u02C9\x0B\x19\x05\x19\u02CB\n\x19\x03\x19\x05\x19\u02CE\n\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x05\x19\u02D8\n\x19\x03\x19\x03\x19\x05\x19\u02DC\n\x19\x03\x19\x05\x19\u02DF\n\x19\x03\x19\x05\x19\u02E2\n\x19\x03\x19\x05\x19\u02E5\n\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x05\x19\u02ED\n\x19\x03\x19\x05\x19\u02F0\n\x19\x03\x19\x05\x19\u02F3\n\x19\x03\x19\x05\x19\u02F6\n\x19\x03\x19\x03\x19\x05\x19\u02FA\n\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x05\x1B\u0308\n\x1B\x05\x1B\u030A\n\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x05\x1C\u0314\n\x1C\x03\x1C\x05\x1C\u0317\n\x1C\x03\x1C\x05\x1C\u031A\n\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x05\x1C\u0325\n\x1C\x05\x1C\u0327\n\x1C\x03\x1C\x03\x1C\x03\x1C\x05\x1C\u032C\n\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x05\x1C\u033C\n\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x07\x1F\u034C\n\x1F\f\x1F\x0E\x1F\u034F\x0B\x1F\x03 \x05 \u0352\n \x03 \x03 \x03 \x03 \x03!\x05!\u0359\n!\x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03#\x03#\x03#\x07#\u0366\n#\f#\x0E#\u0369\x0B#\x03$\x03$\x03$\x07$\u036E\n$\f$\x0E$\u0371\x0B$\x03$\x03$\x03$\x03$\x07$\u0377\n$\f$\x0E$\u037A\x0B$\x05$\u037C\n$\x03%\x03%\x03%\x05%\u0381\n%\x03&\x05&\u0384\n&\x03&\x03&\x03&\x05&\u0389\n&\x03&\x05&\u038C\n&\x03&\x05&\u038F\n&\x03'\x03'\x03'\x03(\x03(\x03(\x03(\x03(\x07(\u0399\n(\f(\x0E(\u039C\x0B(\x03)\x03)\x03)\x03)\x03)\x07)\u03A3\n)\f)\x0E)\u03A6\x0B)\x03*\x03*\x05*\u03AA\n*\x03+\x03+\x03+\x05+\u03AF\n+\x03+\x03+\x03+\x03+\x03+\x03,\x03,\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x05-\u03C3\n-\x03.\x03.\x03.\x03.\x03.\x07.\u03CA\n.\f.\x0E.\u03CD\x0B.\x03.\x03.\x03.\x05.\u03D2\n.\x03/\x03/\x03/\x030\x030\x030\x030\x050\u03DB\n0\x031\x031\x031\x051\u03E0\n1\x032\x032\x052\u03E4\n2\x033\x033\x033\x033\x033\x053\u03EB\n3\x034\x034\x034\x054\u03F0\n4\x035\x035\x055\u03F4\n5\x035\x055\u03F7\n5\x035\x055\u03FA\n5\x035\x055\u03FD\n5\x036\x036\x036\x036\x036\x056\u0404\n6\x037\x037\x037\x037\x037\x077\u040B\n7\f7\x0E7\u040E\x0B7\x037\x037\x057\u0412\n7\x038\x038\x038\x038\x038\x058\u0419\n8\x039\x039\x039\x039\x039\x039\x079\u0421\n9\f9\x0E9\u0424\x0B9\x039\x039\x059\u0428\n9\x039\x039\x039\x039\x039\x079\u042F\n9\f9\x0E9\u0432\x0B9\x039\x039\x059\u0436\n9\x059\u0438\n9\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x07:\u0442\n:\f:\x0E:\u0445\x0B:\x03:\x03:\x05:\u0449\n:\x03:\x05:\u044C\n:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x07:\u0455\n:\f:\x0E:\u0458\x0B:\x03:\x03:\x05:\u045C\n:\x03:\x03:\x05:\u0460\n:\x05:\u0462\n:\x03;\x03;\x03<\x03<\x03=\x03=\x03=\x03=\x07=\u046C\n=\f=\x0E=\u046F\x0B=\x03>\x03>\x03>\x05>\u0474\n>\x03?\x03?\x03?\x07?\u0479\n?\f?\x0E?\u047C\x0B?\x03@\x03@\x05@\u0480\n@\x03@\x03@\x03@\x03@\x05@\u0486\n@\x03@\x03@\x05@\u048A\n@\x03@\x05@\u048D\n@\x03A\x03A\x03A\x07A\u0492\nA\fA\x0EA\u0495\x0BA\x03B\x03B\x05B\u0499\nB\x03B\x03B\x05B\u049D\nB\x03B\x05B\u04A0\nB\x03C\x03C\x03C\x05C\u04A5\nC\x03C\x03C\x03C\x03D\x03D\x03D\x07D\u04AD\nD\fD\x0ED\u04B0\x0BD\x03E\x03E\x03E\x03E\x05E\u04B6\nE\x03E\x03E\x05E\u04BA\nE\x03E\x03E\x07E\u04BE\nE\fE\x0EE\u04C1\x0BE\x03F\x05F\u04C4\nF\x03F\x03F\x03F\x03F\x03F\x05F\u04CB\nF\x03G\x03G\x03H\x03H\x03H\x03H\x03H\x03H\x03H\x03H\x07H\u04D7\nH\fH\x0EH\u04DA\x0BH\x03H\x03H\x05H\u04DE\nH\x03I\x03I\x03I\x05I\u04E3\nI\x03J\x03J\x05J\u04E7\nJ\x03K\x03K\x03L\x03L\x03M\x03M\x03M\x03M\x07M\u04F1\nM\fM\x0EM\u04F4\x0BM\x03N\x03N\x03O\x03O\x03O\x03P\x03P\x03Q\x03Q\x03R\x03R\x03S\x03S\x03T\x03T\x03U\x03U\x03U\x05U\u0508\nU\x03V\x03V\x03V\x03V\x07V\u050E\nV\fV\x0EV\u0511\x0BV\x03V\x03V\x03W\x03W\x03W\x03X\x03X\x03X\x03Y\x03Y\x03Z\x03Z\x05Z\u051F\nZ\x03[\x03[\x03[\x03[\x03[\x05[\u0526\n[\x03\\\x03\\\x03\\\x03]\x03]\x03^\x03^\x03_\x03_\x03`\x03`\x03a\x03a\x03b\x03b\x03b\x02\x03\x06c\x02\x04\x06\b\n\f\x0E\x10\x12\x14\x16\x18\x1A\x1C\x1E \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\x80\x82\x84\x86\x88\x8A\x8C\x8E\x90\x92\x94\x96\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xAE\xB0\xB2\xB4\xB6\xB8\xBA\xBC\xBE\xC0\xC2\x02'\x04\x02\x0F\x10))\x03\x02\x11\x12\x04\x02\x0F\x10TT\x03\x02'(\x03\x02+,\x03\x02 !\x04\x02\xC1\xC1\xC3\xC3\x03\x02\xB8\xB9\x03\x02\xBA\xBB\x05\x02SSUWz{\x06\x02KKMMbb~\x80\x03\x02OP\x04\x02NNQR\x04\x02>>\xC8\xC8\x03\x02\x99\x9A\x04\x02ii\xEB\xEB\x03\x02HI\x04\x0222\x82\x82\x04\x02>>jj\x05\x02FGY\\\x83\x86\x06\x02FGY\\\x83\x86\x8A\x8B\x03\x02\x8C\x8D\x03\x02DE\x04\x02BB\x88\x88\x03\x02lm\x03\x02\x0F\x10\x04\x02\xE8\xE9\xEC\xEC\x04\x02\x0F\x0F\x11\x11\x05\x02>>jj\xDF\xDF\x03\x02\xD8\xDD\x04\x02pp\xD3\xD3\x05\x02ppww\xD2\xD2\x04\x02>>\xD7\xD7\x03\x02\t\x0E\x04\x02--\xE8\xEB\x05\x02\x9F\xA5\xC9\xC9\xE0\xE0\x04\x02>>\xEA\xEA\x02\u05A4\x02\xC9\x03\x02\x02\x02\x04\xD7\x03\x02\x02\x02\x06\xEA\x03\x02\x02\x02\b\u011C\x03\x02\x02\x02\n\u0126\x03\x02\x02\x02\f\u0128\x03\x02\x02\x02\x0E\u0131\x03\x02\x02\x02\x10\u0139\x03\x02\x02\x02\x12\u013C\x03\x02\x02\x02\x14\u0145\x03\x02\x02\x02\x16\u014E\x03\x02\x02\x02\x18\u0153\x03\x02\x02\x02\x1A\u0160\x03\x02\x02\x02\x1C\u0175\x03\x02\x02\x02\x1E\u01A9\x03\x02\x02\x02 \u01E4\x03\x02\x02\x02\"\u01E9\x03\x02\x02\x02$\u021B\x03\x02\x02\x02&\u0232\x03\x02\x02\x02(\u0254\x03\x02\x02\x02*\u0284\x03\x02\x02\x02,\u02A3\x03\x02\x02\x02.\u02A5\x03\x02\x02\x020\u02F9\x03\x02\x02\x022\u02FB\x03\x02\x02\x024\u0302\x03\x02\x02\x026\u033B\x03\x02\x02\x028\u033D\x03\x02\x02\x02:\u0344\x03\x02\x02\x02<\u0348\x03\x02\x02\x02>\u0351\x03\x02\x02\x02@\u0358\x03\x02\x02\x02B\u035E\x03\x02\x02\x02D\u0362\x03\x02\x02\x02F\u036A\x03\x02\x02\x02H\u037D\x03\x02\x02\x02J\u0383\x03\x02\x02\x02L\u0390\x03\x02\x02\x02N\u0393\x03\x02\x02\x02P\u039D\x03\x02\x02\x02R\u03A7\x03\x02\x02\x02T\u03AE\x03\x02\x02\x02V\u03B5\x03\x02\x02\x02X\u03C2\x03\x02\x02\x02Z\u03D1\x03\x02\x02\x02\\\u03D3\x03\x02\x02\x02^\u03D6\x03\x02\x02\x02`\u03DF\x03\x02\x02\x02b\u03E3\x03\x02\x02\x02d\u03EA\x03\x02\x02\x02f\u03EF\x03\x02\x02\x02h\u03F3\x03\x02\x02\x02j\u03FE\x03\x02\x02\x02l\u0405\x03\x02\x02\x02n\u0413\x03\x02\x02\x02p\u0437\x03\x02\x02\x02r\u0461\x03\x02\x02\x02t\u0463\x03\x02\x02\x02v\u0465\x03\x02\x02\x02x\u0467\x03\x02\x02\x02z\u0470\x03\x02\x02\x02|\u0475\x03\x02\x02\x02~\u047F\x03\x02\x02\x02\x80\u048E\x03\x02\x02\x02\x82\u0498\x03\x02\x02\x02\x84\u04A1\x03\x02\x02\x02\x86\u04A9\x03\x02\x02\x02\x88\u04B5\x03\x02\x02\x02\x8A\u04C3\x03\x02\x02\x02\x8C\u04CC\x03\x02\x02\x02\x8E\u04DD\x03\x02\x02\x02\x90\u04DF\x03\x02\x02\x02\x92\u04E4\x03\x02\x02\x02\x94\u04E8\x03\x02\x02\x02\x96\u04EA\x03\x02\x02\x02\x98\u04EC\x03\x02\x02\x02\x9A\u04F5\x03\x02\x02\x02\x9C\u04F7\x03\x02\x02\x02\x9E\u04FA\x03\x02\x02\x02\xA0\u04FC\x03\x02\x02\x02\xA2\u04FE\x03\x02\x02\x02\xA4\u0500\x03\x02\x02\x02\xA6\u0502\x03\x02\x02\x02\xA8\u0504\x03\x02\x02\x02\xAA\u0509\x03\x02\x02\x02\xAC\u0514\x03\x02\x02\x02\xAE\u0517\x03\x02\x02\x02\xB0\u051A\x03\x02\x02\x02\xB2\u051E\x03\x02\x02\x02\xB4\u0525\x03\x02\x02\x02\xB6\u0527\x03\x02\x02\x02\xB8\u052A\x03\x02\x02\x02\xBA\u052C\x03\x02\x02\x02\xBC\u052E\x03\x02\x02\x02\xBE\u0530\x03\x02\x02\x02\xC0\u0532\x03\x02\x02\x02\xC2\u0534\x03\x02\x02\x02\xC4\xC5\x05\x04\x03\x02\xC5\xC6\x07\xEE\x02\x02\xC6\xC8\x03\x02\x02\x02\xC7\xC4\x03\x02\x02\x02\xC8\xCB\x03\x02\x02\x02\xC9\xC7\x03\x02\x02\x02\xC9\xCA\x03\x02\x02\x02\xCA\xCC\x03\x02\x02\x02\xCB\xC9\x03\x02\x02\x02\xCC\xCD\x07\x02\x02\x03\xCD\x03\x03\x02\x02\x02\xCE\xCF\x05\xA4S\x02\xCF\xD0\x07\x16\x02\x02\xD0\xD1\x05\x06\x04\x02\xD1\xD8\x03\x02\x02\x02\xD2\xD3\x05\xA4S\x02\xD3\xD4\x07s\x02\x02\xD4\xD5\x05\x06\x04\x02\xD5\xD8\x03\x02\x02\x02\xD6\xD8\x05\x1E\x10\x02\xD7\xCE\x03\x02\x02\x02\xD7\xD2\x03\x02\x02\x02\xD7\xD6\x03\x02\x02\x02\xD8\x05\x03\x02\x02\x02\xD9\xDA\b\x04\x01\x02\xDA\xDB\x07\x03\x02\x02\xDB\xDC\x05\x06\x04\x02\xDC\xDD\x07\x04\x02\x02\xDD\xEB\x03\x02\x02\x02\xDE\xEB\x05\b\x05\x02\xDF\xE0\t\x02\x02\x02\xE0\xEB\x05\x06\x04\f\xE1\xE2\x07\x19\x02\x02\xE2\xE3\x05\x06\x04\x02\xE3\xE4\x07\x1A\x02\x02\xE4\xE5\x05\x06\x04\x02\xE5\xE6\x07\x1B\x02\x02\xE6\xE7\x05\x06\x04\x05\xE7\xEB\x03\x02\x02\x02\xE8\xEB\x05\xBE`\x02\xE9\xEB\x05\xA4S\x02\xEA\xD9\x03\x02\x02\x02\xEA\xDE\x03\x02\x02\x02\xEA\xDF\x03\x02\x02\x02\xEA\xE1\x03\x02\x02\x02\xEA\xE8\x03\x02\x02\x02\xEA\xE9\x03\x02\x02\x02\xEB\u010C\x03\x02\x02\x02\xEC\xED\f\x0B\x02\x02\xED\xEE\t\x03\x02\x02\xEE\u010B\x05\x06\x04\f\xEF\xF0\f\n\x02\x02\xF0\xF1\t\x04\x02\x02\xF1\u010B\x05\x06\x04\x0B\xF2\xF3\f\t\x02\x02\xF3\xF4\x05\xB0Y\x02\xF4\xF5\x05\x06\x04\n\xF5\u010B\x03\x02\x02\x02\xF6\xF7\f\x07\x02\x02\xF7\xF8\x07&\x02\x02\xF8\u010B\x05\x06\x04\b\xF9\xFA\f\x06\x02\x02\xFA\xFB\t\x05\x02\x02\xFB\u010B\x05\x06\x04\x07\xFC\xFD\f\x0E\x02\x02\xFD\xFE\x07\x05\x02\x02\xFE\xFF\x05\n\x06\x02\xFF\u0100\x07\x06\x02\x02\u0100\u010B\x03\x02\x02\x02\u0101\u0102\f\r\x02\x02\u0102\u0103\x07\x17\x02\x02\u0103\u010B\x05\xA6T\x02\u0104\u0105\f\b\x02\x02\u0105\u0108\t\x06\x02\x02\u0106\u0109\x05\xAAV\x02\u0107\u0109\x05\xB8]\x02\u0108\u0106\x03\x02\x02\x02\u0108\u0107\x03\x02\x02\x02\u0109\u010B\x03\x02\x02\x02\u010A\xEC\x03\x02\x02\x02\u010A\xEF\x03\x02\x02\x02\u010A\xF2\x03\x02\x02\x02\u010A\xF6\x03\x02\x02\x02\u010A\xF9\x03\x02\x02\x02\u010A\xFC\x03\x02\x02\x02\u010A\u0101\x03\x02\x02\x02\u010A\u0104\x03\x02\x02\x02\u010B\u010E\x03\x02\x02\x02\u010C\u010A\x03\x02\x02\x02\u010C\u010D\x03\x02\x02\x02\u010D\x07\x03\x02\x02\x02\u010E\u010C\x03\x02\x02\x02\u010F\u011D\x05\x1C\x0F\x02\u0110\u011D\x05 \x11\x02\u0111\u011D\x05$\x13\x02\u0112\u011D\x05&\x14\x02\u0113\u011D\x05(\x15\x02\u0114\u011D\x05*\x16\x02\u0115\u011D\x05,\x17\x02\u0116\u011D\x05.\x18\x02\u0117\u011D\x050\x19\x02\u0118\u011D\x052\x1A\x02\u0119\u011D\x054\x1B\x02\u011A\u011D\x056\x1C\x02\u011B\u011D\x058\x1D\x02\u011C\u010F\x03\x02\x02\x02\u011C\u0110\x03\x02\x02\x02\u011C\u0111\x03\x02\x02\x02\u011C\u0112\x03\x02\x02\x02\u011C\u0113\x03\x02\x02\x02\u011C\u0114\x03\x02\x02\x02\u011C\u0115\x03\x02\x02\x02\u011C\u0116\x03\x02\x02\x02\u011C\u0117\x03\x02\x02\x02\u011C\u0118\x03\x02\x02\x02\u011C\u0119\x03\x02\x02\x02\u011C\u011A\x03\x02\x02\x02\u011C\u011B\x03\x02\x02\x02\u011D\t\x03\x02\x02\x02\u011E\u0127\x05\f\x07\x02\u011F\u0127\x05\x0E\b\x02\u0120\u0127\x05\x10\t\x02\u0121\u0127\x05\x12\n\x02\u0122\u0127\x05\x14\x0B\x02\u0123\u0127\x05\x16\f\x02\u0124\u0127\x05\x18\r\x02\u0125\u0127\x05\x1A\x0E\x02\u0126\u011E\x03\x02\x02\x02\u0126\u011F\x03\x02\x02\x02\u0126\u0120\x03\x02\x02\x02\u0126\u0121\x03\x02\x02\x02\u0126\u0122\x03\x02\x02\x02\u0126\u0123\x03\x02\x02\x02\u0126\u0124\x03\x02\x02\x02\u0126\u0125\x03\x02\x02\x02\u0127\x0B\x03\x02\x02\x02\u0128\u0129\x07$\x02\x02\u0129\u012E\x05:\x1E\x02\u012A\u012B\x07\x13\x02\x02\u012B\u012D\x05:\x1E\x02\u012C\u012A\x03\x02\x02\x02\u012D\u0130\x03\x02\x02\x02\u012E\u012C\x03\x02\x02\x02\u012E\u012F\x03\x02\x02\x02\u012F\r\x03\x02\x02\x02\u0130\u012E\x03\x02\x02\x02\u0131\u0132\x07?\x02\x02\u0132\u0137\x05<\x1F\x02\u0133\u0135\x05Z.\x02\u0134\u0136\x05\\/\x02\u0135\u0134\x03\x02\x02\x02\u0135\u0136\x03\x02\x02\x02\u0136\u0138\x03\x02\x02\x02\u0137\u0133\x03\x02\x02\x02\u0137\u0138\x03\x02\x02\x02\u0138\x0F\x03\x02\x02\x02\u0139\u013A\x07`\x02\x02\u013A\u013B\x05\x06\x04\x02\u013B\x11\x03\x02\x02\x02\u013C\u013D\x07\"\x02\x02\u013D\u0142\x05@!\x02\u013E\u013F\x07\x13\x02\x02\u013F\u0141\x05@!\x02\u0140\u013E\x03\x02\x02\x02\u0141\u0144\x03\x02\x02\x02\u0142\u0140\x03\x02\x02\x02\u0142\u0143\x03\x02\x02\x02\u0143\x13\x03\x02\x02\x02\u0144\u0142\x03\x02\x02\x02\u0145\u0146\t\x07\x02\x02\u0146\u014B\x05\xA8U\x02\u0147\u0148\x07\x13\x02\x02\u0148\u014A\x05\xA8U\x02\u0149\u0147\x03\x02\x02\x02\u014A\u014D\x03\x02\x02\x02\u014B\u0149\x03\x02\x02\x02\u014B\u014C\x03\x02\x02\x02\u014C\x15\x03\x02\x02\x02\u014D\u014B\x03\x02\x02\x02\u014E\u014F\t\b\x02\x02\u014F\u0150\x05\xA8U\x02\u0150\u0151\x07\x13\x02\x02\u0151\u0152\x05\xA8U\x02\u0152\x17\x03\x02\x02\x02\u0153\u0154\x07\xC2\x02\x02\u0154\u0155\x05\xA8U\x02\u0155\u0156\x07\x13\x02\x02\u0156\u0157\x05\xA8U\x02\u0157\u0158\x07+\x02\x02\u0158\u015D\x05\xBE`\x02\u0159\u015A\x07\x13\x02\x02\u015A\u015C\x05\xBE`\x02\u015B\u0159\x03\x02\x02\x02\u015C\u015F\x03\x02\x02\x02\u015D\u015B\x03\x02\x02\x02\u015D\u015E\x03\x02\x02\x02\u015E\x19\x03\x02\x02\x02\u015F\u015D\x03\x02\x02\x02\u0160\u0161\x07\xC4\x02\x02\u0161\u0166\x05B\"\x02\u0162\u0163\x07\x13\x02\x02\u0163\u0165\x05B\"\x02\u0164\u0162\x03\x02\x02\x02\u0165\u0168\x03\x02\x02\x02\u0166\u0164\x03\x02\x02\x02\u0166\u0167\x03\x02\x02\x02\u0167\x1B\x03\x02\x02\x02\u0168\u0166\x03\x02\x02\x02\u0169\u016A\t\t\x02\x02\u016A\u016B\x07\x03\x02\x02\u016B\u016C\x05F$\x02\u016C\u016D\x05J&\x02\u016D\u016E\x07\x04\x02\x02\u016E\u0176\x03\x02\x02\x02\u016F\u0170\t\n\x02\x02\u0170\u0171\x07\x03\x02\x02\u0171\u0172\x05D#\x02\u0172\u0173\x05J&\x02\u0173\u0174\x07\x04\x02\x02\u0174\u0176\x03\x02\x02\x02\u0175\u0169\x03\x02\x02\x02\u0175\u016F\x03\x02\x02\x02\u0176\x1D\x03\x02\x02\x02\u0177\u0178\x07r\x02\x02\u0178\u0179\x07q\x02\x02\u0179\u017A\x05\xBA^\x02\u017A\u0183\x07\x03\x02\x02\u017B\u0180\x05^0\x02\u017C\u017D\x07\x13\x02\x02\u017D\u017F\x05^0\x02\u017E\u017C\x03\x02\x02\x02\u017F\u0182\x03\x02\x02\x02\u0180\u017E\x03\x02\x02\x02\u0180\u0181\x03\x02\x02\x02\u0181\u0184\x03\x02\x02\x02\u0182\u0180\x03\x02\x02\x02\u0183\u017B\x03\x02\x02\x02\u0183\u0184\x03\x02\x02\x02\u0184\u0185\x03\x02\x02\x02\u0185\u0188\x07\x04\x02\x02\u0186\u0187\x07\xC0\x02\x02\u0187\u0189\x05`1\x02\u0188\u0186\x03\x02\x02\x02\u0188\u0189\x03\x02\x02\x02\u0189\u018A\x03\x02\x02\x02\u018A\u018B\x07\xAF\x02\x02\u018B\u018C\x05\x06\x04\x02\u018C\u018D\x07x\x02\x02\u018D\u018E\x07q\x02\x02\u018E\u01AA\x03\x02\x02\x02\u018F\u0190\x07r\x02\x02\u0190\u0191\x07t\x02\x02\u0191\u0192\x07v\x02\x02\u0192\u0193\x05v<\x02\u0193\u0194\x07\x03\x02\x02\u0194\u0195\x05x=\x02\u0195\u0196\x07\x04\x02\x02\u0196\u0197\x07\xAF\x02\x02\u0197\u0198\x05|?\x02\u0198\u0199\x07x\x02\x02\u0199\u019A\x07t\x02\x02\u019A\u019B\x07v\x02\x02\u019B\u01AA\x03\x02\x02\x02\u019C\u019D\x07r\x02\x02\u019D\u019E\x07u\x02\x02\u019E\u019F\x07v\x02\x02\u019F\u01A0\x05v<\x02\u01A0\u01A1\x07\x03\x02\x02\u01A1\u01A2\x05\x84C\x02\u01A2\u01A3\x07\x04\x02\x02\u01A3\u01A4\x07\xAF\x02\x02\u01A4\u01A5\x05\x80A\x02\u01A5\u01A6\x07x\x02\x02\u01A6\u01A7\x07u\x02\x02\u01A7\u01A8\x07v\x02\x02\u01A8\u01AA\x03\x02\x02\x02\u01A9\u0177\x03\x02\x02\x02\u01A9\u018F\x03\x02\x02\x02\u01A9\u019C\x03\x02\x02\x02\u01AA\x1F\x03\x02\x02\x02\u01AB\u01AC\x05\xBA^\x02\u01AC\u01B5\x07\x03\x02\x02\u01AD\u01B2\x05\"\x12\x02\u01AE\u01AF\x07\x13\x02\x02\u01AF\u01B1\x05\"\x12\x02\u01B0\u01AE\x03\x02\x02\x02\u01B1\u01B4\x03\x02\x02\x02\u01B2\u01B0\x03\x02\x02\x02\u01B2\u01B3\x03\x02\x02\x02\u01B3\u01B6\x03\x02\x02\x02\u01B4\u01B2\x03\x02\x02\x02\u01B5\u01AD\x03\x02\x02\x02\u01B5\u01B6\x03\x02\x02\x02\u01B6\u01B7\x03\x02\x02\x02\u01B7\u01B8\x07\x04\x02\x02\u01B8\u01E5\x03\x02\x02\x02\u01B9\u01BA\x07\x18\x02\x02\u01BA\u01BB\x07\x03\x02\x02\u01BB\u01BC\x05\xBC_\x02\u01BC\u01BF\x07\x03\x02\x02\u01BD\u01C0\x05\xA4S\x02\u01BE\u01C0\x05\xBE`\x02\u01BF\u01BD\x03\x02\x02\x02\u01BF\u01BE\x03\x02\x02\x02\u01BF\u01C0\x03\x02\x02\x02\u01C0\u01C8\x03\x02\x02\x02\u01C1\u01C4\x07\x13\x02\x02\u01C2\u01C5\x05\xA4S\x02\u01C3\u01C5\x05\xBE`\x02\u01C4\u01C2\x03\x02\x02\x02\u01C4\u01C3\x03\x02\x02\x02\u01C5\u01C7\x03\x02\x02\x02\u01C6\u01C1\x03\x02\x02\x02\u01C7\u01CA\x03\x02\x02\x02\u01C8\u01C6\x03\x02\x02\x02\u01C8\u01C9\x03\x02\x02\x02\u01C9\u01CB\x03\x02\x02\x02\u01CA\u01C8\x03\x02\x02\x02\u01CB\u01CE\x07\x04\x02\x02\u01CC\u01CD\x07\xE7\x02\x02\u01CD\u01CF\x07\xEB\x02\x02\u01CE\u01CC\x03\x02\x02\x02\u01CE\u01CF\x03\x02\x02\x02\u01CF\u01D2\x03\x02\x02\x02\u01D0\u01D1\x07\xC0\x02\x02\u01D1\u01D3\x05l7\x02\u01D2\u01D0\x03\x02\x02\x02\u01D2\u01D3\x03\x02\x02\x02\u01D3\u01D4\x03\x02\x02\x02\u01D4\u01D5\x07\x04\x02\x02\u01D5\u01E5\x03\x02\x02\x02\u01D6\u01D7\x07\xD1\x02\x02\u01D7\u01D8\x07\x03\x02\x02\u01D8\u01D9\x05\x06\x04\x02\u01D9\u01DC\x07\x13\x02\x02\u01DA\u01DD\x05\xC0a\x02\u01DB\u01DD\x05t;\x02\u01DC\u01DA\x03\x02\x02\x02\u01DC\u01DB\x03\x02\x02\x02\u01DD\u01E0\x03\x02\x02\x02\u01DE\u01DF\x07\x13\x02\x02\u01DF\u01E1\x07\xEB\x02\x02\u01E0\u01DE\x03\x02\x02\x02\u01E0\u01E1\x03\x02\x02\x02\u01E1\u01E2\x03\x02\x02\x02\u01E2\u01E3\x07\x04\x02\x02\u01E3\u01E5\x03\x02\x02\x02\u01E4\u01AB\x03\x02\x02\x02\u01E4\u01B9\x03\x02\x02\x02\u01E4\u01D6\x03\x02\x02\x02\u01E5!\x03\x02\x02\x02\u01E6\u01EA\x05\xA4S\x02\u01E7\u01EA\x05\xBE`\x02\u01E8\u01EA\x07i\x02\x02\u01E9\u01E6\x03\x02\x02\x02\u01E9\u01E7\x03\x02\x02\x02\u01E9\u01E8\x03\x02\x02\x02\u01EA#\x03\x02\x02\x02\u01EB\u01EC\t\x0B\x02\x02\u01EC\u01ED\x07\x03\x02\x02\u01ED\u01EE\x05\x06\x04\x02\u01EE\u01EF\x07\x04\x02\x02\u01EF\u021C\x03\x02\x02\x02\u01F0\u01F1\x07X\x02\x02\u01F1\u01F2\x07\x03\x02\x02\u01F2\u01FD\x05\x06\x04\x02\u01F3\u01F4\x07\x13\x02\x02\u01F4\u01F5\x05\xB2Z\x02\u01F5\u01F6\x03\x02\x02\x02\u01F6\u01F7\x07\x13\x02\x02\u01F7\u01F8\x05\xB2Z\x02\u01F8\u01FA\x03\x02\x02\x02\u01F9\u01F3\x03\x02\x02\x02\u01F9\u01FA\x03\x02\x02\x02\u01FA\u01FE\x03\x02\x02\x02\u01FB\u01FC\x07\x13\x02\x02\u01FC\u01FE\x05\xB2Z\x02\u01FD\u01F9\x03\x02\x02\x02\u01FD\u01FB\x03\x02\x02\x02\u01FE\u01FF\x03\x02\x02\x02\u01FF\u0200\x07\x04\x02\x02\u0200\u021C\x03\x02\x02\x02\u0201\u0202\x07}\x02\x02\u0202\u0203\x07\x03\x02\x02\u0203\u0204\x05\x06\x04\x02\u0204\u0205\x07\x13\x02\x02\u0205\u0208\x05\x06\x04\x02\u0206\u0207\x07\x13\x02\x02\u0207\u0209\x05\xB2Z\x02\u0208\u0206\x03\x02\x02\x02\u0208\u0209\x03\x02\x02\x02\u0209\u020A\x03\x02\x02\x02\u020A\u020B\x07\x04\x02\x02\u020B\u021C\x03\x02\x02\x02\u020C\u020D\x07|\x02\x02\u020D\u020E\x07\x03\x02\x02\u020E\u020F\x05\x06\x04\x02\u020F\u0210\x07\x13\x02\x02\u0210\u0213\x05\x06\x04\x02\u0211\u0212\x07\x13\x02\x02\u0212\u0214\x05\xB2Z\x02\u0213\u0211\x03\x02\x02\x02\u0213\u0214\x03\x02\x02\x02\u0214\u0217\x03\x02\x02\x02\u0215\u0216\x07\x13\x02\x02\u0216\u0218\x05\xB2Z\x02\u0217\u0215\x03\x02\x02\x02\u0217\u0218\x03\x02\x02\x02\u0218\u0219\x03\x02\x02\x02\u0219\u021A\x07\x04\x02\x02\u021A\u021C\x03\x02\x02\x02\u021B\u01EB\x03\x02\x02\x02\u021B\u01F0\x03\x02\x02\x02\u021B\u0201\x03\x02\x02\x02\u021B\u020C\x03\x02\x02\x02\u021C%\x03\x02\x02\x02\u021D\u021E\t\f\x02\x02\u021E\u021F\x07\x03\x02\x02\u021F\u0220\x05\x06\x04\x02\u0220\u0221\x07\x04\x02\x02\u0221\u0233\x03\x02\x02\x02\u0222\u0223\t\r\x02\x02\u0223\u0224\x07\x03\x02\x02\u0224\u0227\x05\x06\x04\x02\u0225\u0226\x07\x13\x02\x02\u0226\u0228\x05\xB2Z\x02\u0227\u0225\x03\x02\x02\x02\u0227\u0228\x03\x02\x02\x02\u0228\u0229\x03\x02\x02\x02\u0229\u022A\x07\x04\x02\x02\u022A\u0233\x03\x02\x02\x02\u022B\u022C\t\x0E\x02\x02\u022C\u022D\x07\x03\x02\x02\u022D\u022E\x05\x06\x04\x02\u022E\u022F\x07\x13\x02\x02\u022F\u0230\x05\x06\x04\x02\u0230\u0231\x07\x04\x02\x02\u0231\u0233\x03\x02\x02\x02\u0232\u021D\x03\x02\x02\x02\u0232\u0222\x03\x02\x02\x02\u0232\u022B\x03\x02\x02\x02\u0233'\x03\x02\x02\x02\u0234\u0235\x07*\x02\x02\u0235\u0236\x07\x03\x02\x02\u0236\u0237\x05\x06\x04\x02\u0237\u0238\x07\x13\x02\x02\u0238\u0239\x05\x06\x04\x02\u0239\u023A\x07\x13\x02\x02\u023A\u023B\x05\x06\x04\x02\u023B\u023C\x07\x04\x02\x02\u023C\u0255\x03\x02\x02\x02\u023D\u023E\x07e\x02\x02\u023E\u023F\x07\x03\x02\x02\u023F\u0240\x05\x06\x04\x02\u0240\u0241\x07\x13\x02\x02\u0241\u0242\x05\x06\x04\x02\u0242\u0243\x07\x04\x02\x02\u0243\u0255\x03\x02\x02\x02\u0244\u0245\x07.\x02\x02\u0245\u0246\x07\x03\x02\x02\u0246\u0247\x05\x06\x04\x02\u0247\u0248\x07\x04\x02\x02\u0248\u0255\x03\x02\x02\x02\u0249\u024A\x079\x02\x02\u024A\u024B\x07\x03\x02\x02\u024B\u024C\x05\x06\x04\x02\u024C\u024D\x07\x13\x02\x02\u024D\u0250\x05\x06\x04\x02\u024E\u024F\x07\x13\x02\x02\u024F\u0251\x05\xC2b\x02\u0250\u024E\x03\x02\x02\x02\u0250\u0251\x03\x02\x02\x02\u0251\u0252\x03\x02\x02\x02\u0252\u0253\x07\x04\x02\x02\u0253\u0255\x03\x02\x02\x02\u0254\u0234\x03\x02\x02\x02\u0254\u023D\x03\x02\x02\x02\u0254\u0244\x03\x02\x02\x02\u0254\u0249\x03\x02\x02\x02\u0255)\x03\x02\x02\x02\u0256\u0257\x07\xC7\x02\x02\u0257\u0259\x07\x03\x02\x02\u0258\u025A\x05\x06\x04\x02\u0259\u0258\x03\x02\x02\x02\u0259\u025A\x03\x02\x02\x02\u025A\u025B\x03\x02\x02\x02\u025B\u0285\x07\x04\x02\x02\u025C\u025D\x07\x98\x02\x02\u025D\u025E\x07\x03\x02\x02\u025E\u0261\x05\x06\x04\x02\u025F\u0260\x07\x13\x02\x02\u0260\u0262\t\x0F\x02\x02\u0261\u025F\x03\x02\x02\x02\u0261\u0262\x03\x02\x02\x02\u0262\u0263\x03\x02\x02\x02\u0263\u0264\x07\x04\x02\x02\u0264\u0285\x03\x02\x02\x02\u0265\u0266\t\x10\x02\x02\u0266\u0267\x07\x03\x02\x02\u0267\u0268\x05\x06\x04\x02\u0268\u0269\x07\x04\x02\x02\u0269\u0285\x03\x02\x02\x02\u026A\u026B\x07\x9B\x02\x02\u026B\u026C\x07\x03\x02\x02\u026C\u026D\x05\x06\x04\x02\u026D\u026E\x07\x13\x02\x02\u026E\u026F\x05V,\x02\u026F\u0270\x07\x04\x02\x02\u0270\u0285\x03\x02\x02\x02\u0271\u0272\x07\xCA\x02\x02\u0272\u0273\x07\x03\x02\x02\u0273\u0276\x07\xEB\x02\x02\u0274\u0275\x07\x13\x02\x02\u0275\u0277\t\x11\x02\x02\u0276\u0274\x03\x02\x02\x02\u0276\u0277\x03\x02\x02\x02\u0277\u027A\x03\x02\x02\x02\u0278\u0279\x07\x13\x02\x02\u0279\u027B\x05\xB2Z\x02\u027A\u0278\x03\x02\x02\x02\u027A\u027B\x03\x02\x02\x02\u027B\u027E\x03\x02\x02\x02\u027C\u027D\x07\x13\x02\x02\u027D\u027F\t\x12\x02\x02\u027E\u027C\x03\x02\x02\x02\u027E\u027F\x03\x02\x02\x02\u027F\u0280\x03\x02\x02\x02\u0280\u0285\x07\x04\x02\x02\u0281\u0282\x07\x1E\x02\x02\u0282\u0283\x07\x03\x02\x02\u0283\u0285\x07\x04\x02\x02\u0284\u0256\x03\x02\x02\x02\u0284\u025C\x03\x02\x02\x02\u0284\u0265\x03\x02\x02\x02\u0284\u026A\x03\x02\x02\x02\u0284\u0271\x03\x02\x02\x02\u0284\u0281\x03\x02\x02\x02\u0285+\x03\x02\x02\x02\u0286\u0287\x070\x02\x02\u0287\u0288\x07\x03\x02\x02\u0288\u028B\x05\x06\x04\x02\u0289\u028A\x07\x13\x02\x02\u028A\u028C\x05\x06\x04\x02\u028B\u0289\x03\x02\x02\x02\u028C\u028D\x03\x02\x02\x02\u028D\u028B\x03\x02\x02\x02\u028D\u028E\x03\x02\x02\x02\u028E\u028F\x03\x02\x02\x02\u028F\u0290\x07\x04\x02\x02\u0290\u02A4\x03\x02\x02\x02\u0291\u0292\x073\x02\x02\u0292\u0293\x07\x03\x02\x02\u0293\u0296\x05\x06\x04\x02\u0294\u0295\x07\x13\x02\x02\u0295\u0297\x05\x06\x04\x02\u0296\u0294\x03\x02\x02\x02\u0297\u0298\x03\x02\x02\x02\u0298\u0296\x03\x02\x02\x02\u0298\u0299\x03\x02\x02\x02\u0299\u029A\x03\x02\x02\x02\u029A\u029B\x07\x04\x02\x02\u029B\u02A4\x03\x02\x02\x02\u029C\u029D\t\x13\x02\x02\u029D\u029E\x07\x03\x02\x02\u029E\u029F\x05\x06\x04\x02\u029F\u02A0\x07\x13\x02\x02\u02A0\u02A1\x05\x06\x04\x02\u02A1\u02A2\x07\x04\x02\x02\u02A2\u02A4\x03\x02\x02\x02\u02A3\u0286\x03\x02\x02\x02\u02A3\u0291\x03\x02\x02\x02\u02A3\u029C\x03\x02\x02\x02\u02A4-\x03\x02\x02\x02\u02A5\u02A6\x07h\x02\x02\u02A6\u02A7\x07\x03\x02\x02\u02A7\u02A8\x05\x06\x04\x02\u02A8\u02A9\x07\x13\x02\x02\u02A9\u02AB\x07\xEC\x02\x02\u02AA\u02AC\x05\x98M\x02\u02AB\u02AA\x03\x02\x02\x02\u02AB\u02AC\x03\x02\x02\x02\u02AC\u02AF\x03\x02\x02\x02\u02AD\u02AE\x07w\x02\x02\u02AE\u02B0\x05\xA8U\x02\u02AF\u02AD\x03\x02\x02\x02\u02AF\u02B0\x03\x02\x02\x02\u02B0\u02B2\x03\x02\x02\x02\u02B1\u02B3\x05\x96L\x02\u02B2\u02B1\x03\x02\x02\x02\u02B2\u02B3\x03\x02\x02\x02\u02B3\u02B5\x03\x02\x02\x02\u02B4\u02B6\x05\x9EP\x02\u02B5\u02B4\x03\x02\x02\x02\u02B5\u02B6\x03\x02\x02\x02\u02B6\u02B8\x03\x02\x02\x02\u02B7\u02B9\x05\xA0Q\x02\u02B8\u02B7\x03\x02\x02\x02\u02B8\u02B9\x03\x02\x02\x02\u02B9\u02BA\x03\x02\x02\x02\u02BA\u02BB\x07\x04\x02\x02\u02BB/\x03\x02\x02\x02\u02BC\u02BD\x07\xD5\x02\x02\u02BD\u02BE\x07\x03\x02\x02\u02BE\u02BF\x05\x06\x04\x02\u02BF\u02C0\x07\x13\x02\x02\u02C0\u02CA\x07\xEC\x02\x02\u02C1\u02C2\x07\xDE\x02\x02\u02C2\u02C7\x05\xA8U\x02\u02C3\u02C4\x07\x13\x02\x02\u02C4\u02C6\x05\xA8U\x02\u02C5\u02C3\x03\x02\x02\x02\u02C6\u02C9\x03\x02\x02\x02\u02C7\u02C5\x03\x02\x02\x02\u02C7\u02C8\x03\x02\x02\x02\u02C8\u02CB\x03\x02\x02\x02\u02C9\u02C7\x03\x02\x02\x02\u02CA\u02C1\x03\x02\x02\x02\u02CA\u02CB\x03\x02\x02\x02\u02CB\u02CD\x03\x02\x02\x02\u02CC\u02CE\x05\x94K\x02\u02CD\u02CC\x03\x02\x02\x02\u02CD\u02CE\x03\x02\x02\x02\u02CE\u02CF\x03\x02\x02\x02\u02CF\u02D0\x07\x04\x02\x02\u02D0\u02FA\x03\x02\x02\x02\u02D1\u02D2\x07\xD6\x02\x02\u02D2\u02D3\x07\x03\x02\x02\u02D3\u02D4\x05\x06\x04\x02\u02D4\u02D5\x07\x13\x02\x02\u02D5\u02D7\x07\xEC\x02\x02\u02D6\u02D8\x05\x98M\x02\u02D7\u02D6\x03\x02\x02\x02\u02D7\u02D8\x03\x02\x02\x02\u02D8\u02DB\x03\x02\x02\x02\u02D9\u02DA\x07w\x02\x02\u02DA\u02DC\x05\xA8U\x02\u02DB\u02D9\x03\x02\x02\x02\u02DB\u02DC\x03\x02\x02\x02\u02DC\u02DE\x03\x02\x02\x02\u02DD\u02DF\x05\x96L\x02\u02DE\u02DD\x03\x02\x02\x02\u02DE\u02DF\x03\x02\x02\x02\u02DF\u02E1\x03\x02\x02\x02\u02E0\u02E2\x05\x9AN\x02\u02E1\u02E0\x03\x02\x02\x02\u02E1\u02E2\x03\x02\x02\x02\u02E2\u02E4\x03\x02\x02\x02\u02E3\u02E5\x05\x94K\x02\u02E4\u02E3\x03\x02\x02\x02\u02E4\u02E5\x03\x02\x02\x02\u02E5\u02E6\x03\x02\x02\x02\u02E6\u02E7\x07\x04\x02\x02\u02E7\u02FA\x03\x02\x02\x02\u02E8\u02E9\x078\x02\x02\u02E9\u02EA\x07\x03\x02\x02\u02EA\u02EC\x05\x06\x04\x02\u02EB\u02ED\x05\xACW\x02\u02EC\u02EB\x03\x02\x02\x02\u02EC\u02ED\x03\x02\x02\x02\u02ED\u02EF\x03\x02\x02\x02\u02EE\u02F0\x05\xAEX\x02\u02EF\u02EE\x03\x02\x02\x02\u02EF\u02F0\x03\x02\x02\x02\u02F0\u02F2\x03\x02\x02\x02\u02F1\u02F3\x05\x9CO\x02\u02F2\u02F1\x03\x02\x02\x02\u02F2\u02F3\x03\x02\x02\x02\u02F3\u02F5\x03\x02\x02\x02\u02F4\u02F6\t\x14\x02\x02\u02F5\u02F4\x03\x02\x02\x02\u02F5\u02F6\x03\x02\x02\x02\u02F6\u02F7\x03\x02\x02\x02\u02F7\u02F8\x07\x04\x02\x02\u02F8\u02FA\x03\x02\x02\x02\u02F9\u02BC\x03\x02\x02\x02\u02F9\u02D1\x03\x02\x02\x02\u02F9\u02E8\x03\x02\x02\x02\u02FA1\x03\x02\x02\x02\u02FB\u02FC\x07g\x02\x02\u02FC\u02FD\x07\x03\x02\x02\u02FD\u02FE\x05\x06\x04\x02\u02FE\u02FF\x07\x13\x02\x02\u02FF\u0300\x05\x06\x04\x02\u0300\u0301\x07\x04\x02\x02\u03013\x03\x02\x02\x02\u0302\u0303\t\x15\x02\x02\u0303\u0304\x07\x03\x02\x02\u0304\u0309\x05\x06\x04\x02\u0305\u0307\x05Z.\x02\u0306\u0308\x05\\/\x02\u0307\u0306\x03\x02\x02\x02\u0307\u0308\x03\x02\x02\x02\u0308\u030A\x03\x02\x02\x02\u0309\u0305\x03\x02\x02\x02\u0309\u030A\x03\x02\x02\x02\u030A\u030B\x03\x02\x02\x02\u030B\u030C\x07\x04\x02\x02\u030C5\x03\x02\x02\x02\u030D\u030E\t\x16\x02\x02\u030E\u030F\x07\x03\x02\x02\u030F\u0310\x05\x06\x04\x02\u0310\u0311\x07\x8F\x02\x02\u0311\u0313\x07\x03\x02\x02\u0312\u0314\x05N(\x02\u0313\u0312\x03\x02\x02\x02\u0313\u0314\x03\x02\x02\x02\u0314\u0316\x03\x02\x02\x02\u0315\u0317\x05P)\x02\u0316\u0315\x03\x02\x02\x02\u0316\u0317\x03\x02\x02\x02\u0317\u0319\x03\x02\x02\x02\u0318\u031A\x05T+\x02\u0319\u0318\x03\x02\x02\x02\u0319\u031A\x03\x02\x02\x02\u031A\u031B\x03\x02\x02\x02\u031B\u031C\x07\x04\x02\x02\u031C\u031D\x07\x04\x02\x02\u031D\u033C\x03\x02\x02\x02\u031E\u031F\t\x17\x02\x02\u031F\u0320\x07\x03\x02\x02\u0320\u0326\x05\x06\x04\x02\u0321\u0322\x07\x13\x02\x02\u0322\u0324\x05V,\x02\u0323\u0325\x05\xBE`\x02\u0324\u0323\x03\x02\x02\x02\u0324\u0325\x03\x02\x02\x02\u0325\u0327\x03\x02\x02\x02\u0326\u0321\x03\x02\x02\x02\u0326\u0327\x03\x02\x02\x02\u0327\u0328\x03\x02\x02\x02\u0328\u0329\x07\x8F\x02\x02\u0329\u032B\x07\x03\x02\x02\u032A\u032C\x05N(\x02\u032B\u032A\x03\x02\x02\x02\u032B\u032C\x03\x02\x02\x02\u032C\u032D\x03\x02\x02\x02\u032D\u032E\x05P)\x02\u032E\u032F\x03\x02\x02\x02\u032F\u0330\x07\x04\x02\x02\u0330\u0331\x07\x04\x02\x02\u0331\u033C\x03\x02\x02\x02\u0332\u0333\x07\x8E\x02\x02\u0333\u0334\x07\x03\x02\x02\u0334\u0335\x05\x06\x04\x02\u0335\u0336\x07\x8F\x02\x02\u0336\u0337\x07\x03\x02\x02\u0337\u0338\x05N(\x02\u0338\u0339\x07\x04\x02\x02\u0339\u033A\x07\x04\x02\x02\u033A\u033C\x03\x02\x02\x02\u033B\u030D\x03\x02\x02\x02\u033B\u031E\x03\x02\x02\x02\u033B\u0332\x03\x02\x02\x02\u033C7\x03\x02\x02\x02\u033D\u033E\x07k\x02\x02\u033E\u033F\x07\x03\x02\x02\u033F\u0340\x05\x06\x04\x02\u0340\u0341\x07\x13\x02\x02\u0341\u0342\x05\x06\x04\x02\u0342\u0343\x07\x04\x02\x02\u03439\x03\x02\x02\x02\u0344\u0345\x05\xA8U\x02\u0345\u0346\x07:\x02\x02\u0346\u0347\x05\xA8U\x02\u0347;\x03\x02\x02\x02\u0348\u034D\x05> \x02\u0349\u034A\x07\x13\x02\x02\u034A\u034C\x05> \x02\u034B\u0349\x03\x02\x02\x02\u034C\u034F\x03\x02\x02\x02\u034D\u034B\x03\x02\x02\x02\u034D\u034E\x03\x02\x02\x02\u034E=\x03\x02\x02\x02\u034F\u034D\x03\x02\x02\x02\u0350\u0352\x05\xB4[\x02\u0351\u0350\x03\x02\x02\x02\u0351\u0352\x03\x02\x02\x02\u0352\u0353\x03\x02\x02\x02\u0353\u0354\x05\xA8U\x02\u0354\u0355\x07\x16\x02\x02\u0355\u0356\x054\x1B\x02\u0356?\x03\x02\x02\x02\u0357\u0359\x05\xB4[\x02\u0358\u0357\x03\x02\x02\x02\u0358\u0359\x03\x02\x02\x02\u0359\u035A\x03\x02\x02\x02\u035A\u035B\x05\xA8U\x02\u035B\u035C\x07\x16\x02\x02\u035C\u035D\x05\x06\x04\x02\u035DA\x03\x02\x02\x02\u035E\u035F\x05\xA8U\x02\u035F\u0360\x07\t\x02\x02\u0360\u0361\x05\xBE`\x02\u0361C\x03\x02\x02\x02\u0362\u0367\x05H%\x02\u0363\u0364\x07\x13\x02\x02\u0364\u0366\x05H%\x02\u0365\u0363\x03\x02\x02\x02\u0366\u0369\x03\x02\x02\x02\u0367\u0365\x03\x02\x02\x02\u0367\u0368\x03\x02\x02\x02\u0368E\x03\x02\x02\x02\u0369\u0367\x03\x02\x02\x02\u036A\u036F\x05H%\x02\u036B\u036C\x07\x13\x02\x02\u036C\u036E\x05H%\x02\u036D\u036B\x03\x02\x02\x02\u036E\u0371\x03\x02\x02\x02\u036F\u036D\x03\x02\x02\x02\u036F\u0370\x03\x02\x02\x02\u0370\u037B\x03\x02\x02\x02\u0371\u036F\x03\x02\x02\x02\u0372\u0373\x07\x1C\x02\x02\u0373\u0378\x05\xA8U\x02\u0374\u0375\x07\x13\x02\x02\u0375\u0377\x05\xA8U\x02\u0376\u0374\x03\x02\x02\x02\u0377\u037A\x03\x02\x02\x02\u0378\u0376\x03\x02\x02\x02\u0378\u0379\x03\x02\x02\x02\u0379\u037C\x03\x02\x02\x02\u037A\u0378\x03\x02\x02\x02\u037B\u0372\x03\x02\x02\x02\u037B\u037C\x03\x02\x02\x02\u037CG\x03\x02\x02\x02\u037D\u0380\x05\x06\x04\x02\u037E\u037F\x07%\x02\x02\u037F\u0381\x05\xA2R\x02\u0380\u037E\x03\x02\x02\x02\u0380\u0381\x03\x02\x02\x02\u0381I\x03\x02\x02\x02\u0382\u0384\x05\x10\t\x02\u0383\u0382\x03\x02\x02\x02\u0383\u0384\x03\x02\x02\x02\u0384\u0388\x03\x02\x02\x02\u0385\u0389\x05\x12\n\x02\u0386\u0389\x05L'\x02\u0387\u0389\x05\x0E\b\x02\u0388\u0385\x03\x02\x02\x02\u0388\u0386\x03\x02\x02\x02\u0388\u0387\x03\x02\x02\x02\u0388\u0389\x03\x02\x02\x02\u0389\u038B\x03\x02\x02\x02\u038A\u038C\x05\x14\x0B\x02\u038B\u038A\x03\x02\x02\x02\u038B\u038C\x03\x02\x02\x02\u038C\u038E\x03\x02\x02\x02\u038D\u038F\x05\f\x07\x02\u038E\u038D\x03\x02\x02\x02\u038E\u038F\x03\x02\x02\x02\u038FK\x03\x02\x02\x02\u0390\u0391\x07\xC5\x02\x02\u0391\u0392\x05\x06\x04\x02\u0392M\x03\x02\x02\x02\u0393\u0394\x07\x93\x02\x02\u0394\u0395\x07B\x02\x02\u0395\u039A\x05\xA8U\x02\u0396\u0397\x07\x13\x02\x02\u0397\u0399\x05\xA8U\x02\u0398\u0396\x03\x02\x02\x02\u0399\u039C\x03\x02\x02\x02\u039A\u0398\x03\x02\x02\x02\u039A\u039B\x03\x02\x02\x02\u039BO\x03\x02\x02\x02\u039C\u039A\x03\x02\x02\x02\u039D\u039E\x07A\x02\x02\u039E\u039F\x07B\x02\x02\u039F\u03A4\x05R*\x02\u03A0\u03A1\x07\x13\x02\x02\u03A1\u03A3\x05R*\x02\u03A2\u03A0\x03\x02\x02\x02\u03A3\u03A6\x03\x02\x02\x02\u03A4\u03A2\x03\x02\x02\x02\u03A4\u03A5\x03\x02\x02\x02\u03A5Q\x03\x02\x02\x02\u03A6\u03A4\x03\x02\x02\x02\u03A7\u03A9\x05\xA8U\x02\u03A8\u03AA\t\x18\x02\x02\u03A9\u03A8\x03\x02\x02\x02\u03A9\u03AA\x03\x02\x02\x02\u03AAS\x03\x02\x02\x02\u03AB\u03AC\x07n\x02\x02\u03AC\u03AF\x07\xB3\x02\x02\u03AD\u03AF\x07\x95\x02\x02\u03AE\u03AB\x03\x02\x02\x02\u03AE\u03AD\x03\x02\x02\x02\u03AF\u03B0\x03\x02\x02\x02\u03B0\u03B1\x07*\x02\x02\u03B1\u03B2\x05X-\x02\u03B2\u03B3\x07&\x02\x02\u03B3\u03B4\x05X-\x02\u03B4U\x03\x02\x02\x02\u03B5\u03B6\x07\xE8\x02\x02\u03B6W\x03\x02\x02\x02\u03B7\u03B8\x07\xE8\x02\x02\u03B8\u03C3\x07\x90\x02\x02\u03B9\u03BA\x07\xE8\x02\x02\u03BA\u03C3\x07\x91\x02\x02\u03BB\u03BC\x07\x96\x02\x02\u03BC\u03BD\x07n\x02\x02\u03BD\u03C3\x07\xB4\x02\x02\u03BE\u03BF\x07\x92\x02\x02\u03BF\u03C3\x07\x90\x02\x02\u03C0\u03C1\x07\x92\x02\x02\u03C1\u03C3\x07\x91\x02\x02\u03C2\u03B7\x03\x02\x02\x02\u03C2\u03B9\x03\x02\x02\x02\u03C2\u03BB\x03\x02\x02\x02\u03C2\u03BE\x03\x02\x02\x02\u03C2\u03C0\x03\x02\x02\x02\u03C3Y\x03\x02\x02\x02\u03C4\u03C5\x07\x87\x02\x02\u03C5\u03C6\t\x19\x02\x02\u03C6\u03CB\x05\xA8U\x02\u03C7\u03C8\x07\x13\x02\x02\u03C8\u03CA\x05\xA8U\x02\u03C9\u03C7\x03\x02\x02\x02\u03CA\u03CD\x03\x02\x02\x02\u03CB\u03C9\x03\x02\x02\x02\u03CB\u03CC\x03\x02\x02\x02\u03CC\u03D2\x03\x02\x02\x02\u03CD\u03CB\x03\x02\x02\x02\u03CE\u03CF\x07\x87\x02\x02\u03CF\u03D0\x07>\x02\x02\u03D0\u03D2\x05\x06\x04\x02\u03D1\u03C4\x03\x02\x02\x02\u03D1\u03CE\x03\x02\x02\x02\u03D2[\x03\x02\x02\x02\u03D3\u03D4\x07\x89\x02\x02\u03D4\u03D5\x05\x06\x04\x02\u03D5]\x03\x02\x02\x02\u03D6\u03D7\x05\xA4S\x02\u03D7\u03DA\x05d3\x02\u03D8\u03D9\x07\xD4\x02\x02\u03D9\u03DB\x05\xBE`\x02\u03DA\u03D8\x03\x02\x02\x02\u03DA\u03DB\x03\x02\x02\x02\u03DB_\x03\x02\x02\x02\u03DC\u03E0\x05h5\x02\u03DD\u03E0\x05l7\x02\u03DE\u03E0\x05j6\x02\u03DF\u03DC\x03\x02\x02\x02\u03DF\u03DD\x03\x02\x02\x02\u03DF\u03DE\x03\x02\x02\x02\u03E0a\x03\x02\x02\x02\u03E1\u03E4\x05j6\x02\u03E2\u03E4\x05h5\x02\u03E3\u03E1\x03\x02\x02\x02\u03E3\u03E2\x03\x02\x02\x02\u03E4c\x03\x02\x02\x02\u03E5\u03EB\x05h5\x02\u03E6\u03EB\x05l7\x02\u03E7\u03EB\x05n8\x02\u03E8\u03EB\x05f4\x02\u03E9\u03EB\x05j6\x02\u03EA\u03E5\x03\x02\x02\x02\u03EA\u03E6\x03\x02\x02\x02\u03EA\u03E7\x03\x02\x02\x02\u03EA\u03E8\x03\x02\x02\x02\u03EA\u03E9\x03\x02\x02\x02\u03EBe\x03\x02\x02\x02\u03EC\u03F0\x07v\x02\x02\u03ED\u03F0\x05p9\x02\u03EE\u03F0\x05r:\x02\u03EF\u03EC\x03\x02\x02\x02\u03EF\u03ED\x03\x02\x02\x02\u03EF\u03EE\x03\x02\x02\x02\u03F0g\x03\x02\x02\x02\u03F1\u03F4\x05\xC0a\x02\u03F2\u03F4\x05t;\x02\u03F3\u03F1\x03\x02\x02\x02\u03F3\u03F2\x03\x02\x02\x02\u03F4\u03F6\x03\x02\x02\x02\u03F5\u03F7\x05\x8EH\x02\u03F6\u03F5\x03\x02\x02\x02\u03F6\u03F7\x03\x02\x02\x02\u03F7\u03FC\x03\x02\x02\x02\u03F8\u03FA\x07)\x02\x02\u03F9\u03F8\x03\x02\x02\x02\u03F9\u03FA\x03\x02\x02\x02\u03FA\u03FB\x03\x02\x02\x02\u03FB\u03FD\x07-\x02\x02\u03FC\u03F9\x03\x02\x02\x02\u03FC\u03FD\x03\x02\x02\x02\u03FDi\x03\x02\x02\x02\u03FE\u0403\x05\xB4[\x02\u03FF\u0400\x07\n\x02\x02\u0400\u0401\x05h5\x02\u0401\u0402\x07\x0B\x02\x02\u0402\u0404\x03\x02\x02\x02\u0403\u03FF\x03\x02\x02\x02\u0403\u0404\x03\x02\x02\x02\u0404k\x03\x02\x02\x02\u0405\u0411\x07p\x02\x02\u0406\u0407\x07\x07\x02\x02\u0407\u040C\x05\x90I\x02\u0408\u0409\x07\x13\x02\x02\u0409\u040B\x05\x90I\x02\u040A\u0408\x03\x02\x02\x02\u040B\u040E\x03\x02\x02\x02\u040C\u040A\x03\x02\x02\x02\u040C\u040D\x03\x02\x02\x02\u040D\u040F\x03\x02\x02\x02\u040E\u040C\x03\x02\x02\x02\u040F\u0410\x07\b\x02\x02\u0410\u0412\x03\x02\x02\x02\u0411\u0406\x03\x02\x02\x02\u0411\u0412\x03\x02\x02\x02\u0412m\x03\x02\x02\x02\u0413\u0418\x07\xE6\x02\x02\u0414\u0415\x07\n\x02\x02\u0415\u0416\x05h5\x02\u0416\u0417\x07\x0B\x02\x02\u0417\u0419\x03\x02\x02\x02\u0418\u0414\x03\x02\x02\x02\u0418\u0419\x03\x02\x02\x02\u0419o\x03\x02\x02\x02\u041A\u0438\x07t\x02\x02\u041B\u0427\x07\xE2\x02\x02\u041C\u041D\x07\x07\x02\x02\u041D\u0422\x05t;\x02\u041E\u041F\x07\x11\x02\x02\u041F\u0421\x05t;\x02\u0420\u041E\x03\x02\x02\x02\u0421\u0424\x03\x02\x02\x02\u0422\u0420\x03\x02\x02\x02\u0422\u0423\x03\x02\x02\x02\u0423\u0425\x03\x02\x02\x02\u0424\u0422\x03\x02\x02\x02\u0425\u0426\x07\b\x02\x02\u0426\u0428\x03\x02\x02\x02\u0427\u041C\x03\x02\x02\x02\u0427\u0428\x03\x02\x02\x02\u0428\u0438\x03\x02\x02\x02\u0429\u0435\x07\xE3\x02\x02\u042A\u042B\x07\x07\x02\x02\u042B\u0430\x05\xA4S\x02\u042C\u042D\x07\x11\x02\x02\u042D\u042F\x05\xA4S\x02\u042E\u042C\x03\x02\x02\x02\u042F\u0432\x03\x02\x02\x02\u0430\u042E\x03\x02\x02\x02\u0430\u0431\x03\x02\x02\x02\u0431\u0433\x03\x02\x02\x02\u0432\u0430\x03\x02\x02\x02\u0433\u0434\x07\b\x02\x02\u0434\u0436\x03\x02\x02\x02\u0435\u042A\x03\x02\x02\x02\u0435\u0436\x03\x02\x02\x02\u0436\u0438\x03\x02\x02\x02\u0437\u041A\x03\x02\x02\x02\u0437\u041B\x03\x02\x02\x02\u0437\u0429\x03\x02\x02\x02\u0438q\x03\x02\x02\x02\u0439\u0462\x07u\x02\x02\u043A\u044B\x07\xE4\x02\x02\u043B\u043C\x07\x07\x02\x02\u043C\u0448\x07\xEC\x02\x02\u043D\u043E\x07\x03\x02\x02\u043E\u0443\x05t;\x02\u043F\u0440\x07\x11\x02\x02\u0440\u0442\x05t;\x02\u0441\u043F\x03\x02\x02\x02\u0442\u0445\x03\x02\x02\x02\u0443\u0441\x03\x02\x02\x02\u0443\u0444\x03\x02\x02\x02\u0444\u0446\x03\x02\x02\x02\u0445\u0443\x03\x02\x02\x02\u0446\u0447\x07\x04\x02\x02\u0447\u0449\x03\x02\x02\x02\u0448\u043D\x03\x02\x02\x02\u0448\u0449\x03\x02\x02\x02\u0449\u044A\x03\x02\x02\x02\u044A\u044C\x07\b\x02\x02\u044B\u043B\x03\x02\x02\x02\u044B\u044C\x03\x02\x02\x02\u044C\u0462\x03\x02\x02\x02\u044D\u045F\x07\xE5\x02\x02\u044E\u044F\x07\x07\x02\x02\u044F\u045B\x05\xA4S\x02\u0450\u0451\x07\x03\x02\x02\u0451\u0456\x05\xA4S\x02\u0452\u0453\x07\x11\x02\x02\u0453\u0455\x05\xA4S\x02\u0454\u0452\x03\x02\x02\x02\u0455\u0458\x03\x02\x02\x02\u0456\u0454\x03\x02\x02\x02\u0456\u0457\x03\x02\x02\x02\u0457\u0459\x03\x02\x02\x02\u0458\u0456\x03\x02\x02\x02\u0459\u045A\x07\x04\x02\x02\u045A\u045C\x03\x02\x02\x02\u045B\u0450\x03\x02\x02\x02\u045B\u045C\x03\x02\x02\x02\u045C\u045D\x03\x02\x02\x02\u045D\u045E\x07\b\x02\x02\u045E\u0460\x03\x02\x02\x02\u045F\u044E\x03\x02\x02\x02\u045F\u0460\x03\x02\x02\x02\u0460\u0462\x03\x02\x02\x02\u0461\u0439\x03\x02\x02\x02\u0461\u043A\x03\x02\x02\x02\u0461\u044D\x03\x02\x02\x02\u0462s\x03\x02\x02\x02\u0463\u0464\x07\xEC\x02\x02\u0464u\x03\x02\x02\x02\u0465\u0466\x07\xEC\x02\x02\u0466w\x03\x02\x02\x02\u0467\u0468\t\x1A\x02\x02\u0468\u046D\x05z>\x02\u0469\u046A\x07\x13\x02\x02\u046A\u046C\x05z>\x02\u046B\u0469\x03\x02\x02\x02\u046C\u046F\x03\x02\x02\x02\u046D\u046B\x03\x02\x02\x02\u046D\u046E\x03\x02\x02\x02\u046Ey\x03\x02\x02\x02\u046F\u046D\x03\x02\x02\x02\u0470\u0473\x05\xA4S\x02\u0471\u0472\x07%\x02\x02\u0472\u0474\x05\xA2R\x02\u0473\u0471\x03\x02\x02\x02\u0473\u0474\x03\x02\x02\x02\u0474{\x03\x02\x02\x02\u0475\u047A\x05~@\x02\u0476\u0477\x07\xEE\x02\x02\u0477\u0479\x05~@\x02\u0478\u0476\x03\x02\x02\x02\u0479\u047C\x03\x02\x02\x02\u047A\u0478\x03\x02\x02\x02\u047A\u047B\x03\x02\x02\x02\u047B}\x03\x02\x02\x02\u047C\u047A\x03\x02\x02\x02\u047D\u047E\x07\xEC\x02\x02\u047E\u0480\x07\x15\x02\x02\u047F\u047D\x03\x02\x02\x02\u047F\u0480\x03\x02\x02\x02\u0480\u0485\x03\x02\x02\x02\u0481\u0482\x07\xB0\x02\x02\u0482\u0483\x05\x06\x04\x02\u0483\u0484\x07\x1A\x02\x02\u0484\u0486\x03\x02\x02\x02\u0485\u0481\x03\x02\x02\x02\u0485\u0486\x03\x02\x02\x02\u0486\u0487\x03\x02\x02\x02\u0487\u0489\x05\x06\x04\x02\u0488\u048A\x05\xACW\x02\u0489\u0488\x03\x02\x02\x02\u0489\u048A\x03\x02\x02\x02\u048A\u048C\x03\x02\x02\x02\u048B\u048D\x05\xAEX\x02\u048C\u048B\x03\x02\x02\x02\u048C\u048D\x03\x02\x02\x02\u048D\x7F\x03\x02\x02\x02\u048E\u0493\x05\x82B\x02\u048F\u0490\x07\xEE\x02\x02\u0490\u0492\x05\x82B\x02\u0491\u048F\x03\x02\x02\x02\u0492\u0495\x03\x02\x02\x02\u0493\u0491\x03\x02\x02\x02\u0493\u0494\x03\x02\x02\x02\u0494\x81\x03\x02\x02\x02\u0495\u0493\x03\x02\x02\x02\u0496\u0497\x07\xEC\x02\x02\u0497\u0499\x07\x15\x02\x02\u0498\u0496\x03\x02\x02\x02\u0498\u0499\x03\x02\x02\x02\u0499\u049A\x03\x02\x02\x02\u049A\u049C\x05\x88E\x02\u049B\u049D\x05\xACW\x02\u049C\u049B\x03\x02\x02\x02\u049C\u049D\x03\x02\x02\x02\u049D\u049F\x03\x02\x02\x02\u049E\u04A0\x05\xAEX\x02\u049F\u049E\x03\x02\x02\x02\u049F\u04A0\x03\x02\x02\x02\u04A0\x83\x03\x02\x02\x02\u04A1\u04A4\t\x1A\x02\x02\u04A2\u04A3\x07\x9E\x02\x02\u04A3\u04A5\x05\x86D\x02\u04A4\u04A2\x03\x02\x02\x02\u04A4\u04A5\x03\x02\x02\x02\u04A5\u04A6\x03\x02\x02\x02\u04A6\u04A7\x07w\x02\x02\u04A7\u04A8\x07\xEC\x02\x02\u04A8\x85\x03\x02\x02\x02\u04A9\u04AE\x05z>\x02\u04AA\u04AB\x07\x13\x02\x02\u04AB\u04AD\x05z>\x02\u04AC\u04AA\x03\x02\x02\x02\u04AD\u04B0\x03\x02\x02\x02\u04AE\u04AC\x03\x02\x02\x02\u04AE\u04AF\x03\x02\x02\x02\u04AF\x87\x03\x02\x02\x02\u04B0\u04AE\x03\x02\x02\x02\u04B1\u04B2\x07\xB0\x02\x02\u04B2\u04B3\x05\x06\x04\x02\u04B3\u04B4\x07\x1A\x02\x02\u04B4\u04B6\x03\x02\x02\x02\u04B5\u04B1\x03\x02\x02\x02\u04B5\u04B6\x03\x02\x02\x02\u04B6\u04B7\x03\x02\x02\x02\u04B7\u04B9\x05\x8CG\x02\u04B8\u04BA\x05\xB0Y\x02\u04B9\u04B8\x03\x02\x02\x02\u04B9\u04BA\x03\x02\x02\x02\u04BA\u04BB\x03\x02\x02\x02\u04BB\u04BF\x05\x8AF\x02\u04BC\u04BE\x05\x8AF\x02\u04BD\u04BC\x03\x02\x02\x02\u04BE\u04C1\x03\x02\x02\x02\u04BF\u04BD\x03\x02\x02\x02\u04BF\u04C0\x03\x02\x02\x02\u04C0\x89\x03\x02\x02\x02\u04C1\u04BF\x03\x02\x02\x02\u04C2\u04C4\t\x1B\x02\x02\u04C3\u04C2\x03\x02\x02\x02\u04C3\u04C4\x03\x02\x02\x02\u04C4\u04C5\x03\x02\x02\x02\u04C5\u04CA\x05\x8CG\x02\u04C6\u04C7\x07\x05\x02\x02\u04C7\u04C8\x05\x06\x04\x02\u04C8\u04C9\x07\x06\x02\x02\u04C9\u04CB\x03\x02\x02\x02\u04CA\u04C6\x03\x02\x02\x02\u04CA\u04CB\x03\x02\x02\x02\u04CB\x8B\x03\x02\x02\x02\u04CC\u04CD\t\x1C\x02\x02\u04CD\x8D\x03\x02\x02\x02\u04CE\u04CF\x07\x05\x02\x02\u04CF\u04D0\x05\x06\x04\x02\u04D0\u04D1\x07\x06\x02\x02\u04D1\u04DE\x03\x02\x02\x02\u04D2\u04D3\x07\x07\x02\x02\u04D3\u04D8\x05\xBE`\x02\u04D4\u04D5\x07\x13\x02\x02\u04D5\u04D7\x05\xBE`\x02\u04D6\u04D4\x03\x02\x02\x02\u04D7\u04DA\x03\x02\x02\x02\u04D8\u04D6\x03\x02\x02\x02\u04D8\u04D9\x03\x02\x02\x02\u04D9\u04DB\x03\x02\x02\x02\u04DA\u04D8\x03\x02\x02\x02\u04DB\u04DC\x07\b\x02\x02\u04DC\u04DE\x03\x02\x02\x02\u04DD\u04CE\x03\x02\x02\x02\u04DD\u04D2\x03\x02\x02\x02\u04DE\x8F\x03\x02\x02\x02\u04DF\u04E2\x05j6\x02\u04E0\u04E3\x05\xA8U\x02\u04E1\u04E3\x05\x92J\x02\u04E2\u04E0\x03\x02\x02\x02\u04E2\u04E1\x03\x02\x02\x02\u04E3\x91\x03\x02\x02\x02\u04E4\u04E6\x07i\x02\x02\u04E5\u04E7\t\x1D\x02\x02\u04E6\u04E5\x03\x02\x02\x02\u04E6\u04E7\x03\x02\x02\x02\u04E7\x93\x03\x02\x02\x02\u04E8\u04E9\t\x1E\x02\x02\u04E9\x95\x03\x02\x02\x02\u04EA\u04EB\t\x1F\x02\x02\u04EB\x97\x03\x02\x02\x02\u04EC\u04ED\x07\x9E\x02\x02\u04ED\u04F2\x05\xA8U\x02\u04EE\u04EF\x07\x13\x02\x02\u04EF\u04F1\x05\xA8U\x02\u04F0\u04EE\x03\x02\x02\x02\u04F1\u04F4\x03\x02\x02\x02\u04F2\u04F0\x03\x02\x02\x02\u04F2\u04F3\x03\x02\x02\x02\u04F3\x99\x03\x02\x02\x02\u04F4\u04F2\x03\x02\x02\x02\u04F5\u04F6\t \x02\x02\u04F6\x9B\x03\x02\x02\x02\u04F7\u04F8\x07<\x02\x02\u04F8\u04F9\x05\x06\x04\x02\u04F9\x9D\x03\x02\x02\x02\u04FA\u04FB\t!\x02\x02\u04FB\x9F\x03\x02\x02\x02\u04FC\u04FD\t\"\x02\x02\u04FD\xA1\x03\x02\x02\x02\u04FE\u04FF\x07\xEC\x02\x02\u04FF\xA3\x03\x02\x02\x02\u0500\u0501\x07\xEC\x02\x02\u0501\xA5\x03\x02\x02\x02\u0502\u0503\x07\xEC\x02\x02\u0503\xA7\x03\x02\x02\x02\u0504\u0507\x07\xEC\x02\x02\u0505\u0506\x07\x17\x02\x02\u0506\u0508\x07\xEC\x02\x02\u0507\u0505\x03\x02\x02\x02\u0507\u0508\x03\x02\x02\x02\u0508\xA9\x03\x02\x02\x02\u0509\u050A\x07\x07\x02\x02\u050A\u050F\x05\xBE`\x02\u050B\u050C\x07\x13\x02\x02\u050C\u050E\x05\xBE`\x02\u050D\u050B\x03\x02\x02\x02\u050E\u0511\x03\x02\x02\x02\u050F\u050D\x03\x02\x02\x02\u050F\u0510\x03\x02\x02\x02\u0510\u0512\x03\x02\x02\x02\u0511\u050F\x03\x02\x02\x02\u0512\u0513\x07\b\x02\x02\u0513\xAB\x03\x02\x02\x02\u0514\u0515\x07=\x02\x02\u0515\u0516\x05\xBE`\x02\u0516\xAD\x03\x02\x02\x02\u0517\u0518\x07@\x02\x02\u0518\u0519\x05\xBE`\x02\u0519\xAF\x03\x02\x02\x02\u051A\u051B\t#\x02\x02\u051B\xB1\x03\x02\x02\x02\u051C\u051F\x05\x06\x04\x02\u051D\u051F\x07i\x02\x02\u051E\u051C\x03\x02\x02\x02\u051E\u051D\x03\x02\x02\x02\u051F\xB3\x03\x02\x02\x02\u0520\u0526\x07^\x02\x02\u0521\u0526\x07\xE1\x02\x02\u0522\u0526\x07]\x02\x02\u0523\u0526\x07_\x02\x02\u0524\u0526\x05\xB6\\\x02\u0525\u0520\x03\x02\x02\x02\u0525\u0521\x03\x02\x02\x02\u0525\u0522\x03\x02\x02\x02\u0525\u0523\x03\x02\x02\x02\u0525\u0524\x03\x02\x02\x02\u0526\xB5\x03\x02\x02\x02\u0527\u0528\x07d\x02\x02\u0528\u0529\x07_\x02\x02\u0529\xB7\x03\x02\x02\x02\u052A\u052B\x07\xEC\x02\x02\u052B\xB9\x03\x02\x02\x02\u052C\u052D\x07\xEC\x02\x02\u052D\xBB\x03\x02\x02\x02\u052E\u052F\x07\xEC\x02\x02\u052F\xBD\x03\x02\x02\x02\u0530\u0531\t$\x02\x02\u0531\xBF\x03\x02\x02\x02\u0532\u0533\t%\x02\x02\u0533\xC1\x03\x02\x02\x02\u0534\u0535\t&\x02\x02\u0535\xC3\x03\x02\x02\x02\x96\xC9\xD7\xEA\u0108\u010A\u010C\u011C\u0126\u012E\u0135\u0137\u0142\u014B\u015D\u0166\u0175\u0180\u0183\u0188\u01A9\u01B2\u01B5\u01BF\u01C4\u01C8\u01CE\u01D2\u01DC\u01E0\u01E4\u01E9\u01F9\u01FD\u0208\u0213\u0217\u021B\u0227\u0232\u0250\u0254\u0259\u0261\u0276\u027A\u027E\u0284\u028D\u0298\u02A3\u02AB\u02AF\u02B2\u02B5\u02B8\u02C7\u02CA\u02CD\u02D7\u02DB\u02DE\u02E1\u02E4\u02EC\u02EF\u02F2\u02F5\u02F9\u0307\u0309\u0313\u0316\u0319\u0324\u0326\u032B\u033B\u034D\u0351\u0358\u0367\u036F\u0378\u037B\u0380\u0383\u0388\u038B\u038E\u039A\u03A4\u03A9\u03AE\u03C2\u03CB\u03D1\u03DA\u03DF\u03E3\u03EA\u03EF\u03F3\u03F6\u03F9\u03FC\u0403\u040C\u0411\u0418\u0422\u0427\u0430\u0435\u0437\u0443\u0448\u044B\u0456\u045B\u045F\u0461\u046D\u0473\u047A\u047F\u0485\u0489\u048C\u0493\u0498\u049C\u049F\u04A4\u04AE\u04B5\u04B9\u04BF\u04C3\u04CA\u04D8\u04DD\u04E2\u04E6\u04F2\u0507\u050F\u051E\u0525"),T=E.decisionToState.map(function(r,t){return new l.dfa.DFA(r,t)}),C=new l.PredictionContextCache,x=[null,"'('","')'","'['","']'","'{'","'}'","'='","'<'","'>'","'>='","'<>'","'<='","'+'","'-'","'*'","'/'","','","'->'","':'","':='","'#'","'eval'","'if'","'then'","'else'","'using'","'with'","'current_date'","'on'","'drop'","'keep'","'calc'","'attrcalc'","'rename'","'as'","'and'","'or'","'xor'","'not'","'between'","'in'","'not_in'","'null'","'isnull'","'ex'","'union'","'diff'","'symdiff'","'intersect'","'keys'","'intyear'","'intmonth'","'intday'","'check'","'exists_in'","'to'","'return'","'imbalance'","'errorcode'","'all'","'aggr'","'errorlevel'","'order'","'by'","'rank'","'asc'","'desc'","'min'","'max'","'first'","'last'","'indexof'","'abs'","'key'","'ln'","'log'","'trunc'","'round'","'power'","'mod'","'length'","'||'","'trim'","'upper'","'lower'","'substr'","'sum'","'avg'","'median'","'count'","'identifier'","'measure'","'attribute'","'filter'","'merge'","'exp'","'componentRole'","'viral'","'match_characters'","'type'","'nvl'","'hierarchy'","'_'","'invalid'","'levenshtein'","'valuedomain'","'variable'","'data'","'structure'","'dataset'","'operator'","'define'","'<-'","'datapoint'","'hierarchical'","'ruleset'","'rule'","'end'","'alterDataset'","'ltrim'","'rtrim'","'instr'","'replace'","'ceil'","'floor'","'sqrt'","'any'","'setdiff'","'stddev_pop'","'stddev_samp'","'var_pop'","'var_samp'","'group'","'except'","'having'","'first_value'","'last_value'","'lag'","'lead'","'ratio_to_report'","'over'","'preceding'","'following'","'unbounded'","'partition'","'rows'","'range'","'current'","'valid'","'fill_time_series'","'flow_to_stock'","'stock_to_flow'","'timeshift'","'measures'","'no_measures'","'condition'","'boolean'","'date'","'time_period'","'number'","'string'","'time'","'integer'","'float'","'list'","'record'","'restrict'","'yyyy'","'mm'","'dd'","'maxLength'","'regexp'","'is'","'when'","'from'","'aggregates'","'points'","'point'","'total'","'partial'","'always'","'inner_join'","'left_join'","'cross_join'","'full_join'","'maps_from'","'maps_to'","'map_to'","'map_from'","'returns'","'pivot'","'customPivot'","'unpivot'","'sub'","'apply'","'conditioned'","'period_indicator'","'single'","'duration'","'time_agg'","'unit'","'Value'","'valuedomains'","'variables'","'input'","'output'","'cast'","'rule_priority'","'dataset_priority'","'default'","'check_datapoint'","'check_hierarchy'","'computed'","'non_null'","'non_zero'","'partial_null'","'partial_zero'","'always_null'","'always_zero'","'components'","'all_measures'","'scalar'","'component'","'datapoint_on_valuedomains'","'datapoint_on_variables'","'hierarchical_on_valuedomains'","'hierarchical_on_variables'","'set'","'language'",null,null,null,null,null,null,"';'"],d=[null,"LPAREN","RPAREN","QLPAREN","QRPAREN","GLPAREN","GRPAREN","EQ","LT","MT","ME","NEQ","LE","PLUS","MINUS","MUL","DIV","COMMA","POINTER","COLON","ASSIGN","MEMBERSHIP","EVAL","IF","THEN","ELSE","USING","WITH","CURRENT_DATE","ON","DROP","KEEP","CALC","ATTRCALC","RENAME","AS","AND","OR","XOR","NOT","BETWEEN","IN","NOT_IN","NULL_CONSTANT","ISNULL","EX","UNION","DIFF","SYMDIFF","INTERSECT","KEYS","INTYEAR","INTMONTH","INTDAY","CHECK","EXISTS_IN","TO","RETURN","IMBALANCE","ERRORCODE","ALL","AGGREGATE","ERRORLEVEL","ORDER","BY","RANK","ASC","DESC","MIN","MAX","FIRST","LAST","INDEXOF","ABS","KEY","LN","LOG","TRUNC","ROUND","POWER","MOD","LEN","CONCAT","TRIM","UCASE","LCASE","SUBSTR","SUM","AVG","MEDIAN","COUNT","DIMENSION","MEASURE","ATTRIBUTE","FILTER","MERGE","EXP","ROLE","VIRAL","CHARSET_MATCH","TYPE","NVL","HIERARCHY","OPTIONAL","INVALID","LEVENSHTEIN","VALUE_DOMAIN","VARIABLE","DATA","STRUCTURE","DATASET","OPERATOR","DEFINE","PUT_SYMBOL","DATAPOINT","HIERARCHICAL","RULESET","RULE","END","ALTER_DATASET","LTRIM","RTRIM","INSTR","REPLACE","CEIL","FLOOR","SQRT","ANY","SETDIFF","STDDEV_POP","STDDEV_SAMP","VAR_POP","VAR_SAMP","GROUP","EXCEPT","HAVING","FIRST_VALUE","LAST_VALUE","LAG","LEAD","RATIO_TO_REPORT","OVER","PRECEDING","FOLLOWING","UNBOUNDED","PARTITION","ROWS","RANGE","CURRENT","VALID","FILL_TIME_SERIES","FLOW_TO_STOCK","STOCK_TO_FLOW","TIMESHIFT","MEASURES","NO_MEASURES","CONDITION","BOOLEAN","DATE","TIME_PERIOD","NUMBER","STRING","TIME","INTEGER","FLOAT","LIST","RECORD","RESTRICT","YYYY","MM","DD","MAX_LENGTH","REGEXP","IS","WHEN","FROM","AGGREGATES","POINTS","POINT","TOTAL","PARTIAL","ALWAYS","INNER_JOIN","LEFT_JOIN","CROSS_JOIN","FULL_JOIN","MAPS_FROM","MAPS_TO","MAP_TO","MAP_FROM","RETURNS","PIVOT","CUSTOMPIVOT","UNPIVOT","SUBSPACE","APPLY","CONDITIONED","PERIOD_INDICATOR","SINGLE","DURATION","TIME_AGG","UNIT","VALUE","VALUEDOMAINS","VARIABLES","INPUT","OUTPUT","CAST","RULE_PRIORITY","DATASET_PRIORITY","DEFAULT","CHECK_DATAPOINT","CHECK_HIERARCHY","COMPUTED","NON_NULL","NON_ZERO","PARTIAL_NULL","PARTIAL_ZERO","ALWAYS_NULL","ALWAYS_ZERO","COMPONENTS","ALL_MEASURES","SCALAR","COMPONENT","DATAPOINT_ON_VD","DATAPOINT_ON_VAR","HIERARCHICAL_ON_VD","HIERARCHICAL_ON_VAR","SET","LANGUAGE","INTEGER_CONSTANT","NUMBER_CONSTANT","BOOLEAN_CONSTANT","STRING_CONSTANT","IDENTIFIER","WS","EOL","ML_COMMENT","SL_COMMENT"],O=["start","statement","expr","functions","datasetClause","renameClause","aggrClause","filterClause","calcClause","keepOrDropClause","pivotOrUnpivotClause","customPivotClause","subspaceClause","joinOperators","defOperators","genericOperators","parameter","stringOperators","numericOperators","comparisonOperators","timeOperators","setOperators","hierarchyOperators","validationOperators","conditionalOperators","aggrOperatorsGrouping","anFunction","distanceOperators","renameClauseItem","aggregateClause","aggrFunctionClause","calcClauseItem","subspaceClauseItem","joinClauseWithoutUsing","joinClause","joinClauseItem","joinBody","joinApplyClause","partitionByClause","orderByClause","orderByItem","windowingClause","signedInteger","limitClauseItem","groupingClause","havingClause","parameterItem","outputParameterType","outputParameterTypeComponent","inputParameterType","rulesetType","scalarType","componentType","datasetType","scalarSetType","dpRuleset","hrRuleset","valueDomainName","rulesetID","rulesetSignature","signature","ruleClauseDatapoint","ruleItemDatapoint","ruleClauseHierarchical","ruleItemHierarchical","hierRuleSignature","valueDomainSignature","codeItemRelation","codeItemRelationClause","valueDomainValue","scalarTypeConstraint","compConstraint","multModifier","validationOutput","validationMode","conditionClause","inputMode","imbalanceExpr","inputModeHierarchy","outputModeHierarchy","alias","varID","simpleComponentId","componentID","lists","erCode","erLevel","comparisonOperand","optionalExpr","componentRole","viralAttribute","valueDomainID","operatorID","routineName","constant","basicScalarType","retainType"];c.prototype=Object.create(l.Parser.prototype),c.prototype.constructor=c,Object.defineProperty(c.prototype,"atn",{get:function(){return E}}),c.EOF=l.Token.EOF,c.LPAREN=1,c.RPAREN=2,c.QLPAREN=3,c.QRPAREN=4,c.GLPAREN=5,c.GRPAREN=6,c.EQ=7,c.LT=8,c.MT=9,c.ME=10,c.NEQ=11,c.LE=12,c.PLUS=13,c.MINUS=14,c.MUL=15,c.DIV=16,c.COMMA=17,c.POINTER=18,c.COLON=19,c.ASSIGN=20,c.MEMBERSHIP=21,c.EVAL=22,c.IF=23,c.THEN=24,c.ELSE=25,c.USING=26,c.WITH=27,c.CURRENT_DATE=28,c.ON=29,c.DROP=30,c.KEEP=31,c.CALC=32,c.ATTRCALC=33,c.RENAME=34,c.AS=35,c.AND=36,c.OR=37,c.XOR=38,c.NOT=39,c.BETWEEN=40,c.IN=41,c.NOT_IN=42,c.NULL_CONSTANT=43,c.ISNULL=44,c.EX=45,c.UNION=46,c.DIFF=47,c.SYMDIFF=48,c.INTERSECT=49,c.KEYS=50,c.INTYEAR=51,c.INTMONTH=52,c.INTDAY=53,c.CHECK=54,c.EXISTS_IN=55,c.TO=56,c.RETURN=57,c.IMBALANCE=58,c.ERRORCODE=59,c.ALL=60,c.AGGREGATE=61,c.ERRORLEVEL=62,c.ORDER=63,c.BY=64,c.RANK=65,c.ASC=66,c.DESC=67,c.MIN=68,c.MAX=69,c.FIRST=70,c.LAST=71,c.INDEXOF=72,c.ABS=73,c.KEY=74,c.LN=75,c.LOG=76,c.TRUNC=77,c.ROUND=78,c.POWER=79,c.MOD=80,c.LEN=81,c.CONCAT=82,c.TRIM=83,c.UCASE=84,c.LCASE=85,c.SUBSTR=86,c.SUM=87,c.AVG=88,c.MEDIAN=89,c.COUNT=90,c.DIMENSION=91,c.MEASURE=92,c.ATTRIBUTE=93,c.FILTER=94,c.MERGE=95,c.EXP=96,c.ROLE=97,c.VIRAL=98,c.CHARSET_MATCH=99,c.TYPE=100,c.NVL=101,c.HIERARCHY=102,c.OPTIONAL=103,c.INVALID=104,c.LEVENSHTEIN=105,c.VALUE_DOMAIN=106,c.VARIABLE=107,c.DATA=108,c.STRUCTURE=109,c.DATASET=110,c.OPERATOR=111,c.DEFINE=112,c.PUT_SYMBOL=113,c.DATAPOINT=114,c.HIERARCHICAL=115,c.RULESET=116,c.RULE=117,c.END=118,c.ALTER_DATASET=119,c.LTRIM=120,c.RTRIM=121,c.INSTR=122,c.REPLACE=123,c.CEIL=124,c.FLOOR=125,c.SQRT=126,c.ANY=127,c.SETDIFF=128,c.STDDEV_POP=129,c.STDDEV_SAMP=130,c.VAR_POP=131,c.VAR_SAMP=132,c.GROUP=133,c.EXCEPT=134,c.HAVING=135,c.FIRST_VALUE=136,c.LAST_VALUE=137,c.LAG=138,c.LEAD=139,c.RATIO_TO_REPORT=140,c.OVER=141,c.PRECEDING=142,c.FOLLOWING=143,c.UNBOUNDED=144,c.PARTITION=145,c.ROWS=146,c.RANGE=147,c.CURRENT=148,c.VALID=149,c.FILL_TIME_SERIES=150,c.FLOW_TO_STOCK=151,c.STOCK_TO_FLOW=152,c.TIMESHIFT=153,c.MEASURES=154,c.NO_MEASURES=155,c.CONDITION=156,c.BOOLEAN=157,c.DATE=158,c.TIME_PERIOD=159,c.NUMBER=160,c.STRING=161,c.TIME=162,c.INTEGER=163,c.FLOAT=164,c.LIST=165,c.RECORD=166,c.RESTRICT=167,c.YYYY=168,c.MM=169,c.DD=170,c.MAX_LENGTH=171,c.REGEXP=172,c.IS=173,c.WHEN=174,c.FROM=175,c.AGGREGATES=176,c.POINTS=177,c.POINT=178,c.TOTAL=179,c.PARTIAL=180,c.ALWAYS=181,c.INNER_JOIN=182,c.LEFT_JOIN=183,c.CROSS_JOIN=184,c.FULL_JOIN=185,c.MAPS_FROM=186,c.MAPS_TO=187,c.MAP_TO=188,c.MAP_FROM=189,c.RETURNS=190,c.PIVOT=191,c.CUSTOMPIVOT=192,c.UNPIVOT=193,c.SUBSPACE=194,c.APPLY=195,c.CONDITIONED=196,c.PERIOD_INDICATOR=197,c.SINGLE=198,c.DURATION=199,c.TIME_AGG=200,c.UNIT=201,c.VALUE=202,c.VALUEDOMAINS=203,c.VARIABLES=204,c.INPUT=205,c.OUTPUT=206,c.CAST=207,c.RULE_PRIORITY=208,c.DATASET_PRIORITY=209,c.DEFAULT=210,c.CHECK_DATAPOINT=211,c.CHECK_HIERARCHY=212,c.COMPUTED=213,c.NON_NULL=214,c.NON_ZERO=215,c.PARTIAL_NULL=216,c.PARTIAL_ZERO=217,c.ALWAYS_NULL=218,c.ALWAYS_ZERO=219,c.COMPONENTS=220,c.ALL_MEASURES=221,c.SCALAR=222,c.COMPONENT=223,c.DATAPOINT_ON_VD=224,c.DATAPOINT_ON_VAR=225,c.HIERARCHICAL_ON_VD=226,c.HIERARCHICAL_ON_VAR=227,c.SET=228,c.LANGUAGE=229,c.INTEGER_CONSTANT=230,c.NUMBER_CONSTANT=231,c.BOOLEAN_CONSTANT=232,c.STRING_CONSTANT=233,c.IDENTIFIER=234,c.WS=235,c.EOL=236,c.ML_COMMENT=237,c.SL_COMMENT=238,c.RULE_start=0,c.RULE_statement=1,c.RULE_expr=2,c.RULE_functions=3,c.RULE_datasetClause=4,c.RULE_renameClause=5,c.RULE_aggrClause=6,c.RULE_filterClause=7,c.RULE_calcClause=8,c.RULE_keepOrDropClause=9,c.RULE_pivotOrUnpivotClause=10,c.RULE_customPivotClause=11,c.RULE_subspaceClause=12,c.RULE_joinOperators=13,c.RULE_defOperators=14,c.RULE_genericOperators=15,c.RULE_parameter=16,c.RULE_stringOperators=17,c.RULE_numericOperators=18,c.RULE_comparisonOperators=19,c.RULE_timeOperators=20,c.RULE_setOperators=21,c.RULE_hierarchyOperators=22,c.RULE_validationOperators=23,c.RULE_conditionalOperators=24,c.RULE_aggrOperatorsGrouping=25,c.RULE_anFunction=26,c.RULE_distanceOperators=27,c.RULE_renameClauseItem=28,c.RULE_aggregateClause=29,c.RULE_aggrFunctionClause=30,c.RULE_calcClauseItem=31,c.RULE_subspaceClauseItem=32,c.RULE_joinClauseWithoutUsing=33,c.RULE_joinClause=34,c.RULE_joinClauseItem=35,c.RULE_joinBody=36,c.RULE_joinApplyClause=37,c.RULE_partitionByClause=38,c.RULE_orderByClause=39,c.RULE_orderByItem=40,c.RULE_windowingClause=41,c.RULE_signedInteger=42,c.RULE_limitClauseItem=43,c.RULE_groupingClause=44,c.RULE_havingClause=45,c.RULE_parameterItem=46,c.RULE_outputParameterType=47,c.RULE_outputParameterTypeComponent=48,c.RULE_inputParameterType=49,c.RULE_rulesetType=50,c.RULE_scalarType=51,c.RULE_componentType=52,c.RULE_datasetType=53,c.RULE_scalarSetType=54,c.RULE_dpRuleset=55,c.RULE_hrRuleset=56,c.RULE_valueDomainName=57,c.RULE_rulesetID=58,c.RULE_rulesetSignature=59,c.RULE_signature=60,c.RULE_ruleClauseDatapoint=61,c.RULE_ruleItemDatapoint=62,c.RULE_ruleClauseHierarchical=63,c.RULE_ruleItemHierarchical=64,c.RULE_hierRuleSignature=65,c.RULE_valueDomainSignature=66,c.RULE_codeItemRelation=67,c.RULE_codeItemRelationClause=68,c.RULE_valueDomainValue=69,c.RULE_scalarTypeConstraint=70,c.RULE_compConstraint=71,c.RULE_multModifier=72,c.RULE_validationOutput=73,c.RULE_validationMode=74,c.RULE_conditionClause=75,c.RULE_inputMode=76,c.RULE_imbalanceExpr=77,c.RULE_inputModeHierarchy=78,c.RULE_outputModeHierarchy=79,c.RULE_alias=80,c.RULE_varID=81,c.RULE_simpleComponentId=82,c.RULE_componentID=83,c.RULE_lists=84,c.RULE_erCode=85,c.RULE_erLevel=86,c.RULE_comparisonOperand=87,c.RULE_optionalExpr=88,c.RULE_componentRole=89,c.RULE_viralAttribute=90,c.RULE_valueDomainID=91,c.RULE_operatorID=92,c.RULE_routineName=93,c.RULE_constant=94,c.RULE_basicScalarType=95,c.RULE_retainType=96,y.prototype=Object.create(l.ParserRuleContext.prototype),y.prototype.constructor=y,y.prototype.EOF=function(){return this.getToken(c.EOF,0)},y.prototype.statement=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(A):this.getTypedRuleContext(A,e)},y.prototype.EOL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.EOL):this.getToken(c.EOL,e)},y.prototype.enterRule=function(e){e instanceof R&&e.enterStart(this)},y.prototype.exitRule=function(e){e instanceof R&&e.exitStart(this)},y.prototype.accept=function(e){return e instanceof f?e.visitStart(this):e.visitChildren(this)},c.StartContext=y,c.prototype.start=function(){var r=new y(this,this._ctx,this.state);this.enterRule(r,0,c.RULE_start);var t=0;try{for(this.enterOuterAlt(r,1),this.state=199,this._errHandler.sync(this),t=this._input.LA(1);t===c.DEFINE||t===c.IDENTIFIER;)this.state=194,this.statement(),this.state=195,this.match(c.EOL),this.state=201,this._errHandler.sync(this),t=this._input.LA(1);this.state=202,this.match(c.EOF)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},A.prototype=Object.create(l.ParserRuleContext.prototype),A.prototype.constructor=A,A.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},_.prototype=Object.create(A.prototype),_.prototype.constructor=_,c.DefineExpressionContext=_,_.prototype.defOperators=function(){return this.getTypedRuleContext(yt,0)},_.prototype.enterRule=function(e){e instanceof R&&e.enterDefineExpression(this)},_.prototype.exitRule=function(e){e instanceof R&&e.exitDefineExpression(this)},_.prototype.accept=function(e){return e instanceof f?e.visitDefineExpression(this):e.visitChildren(this)},I.prototype=Object.create(A.prototype),I.prototype.constructor=I,c.TemporaryAssignmentContext=I,I.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},I.prototype.ASSIGN=function(){return this.getToken(c.ASSIGN,0)},I.prototype.expr=function(){return this.getTypedRuleContext(g,0)},I.prototype.enterRule=function(e){e instanceof R&&e.enterTemporaryAssignment(this)},I.prototype.exitRule=function(e){e instanceof R&&e.exitTemporaryAssignment(this)},I.prototype.accept=function(e){return e instanceof f?e.visitTemporaryAssignment(this):e.visitChildren(this)},m.prototype=Object.create(A.prototype),m.prototype.constructor=m,c.PersistAssignmentContext=m,m.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},m.prototype.PUT_SYMBOL=function(){return this.getToken(c.PUT_SYMBOL,0)},m.prototype.expr=function(){return this.getTypedRuleContext(g,0)},m.prototype.enterRule=function(e){e instanceof R&&e.enterPersistAssignment(this)},m.prototype.exitRule=function(e){e instanceof R&&e.exitPersistAssignment(this)},m.prototype.accept=function(e){return e instanceof f?e.visitPersistAssignment(this):e.visitChildren(this)},c.StatementContext=A,c.prototype.statement=function(){var r=new A(this,this._ctx,this.state);this.enterRule(r,2,c.RULE_statement);try{switch(this.state=213,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,1,this._ctx)){case 1:r=new I(this,r),this.enterOuterAlt(r,1),this.state=204,this.varID(),this.state=205,this.match(c.ASSIGN),this.state=206,this.expr(0);break;case 2:r=new m(this,r),this.enterOuterAlt(r,2),this.state=208,this.varID(),this.state=209,this.match(c.PUT_SYMBOL),this.state=210,this.expr(0);break;case 3:r=new _(this,r),this.enterOuterAlt(r,3),this.state=212,this.defOperators();}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},g.prototype=Object.create(l.ParserRuleContext.prototype),g.prototype.constructor=g,g.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},L.prototype=Object.create(g.prototype),L.prototype.constructor=L,c.VarIdExprContext=L,L.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},L.prototype.enterRule=function(e){e instanceof R&&e.enterVarIdExpr(this)},L.prototype.exitRule=function(e){e instanceof R&&e.exitVarIdExpr(this)},L.prototype.accept=function(e){return e instanceof f?e.visitVarIdExpr(this):e.visitChildren(this)},S.prototype=Object.create(g.prototype),S.prototype.constructor=S,c.MembershipExprContext=S,S.prototype.expr=function(){return this.getTypedRuleContext(g,0)},S.prototype.MEMBERSHIP=function(){return this.getToken(c.MEMBERSHIP,0)},S.prototype.simpleComponentId=function(){return this.getTypedRuleContext(fr,0)},S.prototype.enterRule=function(e){e instanceof R&&e.enterMembershipExpr(this)},S.prototype.exitRule=function(e){e instanceof R&&e.exitMembershipExpr(this)},S.prototype.accept=function(e){return e instanceof f?e.visitMembershipExpr(this):e.visitChildren(this)},v.prototype=Object.create(g.prototype),v.prototype.constructor=v,c.InNotInExprContext=v,v.prototype.expr=function(){return this.getTypedRuleContext(g,0)},v.prototype.IN=function(){return this.getToken(c.IN,0)},v.prototype.NOT_IN=function(){return this.getToken(c.NOT_IN,0)},v.prototype.lists=function(){return this.getTypedRuleContext(Tr,0)},v.prototype.valueDomainID=function(){return this.getTypedRuleContext(Or,0)},v.prototype.enterRule=function(e){e instanceof R&&e.enterInNotInExpr(this)},v.prototype.exitRule=function(e){e instanceof R&&e.exitInNotInExpr(this)},v.prototype.accept=function(e){return e instanceof f?e.visitInNotInExpr(this):e.visitChildren(this)},P.prototype=Object.create(g.prototype),P.prototype.constructor=P,c.BooleanExprContext=P,P.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},P.prototype.AND=function(){return this.getToken(c.AND,0)},P.prototype.OR=function(){return this.getToken(c.OR,0)},P.prototype.XOR=function(){return this.getToken(c.XOR,0)},P.prototype.enterRule=function(e){e instanceof R&&e.enterBooleanExpr(this)},P.prototype.exitRule=function(e){e instanceof R&&e.exitBooleanExpr(this)},P.prototype.accept=function(e){return e instanceof f?e.visitBooleanExpr(this):e.visitChildren(this)},D.prototype=Object.create(g.prototype),D.prototype.constructor=D,c.ComparisonExprContext=D,D.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},D.prototype.comparisonOperand=function(){return this.getTypedRuleContext(Cr,0)},D.prototype.enterRule=function(e){e instanceof R&&e.enterComparisonExpr(this)},D.prototype.exitRule=function(e){e instanceof R&&e.exitComparisonExpr(this)},D.prototype.accept=function(e){return e instanceof f?e.visitComparisonExpr(this):e.visitChildren(this)},M.prototype=Object.create(g.prototype),M.prototype.constructor=M,c.UnaryExprContext=M,M.prototype.expr=function(){return this.getTypedRuleContext(g,0)},M.prototype.PLUS=function(){return this.getToken(c.PLUS,0)},M.prototype.MINUS=function(){return this.getToken(c.MINUS,0)},M.prototype.NOT=function(){return this.getToken(c.NOT,0)},M.prototype.enterRule=function(e){e instanceof R&&e.enterUnaryExpr(this)},M.prototype.exitRule=function(e){e instanceof R&&e.exitUnaryExpr(this)},M.prototype.accept=function(e){return e instanceof f?e.visitUnaryExpr(this):e.visitChildren(this)},k.prototype=Object.create(g.prototype),k.prototype.constructor=k,c.FunctionsExpressionContext=k,k.prototype.functions=function(){return this.getTypedRuleContext(B,0)},k.prototype.enterRule=function(e){e instanceof R&&e.enterFunctionsExpression(this)},k.prototype.exitRule=function(e){e instanceof R&&e.exitFunctionsExpression(this)},k.prototype.accept=function(e){return e instanceof f?e.visitFunctionsExpression(this):e.visitChildren(this)},U.prototype=Object.create(g.prototype),U.prototype.constructor=U,c.IfExprContext=U,U.prototype.IF=function(){return this.getToken(c.IF,0)},U.prototype.THEN=function(){return this.getToken(c.THEN,0)},U.prototype.ELSE=function(){return this.getToken(c.ELSE,0)},U.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},U.prototype.enterRule=function(e){e instanceof R&&e.enterIfExpr(this)},U.prototype.exitRule=function(e){e instanceof R&&e.exitIfExpr(this)},U.prototype.accept=function(e){return e instanceof f?e.visitIfExpr(this):e.visitChildren(this)},F.prototype=Object.create(g.prototype),F.prototype.constructor=F,c.ClauseExprContext=F,F.prototype.QLPAREN=function(){return this.getToken(c.QLPAREN,0)},F.prototype.QRPAREN=function(){return this.getToken(c.QRPAREN,0)},F.prototype.expr=function(){return this.getTypedRuleContext(g,0)},F.prototype.datasetClause=function(){return this.getTypedRuleContext(tt,0)},F.prototype.enterRule=function(e){e instanceof R&&e.enterClauseExpr(this)},F.prototype.exitRule=function(e){e instanceof R&&e.exitClauseExpr(this)},F.prototype.accept=function(e){return e instanceof f?e.visitClauseExpr(this):e.visitChildren(this)},w.prototype=Object.create(g.prototype),w.prototype.constructor=w,c.ArithmeticExprContext=w,w.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},w.prototype.MUL=function(){return this.getToken(c.MUL,0)},w.prototype.DIV=function(){return this.getToken(c.DIV,0)},w.prototype.enterRule=function(e){e instanceof R&&e.enterArithmeticExpr(this)},w.prototype.exitRule=function(e){e instanceof R&&e.exitArithmeticExpr(this)},w.prototype.accept=function(e){return e instanceof f?e.visitArithmeticExpr(this):e.visitChildren(this)},b.prototype=Object.create(g.prototype),b.prototype.constructor=b,c.ParenthesisExprContext=b,b.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},b.prototype.expr=function(){return this.getTypedRuleContext(g,0)},b.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},b.prototype.enterRule=function(e){e instanceof R&&e.enterParenthesisExpr(this)},b.prototype.exitRule=function(e){e instanceof R&&e.exitParenthesisExpr(this)},b.prototype.accept=function(e){return e instanceof f?e.visitParenthesisExpr(this):e.visitChildren(this)},H.prototype=Object.create(g.prototype),H.prototype.constructor=H,c.ConstantExprContext=H,H.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},H.prototype.enterRule=function(e){e instanceof R&&e.enterConstantExpr(this)},H.prototype.exitRule=function(e){e instanceof R&&e.exitConstantExpr(this)},H.prototype.accept=function(e){return e instanceof f?e.visitConstantExpr(this):e.visitChildren(this)},V.prototype=Object.create(g.prototype),V.prototype.constructor=V,c.ArithmeticExprOrConcatContext=V,V.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},V.prototype.PLUS=function(){return this.getToken(c.PLUS,0)},V.prototype.MINUS=function(){return this.getToken(c.MINUS,0)},V.prototype.CONCAT=function(){return this.getToken(c.CONCAT,0)},V.prototype.enterRule=function(e){e instanceof R&&e.enterArithmeticExprOrConcat(this)},V.prototype.exitRule=function(e){e instanceof R&&e.exitArithmeticExprOrConcat(this)},V.prototype.accept=function(e){return e instanceof f?e.visitArithmeticExprOrConcat(this):e.visitChildren(this)},c.prototype.expr=function(a){void 0===a&&(a=0);var p=this._ctx,e=this.state,i=new g(this,this._ctx,e),d=i;this.enterRecursionRule(i,4,c.RULE_expr,a);var u=0;try{switch(this.enterOuterAlt(i,1),this.state=232,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,2,this._ctx)){case 1:i=new b(this,i),this._ctx=i,d=i,this.state=216,this.match(c.LPAREN),this.state=217,this.expr(0),this.state=218,this.match(c.RPAREN);break;case 2:i=new k(this,i),this._ctx=i,d=i,this.state=220,this.functions();break;case 3:i=new M(this,i),this._ctx=i,d=i,this.state=221,i.op=this._input.LT(1),0!=(-32&(u=this._input.LA(1))-13)||0==(1<<u-13&(1<<c.PLUS-13|1<<c.MINUS-13|1<<c.NOT-13))?i.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=222,i.right=this.expr(10);break;case 4:i=new U(this,i),this._ctx=i,d=i,this.state=223,this.match(c.IF),this.state=224,i.conditionalExpr=this.expr(0),this.state=225,this.match(c.THEN),this.state=226,i.thenExpr=this.expr(0),this.state=227,this.match(c.ELSE),this.state=228,i.elseExpr=this.expr(3);break;case 5:i=new H(this,i),this._ctx=i,d=i,this.state=230,this.constant();break;case 6:i=new L(this,i),this._ctx=i,d=i,this.state=231,this.varID();}this._ctx.stop=this._input.LT(-1),this.state=266,this._errHandler.sync(this);for(var y=this._interp.adaptivePredict(this._input,5,this._ctx);2!=y&&y!=l.atn.ATN.INVALID_ALT_NUMBER;){if(1===y)switch(null!==this._parseListeners&&this.triggerExitRuleEvent(),d=i,this.state=264,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,4,this._ctx)){case 1:if((i=new w(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=234,!this.precpred(this._ctx,9))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 9)");this.state=235,i.op=this._input.LT(1),(u=this._input.LA(1))!==c.MUL&&u!==c.DIV?i.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=236,i.right=this.expr(10);break;case 2:if((i=new V(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=237,!this.precpred(this._ctx,8))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 8)");this.state=238,i.op=this._input.LT(1),(u=this._input.LA(1))!==c.PLUS&&u!==c.MINUS&&u!==c.CONCAT?i.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=239,i.right=this.expr(9);break;case 3:if((i=new D(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=240,!this.precpred(this._ctx,7))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 7)");this.state=241,i.op=this.comparisonOperand(),this.state=242,i.right=this.expr(8);break;case 4:if((i=new P(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=244,!this.precpred(this._ctx,5))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 5)");this.state=245,i.op=this.match(c.AND),this.state=246,i.right=this.expr(6);break;case 5:if((i=new P(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=247,!this.precpred(this._ctx,4))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 4)");this.state=248,i.op=this._input.LT(1),(u=this._input.LA(1))!==c.OR&&u!==c.XOR?i.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=249,i.right=this.expr(5);break;case 6:if((i=new F(this,new g(this,p,e))).dataset=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=250,!this.precpred(this._ctx,12))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 12)");this.state=251,this.match(c.QLPAREN),this.state=252,i.clause=this.datasetClause(),this.state=253,this.match(c.QRPAREN);break;case 7:if(i=new S(this,new g(this,p,e)),this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=255,!this.precpred(this._ctx,11))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 11)");this.state=256,this.match(c.MEMBERSHIP),this.state=257,this.simpleComponentId();break;case 8:if((i=new v(this,new g(this,p,e))).left=d,this.pushNewRecursionContext(i,4,c.RULE_expr),this.state=258,!this.precpred(this._ctx,6))throw new l.error.FailedPredicateException(this,"this.precpred(this._ctx, 6)");switch(this.state=259,i.op=this._input.LT(1),(u=this._input.LA(1))!==c.IN&&u!==c.NOT_IN?i.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=262,this._errHandler.sync(this),this._input.LA(1)){case c.GLPAREN:this.state=260,this.lists();break;case c.IDENTIFIER:this.state=261,this.valueDomainID();break;default:throw new l.error.NoViableAltException(this);}}this.state=268,this._errHandler.sync(this),y=this._interp.adaptivePredict(this._input,5,this._ctx)}}catch(e){if(!(e instanceof l.error.RecognitionException))throw e;i.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.unrollRecursionContexts(p)}return i},B.prototype=Object.create(l.ParserRuleContext.prototype),B.prototype.constructor=B,B.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},G.prototype=Object.create(B.prototype),G.prototype.constructor=G,c.StringFunctionsContext=G,G.prototype.stringOperators=function(){return this.getTypedRuleContext(At,0)},G.prototype.enterRule=function(e){e instanceof R&&e.enterStringFunctions(this)},G.prototype.exitRule=function(e){e instanceof R&&e.exitStringFunctions(this)},G.prototype.accept=function(e){return e instanceof f?e.visitStringFunctions(this):e.visitChildren(this)},Y.prototype=Object.create(B.prototype),Y.prototype.constructor=Y,c.GenericFunctionsContext=Y,Y.prototype.genericOperators=function(){return this.getTypedRuleContext(Tt,0)},Y.prototype.enterRule=function(e){e instanceof R&&e.enterGenericFunctions(this)},Y.prototype.exitRule=function(e){e instanceof R&&e.exitGenericFunctions(this)},Y.prototype.accept=function(e){return e instanceof f?e.visitGenericFunctions(this):e.visitChildren(this)},j.prototype=Object.create(B.prototype),j.prototype.constructor=j,c.ConditionalFunctionsContext=j,j.prototype.conditionalOperators=function(){return this.getTypedRuleContext(zt,0)},j.prototype.enterRule=function(e){e instanceof R&&e.enterConditionalFunctions(this)},j.prototype.exitRule=function(e){e instanceof R&&e.exitConditionalFunctions(this)},j.prototype.accept=function(e){return e instanceof f?e.visitConditionalFunctions(this):e.visitChildren(this)},W.prototype=Object.create(B.prototype),W.prototype.constructor=W,c.AggregateFunctionsContext=W,W.prototype.aggrOperatorsGrouping=function(){return this.getTypedRuleContext(ee,0)},W.prototype.enterRule=function(e){e instanceof R&&e.enterAggregateFunctions(this)},W.prototype.exitRule=function(e){e instanceof R&&e.exitAggregateFunctions(this)},W.prototype.accept=function(e){return e instanceof f?e.visitAggregateFunctions(this):e.visitChildren(this)},q.prototype=Object.create(B.prototype),q.prototype.constructor=q,c.JoinFunctionsContext=q,q.prototype.joinOperators=function(){return this.getTypedRuleContext(lt,0)},q.prototype.enterRule=function(e){e instanceof R&&e.enterJoinFunctions(this)},q.prototype.exitRule=function(e){e instanceof R&&e.exitJoinFunctions(this)},q.prototype.accept=function(e){return e instanceof f?e.visitJoinFunctions(this):e.visitChildren(this)},K.prototype=Object.create(B.prototype),K.prototype.constructor=K,c.TimeFunctionsContext=K,K.prototype.timeOperators=function(){return this.getTypedRuleContext(Ut,0)},K.prototype.enterRule=function(e){e instanceof R&&e.enterTimeFunctions(this)},K.prototype.exitRule=function(e){e instanceof R&&e.exitTimeFunctions(this)},K.prototype.accept=function(e){return e instanceof f?e.visitTimeFunctions(this):e.visitChildren(this)},J.prototype=Object.create(B.prototype),J.prototype.constructor=J,c.HierarchyFunctionsContext=J,J.prototype.hierarchyOperators=function(){return this.getTypedRuleContext(qt,0)},J.prototype.enterRule=function(e){e instanceof R&&e.enterHierarchyFunctions(this)},J.prototype.exitRule=function(e){e instanceof R&&e.exitHierarchyFunctions(this)},J.prototype.accept=function(e){return e instanceof f?e.visitHierarchyFunctions(this):e.visitChildren(this)},X.prototype=Object.create(B.prototype),X.prototype.constructor=X,c.ValidationFunctionsContext=X,X.prototype.validationOperators=function(){return this.getTypedRuleContext(Kt,0)},X.prototype.enterRule=function(e){e instanceof R&&e.enterValidationFunctions(this)},X.prototype.exitRule=function(e){e instanceof R&&e.exitValidationFunctions(this)},X.prototype.accept=function(e){return e instanceof f?e.visitValidationFunctions(this):e.visitChildren(this)},$.prototype=Object.create(B.prototype),$.prototype.constructor=$,c.DistanceFunctionsContext=$,$.prototype.distanceOperators=function(){return this.getTypedRuleContext(pe,0)},$.prototype.enterRule=function(e){e instanceof R&&e.enterDistanceFunctions(this)},$.prototype.exitRule=function(e){e instanceof R&&e.exitDistanceFunctions(this)},$.prototype.accept=function(e){return e instanceof f?e.visitDistanceFunctions(this):e.visitChildren(this)},z.prototype=Object.create(B.prototype),z.prototype.constructor=z,c.ComparisonFunctionsContext=z,z.prototype.comparisonOperators=function(){return this.getTypedRuleContext(vt,0)},z.prototype.enterRule=function(e){e instanceof R&&e.enterComparisonFunctions(this)},z.prototype.exitRule=function(e){e instanceof R&&e.exitComparisonFunctions(this)},z.prototype.accept=function(e){return e instanceof f?e.visitComparisonFunctions(this):e.visitChildren(this)},Q.prototype=Object.create(B.prototype),Q.prototype.constructor=Q,c.NumericFunctionsContext=Q,Q.prototype.numericOperators=function(){return this.getTypedRuleContext(mt,0)},Q.prototype.enterRule=function(e){e instanceof R&&e.enterNumericFunctions(this)},Q.prototype.exitRule=function(e){e instanceof R&&e.exitNumericFunctions(this)},Q.prototype.accept=function(e){return e instanceof f?e.visitNumericFunctions(this):e.visitChildren(this)},Z.prototype=Object.create(B.prototype),Z.prototype.constructor=Z,c.SetFunctionsContext=Z,Z.prototype.setOperators=function(){return this.getTypedRuleContext(Gt,0)},Z.prototype.enterRule=function(e){e instanceof R&&e.enterSetFunctions(this)},Z.prototype.exitRule=function(e){e instanceof R&&e.exitSetFunctions(this)},Z.prototype.accept=function(e){return e instanceof f?e.visitSetFunctions(this):e.visitChildren(this)},et.prototype=Object.create(B.prototype),et.prototype.constructor=et,c.AnalyticFunctionsContext=et,et.prototype.anFunction=function(){return this.getTypedRuleContext(ne,0)},et.prototype.enterRule=function(e){e instanceof R&&e.enterAnalyticFunctions(this)},et.prototype.exitRule=function(e){e instanceof R&&e.exitAnalyticFunctions(this)},et.prototype.accept=function(e){return e instanceof f?e.visitAnalyticFunctions(this):e.visitChildren(this)},c.FunctionsContext=B,c.prototype.functions=function(){var r=new B(this,this._ctx,this.state);this.enterRule(r,6,c.RULE_functions);try{switch(this.state=282,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,6,this._ctx)){case 1:r=new q(this,r),this.enterOuterAlt(r,1),this.state=269,this.joinOperators();break;case 2:r=new Y(this,r),this.enterOuterAlt(r,2),this.state=270,this.genericOperators();break;case 3:r=new G(this,r),this.enterOuterAlt(r,3),this.state=271,this.stringOperators();break;case 4:r=new Q(this,r),this.enterOuterAlt(r,4),this.state=272,this.numericOperators();break;case 5:r=new z(this,r),this.enterOuterAlt(r,5),this.state=273,this.comparisonOperators();break;case 6:r=new K(this,r),this.enterOuterAlt(r,6),this.state=274,this.timeOperators();break;case 7:r=new Z(this,r),this.enterOuterAlt(r,7),this.state=275,this.setOperators();break;case 8:r=new J(this,r),this.enterOuterAlt(r,8),this.state=276,this.hierarchyOperators();break;case 9:r=new X(this,r),this.enterOuterAlt(r,9),this.state=277,this.validationOperators();break;case 10:r=new j(this,r),this.enterOuterAlt(r,10),this.state=278,this.conditionalOperators();break;case 11:r=new W(this,r),this.enterOuterAlt(r,11),this.state=279,this.aggrOperatorsGrouping();break;case 12:r=new et(this,r),this.enterOuterAlt(r,12),this.state=280,this.anFunction();break;case 13:r=new $(this,r),this.enterOuterAlt(r,13),this.state=281,this.distanceOperators();}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},tt.prototype=Object.create(l.ParserRuleContext.prototype),tt.prototype.constructor=tt,tt.prototype.renameClause=function(){return this.getTypedRuleContext(rt,0)},tt.prototype.aggrClause=function(){return this.getTypedRuleContext(ot,0)},tt.prototype.filterClause=function(){return this.getTypedRuleContext(nt,0)},tt.prototype.calcClause=function(){return this.getTypedRuleContext(it,0)},tt.prototype.keepOrDropClause=function(){return this.getTypedRuleContext(pt,0)},tt.prototype.pivotOrUnpivotClause=function(){return this.getTypedRuleContext(st,0)},tt.prototype.customPivotClause=function(){return this.getTypedRuleContext(at,0)},tt.prototype.subspaceClause=function(){return this.getTypedRuleContext(ct,0)},tt.prototype.enterRule=function(e){e instanceof R&&e.enterDatasetClause(this)},tt.prototype.exitRule=function(e){e instanceof R&&e.exitDatasetClause(this)},tt.prototype.accept=function(e){return e instanceof f?e.visitDatasetClause(this):e.visitChildren(this)},c.DatasetClauseContext=tt,c.prototype.datasetClause=function(){var r=new tt(this,this._ctx,this.state);this.enterRule(r,8,c.RULE_datasetClause);try{switch(this.state=292,this._errHandler.sync(this),this._input.LA(1)){case c.RENAME:this.enterOuterAlt(r,1),this.state=284,this.renameClause();break;case c.AGGREGATE:this.enterOuterAlt(r,2),this.state=285,this.aggrClause();break;case c.FILTER:this.enterOuterAlt(r,3),this.state=286,this.filterClause();break;case c.CALC:this.enterOuterAlt(r,4),this.state=287,this.calcClause();break;case c.DROP:case c.KEEP:this.enterOuterAlt(r,5),this.state=288,this.keepOrDropClause();break;case c.PIVOT:case c.UNPIVOT:this.enterOuterAlt(r,6),this.state=289,this.pivotOrUnpivotClause();break;case c.CUSTOMPIVOT:this.enterOuterAlt(r,7),this.state=290,this.customPivotClause();break;case c.SUBSPACE:this.enterOuterAlt(r,8),this.state=291,this.subspaceClause();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},rt.prototype=Object.create(l.ParserRuleContext.prototype),rt.prototype.constructor=rt,rt.prototype.RENAME=function(){return this.getToken(c.RENAME,0)},rt.prototype.renameClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ue):this.getTypedRuleContext(ue,e)},rt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},rt.prototype.enterRule=function(e){e instanceof R&&e.enterRenameClause(this)},rt.prototype.exitRule=function(e){e instanceof R&&e.exitRenameClause(this)},rt.prototype.accept=function(e){return e instanceof f?e.visitRenameClause(this):e.visitChildren(this)},c.RenameClauseContext=rt,c.prototype.renameClause=function(){var r=new rt(this,this._ctx,this.state);this.enterRule(r,10,c.RULE_renameClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=294,this.match(c.RENAME),this.state=295,this.renameClauseItem(),this.state=300,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=296,this.match(c.COMMA),this.state=297,this.renameClauseItem(),this.state=302,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ot.prototype=Object.create(l.ParserRuleContext.prototype),ot.prototype.constructor=ot,ot.prototype.AGGREGATE=function(){return this.getToken(c.AGGREGATE,0)},ot.prototype.aggregateClause=function(){return this.getTypedRuleContext(ae,0)},ot.prototype.groupingClause=function(){return this.getTypedRuleContext(_e,0)},ot.prototype.havingClause=function(){return this.getTypedRuleContext(me,0)},ot.prototype.enterRule=function(e){e instanceof R&&e.enterAggrClause(this)},ot.prototype.exitRule=function(e){e instanceof R&&e.exitAggrClause(this)},ot.prototype.accept=function(e){return e instanceof f?e.visitAggrClause(this):e.visitChildren(this)},c.AggrClauseContext=ot,c.prototype.aggrClause=function(){var r=new ot(this,this._ctx,this.state);this.enterRule(r,12,c.RULE_aggrClause);try{this.enterOuterAlt(r,1),this.state=303,this.match(c.AGGREGATE),this.state=304,this.aggregateClause(),this.state=309,this._errHandler.sync(this),this._input.LA(1)===c.GROUP&&(this.state=305,this.groupingClause(),this.state=307,this._errHandler.sync(this),this._input.LA(1)===c.HAVING&&(this.state=306,this.havingClause()))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},nt.prototype=Object.create(l.ParserRuleContext.prototype),nt.prototype.constructor=nt,nt.prototype.FILTER=function(){return this.getToken(c.FILTER,0)},nt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},nt.prototype.enterRule=function(e){e instanceof R&&e.enterFilterClause(this)},nt.prototype.exitRule=function(e){e instanceof R&&e.exitFilterClause(this)},nt.prototype.accept=function(e){return e instanceof f?e.visitFilterClause(this):e.visitChildren(this)},c.FilterClauseContext=nt,c.prototype.filterClause=function(){var r=new nt(this,this._ctx,this.state);this.enterRule(r,14,c.RULE_filterClause);try{this.enterOuterAlt(r,1),this.state=311,this.match(c.FILTER),this.state=312,this.expr(0)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},it.prototype=Object.create(l.ParserRuleContext.prototype),it.prototype.constructor=it,it.prototype.CALC=function(){return this.getToken(c.CALC,0)},it.prototype.calcClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(le):this.getTypedRuleContext(le,e)},it.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},it.prototype.enterRule=function(e){e instanceof R&&e.enterCalcClause(this)},it.prototype.exitRule=function(e){e instanceof R&&e.exitCalcClause(this)},it.prototype.accept=function(e){return e instanceof f?e.visitCalcClause(this):e.visitChildren(this)},c.CalcClauseContext=it,c.prototype.calcClause=function(){var r=new it(this,this._ctx,this.state);this.enterRule(r,16,c.RULE_calcClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=314,this.match(c.CALC),this.state=315,this.calcClauseItem(),this.state=320,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=316,this.match(c.COMMA),this.state=317,this.calcClauseItem(),this.state=322,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},pt.prototype=Object.create(l.ParserRuleContext.prototype),pt.prototype.constructor=pt,pt.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},pt.prototype.KEEP=function(){return this.getToken(c.KEEP,0)},pt.prototype.DROP=function(){return this.getToken(c.DROP,0)},pt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},pt.prototype.enterRule=function(e){e instanceof R&&e.enterKeepOrDropClause(this)},pt.prototype.exitRule=function(e){e instanceof R&&e.exitKeepOrDropClause(this)},pt.prototype.accept=function(e){return e instanceof f?e.visitKeepOrDropClause(this):e.visitChildren(this)},c.KeepOrDropClauseContext=pt,c.prototype.keepOrDropClause=function(){var r=new pt(this,this._ctx,this.state);this.enterRule(r,18,c.RULE_keepOrDropClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=323,r.op=this._input.LT(1),(t=this._input.LA(1))!==c.DROP&&t!==c.KEEP?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=324,this.componentID(),this.state=329,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=325,this.match(c.COMMA),this.state=326,this.componentID(),this.state=331,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},st.prototype=Object.create(l.ParserRuleContext.prototype),st.prototype.constructor=st,st.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},st.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},st.prototype.PIVOT=function(){return this.getToken(c.PIVOT,0)},st.prototype.UNPIVOT=function(){return this.getToken(c.UNPIVOT,0)},st.prototype.enterRule=function(e){e instanceof R&&e.enterPivotOrUnpivotClause(this)},st.prototype.exitRule=function(e){e instanceof R&&e.exitPivotOrUnpivotClause(this)},st.prototype.accept=function(e){return e instanceof f?e.visitPivotOrUnpivotClause(this):e.visitChildren(this)},c.PivotOrUnpivotClauseContext=st,c.prototype.pivotOrUnpivotClause=function(){var r=new st(this,this._ctx,this.state);this.enterRule(r,20,c.RULE_pivotOrUnpivotClause);var t=0;try{this.enterOuterAlt(r,1),this.state=332,r.op=this._input.LT(1),(t=this._input.LA(1))!==c.PIVOT&&t!==c.UNPIVOT?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=333,r.id_=this.componentID(),this.state=334,this.match(c.COMMA),this.state=335,r.mea=this.componentID()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},at.prototype=Object.create(l.ParserRuleContext.prototype),at.prototype.constructor=at,at.prototype.CUSTOMPIVOT=function(){return this.getToken(c.CUSTOMPIVOT,0)},at.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},at.prototype.IN=function(){return this.getToken(c.IN,0)},at.prototype.constant=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Lr):this.getTypedRuleContext(Lr,e)},at.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},at.prototype.enterRule=function(e){e instanceof R&&e.enterCustomPivotClause(this)},at.prototype.exitRule=function(e){e instanceof R&&e.exitCustomPivotClause(this)},at.prototype.accept=function(e){return e instanceof f?e.visitCustomPivotClause(this):e.visitChildren(this)},c.CustomPivotClauseContext=at,c.prototype.customPivotClause=function(){var r=new at(this,this._ctx,this.state);this.enterRule(r,22,c.RULE_customPivotClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=337,this.match(c.CUSTOMPIVOT),this.state=338,r.id_=this.componentID(),this.state=339,this.match(c.COMMA),this.state=340,r.mea=this.componentID(),this.state=341,this.match(c.IN),this.state=342,this.constant(),this.state=347,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=343,this.match(c.COMMA),this.state=344,this.constant(),this.state=349,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ct.prototype=Object.create(l.ParserRuleContext.prototype),ct.prototype.constructor=ct,ct.prototype.SUBSPACE=function(){return this.getToken(c.SUBSPACE,0)},ct.prototype.subspaceClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ye):this.getTypedRuleContext(ye,e)},ct.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ct.prototype.enterRule=function(e){e instanceof R&&e.enterSubspaceClause(this)},ct.prototype.exitRule=function(e){e instanceof R&&e.exitSubspaceClause(this)},ct.prototype.accept=function(e){return e instanceof f?e.visitSubspaceClause(this):e.visitChildren(this)},c.SubspaceClauseContext=ct,c.prototype.subspaceClause=function(){var r=new ct(this,this._ctx,this.state);this.enterRule(r,24,c.RULE_subspaceClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=350,this.match(c.SUBSPACE),this.state=351,this.subspaceClauseItem(),this.state=356,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=352,this.match(c.COMMA),this.state=353,this.subspaceClauseItem(),this.state=358,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},lt.prototype=Object.create(l.ParserRuleContext.prototype),lt.prototype.constructor=lt,lt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},ut.prototype=Object.create(lt.prototype),ut.prototype.constructor=ut,c.JoinExprContext=ut,ut.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},ut.prototype.joinClause=function(){return this.getTypedRuleContext(fe,0)},ut.prototype.joinBody=function(){return this.getTypedRuleContext(Ae,0)},ut.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},ut.prototype.INNER_JOIN=function(){return this.getToken(c.INNER_JOIN,0)},ut.prototype.LEFT_JOIN=function(){return this.getToken(c.LEFT_JOIN,0)},ut.prototype.joinClauseWithoutUsing=function(){return this.getTypedRuleContext(Re,0)},ut.prototype.FULL_JOIN=function(){return this.getToken(c.FULL_JOIN,0)},ut.prototype.CROSS_JOIN=function(){return this.getToken(c.CROSS_JOIN,0)},ut.prototype.enterRule=function(e){e instanceof R&&e.enterJoinExpr(this)},ut.prototype.exitRule=function(e){e instanceof R&&e.exitJoinExpr(this)},ut.prototype.accept=function(e){return e instanceof f?e.visitJoinExpr(this):e.visitChildren(this)},c.JoinOperatorsContext=lt,c.prototype.joinOperators=function(){var r=new lt(this,this._ctx,this.state);this.enterRule(r,26,c.RULE_joinOperators);var o=0;try{switch(this.state=371,this._errHandler.sync(this),this._input.LA(1)){case c.INNER_JOIN:case c.LEFT_JOIN:r=new ut(this,r),this.enterOuterAlt(r,1),this.state=359,r.joinKeyword=this._input.LT(1),(o=this._input.LA(1))!==c.INNER_JOIN&&o!==c.LEFT_JOIN?r.joinKeyword=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=360,this.match(c.LPAREN),this.state=361,this.joinClause(),this.state=362,this.joinBody(),this.state=363,this.match(c.RPAREN);break;case c.CROSS_JOIN:case c.FULL_JOIN:r=new ut(this,r),this.enterOuterAlt(r,2),this.state=365,r.joinKeyword=this._input.LT(1),(o=this._input.LA(1))!==c.CROSS_JOIN&&o!==c.FULL_JOIN?r.joinKeyword=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=366,this.match(c.LPAREN),this.state=367,this.joinClauseWithoutUsing(),this.state=368,this.joinBody(),this.state=369,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},yt.prototype=Object.create(l.ParserRuleContext.prototype),yt.prototype.constructor=yt,yt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},ft.prototype=Object.create(yt.prototype),ft.prototype.constructor=ft,c.DefOperatorContext=ft,ft.prototype.DEFINE=function(){return this.getToken(c.DEFINE,0)},ft.prototype.OPERATOR=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.OPERATOR):this.getToken(c.OPERATOR,e)},ft.prototype.operatorID=function(){return this.getTypedRuleContext(Ir,0)},ft.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},ft.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},ft.prototype.IS=function(){return this.getToken(c.IS,0)},ft.prototype.END=function(){return this.getToken(c.END,0)},ft.prototype.expr=function(){return this.getTypedRuleContext(g,0)},ft.prototype.parameterItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,e)},ft.prototype.RETURNS=function(){return this.getToken(c.RETURNS,0)},ft.prototype.outputParameterType=function(){return this.getTypedRuleContext(Pe,0)},ft.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ft.prototype.enterRule=function(e){e instanceof R&&e.enterDefOperator(this)},ft.prototype.exitRule=function(e){e instanceof R&&e.exitDefOperator(this)},ft.prototype.accept=function(e){return e instanceof f?e.visitDefOperator(this):e.visitChildren(this)},Et.prototype=Object.create(yt.prototype),Et.prototype.constructor=Et,c.DefHierarchicalContext=Et,Et.prototype.DEFINE=function(){return this.getToken(c.DEFINE,0)},Et.prototype.HIERARCHICAL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.HIERARCHICAL):this.getToken(c.HIERARCHICAL,e)},Et.prototype.RULESET=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RULESET):this.getToken(c.RULESET,e)},Et.prototype.rulesetID=function(){return this.getTypedRuleContext(Je,0)},Et.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Et.prototype.hierRuleSignature=function(){return this.getTypedRuleContext(Qt,0)},Et.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Et.prototype.IS=function(){return this.getToken(c.IS,0)},Et.prototype.ruleClauseHierarchical=function(){return this.getTypedRuleContext($e,0)},Et.prototype.END=function(){return this.getToken(c.END,0)},Et.prototype.enterRule=function(e){e instanceof R&&e.enterDefHierarchical(this)},Et.prototype.exitRule=function(e){e instanceof R&&e.exitDefHierarchical(this)},Et.prototype.accept=function(e){return e instanceof f?e.visitDefHierarchical(this):e.visitChildren(this)},Rt.prototype=Object.create(yt.prototype),Rt.prototype.constructor=Rt,c.DefDatapointRulesetContext=Rt,Rt.prototype.DEFINE=function(){return this.getToken(c.DEFINE,0)},Rt.prototype.DATAPOINT=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.DATAPOINT):this.getToken(c.DATAPOINT,e)},Rt.prototype.RULESET=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RULESET):this.getToken(c.RULESET,e)},Rt.prototype.rulesetID=function(){return this.getTypedRuleContext(Je,0)},Rt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Rt.prototype.rulesetSignature=function(){return this.getTypedRuleContext(Ke,0)},Rt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Rt.prototype.IS=function(){return this.getToken(c.IS,0)},Rt.prototype.ruleClauseDatapoint=function(){return this.getTypedRuleContext(Qe,0)},Rt.prototype.END=function(){return this.getToken(c.END,0)},Rt.prototype.enterRule=function(e){e instanceof R&&e.enterDefDatapointRuleset(this)},Rt.prototype.exitRule=function(e){e instanceof R&&e.exitDefDatapointRuleset(this)},Rt.prototype.accept=function(e){return e instanceof f?e.visitDefDatapointRuleset(this):e.visitChildren(this)},c.DefOperatorsContext=yt,c.prototype.defOperators=function(){var r=new yt(this,this._ctx,this.state);this.enterRule(r,28,c.RULE_defOperators);var o=0;try{switch(this.state=423,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,19,this._ctx)){case 1:if(r=new ft(this,r),this.enterOuterAlt(r,1),this.state=373,this.match(c.DEFINE),this.state=374,this.match(c.OPERATOR),this.state=375,this.operatorID(),this.state=376,this.match(c.LPAREN),this.state=385,this._errHandler.sync(this),(o=this._input.LA(1))===c.IDENTIFIER)for(this.state=377,this.parameterItem(),this.state=382,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;)this.state=378,this.match(c.COMMA),this.state=379,this.parameterItem(),this.state=384,this._errHandler.sync(this),o=this._input.LA(1);this.state=387,this.match(c.RPAREN),this.state=390,this._errHandler.sync(this),(o=this._input.LA(1))===c.RETURNS&&(this.state=388,this.match(c.RETURNS),this.state=389,this.outputParameterType()),this.state=392,this.match(c.IS),this.state=393,this.expr(0),this.state=394,this.match(c.END),this.state=395,this.match(c.OPERATOR);break;case 2:r=new Rt(this,r),this.enterOuterAlt(r,2),this.state=397,this.match(c.DEFINE),this.state=398,this.match(c.DATAPOINT),this.state=399,this.match(c.RULESET),this.state=400,this.rulesetID(),this.state=401,this.match(c.LPAREN),this.state=402,this.rulesetSignature(),this.state=403,this.match(c.RPAREN),this.state=404,this.match(c.IS),this.state=405,this.ruleClauseDatapoint(),this.state=406,this.match(c.END),this.state=407,this.match(c.DATAPOINT),this.state=408,this.match(c.RULESET);break;case 3:r=new Et(this,r),this.enterOuterAlt(r,3),this.state=410,this.match(c.DEFINE),this.state=411,this.match(c.HIERARCHICAL),this.state=412,this.match(c.RULESET),this.state=413,this.rulesetID(),this.state=414,this.match(c.LPAREN),this.state=415,this.hierRuleSignature(),this.state=416,this.match(c.RPAREN),this.state=417,this.match(c.IS),this.state=418,this.ruleClauseHierarchical(),this.state=419,this.match(c.END),this.state=420,this.match(c.HIERARCHICAL),this.state=421,this.match(c.RULESET);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Tt.prototype=Object.create(l.ParserRuleContext.prototype),Tt.prototype.constructor=Tt,Tt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},ht.prototype=Object.create(Tt.prototype),ht.prototype.constructor=ht,c.EvalAtomContext=ht,ht.prototype.EVAL=function(){return this.getToken(c.EVAL,0)},ht.prototype.LPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.LPAREN):this.getToken(c.LPAREN,e)},ht.prototype.routineName=function(){return this.getTypedRuleContext(Sr,0)},ht.prototype.RPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RPAREN):this.getToken(c.RPAREN,e)},ht.prototype.varID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Er):this.getTypedRuleContext(Er,e)},ht.prototype.constant=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Lr):this.getTypedRuleContext(Lr,e)},ht.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ht.prototype.LANGUAGE=function(){return this.getToken(c.LANGUAGE,0)},ht.prototype.STRING_CONSTANT=function(){return this.getToken(c.STRING_CONSTANT,0)},ht.prototype.RETURNS=function(){return this.getToken(c.RETURNS,0)},ht.prototype.datasetType=function(){return this.getTypedRuleContext(ke,0)},ht.prototype.enterRule=function(e){e instanceof R&&e.enterEvalAtom(this)},ht.prototype.exitRule=function(e){e instanceof R&&e.exitEvalAtom(this)},ht.prototype.accept=function(e){return e instanceof f?e.visitEvalAtom(this):e.visitChildren(this)},xt.prototype=Object.create(Tt.prototype),xt.prototype.constructor=xt,c.CastExprDatasetContext=xt,xt.prototype.CAST=function(){return this.getToken(c.CAST,0)},xt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},xt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},xt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},xt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},xt.prototype.basicScalarType=function(){return this.getTypedRuleContext(vr,0)},xt.prototype.valueDomainName=function(){return this.getTypedRuleContext(qe,0)},xt.prototype.STRING_CONSTANT=function(){return this.getToken(c.STRING_CONSTANT,0)},xt.prototype.enterRule=function(e){e instanceof R&&e.enterCastExprDataset(this)},xt.prototype.exitRule=function(e){e instanceof R&&e.exitCastExprDataset(this)},xt.prototype.accept=function(e){return e instanceof f?e.visitCastExprDataset(this):e.visitChildren(this)},dt.prototype=Object.create(Tt.prototype),dt.prototype.constructor=dt,c.CallDatasetContext=dt,dt.prototype.operatorID=function(){return this.getTypedRuleContext(Ir,0)},dt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},dt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},dt.prototype.parameter=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ct):this.getTypedRuleContext(Ct,e)},dt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},dt.prototype.enterRule=function(e){e instanceof R&&e.enterCallDataset(this)},dt.prototype.exitRule=function(e){e instanceof R&&e.exitCallDataset(this)},dt.prototype.accept=function(e){return e instanceof f?e.visitCallDataset(this):e.visitChildren(this)},c.GenericOperatorsContext=Tt,c.prototype.genericOperators=function(){var r=new Tt(this,this._ctx,this.state);this.enterRule(r,30,c.RULE_genericOperators);var o=0;try{switch(this.state=482,this._errHandler.sync(this),this._input.LA(1)){case c.IDENTIFIER:if(r=new dt(this,r),this.enterOuterAlt(r,1),this.state=425,this.operatorID(),this.state=426,this.match(c.LPAREN),this.state=435,this._errHandler.sync(this),(o=this._input.LA(1))===c.NULL_CONSTANT||o===c.OPTIONAL||0==(-32&o-230)&&0!=(1<<o-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.BOOLEAN_CONSTANT-230|1<<c.STRING_CONSTANT-230|1<<c.IDENTIFIER-230)))for(this.state=427,this.parameter(),this.state=432,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;)this.state=428,this.match(c.COMMA),this.state=429,this.parameter(),this.state=434,this._errHandler.sync(this),o=this._input.LA(1);this.state=437,this.match(c.RPAREN);break;case c.EVAL:switch(r=new ht(this,r),this.enterOuterAlt(r,2),this.state=439,this.match(c.EVAL),this.state=440,this.match(c.LPAREN),this.state=441,this.routineName(),this.state=442,this.match(c.LPAREN),this.state=445,this._errHandler.sync(this),this._input.LA(1)){case c.IDENTIFIER:this.state=443,this.varID();break;case c.NULL_CONSTANT:case c.INTEGER_CONSTANT:case c.NUMBER_CONSTANT:case c.BOOLEAN_CONSTANT:case c.STRING_CONSTANT:this.state=444,this.constant();break;case c.RPAREN:case c.COMMA:}for(this.state=454,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;){switch(this.state=447,this.match(c.COMMA),this.state=450,this._errHandler.sync(this),this._input.LA(1)){case c.IDENTIFIER:this.state=448,this.varID();break;case c.NULL_CONSTANT:case c.INTEGER_CONSTANT:case c.NUMBER_CONSTANT:case c.BOOLEAN_CONSTANT:case c.STRING_CONSTANT:this.state=449,this.constant();break;default:throw new l.error.NoViableAltException(this);}this.state=456,this._errHandler.sync(this),o=this._input.LA(1)}this.state=457,this.match(c.RPAREN),this.state=460,this._errHandler.sync(this),(o=this._input.LA(1))===c.LANGUAGE&&(this.state=458,this.match(c.LANGUAGE),this.state=459,this.match(c.STRING_CONSTANT)),this.state=464,this._errHandler.sync(this),(o=this._input.LA(1))===c.RETURNS&&(this.state=462,this.match(c.RETURNS),this.state=463,this.datasetType()),this.state=466,this.match(c.RPAREN);break;case c.CAST:switch(r=new xt(this,r),this.enterOuterAlt(r,3),this.state=468,this.match(c.CAST),this.state=469,this.match(c.LPAREN),this.state=470,this.expr(0),this.state=471,this.match(c.COMMA),this.state=474,this._errHandler.sync(this),this._input.LA(1)){case c.BOOLEAN:case c.DATE:case c.TIME_PERIOD:case c.NUMBER:case c.STRING:case c.TIME:case c.INTEGER:case c.DURATION:case c.SCALAR:this.state=472,this.basicScalarType();break;case c.IDENTIFIER:this.state=473,this.valueDomainName();break;default:throw new l.error.NoViableAltException(this);}this.state=478,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=476,this.match(c.COMMA),this.state=477,this.match(c.STRING_CONSTANT)),this.state=480,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ct.prototype=Object.create(l.ParserRuleContext.prototype),Ct.prototype.constructor=Ct,Ct.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},Ct.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},Ct.prototype.OPTIONAL=function(){return this.getToken(c.OPTIONAL,0)},Ct.prototype.enterRule=function(e){e instanceof R&&e.enterParameter(this)},Ct.prototype.exitRule=function(e){e instanceof R&&e.exitParameter(this)},Ct.prototype.accept=function(e){return e instanceof f?e.visitParameter(this):e.visitChildren(this)},c.ParameterContext=Ct,c.prototype.parameter=function(){var r=new Ct(this,this._ctx,this.state);this.enterRule(r,32,c.RULE_parameter);try{switch(this.state=487,this._errHandler.sync(this),this._input.LA(1)){case c.IDENTIFIER:this.enterOuterAlt(r,1),this.state=484,this.varID();break;case c.NULL_CONSTANT:case c.INTEGER_CONSTANT:case c.NUMBER_CONSTANT:case c.BOOLEAN_CONSTANT:case c.STRING_CONSTANT:this.enterOuterAlt(r,2),this.state=485,this.constant();break;case c.OPTIONAL:this.enterOuterAlt(r,3),this.state=486,this.match(c.OPTIONAL);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},At.prototype=Object.create(l.ParserRuleContext.prototype),At.prototype.constructor=At,At.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Nt.prototype=Object.create(At.prototype),Nt.prototype.constructor=Nt,c.InstrAtomContext=Nt,Nt.prototype.INSTR=function(){return this.getToken(c.INSTR,0)},Nt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Nt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Nt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Nt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Nt.prototype.optionalExpr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ar):this.getTypedRuleContext(Ar,e)},Nt.prototype.enterRule=function(e){e instanceof R&&e.enterInstrAtom(this)},Nt.prototype.exitRule=function(e){e instanceof R&&e.exitInstrAtom(this)},Nt.prototype.accept=function(e){return e instanceof f?e.visitInstrAtom(this):e.visitChildren(this)},_t.prototype=Object.create(At.prototype),_t.prototype.constructor=_t,c.UnaryStringFunctionContext=_t,_t.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},_t.prototype.expr=function(){return this.getTypedRuleContext(g,0)},_t.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},_t.prototype.TRIM=function(){return this.getToken(c.TRIM,0)},_t.prototype.LTRIM=function(){return this.getToken(c.LTRIM,0)},_t.prototype.RTRIM=function(){return this.getToken(c.RTRIM,0)},_t.prototype.UCASE=function(){return this.getToken(c.UCASE,0)},_t.prototype.LCASE=function(){return this.getToken(c.LCASE,0)},_t.prototype.LEN=function(){return this.getToken(c.LEN,0)},_t.prototype.enterRule=function(e){e instanceof R&&e.enterUnaryStringFunction(this)},_t.prototype.exitRule=function(e){e instanceof R&&e.exitUnaryStringFunction(this)},_t.prototype.accept=function(e){return e instanceof f?e.visitUnaryStringFunction(this):e.visitChildren(this)},Ot.prototype=Object.create(At.prototype),Ot.prototype.constructor=Ot,c.SubstrAtomContext=Ot,Ot.prototype.SUBSTR=function(){return this.getToken(c.SUBSTR,0)},Ot.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Ot.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Ot.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Ot.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Ot.prototype.optionalExpr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ar):this.getTypedRuleContext(Ar,e)},Ot.prototype.enterRule=function(e){e instanceof R&&e.enterSubstrAtom(this)},Ot.prototype.exitRule=function(e){e instanceof R&&e.exitSubstrAtom(this)},Ot.prototype.accept=function(e){return e instanceof f?e.visitSubstrAtom(this):e.visitChildren(this)},It.prototype=Object.create(At.prototype),It.prototype.constructor=It,c.ReplaceAtomContext=It,It.prototype.REPLACE=function(){return this.getToken(c.REPLACE,0)},It.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},It.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},It.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},It.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},It.prototype.optionalExpr=function(){return this.getTypedRuleContext(Ar,0)},It.prototype.enterRule=function(e){e instanceof R&&e.enterReplaceAtom(this)},It.prototype.exitRule=function(e){e instanceof R&&e.exitReplaceAtom(this)},It.prototype.accept=function(e){return e instanceof f?e.visitReplaceAtom(this):e.visitChildren(this)},c.StringOperatorsContext=At,c.prototype.stringOperators=function(){var r=new At(this,this._ctx,this.state);this.enterRule(r,34,c.RULE_stringOperators);var o=0;try{switch(this.state=537,this._errHandler.sync(this),this._input.LA(1)){case c.LEN:case c.TRIM:case c.UCASE:case c.LCASE:case c.LTRIM:case c.RTRIM:r=new _t(this,r),this.enterOuterAlt(r,1),this.state=489,r.op=this._input.LT(1),0==(-32&(o=this._input.LA(1))-81)&&0!=(1<<o-81&(1<<c.LEN-81|1<<c.TRIM-81|1<<c.UCASE-81|1<<c.LCASE-81))||o===c.LTRIM||o===c.RTRIM?(this._errHandler.reportMatch(this),this.consume()):r.op=this._errHandler.recoverInline(this),this.state=490,this.match(c.LPAREN),this.state=491,this.expr(0),this.state=492,this.match(c.RPAREN);break;case c.SUBSTR:switch(r=new Ot(this,r),this.enterOuterAlt(r,2),this.state=494,this.match(c.SUBSTR),this.state=495,this.match(c.LPAREN),this.state=496,this.expr(0),this.state=507,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,32,this._ctx)){case 1:this.state=503,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=497,this.match(c.COMMA),this.state=498,r.startParameter=this.optionalExpr(),this.state=500,this.match(c.COMMA),this.state=501,r.endParameter=this.optionalExpr());break;case 2:this.state=505,this.match(c.COMMA),this.state=506,r.startParameter=this.optionalExpr();}this.state=509,this.match(c.RPAREN);break;case c.REPLACE:r=new It(this,r),this.enterOuterAlt(r,3),this.state=511,this.match(c.REPLACE),this.state=512,this.match(c.LPAREN),this.state=513,this.expr(0),this.state=514,this.match(c.COMMA),this.state=515,r.param=this.expr(0),this.state=518,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=516,this.match(c.COMMA),this.state=517,this.optionalExpr()),this.state=520,this.match(c.RPAREN);break;case c.INSTR:r=new Nt(this,r),this.enterOuterAlt(r,4),this.state=522,this.match(c.INSTR),this.state=523,this.match(c.LPAREN),this.state=524,this.expr(0),this.state=525,this.match(c.COMMA),this.state=526,r.pattern=this.expr(0),this.state=529,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,34,this._ctx)&&(this.state=527,this.match(c.COMMA),this.state=528,r.startParameter=this.optionalExpr()),this.state=533,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=531,this.match(c.COMMA),this.state=532,r.occurrenceParameter=this.optionalExpr()),this.state=535,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},mt.prototype=Object.create(l.ParserRuleContext.prototype),mt.prototype.constructor=mt,mt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},gt.prototype=Object.create(mt.prototype),gt.prototype.constructor=gt,c.UnaryNumericContext=gt,gt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},gt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},gt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},gt.prototype.CEIL=function(){return this.getToken(c.CEIL,0)},gt.prototype.FLOOR=function(){return this.getToken(c.FLOOR,0)},gt.prototype.ABS=function(){return this.getToken(c.ABS,0)},gt.prototype.EXP=function(){return this.getToken(c.EXP,0)},gt.prototype.LN=function(){return this.getToken(c.LN,0)},gt.prototype.SQRT=function(){return this.getToken(c.SQRT,0)},gt.prototype.enterRule=function(e){e instanceof R&&e.enterUnaryNumeric(this)},gt.prototype.exitRule=function(e){e instanceof R&&e.exitUnaryNumeric(this)},gt.prototype.accept=function(e){return e instanceof f?e.visitUnaryNumeric(this):e.visitChildren(this)},Lt.prototype=Object.create(mt.prototype),Lt.prototype.constructor=Lt,c.UnaryWithOptionalNumericContext=Lt,Lt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Lt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Lt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Lt.prototype.ROUND=function(){return this.getToken(c.ROUND,0)},Lt.prototype.TRUNC=function(){return this.getToken(c.TRUNC,0)},Lt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},Lt.prototype.optionalExpr=function(){return this.getTypedRuleContext(Ar,0)},Lt.prototype.enterRule=function(e){e instanceof R&&e.enterUnaryWithOptionalNumeric(this)},Lt.prototype.exitRule=function(e){e instanceof R&&e.exitUnaryWithOptionalNumeric(this)},Lt.prototype.accept=function(e){return e instanceof f?e.visitUnaryWithOptionalNumeric(this):e.visitChildren(this)},St.prototype=Object.create(mt.prototype),St.prototype.constructor=St,c.BinaryNumericContext=St,St.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},St.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},St.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},St.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},St.prototype.MOD=function(){return this.getToken(c.MOD,0)},St.prototype.POWER=function(){return this.getToken(c.POWER,0)},St.prototype.LOG=function(){return this.getToken(c.LOG,0)},St.prototype.enterRule=function(e){e instanceof R&&e.enterBinaryNumeric(this)},St.prototype.exitRule=function(e){e instanceof R&&e.exitBinaryNumeric(this)},St.prototype.accept=function(e){return e instanceof f?e.visitBinaryNumeric(this):e.visitChildren(this)},c.NumericOperatorsContext=mt,c.prototype.numericOperators=function(){var r=new mt(this,this._ctx,this.state);this.enterRule(r,36,c.RULE_numericOperators);var o=0;try{switch(this.state=560,this._errHandler.sync(this),this._input.LA(1)){case c.ABS:case c.LN:case c.EXP:case c.CEIL:case c.FLOOR:case c.SQRT:r=new gt(this,r),this.enterOuterAlt(r,1),this.state=539,r.op=this._input.LT(1),0==(-32&(o=this._input.LA(1))-73)&&0!=(1<<o-73&(1<<c.ABS-73|1<<c.LN-73|1<<c.EXP-73))||0==(-32&o-124)&&0!=(1<<o-124&(1<<c.CEIL-124|1<<c.FLOOR-124|1<<c.SQRT-124))?(this._errHandler.reportMatch(this),this.consume()):r.op=this._errHandler.recoverInline(this),this.state=540,this.match(c.LPAREN),this.state=541,this.expr(0),this.state=542,this.match(c.RPAREN);break;case c.TRUNC:case c.ROUND:r=new Lt(this,r),this.enterOuterAlt(r,2),this.state=544,r.op=this._input.LT(1),(o=this._input.LA(1))!==c.TRUNC&&o!==c.ROUND?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=545,this.match(c.LPAREN),this.state=546,this.expr(0),this.state=549,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=547,this.match(c.COMMA),this.state=548,this.optionalExpr()),this.state=551,this.match(c.RPAREN);break;case c.LOG:case c.POWER:case c.MOD:r=new St(this,r),this.enterOuterAlt(r,3),this.state=553,r.op=this._input.LT(1),0!=(-32&(o=this._input.LA(1))-76)||0==(1<<o-76&(1<<c.LOG-76|1<<c.POWER-76|1<<c.MOD-76))?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=554,this.match(c.LPAREN),this.state=555,r.left=this.expr(0),this.state=556,this.match(c.COMMA),this.state=557,r.right=this.expr(0),this.state=558,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},vt.prototype=Object.create(l.ParserRuleContext.prototype),vt.prototype.constructor=vt,vt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Pt.prototype=Object.create(vt.prototype),Pt.prototype.constructor=Pt,c.BetweenAtomContext=Pt,Pt.prototype.BETWEEN=function(){return this.getToken(c.BETWEEN,0)},Pt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Pt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Pt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Pt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Pt.prototype.enterRule=function(e){e instanceof R&&e.enterBetweenAtom(this)},Pt.prototype.exitRule=function(e){e instanceof R&&e.exitBetweenAtom(this)},Pt.prototype.accept=function(e){return e instanceof f?e.visitBetweenAtom(this):e.visitChildren(this)},Dt.prototype=Object.create(vt.prototype),Dt.prototype.constructor=Dt,c.CharsetMatchAtomContext=Dt,Dt.prototype.CHARSET_MATCH=function(){return this.getToken(c.CHARSET_MATCH,0)},Dt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Dt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},Dt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Dt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Dt.prototype.enterRule=function(e){e instanceof R&&e.enterCharsetMatchAtom(this)},Dt.prototype.exitRule=function(e){e instanceof R&&e.exitCharsetMatchAtom(this)},Dt.prototype.accept=function(e){return e instanceof f?e.visitCharsetMatchAtom(this):e.visitChildren(this)},Mt.prototype=Object.create(vt.prototype),Mt.prototype.constructor=Mt,c.IsNullAtomContext=Mt,Mt.prototype.ISNULL=function(){return this.getToken(c.ISNULL,0)},Mt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Mt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Mt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Mt.prototype.enterRule=function(e){e instanceof R&&e.enterIsNullAtom(this)},Mt.prototype.exitRule=function(e){e instanceof R&&e.exitIsNullAtom(this)},Mt.prototype.accept=function(e){return e instanceof f?e.visitIsNullAtom(this):e.visitChildren(this)},kt.prototype=Object.create(vt.prototype),kt.prototype.constructor=kt,c.ExistInAtomContext=kt,kt.prototype.EXISTS_IN=function(){return this.getToken(c.EXISTS_IN,0)},kt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},kt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},kt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},kt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},kt.prototype.retainType=function(){return this.getTypedRuleContext(br,0)},kt.prototype.enterRule=function(e){e instanceof R&&e.enterExistInAtom(this)},kt.prototype.exitRule=function(e){e instanceof R&&e.exitExistInAtom(this)},kt.prototype.accept=function(e){return e instanceof f?e.visitExistInAtom(this):e.visitChildren(this)},c.ComparisonOperatorsContext=vt,c.prototype.comparisonOperators=function(){var r=new vt(this,this._ctx,this.state);this.enterRule(r,38,c.RULE_comparisonOperators);try{switch(this.state=594,this._errHandler.sync(this),this._input.LA(1)){case c.BETWEEN:r=new Pt(this,r),this.enterOuterAlt(r,1),this.state=562,this.match(c.BETWEEN),this.state=563,this.match(c.LPAREN),this.state=564,r.op=this.expr(0),this.state=565,this.match(c.COMMA),this.state=566,r.from_=this.expr(0),this.state=567,this.match(c.COMMA),this.state=568,r.to_=this.expr(0),this.state=569,this.match(c.RPAREN);break;case c.CHARSET_MATCH:r=new Dt(this,r),this.enterOuterAlt(r,2),this.state=571,this.match(c.CHARSET_MATCH),this.state=572,this.match(c.LPAREN),this.state=573,r.op=this.expr(0),this.state=574,this.match(c.COMMA),this.state=575,r.pattern=this.expr(0),this.state=576,this.match(c.RPAREN);break;case c.ISNULL:r=new Mt(this,r),this.enterOuterAlt(r,3),this.state=578,this.match(c.ISNULL),this.state=579,this.match(c.LPAREN),this.state=580,this.expr(0),this.state=581,this.match(c.RPAREN);break;case c.EXISTS_IN:r=new kt(this,r),this.enterOuterAlt(r,4),this.state=583,this.match(c.EXISTS_IN),this.state=584,this.match(c.LPAREN),this.state=585,r.left=this.expr(0),this.state=586,this.match(c.COMMA),this.state=587,r.right=this.expr(0),this.state=590,this._errHandler.sync(this),this._input.LA(1)===c.COMMA&&(this.state=588,this.match(c.COMMA),this.state=589,this.retainType()),this.state=592,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ut.prototype=Object.create(l.ParserRuleContext.prototype),Ut.prototype.constructor=Ut,Ut.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Ft.prototype=Object.create(Ut.prototype),Ft.prototype.constructor=Ft,c.FlowAtomContext=Ft,Ft.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Ft.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Ft.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Ft.prototype.FLOW_TO_STOCK=function(){return this.getToken(c.FLOW_TO_STOCK,0)},Ft.prototype.STOCK_TO_FLOW=function(){return this.getToken(c.STOCK_TO_FLOW,0)},Ft.prototype.enterRule=function(e){e instanceof R&&e.enterFlowAtom(this)},Ft.prototype.exitRule=function(e){e instanceof R&&e.exitFlowAtom(this)},Ft.prototype.accept=function(e){return e instanceof f?e.visitFlowAtom(this):e.visitChildren(this)},wt.prototype=Object.create(Ut.prototype),wt.prototype.constructor=wt,c.TimeShiftAtomContext=wt,wt.prototype.TIMESHIFT=function(){return this.getToken(c.TIMESHIFT,0)},wt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},wt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},wt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},wt.prototype.signedInteger=function(){return this.getTypedRuleContext(Ne,0)},wt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},wt.prototype.enterRule=function(e){e instanceof R&&e.enterTimeShiftAtom(this)},wt.prototype.exitRule=function(e){e instanceof R&&e.exitTimeShiftAtom(this)},wt.prototype.accept=function(e){return e instanceof f?e.visitTimeShiftAtom(this):e.visitChildren(this)},bt.prototype=Object.create(Ut.prototype),bt.prototype.constructor=bt,c.TimeAggAtomContext=bt,bt.prototype.TIME_AGG=function(){return this.getToken(c.TIME_AGG,0)},bt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},bt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},bt.prototype.STRING_CONSTANT=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.STRING_CONSTANT):this.getToken(c.STRING_CONSTANT,e)},bt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},bt.prototype.optionalExpr=function(){return this.getTypedRuleContext(Ar,0)},bt.prototype.FIRST=function(){return this.getToken(c.FIRST,0)},bt.prototype.LAST=function(){return this.getToken(c.LAST,0)},bt.prototype.OPTIONAL=function(){return this.getToken(c.OPTIONAL,0)},bt.prototype.enterRule=function(e){e instanceof R&&e.enterTimeAggAtom(this)},bt.prototype.exitRule=function(e){e instanceof R&&e.exitTimeAggAtom(this)},bt.prototype.accept=function(e){return e instanceof f?e.visitTimeAggAtom(this):e.visitChildren(this)},Ht.prototype=Object.create(Ut.prototype),Ht.prototype.constructor=Ht,c.CurrentDateAtomContext=Ht,Ht.prototype.CURRENT_DATE=function(){return this.getToken(c.CURRENT_DATE,0)},Ht.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Ht.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Ht.prototype.enterRule=function(e){e instanceof R&&e.enterCurrentDateAtom(this)},Ht.prototype.exitRule=function(e){e instanceof R&&e.exitCurrentDateAtom(this)},Ht.prototype.accept=function(e){return e instanceof f?e.visitCurrentDateAtom(this):e.visitChildren(this)},Vt.prototype=Object.create(Ut.prototype),Vt.prototype.constructor=Vt,c.PeriodAtomContext=Vt,Vt.prototype.PERIOD_INDICATOR=function(){return this.getToken(c.PERIOD_INDICATOR,0)},Vt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Vt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Vt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Vt.prototype.enterRule=function(e){e instanceof R&&e.enterPeriodAtom(this)},Vt.prototype.exitRule=function(e){e instanceof R&&e.exitPeriodAtom(this)},Vt.prototype.accept=function(e){return e instanceof f?e.visitPeriodAtom(this):e.visitChildren(this)},Bt.prototype=Object.create(Ut.prototype),Bt.prototype.constructor=Bt,c.FillTimeAtomContext=Bt,Bt.prototype.FILL_TIME_SERIES=function(){return this.getToken(c.FILL_TIME_SERIES,0)},Bt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Bt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Bt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Bt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},Bt.prototype.SINGLE=function(){return this.getToken(c.SINGLE,0)},Bt.prototype.ALL=function(){return this.getToken(c.ALL,0)},Bt.prototype.enterRule=function(e){e instanceof R&&e.enterFillTimeAtom(this)},Bt.prototype.exitRule=function(e){e instanceof R&&e.exitFillTimeAtom(this)},Bt.prototype.accept=function(e){return e instanceof f?e.visitFillTimeAtom(this):e.visitChildren(this)},c.TimeOperatorsContext=Ut,c.prototype.timeOperators=function(){var r=new Ut(this,this._ctx,this.state);this.enterRule(r,40,c.RULE_timeOperators);var o=0;try{switch(this.state=642,this._errHandler.sync(this),this._input.LA(1)){case c.PERIOD_INDICATOR:r=new Vt(this,r),this.enterOuterAlt(r,1),this.state=596,this.match(c.PERIOD_INDICATOR),this.state=597,this.match(c.LPAREN),this.state=599,this._errHandler.sync(this),(0==(-32&(o=this._input.LA(1)))&&0!=(1<<o&(1<<c.LPAREN|1<<c.PLUS|1<<c.MINUS|1<<c.EVAL|1<<c.IF|1<<c.CURRENT_DATE))||0==(-32&o-39)&&0!=(1<<o-39&(1<<c.NOT-39|1<<c.BETWEEN-39|1<<c.NULL_CONSTANT-39|1<<c.ISNULL-39|1<<c.UNION-39|1<<c.SYMDIFF-39|1<<c.INTERSECT-39|1<<c.CHECK-39|1<<c.EXISTS_IN-39|1<<c.MIN-39|1<<c.MAX-39))||0==(-32&o-73)&&0!=(1<<o-73&(1<<c.ABS-73|1<<c.LN-73|1<<c.LOG-73|1<<c.TRUNC-73|1<<c.ROUND-73|1<<c.POWER-73|1<<c.MOD-73|1<<c.LEN-73|1<<c.TRIM-73|1<<c.UCASE-73|1<<c.LCASE-73|1<<c.SUBSTR-73|1<<c.SUM-73|1<<c.AVG-73|1<<c.MEDIAN-73|1<<c.COUNT-73|1<<c.EXP-73|1<<c.CHARSET_MATCH-73|1<<c.NVL-73|1<<c.HIERARCHY-73))||0==(-32&o-105)&&0!=(1<<o-105&(1<<c.LEVENSHTEIN-105|1<<c.LTRIM-105|1<<c.RTRIM-105|1<<c.INSTR-105|1<<c.REPLACE-105|1<<c.CEIL-105|1<<c.FLOOR-105|1<<c.SQRT-105|1<<c.SETDIFF-105|1<<c.STDDEV_POP-105|1<<c.STDDEV_SAMP-105|1<<c.VAR_POP-105|1<<c.VAR_SAMP-105|1<<c.FIRST_VALUE-105))||0==(-32&o-137)&&0!=(1<<o-137&(1<<c.LAST_VALUE-137|1<<c.LAG-137|1<<c.LEAD-137|1<<c.RATIO_TO_REPORT-137|1<<c.FILL_TIME_SERIES-137|1<<c.FLOW_TO_STOCK-137|1<<c.STOCK_TO_FLOW-137|1<<c.TIMESHIFT-137))||0==(-32&o-182)&&0!=(1<<o-182&(1<<c.INNER_JOIN-182|1<<c.LEFT_JOIN-182|1<<c.CROSS_JOIN-182|1<<c.FULL_JOIN-182|1<<c.PERIOD_INDICATOR-182|1<<c.TIME_AGG-182|1<<c.CAST-182|1<<c.CHECK_DATAPOINT-182|1<<c.CHECK_HIERARCHY-182))||0==(-32&o-230)&&0!=(1<<o-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.BOOLEAN_CONSTANT-230|1<<c.STRING_CONSTANT-230|1<<c.IDENTIFIER-230)))&&(this.state=598,this.expr(0)),this.state=601,this.match(c.RPAREN);break;case c.FILL_TIME_SERIES:r=new Bt(this,r),this.enterOuterAlt(r,2),this.state=602,this.match(c.FILL_TIME_SERIES),this.state=603,this.match(c.LPAREN),this.state=604,this.expr(0),this.state=607,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=605,this.match(c.COMMA),this.state=606,(o=this._input.LA(1))!==c.ALL&&o!==c.SINGLE?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())),this.state=609,this.match(c.RPAREN);break;case c.FLOW_TO_STOCK:case c.STOCK_TO_FLOW:r=new Ft(this,r),this.enterOuterAlt(r,3),this.state=611,r.op=this._input.LT(1),(o=this._input.LA(1))!==c.FLOW_TO_STOCK&&o!==c.STOCK_TO_FLOW?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=612,this.match(c.LPAREN),this.state=613,this.expr(0),this.state=614,this.match(c.RPAREN);break;case c.TIMESHIFT:r=new wt(this,r),this.enterOuterAlt(r,4),this.state=616,this.match(c.TIMESHIFT),this.state=617,this.match(c.LPAREN),this.state=618,this.expr(0),this.state=619,this.match(c.COMMA),this.state=620,this.signedInteger(),this.state=621,this.match(c.RPAREN);break;case c.TIME_AGG:r=new bt(this,r),this.enterOuterAlt(r,5),this.state=623,this.match(c.TIME_AGG),this.state=624,this.match(c.LPAREN),this.state=625,r.periodIndTo=this.match(c.STRING_CONSTANT),this.state=628,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,43,this._ctx)&&(this.state=626,this.match(c.COMMA),this.state=627,r.periodIndFrom=this._input.LT(1),(o=this._input.LA(1))!==c.OPTIONAL&&o!==c.STRING_CONSTANT?r.periodIndFrom=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())),this.state=632,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,44,this._ctx)&&(this.state=630,this.match(c.COMMA),this.state=631,r.op=this.optionalExpr()),this.state=636,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=634,this.match(c.COMMA),this.state=635,(o=this._input.LA(1))!==c.FIRST&&o!==c.LAST?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())),this.state=638,this.match(c.RPAREN);break;case c.CURRENT_DATE:r=new Ht(this,r),this.enterOuterAlt(r,6),this.state=639,this.match(c.CURRENT_DATE),this.state=640,this.match(c.LPAREN),this.state=641,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Gt.prototype=Object.create(l.ParserRuleContext.prototype),Gt.prototype.constructor=Gt,Gt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Yt.prototype=Object.create(Gt.prototype),Yt.prototype.constructor=Yt,c.SetOrSYmDiffAtomContext=Yt,Yt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Yt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},Yt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Yt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Yt.prototype.SETDIFF=function(){return this.getToken(c.SETDIFF,0)},Yt.prototype.SYMDIFF=function(){return this.getToken(c.SYMDIFF,0)},Yt.prototype.enterRule=function(e){e instanceof R&&e.enterSetOrSYmDiffAtom(this)},Yt.prototype.exitRule=function(e){e instanceof R&&e.exitSetOrSYmDiffAtom(this)},Yt.prototype.accept=function(e){return e instanceof f?e.visitSetOrSYmDiffAtom(this):e.visitChildren(this)},jt.prototype=Object.create(Gt.prototype),jt.prototype.constructor=jt,c.IntersectAtomContext=jt,jt.prototype.INTERSECT=function(){return this.getToken(c.INTERSECT,0)},jt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},jt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},jt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},jt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},jt.prototype.enterRule=function(e){e instanceof R&&e.enterIntersectAtom(this)},jt.prototype.exitRule=function(e){e instanceof R&&e.exitIntersectAtom(this)},jt.prototype.accept=function(e){return e instanceof f?e.visitIntersectAtom(this):e.visitChildren(this)},Wt.prototype=Object.create(Gt.prototype),Wt.prototype.constructor=Wt,c.UnionAtomContext=Wt,Wt.prototype.UNION=function(){return this.getToken(c.UNION,0)},Wt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Wt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Wt.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Wt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Wt.prototype.enterRule=function(e){e instanceof R&&e.enterUnionAtom(this)},Wt.prototype.exitRule=function(e){e instanceof R&&e.exitUnionAtom(this)},Wt.prototype.accept=function(e){return e instanceof f?e.visitUnionAtom(this):e.visitChildren(this)},c.SetOperatorsContext=Gt,c.prototype.setOperators=function(){var r=new Gt(this,this._ctx,this.state);this.enterRule(r,42,c.RULE_setOperators);var o=0;try{switch(this.state=673,this._errHandler.sync(this),this._input.LA(1)){case c.UNION:r=new Wt(this,r),this.enterOuterAlt(r,1),this.state=644,this.match(c.UNION),this.state=645,this.match(c.LPAREN),this.state=646,r.left=this.expr(0),this.state=649,this._errHandler.sync(this),o=this._input.LA(1);do this.state=647,this.match(c.COMMA),this.state=648,this.expr(0),this.state=651,this._errHandler.sync(this),o=this._input.LA(1);while(o===c.COMMA);this.state=653,this.match(c.RPAREN);break;case c.INTERSECT:r=new jt(this,r),this.enterOuterAlt(r,2),this.state=655,this.match(c.INTERSECT),this.state=656,this.match(c.LPAREN),this.state=657,r.left=this.expr(0),this.state=660,this._errHandler.sync(this),o=this._input.LA(1);do this.state=658,this.match(c.COMMA),this.state=659,this.expr(0),this.state=662,this._errHandler.sync(this),o=this._input.LA(1);while(o===c.COMMA);this.state=664,this.match(c.RPAREN);break;case c.SYMDIFF:case c.SETDIFF:r=new Yt(this,r),this.enterOuterAlt(r,3),this.state=666,r.op=this._input.LT(1),(o=this._input.LA(1))!==c.SYMDIFF&&o!==c.SETDIFF?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=667,this.match(c.LPAREN),this.state=668,r.left=this.expr(0),this.state=669,this.match(c.COMMA),this.state=670,r.right=this.expr(0),this.state=671,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},qt.prototype=Object.create(l.ParserRuleContext.prototype),qt.prototype.constructor=qt,qt.prototype.HIERARCHY=function(){return this.getToken(c.HIERARCHY,0)},qt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},qt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},qt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},qt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},qt.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},qt.prototype.conditionClause=function(){return this.getTypedRuleContext(dr,0)},qt.prototype.RULE=function(){return this.getToken(c.RULE,0)},qt.prototype.validationMode=function(){return this.getTypedRuleContext(lr,0)},qt.prototype.inputModeHierarchy=function(){return this.getTypedRuleContext(yr,0)},qt.prototype.outputModeHierarchy=function(){return this.getTypedRuleContext(mr,0)},qt.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},qt.prototype.enterRule=function(e){e instanceof R&&e.enterHierarchyOperators(this)},qt.prototype.exitRule=function(e){e instanceof R&&e.exitHierarchyOperators(this)},qt.prototype.accept=function(e){return e instanceof f?e.visitHierarchyOperators(this):e.visitChildren(this)},c.HierarchyOperatorsContext=qt,c.prototype.hierarchyOperators=function(){var r=new qt(this,this._ctx,this.state);this.enterRule(r,44,c.RULE_hierarchyOperators);var t=0;try{this.enterOuterAlt(r,1),this.state=675,this.match(c.HIERARCHY),this.state=676,this.match(c.LPAREN),this.state=677,r.op=this.expr(0),this.state=678,this.match(c.COMMA),this.state=679,r.hrName=this.match(c.IDENTIFIER),this.state=681,this._errHandler.sync(this),(t=this._input.LA(1))===c.CONDITION&&(this.state=680,this.conditionClause()),this.state=685,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,51,this._ctx)&&(this.state=683,this.match(c.RULE),this.state=684,r.ruleComponent=this.componentID()),this.state=688,this._errHandler.sync(this),0==(-32&(t=this._input.LA(1))-214)&&0!=(1<<t-214&(1<<c.NON_NULL-214|1<<c.NON_ZERO-214|1<<c.PARTIAL_NULL-214|1<<c.PARTIAL_ZERO-214|1<<c.ALWAYS_NULL-214|1<<c.ALWAYS_ZERO-214))&&(this.state=687,this.validationMode()),this.state=691,this._errHandler.sync(this),(t=this._input.LA(1))!==c.DATASET&&t!==c.RULE&&t!==c.RULE_PRIORITY||(this.state=690,this.inputModeHierarchy()),this.state=694,this._errHandler.sync(this),(t=this._input.LA(1))!==c.ALL&&t!==c.COMPUTED||(this.state=693,this.outputModeHierarchy()),this.state=696,this.match(c.RPAREN)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Kt.prototype=Object.create(l.ParserRuleContext.prototype),Kt.prototype.constructor=Kt,Kt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Jt.prototype=Object.create(Kt.prototype),Jt.prototype.constructor=Jt,c.ValidateHRrulesetContext=Jt,Jt.prototype.CHECK_HIERARCHY=function(){return this.getToken(c.CHECK_HIERARCHY,0)},Jt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Jt.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},Jt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Jt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Jt.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Jt.prototype.conditionClause=function(){return this.getTypedRuleContext(dr,0)},Jt.prototype.RULE=function(){return this.getToken(c.RULE,0)},Jt.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},Jt.prototype.validationMode=function(){return this.getTypedRuleContext(lr,0)},Jt.prototype.inputMode=function(){return this.getTypedRuleContext(cr,0)},Jt.prototype.validationOutput=function(){return this.getTypedRuleContext(sr,0)},Jt.prototype.enterRule=function(e){e instanceof R&&e.enterValidateHRruleset(this)},Jt.prototype.exitRule=function(e){e instanceof R&&e.exitValidateHRruleset(this)},Jt.prototype.accept=function(e){return e instanceof f?e.visitValidateHRruleset(this):e.visitChildren(this)},Xt.prototype=Object.create(Kt.prototype),Xt.prototype.constructor=Xt,c.ValidateDPrulesetContext=Xt,Xt.prototype.CHECK_DATAPOINT=function(){return this.getToken(c.CHECK_DATAPOINT,0)},Xt.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Xt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Xt.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Xt.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Xt.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Xt.prototype.COMPONENTS=function(){return this.getToken(c.COMPONENTS,0)},Xt.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},Xt.prototype.validationOutput=function(){return this.getTypedRuleContext(sr,0)},Xt.prototype.enterRule=function(e){e instanceof R&&e.enterValidateDPruleset(this)},Xt.prototype.exitRule=function(e){e instanceof R&&e.exitValidateDPruleset(this)},Xt.prototype.accept=function(e){return e instanceof f?e.visitValidateDPruleset(this):e.visitChildren(this)},$t.prototype=Object.create(Kt.prototype),$t.prototype.constructor=$t,c.ValidationSimpleContext=$t,$t.prototype.CHECK=function(){return this.getToken(c.CHECK,0)},$t.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},$t.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},$t.prototype.expr=function(){return this.getTypedRuleContext(g,0)},$t.prototype.imbalanceExpr=function(){return this.getTypedRuleContext(ur,0)},$t.prototype.erCode=function(){return this.getTypedRuleContext(Rr,0)},$t.prototype.erLevel=function(){return this.getTypedRuleContext(hr,0)},$t.prototype.INVALID=function(){return this.getToken(c.INVALID,0)},$t.prototype.ALL=function(){return this.getToken(c.ALL,0)},$t.prototype.enterRule=function(e){e instanceof R&&e.enterValidationSimple(this)},$t.prototype.exitRule=function(e){e instanceof R&&e.exitValidationSimple(this)},$t.prototype.accept=function(e){return e instanceof f?e.visitValidationSimple(this):e.visitChildren(this)},c.ValidationOperatorsContext=Kt,c.prototype.validationOperators=function(){var r=new Kt(this,this._ctx,this.state);this.enterRule(r,46,c.RULE_validationOperators);var o=0;try{switch(this.state=759,this._errHandler.sync(this),this._input.LA(1)){case c.CHECK_DATAPOINT:if(r=new Xt(this,r),this.enterOuterAlt(r,1),this.state=698,this.match(c.CHECK_DATAPOINT),this.state=699,this.match(c.LPAREN),this.state=700,r.op=this.expr(0),this.state=701,this.match(c.COMMA),this.state=702,r.dpName=this.match(c.IDENTIFIER),this.state=712,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMPONENTS)for(this.state=703,this.match(c.COMPONENTS),this.state=704,this.componentID(),this.state=709,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;)this.state=705,this.match(c.COMMA),this.state=706,this.componentID(),this.state=711,this._errHandler.sync(this),o=this._input.LA(1);this.state=715,this._errHandler.sync(this),(o=this._input.LA(1))!==c.ALL&&o!==c.INVALID&&o!==c.ALL_MEASURES||(this.state=714,this.validationOutput()),this.state=717,this.match(c.RPAREN);break;case c.CHECK_HIERARCHY:r=new Jt(this,r),this.enterOuterAlt(r,2),this.state=719,this.match(c.CHECK_HIERARCHY),this.state=720,this.match(c.LPAREN),this.state=721,r.op=this.expr(0),this.state=722,this.match(c.COMMA),this.state=723,r.hrName=this.match(c.IDENTIFIER),this.state=725,this._errHandler.sync(this),(o=this._input.LA(1))===c.CONDITION&&(this.state=724,this.conditionClause()),this.state=729,this._errHandler.sync(this),(o=this._input.LA(1))===c.RULE&&(this.state=727,this.match(c.RULE),this.state=728,this.componentID()),this.state=732,this._errHandler.sync(this),0==(-32&(o=this._input.LA(1))-214)&&0!=(1<<o-214&(1<<c.NON_NULL-214|1<<c.NON_ZERO-214|1<<c.PARTIAL_NULL-214|1<<c.PARTIAL_ZERO-214|1<<c.ALWAYS_NULL-214|1<<c.ALWAYS_ZERO-214))&&(this.state=731,this.validationMode()),this.state=735,this._errHandler.sync(this),(o=this._input.LA(1))!==c.DATASET&&o!==c.DATASET_PRIORITY||(this.state=734,this.inputMode()),this.state=738,this._errHandler.sync(this),(o=this._input.LA(1))!==c.ALL&&o!==c.INVALID&&o!==c.ALL_MEASURES||(this.state=737,this.validationOutput()),this.state=740,this.match(c.RPAREN);break;case c.CHECK:r=new $t(this,r),this.enterOuterAlt(r,3),this.state=742,this.match(c.CHECK),this.state=743,this.match(c.LPAREN),this.state=744,r.op=this.expr(0),this.state=746,this._errHandler.sync(this),(o=this._input.LA(1))===c.ERRORCODE&&(this.state=745,r.codeErr=this.erCode()),this.state=749,this._errHandler.sync(this),(o=this._input.LA(1))===c.ERRORLEVEL&&(this.state=748,r.levelCode=this.erLevel()),this.state=752,this._errHandler.sync(this),(o=this._input.LA(1))===c.IMBALANCE&&(this.state=751,this.imbalanceExpr()),this.state=755,this._errHandler.sync(this),(o=this._input.LA(1))!==c.ALL&&o!==c.INVALID||(this.state=754,r.output=this._input.LT(1),(o=this._input.LA(1))!==c.ALL&&o!==c.INVALID?r.output=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())),this.state=757,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},zt.prototype=Object.create(l.ParserRuleContext.prototype),zt.prototype.constructor=zt,zt.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},te.prototype=Object.create(zt.prototype),te.prototype.constructor=te,c.NvlAtomContext=te,te.prototype.NVL=function(){return this.getToken(c.NVL,0)},te.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},te.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},te.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},te.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},te.prototype.enterRule=function(e){e instanceof R&&e.enterNvlAtom(this)},te.prototype.exitRule=function(e){e instanceof R&&e.exitNvlAtom(this)},te.prototype.accept=function(e){return e instanceof f?e.visitNvlAtom(this):e.visitChildren(this)},c.ConditionalOperatorsContext=zt,c.prototype.conditionalOperators=function(){var r=new zt(this,this._ctx,this.state);this.enterRule(r,48,c.RULE_conditionalOperators);try{r=new te(this,r),this.enterOuterAlt(r,1),this.state=761,this.match(c.NVL),this.state=762,this.match(c.LPAREN),this.state=763,r.left=this.expr(0),this.state=764,this.match(c.COMMA),this.state=765,r.right=this.expr(0),this.state=766,this.match(c.RPAREN)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ee.prototype=Object.create(l.ParserRuleContext.prototype),ee.prototype.constructor=ee,ee.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},ie.prototype=Object.create(ee.prototype),ie.prototype.constructor=ie,c.AggrDatasetContext=ie,ie.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},ie.prototype.expr=function(){return this.getTypedRuleContext(g,0)},ie.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},ie.prototype.SUM=function(){return this.getToken(c.SUM,0)},ie.prototype.AVG=function(){return this.getToken(c.AVG,0)},ie.prototype.COUNT=function(){return this.getToken(c.COUNT,0)},ie.prototype.MEDIAN=function(){return this.getToken(c.MEDIAN,0)},ie.prototype.MIN=function(){return this.getToken(c.MIN,0)},ie.prototype.MAX=function(){return this.getToken(c.MAX,0)},ie.prototype.STDDEV_POP=function(){return this.getToken(c.STDDEV_POP,0)},ie.prototype.STDDEV_SAMP=function(){return this.getToken(c.STDDEV_SAMP,0)},ie.prototype.VAR_POP=function(){return this.getToken(c.VAR_POP,0)},ie.prototype.VAR_SAMP=function(){return this.getToken(c.VAR_SAMP,0)},ie.prototype.groupingClause=function(){return this.getTypedRuleContext(_e,0)},ie.prototype.havingClause=function(){return this.getTypedRuleContext(me,0)},ie.prototype.enterRule=function(e){e instanceof R&&e.enterAggrDataset(this)},ie.prototype.exitRule=function(e){e instanceof R&&e.exitAggrDataset(this)},ie.prototype.accept=function(e){return e instanceof f?e.visitAggrDataset(this):e.visitChildren(this)},c.AggrOperatorsGroupingContext=ee,c.prototype.aggrOperatorsGrouping=function(){var r=new ee(this,this._ctx,this.state);this.enterRule(r,50,c.RULE_aggrOperatorsGrouping);var o=0;try{r=new ie(this,r),this.enterOuterAlt(r,1),this.state=768,r.op=this._input.LT(1),0==(-32&(o=this._input.LA(1))-68)&&0!=(1<<o-68&(1<<c.MIN-68|1<<c.MAX-68|1<<c.SUM-68|1<<c.AVG-68|1<<c.MEDIAN-68|1<<c.COUNT-68))||0==(-32&o-129)&&0!=(1<<o-129&(1<<c.STDDEV_POP-129|1<<c.STDDEV_SAMP-129|1<<c.VAR_POP-129|1<<c.VAR_SAMP-129))?(this._errHandler.reportMatch(this),this.consume()):r.op=this._errHandler.recoverInline(this),this.state=769,this.match(c.LPAREN),this.state=770,this.expr(0),this.state=775,this._errHandler.sync(this),(o=this._input.LA(1))===c.GROUP&&(this.state=771,this.groupingClause(),this.state=773,this._errHandler.sync(this),(o=this._input.LA(1))===c.HAVING&&(this.state=772,this.havingClause())),this.state=777,this.match(c.RPAREN)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ne.prototype=Object.create(l.ParserRuleContext.prototype),ne.prototype.constructor=ne,ne.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},re.prototype=Object.create(ne.prototype),re.prototype.constructor=re,c.LagOrLeadAnContext=re,re.prototype.LPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.LPAREN):this.getToken(c.LPAREN,e)},re.prototype.expr=function(){return this.getTypedRuleContext(g,0)},re.prototype.OVER=function(){return this.getToken(c.OVER,0)},re.prototype.RPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RPAREN):this.getToken(c.RPAREN,e)},re.prototype.LAG=function(){return this.getToken(c.LAG,0)},re.prototype.LEAD=function(){return this.getToken(c.LEAD,0)},re.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},re.prototype.orderByClause=function(){return this.getTypedRuleContext(xe,0)},re.prototype.signedInteger=function(){return this.getTypedRuleContext(Ne,0)},re.prototype.partitionByClause=function(){return this.getTypedRuleContext(Ce,0)},re.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},re.prototype.enterRule=function(e){e instanceof R&&e.enterLagOrLeadAn(this)},re.prototype.exitRule=function(e){e instanceof R&&e.exitLagOrLeadAn(this)},re.prototype.accept=function(e){return e instanceof f?e.visitLagOrLeadAn(this):e.visitChildren(this)},oe.prototype=Object.create(ne.prototype),oe.prototype.constructor=oe,c.RatioToReportAnContext=oe,oe.prototype.LPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.LPAREN):this.getToken(c.LPAREN,e)},oe.prototype.expr=function(){return this.getTypedRuleContext(g,0)},oe.prototype.OVER=function(){return this.getToken(c.OVER,0)},oe.prototype.RPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RPAREN):this.getToken(c.RPAREN,e)},oe.prototype.RATIO_TO_REPORT=function(){return this.getToken(c.RATIO_TO_REPORT,0)},oe.prototype.partitionByClause=function(){return this.getTypedRuleContext(Ce,0)},oe.prototype.enterRule=function(e){e instanceof R&&e.enterRatioToReportAn(this)},oe.prototype.exitRule=function(e){e instanceof R&&e.exitRatioToReportAn(this)},oe.prototype.accept=function(e){return e instanceof f?e.visitRatioToReportAn(this):e.visitChildren(this)},se.prototype=Object.create(ne.prototype),se.prototype.constructor=se,c.AnSimpleFunctionContext=se,se.prototype.LPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.LPAREN):this.getToken(c.LPAREN,e)},se.prototype.expr=function(){return this.getTypedRuleContext(g,0)},se.prototype.OVER=function(){return this.getToken(c.OVER,0)},se.prototype.RPAREN=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.RPAREN):this.getToken(c.RPAREN,e)},se.prototype.SUM=function(){return this.getToken(c.SUM,0)},se.prototype.AVG=function(){return this.getToken(c.AVG,0)},se.prototype.COUNT=function(){return this.getToken(c.COUNT,0)},se.prototype.MEDIAN=function(){return this.getToken(c.MEDIAN,0)},se.prototype.MIN=function(){return this.getToken(c.MIN,0)},se.prototype.MAX=function(){return this.getToken(c.MAX,0)},se.prototype.STDDEV_POP=function(){return this.getToken(c.STDDEV_POP,0)},se.prototype.STDDEV_SAMP=function(){return this.getToken(c.STDDEV_SAMP,0)},se.prototype.VAR_POP=function(){return this.getToken(c.VAR_POP,0)},se.prototype.VAR_SAMP=function(){return this.getToken(c.VAR_SAMP,0)},se.prototype.FIRST_VALUE=function(){return this.getToken(c.FIRST_VALUE,0)},se.prototype.LAST_VALUE=function(){return this.getToken(c.LAST_VALUE,0)},se.prototype.partitionByClause=function(){return this.getTypedRuleContext(Ce,0)},se.prototype.orderByClause=function(){return this.getTypedRuleContext(xe,0)},se.prototype.windowingClause=function(){return this.getTypedRuleContext(Oe,0)},se.prototype.enterRule=function(e){e instanceof R&&e.enterAnSimpleFunction(this)},se.prototype.exitRule=function(e){e instanceof R&&e.exitAnSimpleFunction(this)},se.prototype.accept=function(e){return e instanceof f?e.visitAnSimpleFunction(this):e.visitChildren(this)},c.AnFunctionContext=ne,c.prototype.anFunction=function(){var r=new ne(this,this._ctx,this.state);this.enterRule(r,52,c.RULE_anFunction);var o=0;try{switch(this.state=825,this._errHandler.sync(this),this._input.LA(1)){case c.MIN:case c.MAX:case c.SUM:case c.AVG:case c.MEDIAN:case c.COUNT:case c.STDDEV_POP:case c.STDDEV_SAMP:case c.VAR_POP:case c.VAR_SAMP:case c.FIRST_VALUE:case c.LAST_VALUE:r=new se(this,r),this.enterOuterAlt(r,1),this.state=779,r.op=this._input.LT(1),0==(-32&(o=this._input.LA(1))-68)&&0!=(1<<o-68&(1<<c.MIN-68|1<<c.MAX-68|1<<c.SUM-68|1<<c.AVG-68|1<<c.MEDIAN-68|1<<c.COUNT-68))||0==(-32&o-129)&&0!=(1<<o-129&(1<<c.STDDEV_POP-129|1<<c.STDDEV_SAMP-129|1<<c.VAR_POP-129|1<<c.VAR_SAMP-129|1<<c.FIRST_VALUE-129|1<<c.LAST_VALUE-129))?(this._errHandler.reportMatch(this),this.consume()):r.op=this._errHandler.recoverInline(this),this.state=780,this.match(c.LPAREN),this.state=781,this.expr(0),this.state=782,this.match(c.OVER),this.state=783,this.match(c.LPAREN),this.state=785,this._errHandler.sync(this),(o=this._input.LA(1))===c.PARTITION&&(this.state=784,r.partition=this.partitionByClause()),this.state=788,this._errHandler.sync(this),(o=this._input.LA(1))===c.ORDER&&(this.state=787,r.orderBy=this.orderByClause()),this.state=791,this._errHandler.sync(this),(o=this._input.LA(1))!==c.DATA&&o!==c.RANGE||(this.state=790,r.windowing=this.windowingClause()),this.state=793,this.match(c.RPAREN),this.state=794,this.match(c.RPAREN);break;case c.LAG:case c.LEAD:r=new re(this,r),this.enterOuterAlt(r,2),this.state=796,r.op=this._input.LT(1),(o=this._input.LA(1))!==c.LAG&&o!==c.LEAD?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=797,this.match(c.LPAREN),this.state=798,this.expr(0),this.state=804,this._errHandler.sync(this),(o=this._input.LA(1))===c.COMMA&&(this.state=799,this.match(c.COMMA),this.state=800,r.offet=this.signedInteger(),this.state=802,this._errHandler.sync(this),((o=this._input.LA(1))===c.NULL_CONSTANT||0==(-32&o-230)&&0!=(1<<o-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.BOOLEAN_CONSTANT-230|1<<c.STRING_CONSTANT-230)))&&(this.state=801,r.defaultValue=this.constant())),this.state=806,this.match(c.OVER),this.state=807,this.match(c.LPAREN),this.state=809,this._errHandler.sync(this),(o=this._input.LA(1))===c.PARTITION&&(this.state=808,r.partition=this.partitionByClause()),this.state=811,r.orderBy=this.orderByClause(),this.state=813,this.match(c.RPAREN),this.state=814,this.match(c.RPAREN);break;case c.RATIO_TO_REPORT:r=new oe(this,r),this.enterOuterAlt(r,3),this.state=816,r.op=this.match(c.RATIO_TO_REPORT),this.state=817,this.match(c.LPAREN),this.state=818,this.expr(0),this.state=819,this.match(c.OVER),this.state=820,this.match(c.LPAREN),this.state=821,r.partition=this.partitionByClause(),this.state=822,this.match(c.RPAREN),this.state=823,this.match(c.RPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},pe.prototype=Object.create(l.ParserRuleContext.prototype),pe.prototype.constructor=pe,pe.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},he.prototype=Object.create(pe.prototype),he.prototype.constructor=he,c.LevenshteinAtomContext=he,he.prototype.LEVENSHTEIN=function(){return this.getToken(c.LEVENSHTEIN,0)},he.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},he.prototype.COMMA=function(){return this.getToken(c.COMMA,0)},he.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},he.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},he.prototype.enterRule=function(e){e instanceof R&&e.enterLevenshteinAtom(this)},he.prototype.exitRule=function(e){e instanceof R&&e.exitLevenshteinAtom(this)},he.prototype.accept=function(e){return e instanceof f?e.visitLevenshteinAtom(this):e.visitChildren(this)},c.DistanceOperatorsContext=pe,c.prototype.distanceOperators=function(){var r=new pe(this,this._ctx,this.state);this.enterRule(r,54,c.RULE_distanceOperators);try{r=new he(this,r),this.enterOuterAlt(r,1),this.state=827,this.match(c.LEVENSHTEIN),this.state=828,this.match(c.LPAREN),this.state=829,r.left=this.expr(0),this.state=830,this.match(c.COMMA),this.state=831,r.right=this.expr(0),this.state=832,this.match(c.RPAREN)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ue.prototype=Object.create(l.ParserRuleContext.prototype),ue.prototype.constructor=ue,ue.prototype.TO=function(){return this.getToken(c.TO,0)},ue.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},ue.prototype.enterRule=function(e){e instanceof R&&e.enterRenameClauseItem(this)},ue.prototype.exitRule=function(e){e instanceof R&&e.exitRenameClauseItem(this)},ue.prototype.accept=function(e){return e instanceof f?e.visitRenameClauseItem(this):e.visitChildren(this)},c.RenameClauseItemContext=ue,c.prototype.renameClauseItem=function(){var r=new ue(this,this._ctx,this.state);this.enterRule(r,56,c.RULE_renameClauseItem);try{this.enterOuterAlt(r,1),this.state=834,r.fromName=this.componentID(),this.state=835,this.match(c.TO),this.state=836,r.toName=this.componentID()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ae.prototype=Object.create(l.ParserRuleContext.prototype),ae.prototype.constructor=ae,ae.prototype.aggrFunctionClause=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ce):this.getTypedRuleContext(ce,e)},ae.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ae.prototype.enterRule=function(e){e instanceof R&&e.enterAggregateClause(this)},ae.prototype.exitRule=function(e){e instanceof R&&e.exitAggregateClause(this)},ae.prototype.accept=function(e){return e instanceof f?e.visitAggregateClause(this):e.visitChildren(this)},c.AggregateClauseContext=ae,c.prototype.aggregateClause=function(){var r=new ae(this,this._ctx,this.state);this.enterRule(r,58,c.RULE_aggregateClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=838,this.aggrFunctionClause(),this.state=843,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=839,this.match(c.COMMA),this.state=840,this.aggrFunctionClause(),this.state=845,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ce.prototype=Object.create(l.ParserRuleContext.prototype),ce.prototype.constructor=ce,ce.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},ce.prototype.ASSIGN=function(){return this.getToken(c.ASSIGN,0)},ce.prototype.aggrOperatorsGrouping=function(){return this.getTypedRuleContext(ee,0)},ce.prototype.componentRole=function(){return this.getTypedRuleContext(_r,0)},ce.prototype.enterRule=function(e){e instanceof R&&e.enterAggrFunctionClause(this)},ce.prototype.exitRule=function(e){e instanceof R&&e.exitAggrFunctionClause(this)},ce.prototype.accept=function(e){return e instanceof f?e.visitAggrFunctionClause(this):e.visitChildren(this)},c.AggrFunctionClauseContext=ce,c.prototype.aggrFunctionClause=function(){var r=new ce(this,this._ctx,this.state);this.enterRule(r,60,c.RULE_aggrFunctionClause);var t=0;try{this.enterOuterAlt(r,1),this.state=847,this._errHandler.sync(this),(0==(-32&(t=this._input.LA(1))-91)&&0!=(1<<t-91&(1<<c.DIMENSION-91|1<<c.MEASURE-91|1<<c.ATTRIBUTE-91|1<<c.VIRAL-91))||t===c.COMPONENT)&&(this.state=846,this.componentRole()),this.state=849,this.componentID(),this.state=850,this.match(c.ASSIGN),this.state=851,this.aggrOperatorsGrouping()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},le.prototype=Object.create(l.ParserRuleContext.prototype),le.prototype.constructor=le,le.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},le.prototype.ASSIGN=function(){return this.getToken(c.ASSIGN,0)},le.prototype.expr=function(){return this.getTypedRuleContext(g,0)},le.prototype.componentRole=function(){return this.getTypedRuleContext(_r,0)},le.prototype.enterRule=function(e){e instanceof R&&e.enterCalcClauseItem(this)},le.prototype.exitRule=function(e){e instanceof R&&e.exitCalcClauseItem(this)},le.prototype.accept=function(e){return e instanceof f?e.visitCalcClauseItem(this):e.visitChildren(this)},c.CalcClauseItemContext=le,c.prototype.calcClauseItem=function(){var r=new le(this,this._ctx,this.state);this.enterRule(r,62,c.RULE_calcClauseItem);var t=0;try{this.enterOuterAlt(r,1),this.state=854,this._errHandler.sync(this),(0==(-32&(t=this._input.LA(1))-91)&&0!=(1<<t-91&(1<<c.DIMENSION-91|1<<c.MEASURE-91|1<<c.ATTRIBUTE-91|1<<c.VIRAL-91))||t===c.COMPONENT)&&(this.state=853,this.componentRole()),this.state=856,this.componentID(),this.state=857,this.match(c.ASSIGN),this.state=858,this.expr(0)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ye.prototype=Object.create(l.ParserRuleContext.prototype),ye.prototype.constructor=ye,ye.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},ye.prototype.EQ=function(){return this.getToken(c.EQ,0)},ye.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},ye.prototype.enterRule=function(e){e instanceof R&&e.enterSubspaceClauseItem(this)},ye.prototype.exitRule=function(e){e instanceof R&&e.exitSubspaceClauseItem(this)},ye.prototype.accept=function(e){return e instanceof f?e.visitSubspaceClauseItem(this):e.visitChildren(this)},c.SubspaceClauseItemContext=ye,c.prototype.subspaceClauseItem=function(){var r=new ye(this,this._ctx,this.state);this.enterRule(r,64,c.RULE_subspaceClauseItem);try{this.enterOuterAlt(r,1),this.state=860,this.componentID(),this.state=861,this.match(c.EQ),this.state=862,this.constant()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Re.prototype=Object.create(l.ParserRuleContext.prototype),Re.prototype.constructor=Re,Re.prototype.joinClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ee):this.getTypedRuleContext(Ee,e)},Re.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Re.prototype.enterRule=function(e){e instanceof R&&e.enterJoinClauseWithoutUsing(this)},Re.prototype.exitRule=function(e){e instanceof R&&e.exitJoinClauseWithoutUsing(this)},Re.prototype.accept=function(e){return e instanceof f?e.visitJoinClauseWithoutUsing(this):e.visitChildren(this)},c.JoinClauseWithoutUsingContext=Re,c.prototype.joinClauseWithoutUsing=function(){var r=new Re(this,this._ctx,this.state);this.enterRule(r,66,c.RULE_joinClauseWithoutUsing);var t=0;try{for(this.enterOuterAlt(r,1),this.state=864,this.joinClauseItem(),this.state=869,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=865,this.match(c.COMMA),this.state=866,this.joinClauseItem(),this.state=871,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},fe.prototype=Object.create(l.ParserRuleContext.prototype),fe.prototype.constructor=fe,fe.prototype.joinClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ee):this.getTypedRuleContext(Ee,e)},fe.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},fe.prototype.USING=function(){return this.getToken(c.USING,0)},fe.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},fe.prototype.enterRule=function(e){e instanceof R&&e.enterJoinClause(this)},fe.prototype.exitRule=function(e){e instanceof R&&e.exitJoinClause(this)},fe.prototype.accept=function(e){return e instanceof f?e.visitJoinClause(this):e.visitChildren(this)},c.JoinClauseContext=fe,c.prototype.joinClause=function(){var r=new fe(this,this._ctx,this.state);this.enterRule(r,68,c.RULE_joinClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=872,this.joinClauseItem(),this.state=877,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=873,this.match(c.COMMA),this.state=874,this.joinClauseItem(),this.state=879,this._errHandler.sync(this),t=this._input.LA(1);if(this.state=889,this._errHandler.sync(this),(t=this._input.LA(1))===c.USING)for(this.state=880,this.match(c.USING),this.state=881,this.componentID(),this.state=886,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=882,this.match(c.COMMA),this.state=883,this.componentID(),this.state=888,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ee.prototype=Object.create(l.ParserRuleContext.prototype),Ee.prototype.constructor=Ee,Ee.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Ee.prototype.AS=function(){return this.getToken(c.AS,0)},Ee.prototype.alias=function(){return this.getTypedRuleContext(gr,0)},Ee.prototype.enterRule=function(e){e instanceof R&&e.enterJoinClauseItem(this)},Ee.prototype.exitRule=function(e){e instanceof R&&e.exitJoinClauseItem(this)},Ee.prototype.accept=function(e){return e instanceof f?e.visitJoinClauseItem(this):e.visitChildren(this)},c.JoinClauseItemContext=Ee,c.prototype.joinClauseItem=function(){var r=new Ee(this,this._ctx,this.state);this.enterRule(r,70,c.RULE_joinClauseItem);try{this.enterOuterAlt(r,1),this.state=891,this.expr(0),this.state=894,this._errHandler.sync(this),this._input.LA(1)===c.AS&&(this.state=892,this.match(c.AS),this.state=893,this.alias())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ae.prototype=Object.create(l.ParserRuleContext.prototype),Ae.prototype.constructor=Ae,Ae.prototype.filterClause=function(){return this.getTypedRuleContext(nt,0)},Ae.prototype.calcClause=function(){return this.getTypedRuleContext(it,0)},Ae.prototype.joinApplyClause=function(){return this.getTypedRuleContext(Te,0)},Ae.prototype.aggrClause=function(){return this.getTypedRuleContext(ot,0)},Ae.prototype.keepOrDropClause=function(){return this.getTypedRuleContext(pt,0)},Ae.prototype.renameClause=function(){return this.getTypedRuleContext(rt,0)},Ae.prototype.enterRule=function(e){e instanceof R&&e.enterJoinBody(this)},Ae.prototype.exitRule=function(e){e instanceof R&&e.exitJoinBody(this)},Ae.prototype.accept=function(e){return e instanceof f?e.visitJoinBody(this):e.visitChildren(this)},c.JoinBodyContext=Ae,c.prototype.joinBody=function(){var r=new Ae(this,this._ctx,this.state);this.enterRule(r,72,c.RULE_joinBody);var t=0;try{switch(this.enterOuterAlt(r,1),this.state=897,this._errHandler.sync(this),(t=this._input.LA(1))===c.FILTER&&(this.state=896,this.filterClause()),this.state=902,this._errHandler.sync(this),this._input.LA(1)){case c.CALC:this.state=899,this.calcClause();break;case c.APPLY:this.state=900,this.joinApplyClause();break;case c.AGGREGATE:this.state=901,this.aggrClause();break;case c.RPAREN:case c.DROP:case c.KEEP:case c.RENAME:}this.state=905,this._errHandler.sync(this),(t=this._input.LA(1))!==c.DROP&&t!==c.KEEP||(this.state=904,this.keepOrDropClause()),this.state=908,this._errHandler.sync(this),(t=this._input.LA(1))===c.RENAME&&(this.state=907,this.renameClause())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Te.prototype=Object.create(l.ParserRuleContext.prototype),Te.prototype.constructor=Te,Te.prototype.APPLY=function(){return this.getToken(c.APPLY,0)},Te.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Te.prototype.enterRule=function(e){e instanceof R&&e.enterJoinApplyClause(this)},Te.prototype.exitRule=function(e){e instanceof R&&e.exitJoinApplyClause(this)},Te.prototype.accept=function(e){return e instanceof f?e.visitJoinApplyClause(this):e.visitChildren(this)},c.JoinApplyClauseContext=Te,c.prototype.joinApplyClause=function(){var r=new Te(this,this._ctx,this.state);this.enterRule(r,74,c.RULE_joinApplyClause);try{this.enterOuterAlt(r,1),this.state=910,this.match(c.APPLY),this.state=911,this.expr(0)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ce.prototype=Object.create(l.ParserRuleContext.prototype),Ce.prototype.constructor=Ce,Ce.prototype.PARTITION=function(){return this.getToken(c.PARTITION,0)},Ce.prototype.BY=function(){return this.getToken(c.BY,0)},Ce.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},Ce.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Ce.prototype.enterRule=function(e){e instanceof R&&e.enterPartitionByClause(this)},Ce.prototype.exitRule=function(e){e instanceof R&&e.exitPartitionByClause(this)},Ce.prototype.accept=function(e){return e instanceof f?e.visitPartitionByClause(this):e.visitChildren(this)},c.PartitionByClauseContext=Ce,c.prototype.partitionByClause=function(){var r=new Ce(this,this._ctx,this.state);this.enterRule(r,76,c.RULE_partitionByClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=913,this.match(c.PARTITION),this.state=914,this.match(c.BY),this.state=915,this.componentID(),this.state=920,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=916,this.match(c.COMMA),this.state=917,this.componentID(),this.state=922,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},xe.prototype=Object.create(l.ParserRuleContext.prototype),xe.prototype.constructor=xe,xe.prototype.ORDER=function(){return this.getToken(c.ORDER,0)},xe.prototype.BY=function(){return this.getToken(c.BY,0)},xe.prototype.orderByItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(de):this.getTypedRuleContext(de,e)},xe.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},xe.prototype.enterRule=function(e){e instanceof R&&e.enterOrderByClause(this)},xe.prototype.exitRule=function(e){e instanceof R&&e.exitOrderByClause(this)},xe.prototype.accept=function(e){return e instanceof f?e.visitOrderByClause(this):e.visitChildren(this)},c.OrderByClauseContext=xe,c.prototype.orderByClause=function(){var r=new xe(this,this._ctx,this.state);this.enterRule(r,78,c.RULE_orderByClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=923,this.match(c.ORDER),this.state=924,this.match(c.BY),this.state=925,this.orderByItem(),this.state=930,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=926,this.match(c.COMMA),this.state=927,this.orderByItem(),this.state=932,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},de.prototype=Object.create(l.ParserRuleContext.prototype),de.prototype.constructor=de,de.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},de.prototype.ASC=function(){return this.getToken(c.ASC,0)},de.prototype.DESC=function(){return this.getToken(c.DESC,0)},de.prototype.enterRule=function(e){e instanceof R&&e.enterOrderByItem(this)},de.prototype.exitRule=function(e){e instanceof R&&e.exitOrderByItem(this)},de.prototype.accept=function(e){return e instanceof f?e.visitOrderByItem(this):e.visitChildren(this)},c.OrderByItemContext=de,c.prototype.orderByItem=function(){var r=new de(this,this._ctx,this.state);this.enterRule(r,80,c.RULE_orderByItem);var t=0;try{this.enterOuterAlt(r,1),this.state=933,this.componentID(),this.state=935,this._errHandler.sync(this),(t=this._input.LA(1))!==c.ASC&&t!==c.DESC||(this.state=934,(t=this._input.LA(1))!==c.ASC&&t!==c.DESC?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Oe.prototype=Object.create(l.ParserRuleContext.prototype),Oe.prototype.constructor=Oe,Oe.prototype.BETWEEN=function(){return this.getToken(c.BETWEEN,0)},Oe.prototype.AND=function(){return this.getToken(c.AND,0)},Oe.prototype.limitClauseItem=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ie):this.getTypedRuleContext(Ie,e)},Oe.prototype.RANGE=function(){return this.getToken(c.RANGE,0)},Oe.prototype.DATA=function(){return this.getToken(c.DATA,0)},Oe.prototype.POINTS=function(){return this.getToken(c.POINTS,0)},Oe.prototype.enterRule=function(e){e instanceof R&&e.enterWindowingClause(this)},Oe.prototype.exitRule=function(e){e instanceof R&&e.exitWindowingClause(this)},Oe.prototype.accept=function(e){return e instanceof f?e.visitWindowingClause(this):e.visitChildren(this)},c.WindowingClauseContext=Oe,c.prototype.windowingClause=function(){var r=new Oe(this,this._ctx,this.state);this.enterRule(r,82,c.RULE_windowingClause);try{switch(this.enterOuterAlt(r,1),this.state=940,this._errHandler.sync(this),this._input.LA(1)){case c.DATA:this.state=937,this.match(c.DATA),this.state=938,this.match(c.POINTS);break;case c.RANGE:this.state=939,this.match(c.RANGE);break;default:throw new l.error.NoViableAltException(this);}this.state=942,this.match(c.BETWEEN),this.state=943,r.from_=this.limitClauseItem(),this.state=944,this.match(c.AND),this.state=945,r.to_=this.limitClauseItem()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ne.prototype=Object.create(l.ParserRuleContext.prototype),Ne.prototype.constructor=Ne,Ne.prototype.INTEGER_CONSTANT=function(){return this.getToken(c.INTEGER_CONSTANT,0)},Ne.prototype.enterRule=function(e){e instanceof R&&e.enterSignedInteger(this)},Ne.prototype.exitRule=function(e){e instanceof R&&e.exitSignedInteger(this)},Ne.prototype.accept=function(e){return e instanceof f?e.visitSignedInteger(this):e.visitChildren(this)},c.SignedIntegerContext=Ne,c.prototype.signedInteger=function(){var r=new Ne(this,this._ctx,this.state);this.enterRule(r,84,c.RULE_signedInteger);try{this.enterOuterAlt(r,1),this.state=947,this.match(c.INTEGER_CONSTANT)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ie.prototype=Object.create(l.ParserRuleContext.prototype),Ie.prototype.constructor=Ie,Ie.prototype.INTEGER_CONSTANT=function(){return this.getToken(c.INTEGER_CONSTANT,0)},Ie.prototype.PRECEDING=function(){return this.getToken(c.PRECEDING,0)},Ie.prototype.FOLLOWING=function(){return this.getToken(c.FOLLOWING,0)},Ie.prototype.CURRENT=function(){return this.getToken(c.CURRENT,0)},Ie.prototype.DATA=function(){return this.getToken(c.DATA,0)},Ie.prototype.POINT=function(){return this.getToken(c.POINT,0)},Ie.prototype.UNBOUNDED=function(){return this.getToken(c.UNBOUNDED,0)},Ie.prototype.enterRule=function(e){e instanceof R&&e.enterLimitClauseItem(this)},Ie.prototype.exitRule=function(e){e instanceof R&&e.exitLimitClauseItem(this)},Ie.prototype.accept=function(e){return e instanceof f?e.visitLimitClauseItem(this):e.visitChildren(this)},c.LimitClauseItemContext=Ie,c.prototype.limitClauseItem=function(){var r=new Ie(this,this._ctx,this.state);this.enterRule(r,86,c.RULE_limitClauseItem);try{switch(this.state=960,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,93,this._ctx)){case 1:this.enterOuterAlt(r,1),this.state=949,this.match(c.INTEGER_CONSTANT),this.state=950,this.match(c.PRECEDING);break;case 2:this.enterOuterAlt(r,2),this.state=951,this.match(c.INTEGER_CONSTANT),this.state=952,this.match(c.FOLLOWING);break;case 3:this.enterOuterAlt(r,3),this.state=953,this.match(c.CURRENT),this.state=954,this.match(c.DATA),this.state=955,this.match(c.POINT);break;case 4:this.enterOuterAlt(r,4),this.state=956,this.match(c.UNBOUNDED),this.state=957,this.match(c.PRECEDING);break;case 5:this.enterOuterAlt(r,5),this.state=958,this.match(c.UNBOUNDED),this.state=959,this.match(c.FOLLOWING);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},_e.prototype=Object.create(l.ParserRuleContext.prototype),_e.prototype.constructor=_e,_e.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Le.prototype=Object.create(_e.prototype),Le.prototype.constructor=Le,c.GroupAllContext=Le,Le.prototype.GROUP=function(){return this.getToken(c.GROUP,0)},Le.prototype.ALL=function(){return this.getToken(c.ALL,0)},Le.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Le.prototype.enterRule=function(e){e instanceof R&&e.enterGroupAll(this)},Le.prototype.exitRule=function(e){e instanceof R&&e.exitGroupAll(this)},Le.prototype.accept=function(e){return e instanceof f?e.visitGroupAll(this):e.visitChildren(this)},ve.prototype=Object.create(_e.prototype),ve.prototype.constructor=ve,c.GroupByOrExceptContext=ve,ve.prototype.GROUP=function(){return this.getToken(c.GROUP,0)},ve.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},ve.prototype.BY=function(){return this.getToken(c.BY,0)},ve.prototype.EXCEPT=function(){return this.getToken(c.EXCEPT,0)},ve.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ve.prototype.enterRule=function(e){e instanceof R&&e.enterGroupByOrExcept(this)},ve.prototype.exitRule=function(e){e instanceof R&&e.exitGroupByOrExcept(this)},ve.prototype.accept=function(e){return e instanceof f?e.visitGroupByOrExcept(this):e.visitChildren(this)},c.GroupingClauseContext=_e,c.prototype.groupingClause=function(){var r=new _e(this,this._ctx,this.state);this.enterRule(r,88,c.RULE_groupingClause);var o=0;try{switch(this.state=975,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,95,this._ctx)){case 1:for(r=new ve(this,r),this.enterOuterAlt(r,1),this.state=962,this.match(c.GROUP),this.state=963,r.op=this._input.LT(1),(o=this._input.LA(1))!==c.BY&&o!==c.EXCEPT?r.op=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=964,this.componentID(),this.state=969,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;)this.state=965,this.match(c.COMMA),this.state=966,this.componentID(),this.state=971,this._errHandler.sync(this),o=this._input.LA(1);break;case 2:r=new Le(this,r),this.enterOuterAlt(r,2),this.state=972,this.match(c.GROUP),this.state=973,this.match(c.ALL),this.state=974,this.expr(0);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},me.prototype=Object.create(l.ParserRuleContext.prototype),me.prototype.constructor=me,me.prototype.HAVING=function(){return this.getToken(c.HAVING,0)},me.prototype.expr=function(){return this.getTypedRuleContext(g,0)},me.prototype.enterRule=function(e){e instanceof R&&e.enterHavingClause(this)},me.prototype.exitRule=function(e){e instanceof R&&e.exitHavingClause(this)},me.prototype.accept=function(e){return e instanceof f?e.visitHavingClause(this):e.visitChildren(this)},c.HavingClauseContext=me,c.prototype.havingClause=function(){var r=new me(this,this._ctx,this.state);this.enterRule(r,90,c.RULE_havingClause);try{this.enterOuterAlt(r,1),this.state=977,this.match(c.HAVING),this.state=978,this.expr(0)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ge.prototype=Object.create(l.ParserRuleContext.prototype),ge.prototype.constructor=ge,ge.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},ge.prototype.inputParameterType=function(){return this.getTypedRuleContext(Me,0)},ge.prototype.DEFAULT=function(){return this.getToken(c.DEFAULT,0)},ge.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},ge.prototype.enterRule=function(e){e instanceof R&&e.enterParameterItem(this)},ge.prototype.exitRule=function(e){e instanceof R&&e.exitParameterItem(this)},ge.prototype.accept=function(e){return e instanceof f?e.visitParameterItem(this):e.visitChildren(this)},c.ParameterItemContext=ge,c.prototype.parameterItem=function(){var r=new ge(this,this._ctx,this.state);this.enterRule(r,92,c.RULE_parameterItem);try{this.enterOuterAlt(r,1),this.state=980,this.varID(),this.state=981,this.inputParameterType(),this.state=984,this._errHandler.sync(this),this._input.LA(1)===c.DEFAULT&&(this.state=982,this.match(c.DEFAULT),this.state=983,this.constant())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Pe.prototype=Object.create(l.ParserRuleContext.prototype),Pe.prototype.constructor=Pe,Pe.prototype.scalarType=function(){return this.getTypedRuleContext(Ue,0)},Pe.prototype.datasetType=function(){return this.getTypedRuleContext(ke,0)},Pe.prototype.componentType=function(){return this.getTypedRuleContext(He,0)},Pe.prototype.enterRule=function(e){e instanceof R&&e.enterOutputParameterType(this)},Pe.prototype.exitRule=function(e){e instanceof R&&e.exitOutputParameterType(this)},Pe.prototype.accept=function(e){return e instanceof f?e.visitOutputParameterType(this):e.visitChildren(this)},c.OutputParameterTypeContext=Pe,c.prototype.outputParameterType=function(){var r=new Pe(this,this._ctx,this.state);this.enterRule(r,94,c.RULE_outputParameterType);try{switch(this.state=989,this._errHandler.sync(this),this._input.LA(1)){case c.BOOLEAN:case c.DATE:case c.TIME_PERIOD:case c.NUMBER:case c.STRING:case c.TIME:case c.INTEGER:case c.DURATION:case c.SCALAR:case c.IDENTIFIER:this.enterOuterAlt(r,1),this.state=986,this.scalarType();break;case c.DATASET:this.enterOuterAlt(r,2),this.state=987,this.datasetType();break;case c.DIMENSION:case c.MEASURE:case c.ATTRIBUTE:case c.VIRAL:case c.COMPONENT:this.enterOuterAlt(r,3),this.state=988,this.componentType();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Se.prototype=Object.create(l.ParserRuleContext.prototype),Se.prototype.constructor=Se,Se.prototype.componentType=function(){return this.getTypedRuleContext(He,0)},Se.prototype.scalarType=function(){return this.getTypedRuleContext(Ue,0)},Se.prototype.enterRule=function(e){e instanceof R&&e.enterOutputParameterTypeComponent(this)},Se.prototype.exitRule=function(e){e instanceof R&&e.exitOutputParameterTypeComponent(this)},Se.prototype.accept=function(e){return e instanceof f?e.visitOutputParameterTypeComponent(this):e.visitChildren(this)},c.OutputParameterTypeComponentContext=Se,c.prototype.outputParameterTypeComponent=function(){var r=new Se(this,this._ctx,this.state);this.enterRule(r,96,c.RULE_outputParameterTypeComponent);try{switch(this.state=993,this._errHandler.sync(this),this._input.LA(1)){case c.DIMENSION:case c.MEASURE:case c.ATTRIBUTE:case c.VIRAL:case c.COMPONENT:this.enterOuterAlt(r,1),this.state=991,this.componentType();break;case c.BOOLEAN:case c.DATE:case c.TIME_PERIOD:case c.NUMBER:case c.STRING:case c.TIME:case c.INTEGER:case c.DURATION:case c.SCALAR:case c.IDENTIFIER:this.enterOuterAlt(r,2),this.state=992,this.scalarType();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Me.prototype=Object.create(l.ParserRuleContext.prototype),Me.prototype.constructor=Me,Me.prototype.scalarType=function(){return this.getTypedRuleContext(Ue,0)},Me.prototype.datasetType=function(){return this.getTypedRuleContext(ke,0)},Me.prototype.scalarSetType=function(){return this.getTypedRuleContext(Fe,0)},Me.prototype.rulesetType=function(){return this.getTypedRuleContext(De,0)},Me.prototype.componentType=function(){return this.getTypedRuleContext(He,0)},Me.prototype.enterRule=function(e){e instanceof R&&e.enterInputParameterType(this)},Me.prototype.exitRule=function(e){e instanceof R&&e.exitInputParameterType(this)},Me.prototype.accept=function(e){return e instanceof f?e.visitInputParameterType(this):e.visitChildren(this)},c.InputParameterTypeContext=Me,c.prototype.inputParameterType=function(){var r=new Me(this,this._ctx,this.state);this.enterRule(r,98,c.RULE_inputParameterType);try{switch(this.state=1e3,this._errHandler.sync(this),this._input.LA(1)){case c.BOOLEAN:case c.DATE:case c.TIME_PERIOD:case c.NUMBER:case c.STRING:case c.TIME:case c.INTEGER:case c.DURATION:case c.SCALAR:case c.IDENTIFIER:this.enterOuterAlt(r,1),this.state=995,this.scalarType();break;case c.DATASET:this.enterOuterAlt(r,2),this.state=996,this.datasetType();break;case c.SET:this.enterOuterAlt(r,3),this.state=997,this.scalarSetType();break;case c.DATAPOINT:case c.HIERARCHICAL:case c.RULESET:case c.DATAPOINT_ON_VD:case c.DATAPOINT_ON_VAR:case c.HIERARCHICAL_ON_VD:case c.HIERARCHICAL_ON_VAR:this.enterOuterAlt(r,4),this.state=998,this.rulesetType();break;case c.DIMENSION:case c.MEASURE:case c.ATTRIBUTE:case c.VIRAL:case c.COMPONENT:this.enterOuterAlt(r,5),this.state=999,this.componentType();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},De.prototype=Object.create(l.ParserRuleContext.prototype),De.prototype.constructor=De,De.prototype.RULESET=function(){return this.getToken(c.RULESET,0)},De.prototype.dpRuleset=function(){return this.getTypedRuleContext(we,0)},De.prototype.hrRuleset=function(){return this.getTypedRuleContext(Be,0)},De.prototype.enterRule=function(e){e instanceof R&&e.enterRulesetType(this)},De.prototype.exitRule=function(e){e instanceof R&&e.exitRulesetType(this)},De.prototype.accept=function(e){return e instanceof f?e.visitRulesetType(this):e.visitChildren(this)},c.RulesetTypeContext=De,c.prototype.rulesetType=function(){var r=new De(this,this._ctx,this.state);this.enterRule(r,100,c.RULE_rulesetType);try{switch(this.state=1005,this._errHandler.sync(this),this._input.LA(1)){case c.RULESET:this.enterOuterAlt(r,1),this.state=1002,this.match(c.RULESET);break;case c.DATAPOINT:case c.DATAPOINT_ON_VD:case c.DATAPOINT_ON_VAR:this.enterOuterAlt(r,2),this.state=1003,this.dpRuleset();break;case c.HIERARCHICAL:case c.HIERARCHICAL_ON_VD:case c.HIERARCHICAL_ON_VAR:this.enterOuterAlt(r,3),this.state=1004,this.hrRuleset();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ue.prototype=Object.create(l.ParserRuleContext.prototype),Ue.prototype.constructor=Ue,Ue.prototype.basicScalarType=function(){return this.getTypedRuleContext(vr,0)},Ue.prototype.valueDomainName=function(){return this.getTypedRuleContext(qe,0)},Ue.prototype.scalarTypeConstraint=function(){return this.getTypedRuleContext(or,0)},Ue.prototype.NULL_CONSTANT=function(){return this.getToken(c.NULL_CONSTANT,0)},Ue.prototype.NOT=function(){return this.getToken(c.NOT,0)},Ue.prototype.enterRule=function(e){e instanceof R&&e.enterScalarType(this)},Ue.prototype.exitRule=function(e){e instanceof R&&e.exitScalarType(this)},Ue.prototype.accept=function(e){return e instanceof f?e.visitScalarType(this):e.visitChildren(this)},c.ScalarTypeContext=Ue,c.prototype.scalarType=function(){var r=new Ue(this,this._ctx,this.state);this.enterRule(r,102,c.RULE_scalarType);var t=0;try{switch(this.enterOuterAlt(r,1),this.state=1009,this._errHandler.sync(this),this._input.LA(1)){case c.BOOLEAN:case c.DATE:case c.TIME_PERIOD:case c.NUMBER:case c.STRING:case c.TIME:case c.INTEGER:case c.DURATION:case c.SCALAR:this.state=1007,this.basicScalarType();break;case c.IDENTIFIER:this.state=1008,this.valueDomainName();break;default:throw new l.error.NoViableAltException(this);}this.state=1012,this._errHandler.sync(this),(t=this._input.LA(1))!==c.QLPAREN&&t!==c.GLPAREN||(this.state=1011,this.scalarTypeConstraint()),this.state=1018,this._errHandler.sync(this),(t=this._input.LA(1))!==c.NOT&&t!==c.NULL_CONSTANT||(this.state=1015,this._errHandler.sync(this),(t=this._input.LA(1))===c.NOT&&(this.state=1014,this.match(c.NOT)),this.state=1017,this.match(c.NULL_CONSTANT))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},He.prototype=Object.create(l.ParserRuleContext.prototype),He.prototype.constructor=He,He.prototype.componentRole=function(){return this.getTypedRuleContext(_r,0)},He.prototype.LT=function(){return this.getToken(c.LT,0)},He.prototype.scalarType=function(){return this.getTypedRuleContext(Ue,0)},He.prototype.MT=function(){return this.getToken(c.MT,0)},He.prototype.enterRule=function(e){e instanceof R&&e.enterComponentType(this)},He.prototype.exitRule=function(e){e instanceof R&&e.exitComponentType(this)},He.prototype.accept=function(e){return e instanceof f?e.visitComponentType(this):e.visitChildren(this)},c.ComponentTypeContext=He,c.prototype.componentType=function(){var r=new He(this,this._ctx,this.state);this.enterRule(r,104,c.RULE_componentType);try{this.enterOuterAlt(r,1),this.state=1020,this.componentRole(),this.state=1025,this._errHandler.sync(this),this._input.LA(1)===c.LT&&(this.state=1021,this.match(c.LT),this.state=1022,this.scalarType(),this.state=1023,this.match(c.MT))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ke.prototype=Object.create(l.ParserRuleContext.prototype),ke.prototype.constructor=ke,ke.prototype.DATASET=function(){return this.getToken(c.DATASET,0)},ke.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},ke.prototype.compConstraint=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ir):this.getTypedRuleContext(ir,e)},ke.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},ke.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},ke.prototype.enterRule=function(e){e instanceof R&&e.enterDatasetType(this)},ke.prototype.exitRule=function(e){e instanceof R&&e.exitDatasetType(this)},ke.prototype.accept=function(e){return e instanceof f?e.visitDatasetType(this):e.visitChildren(this)},c.DatasetTypeContext=ke,c.prototype.datasetType=function(){var r=new ke(this,this._ctx,this.state);this.enterRule(r,106,c.RULE_datasetType);var t=0;try{if(this.enterOuterAlt(r,1),this.state=1027,this.match(c.DATASET),this.state=1039,this._errHandler.sync(this),(t=this._input.LA(1))===c.GLPAREN){for(this.state=1028,this.match(c.GLPAREN),this.state=1029,this.compConstraint(),this.state=1034,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=1030,this.match(c.COMMA),this.state=1031,this.compConstraint(),this.state=1036,this._errHandler.sync(this),t=this._input.LA(1);this.state=1037,this.match(c.GRPAREN)}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Fe.prototype=Object.create(l.ParserRuleContext.prototype),Fe.prototype.constructor=Fe,Fe.prototype.SET=function(){return this.getToken(c.SET,0)},Fe.prototype.LT=function(){return this.getToken(c.LT,0)},Fe.prototype.scalarType=function(){return this.getTypedRuleContext(Ue,0)},Fe.prototype.MT=function(){return this.getToken(c.MT,0)},Fe.prototype.enterRule=function(e){e instanceof R&&e.enterScalarSetType(this)},Fe.prototype.exitRule=function(e){e instanceof R&&e.exitScalarSetType(this)},Fe.prototype.accept=function(e){return e instanceof f?e.visitScalarSetType(this):e.visitChildren(this)},c.ScalarSetTypeContext=Fe,c.prototype.scalarSetType=function(){var r=new Fe(this,this._ctx,this.state);this.enterRule(r,108,c.RULE_scalarSetType);try{this.enterOuterAlt(r,1),this.state=1041,this.match(c.SET),this.state=1046,this._errHandler.sync(this),this._input.LA(1)===c.LT&&(this.state=1042,this.match(c.LT),this.state=1043,this.scalarType(),this.state=1044,this.match(c.MT))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},we.prototype=Object.create(l.ParserRuleContext.prototype),we.prototype.constructor=we,we.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},Ve.prototype=Object.create(we.prototype),Ve.prototype.constructor=Ve,c.DataPointVdContext=Ve,Ve.prototype.DATAPOINT_ON_VD=function(){return this.getToken(c.DATAPOINT_ON_VD,0)},Ve.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},Ve.prototype.valueDomainName=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(qe):this.getTypedRuleContext(qe,e)},Ve.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},Ve.prototype.MUL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.MUL):this.getToken(c.MUL,e)},Ve.prototype.enterRule=function(e){e instanceof R&&e.enterDataPointVd(this)},Ve.prototype.exitRule=function(e){e instanceof R&&e.exitDataPointVd(this)},Ve.prototype.accept=function(e){return e instanceof f?e.visitDataPointVd(this):e.visitChildren(this)},be.prototype=Object.create(we.prototype),be.prototype.constructor=be,c.DataPointVarContext=be,be.prototype.DATAPOINT_ON_VAR=function(){return this.getToken(c.DATAPOINT_ON_VAR,0)},be.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},be.prototype.varID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Er):this.getTypedRuleContext(Er,e)},be.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},be.prototype.MUL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.MUL):this.getToken(c.MUL,e)},be.prototype.enterRule=function(e){e instanceof R&&e.enterDataPointVar(this)},be.prototype.exitRule=function(e){e instanceof R&&e.exitDataPointVar(this)},be.prototype.accept=function(e){return e instanceof f?e.visitDataPointVar(this):e.visitChildren(this)},Ge.prototype=Object.create(we.prototype),Ge.prototype.constructor=Ge,c.DataPointContext=Ge,Ge.prototype.DATAPOINT=function(){return this.getToken(c.DATAPOINT,0)},Ge.prototype.enterRule=function(e){e instanceof R&&e.enterDataPoint(this)},Ge.prototype.exitRule=function(e){e instanceof R&&e.exitDataPoint(this)},Ge.prototype.accept=function(e){return e instanceof f?e.visitDataPoint(this):e.visitChildren(this)},c.DpRulesetContext=we,c.prototype.dpRuleset=function(){var r=new we(this,this._ctx,this.state);this.enterRule(r,110,c.RULE_dpRuleset);var o=0;try{switch(this.state=1077,this._errHandler.sync(this),this._input.LA(1)){case c.DATAPOINT:r=new Ge(this,r),this.enterOuterAlt(r,1),this.state=1048,this.match(c.DATAPOINT);break;case c.DATAPOINT_ON_VD:if(r=new Ve(this,r),this.enterOuterAlt(r,2),this.state=1049,this.match(c.DATAPOINT_ON_VD),this.state=1061,this._errHandler.sync(this),(o=this._input.LA(1))===c.GLPAREN){for(this.state=1050,this.match(c.GLPAREN),this.state=1051,this.valueDomainName(),this.state=1056,this._errHandler.sync(this),o=this._input.LA(1);o===c.MUL;)this.state=1052,this.match(c.MUL),this.state=1053,this.valueDomainName(),this.state=1058,this._errHandler.sync(this),o=this._input.LA(1);this.state=1059,this.match(c.GRPAREN)}break;case c.DATAPOINT_ON_VAR:if(r=new be(this,r),this.enterOuterAlt(r,3),this.state=1063,this.match(c.DATAPOINT_ON_VAR),this.state=1075,this._errHandler.sync(this),(o=this._input.LA(1))===c.GLPAREN){for(this.state=1064,this.match(c.GLPAREN),this.state=1065,this.varID(),this.state=1070,this._errHandler.sync(this),o=this._input.LA(1);o===c.MUL;)this.state=1066,this.match(c.MUL),this.state=1067,this.varID(),this.state=1072,this._errHandler.sync(this),o=this._input.LA(1);this.state=1073,this.match(c.GRPAREN)}break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Be.prototype=Object.create(l.ParserRuleContext.prototype),Be.prototype.constructor=Be,Be.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},je.prototype=Object.create(Be.prototype),je.prototype.constructor=je,c.HrRulesetVdTypeContext=je,je.prototype.HIERARCHICAL_ON_VD=function(){return this.getToken(c.HIERARCHICAL_ON_VD,0)},je.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},je.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},je.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},je.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},je.prototype.valueDomainName=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(qe):this.getTypedRuleContext(qe,e)},je.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},je.prototype.MUL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.MUL):this.getToken(c.MUL,e)},je.prototype.enterRule=function(e){e instanceof R&&e.enterHrRulesetVdType(this)},je.prototype.exitRule=function(e){e instanceof R&&e.exitHrRulesetVdType(this)},je.prototype.accept=function(e){return e instanceof f?e.visitHrRulesetVdType(this):e.visitChildren(this)},Ye.prototype=Object.create(Be.prototype),Ye.prototype.constructor=Ye,c.HrRulesetVarTypeContext=Ye,Ye.prototype.HIERARCHICAL_ON_VAR=function(){return this.getToken(c.HIERARCHICAL_ON_VAR,0)},Ye.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},Ye.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},Ye.prototype.varID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Er):this.getTypedRuleContext(Er,e)},Ye.prototype.LPAREN=function(){return this.getToken(c.LPAREN,0)},Ye.prototype.RPAREN=function(){return this.getToken(c.RPAREN,0)},Ye.prototype.MUL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.MUL):this.getToken(c.MUL,e)},Ye.prototype.enterRule=function(e){e instanceof R&&e.enterHrRulesetVarType(this)},Ye.prototype.exitRule=function(e){e instanceof R&&e.exitHrRulesetVarType(this)},Ye.prototype.accept=function(e){return e instanceof f?e.visitHrRulesetVarType(this):e.visitChildren(this)},We.prototype=Object.create(Be.prototype),We.prototype.constructor=We,c.HrRulesetTypeContext=We,We.prototype.HIERARCHICAL=function(){return this.getToken(c.HIERARCHICAL,0)},We.prototype.enterRule=function(e){e instanceof R&&e.enterHrRulesetType(this)},We.prototype.exitRule=function(e){e instanceof R&&e.exitHrRulesetType(this)},We.prototype.accept=function(e){return e instanceof f?e.visitHrRulesetType(this):e.visitChildren(this)},c.HrRulesetContext=Be,c.prototype.hrRuleset=function(){var r=new Be(this,this._ctx,this.state);this.enterRule(r,112,c.RULE_hrRuleset);var o=0;try{switch(this.state=1119,this._errHandler.sync(this),this._input.LA(1)){case c.HIERARCHICAL:r=new We(this,r),this.enterOuterAlt(r,1),this.state=1079,this.match(c.HIERARCHICAL);break;case c.HIERARCHICAL_ON_VD:if(r=new je(this,r),this.enterOuterAlt(r,2),this.state=1080,this.match(c.HIERARCHICAL_ON_VD),this.state=1097,this._errHandler.sync(this),(o=this._input.LA(1))===c.GLPAREN){if(this.state=1081,this.match(c.GLPAREN),this.state=1082,r.vdName=this.match(c.IDENTIFIER),this.state=1094,this._errHandler.sync(this),(o=this._input.LA(1))===c.LPAREN){for(this.state=1083,this.match(c.LPAREN),this.state=1084,this.valueDomainName(),this.state=1089,this._errHandler.sync(this),o=this._input.LA(1);o===c.MUL;)this.state=1085,this.match(c.MUL),this.state=1086,this.valueDomainName(),this.state=1091,this._errHandler.sync(this),o=this._input.LA(1);this.state=1092,this.match(c.RPAREN)}this.state=1096,this.match(c.GRPAREN)}break;case c.HIERARCHICAL_ON_VAR:if(r=new Ye(this,r),this.enterOuterAlt(r,3),this.state=1099,this.match(c.HIERARCHICAL_ON_VAR),this.state=1117,this._errHandler.sync(this),(o=this._input.LA(1))===c.GLPAREN){if(this.state=1100,this.match(c.GLPAREN),this.state=1101,r.varName=this.varID(),this.state=1113,this._errHandler.sync(this),(o=this._input.LA(1))===c.LPAREN){for(this.state=1102,this.match(c.LPAREN),this.state=1103,this.varID(),this.state=1108,this._errHandler.sync(this),o=this._input.LA(1);o===c.MUL;)this.state=1104,this.match(c.MUL),this.state=1105,this.varID(),this.state=1110,this._errHandler.sync(this),o=this._input.LA(1);this.state=1111,this.match(c.RPAREN)}this.state=1115,this.match(c.GRPAREN)}break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},qe.prototype=Object.create(l.ParserRuleContext.prototype),qe.prototype.constructor=qe,qe.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},qe.prototype.enterRule=function(e){e instanceof R&&e.enterValueDomainName(this)},qe.prototype.exitRule=function(e){e instanceof R&&e.exitValueDomainName(this)},qe.prototype.accept=function(e){return e instanceof f?e.visitValueDomainName(this):e.visitChildren(this)},c.ValueDomainNameContext=qe,c.prototype.valueDomainName=function(){var r=new qe(this,this._ctx,this.state);this.enterRule(r,114,c.RULE_valueDomainName);try{this.enterOuterAlt(r,1),this.state=1121,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Je.prototype=Object.create(l.ParserRuleContext.prototype),Je.prototype.constructor=Je,Je.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Je.prototype.enterRule=function(e){e instanceof R&&e.enterRulesetID(this)},Je.prototype.exitRule=function(e){e instanceof R&&e.exitRulesetID(this)},Je.prototype.accept=function(e){return e instanceof f?e.visitRulesetID(this):e.visitChildren(this)},c.RulesetIDContext=Je,c.prototype.rulesetID=function(){var r=new Je(this,this._ctx,this.state);this.enterRule(r,116,c.RULE_rulesetID);try{this.enterOuterAlt(r,1),this.state=1123,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ke.prototype=Object.create(l.ParserRuleContext.prototype),Ke.prototype.constructor=Ke,Ke.prototype.signature=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Xe):this.getTypedRuleContext(Xe,e)},Ke.prototype.VALUE_DOMAIN=function(){return this.getToken(c.VALUE_DOMAIN,0)},Ke.prototype.VARIABLE=function(){return this.getToken(c.VARIABLE,0)},Ke.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Ke.prototype.enterRule=function(e){e instanceof R&&e.enterRulesetSignature(this)},Ke.prototype.exitRule=function(e){e instanceof R&&e.exitRulesetSignature(this)},Ke.prototype.accept=function(e){return e instanceof f?e.visitRulesetSignature(this):e.visitChildren(this)},c.RulesetSignatureContext=Ke,c.prototype.rulesetSignature=function(){var r=new Ke(this,this._ctx,this.state);this.enterRule(r,118,c.RULE_rulesetSignature);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1125,(t=this._input.LA(1))!==c.VALUE_DOMAIN&&t!==c.VARIABLE?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=1126,this.signature(),this.state=1131,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=1127,this.match(c.COMMA),this.state=1128,this.signature(),this.state=1133,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Xe.prototype=Object.create(l.ParserRuleContext.prototype),Xe.prototype.constructor=Xe,Xe.prototype.varID=function(){return this.getTypedRuleContext(Er,0)},Xe.prototype.AS=function(){return this.getToken(c.AS,0)},Xe.prototype.alias=function(){return this.getTypedRuleContext(gr,0)},Xe.prototype.enterRule=function(e){e instanceof R&&e.enterSignature(this)},Xe.prototype.exitRule=function(e){e instanceof R&&e.exitSignature(this)},Xe.prototype.accept=function(e){return e instanceof f?e.visitSignature(this):e.visitChildren(this)},c.SignatureContext=Xe,c.prototype.signature=function(){var r=new Xe(this,this._ctx,this.state);this.enterRule(r,120,c.RULE_signature);try{this.enterOuterAlt(r,1),this.state=1134,this.varID(),this.state=1137,this._errHandler.sync(this),this._input.LA(1)===c.AS&&(this.state=1135,this.match(c.AS),this.state=1136,this.alias())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Qe.prototype=Object.create(l.ParserRuleContext.prototype),Qe.prototype.constructor=Qe,Qe.prototype.ruleItemDatapoint=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ze):this.getTypedRuleContext(Ze,e)},Qe.prototype.EOL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.EOL):this.getToken(c.EOL,e)},Qe.prototype.enterRule=function(e){e instanceof R&&e.enterRuleClauseDatapoint(this)},Qe.prototype.exitRule=function(e){e instanceof R&&e.exitRuleClauseDatapoint(this)},Qe.prototype.accept=function(e){return e instanceof f?e.visitRuleClauseDatapoint(this):e.visitChildren(this)},c.RuleClauseDatapointContext=Qe,c.prototype.ruleClauseDatapoint=function(){var r=new Qe(this,this._ctx,this.state);this.enterRule(r,122,c.RULE_ruleClauseDatapoint);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1139,this.ruleItemDatapoint(),this.state=1144,this._errHandler.sync(this),t=this._input.LA(1);t===c.EOL;)this.state=1140,this.match(c.EOL),this.state=1141,this.ruleItemDatapoint(),this.state=1146,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ze.prototype=Object.create(l.ParserRuleContext.prototype),Ze.prototype.constructor=Ze,Ze.prototype.expr=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(g):this.getTypedRuleContext(g,e)},Ze.prototype.COLON=function(){return this.getToken(c.COLON,0)},Ze.prototype.WHEN=function(){return this.getToken(c.WHEN,0)},Ze.prototype.THEN=function(){return this.getToken(c.THEN,0)},Ze.prototype.erCode=function(){return this.getTypedRuleContext(Rr,0)},Ze.prototype.erLevel=function(){return this.getTypedRuleContext(hr,0)},Ze.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Ze.prototype.enterRule=function(e){e instanceof R&&e.enterRuleItemDatapoint(this)},Ze.prototype.exitRule=function(e){e instanceof R&&e.exitRuleItemDatapoint(this)},Ze.prototype.accept=function(e){return e instanceof f?e.visitRuleItemDatapoint(this):e.visitChildren(this)},c.RuleItemDatapointContext=Ze,c.prototype.ruleItemDatapoint=function(){var r=new Ze(this,this._ctx,this.state);this.enterRule(r,124,c.RULE_ruleItemDatapoint);try{this.enterOuterAlt(r,1),this.state=1149,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,124,this._ctx)&&(this.state=1147,r.ruleName=this.match(c.IDENTIFIER),this.state=1148,this.match(c.COLON)),this.state=1155,this._errHandler.sync(this),this._input.LA(1)===c.WHEN&&(this.state=1151,this.match(c.WHEN),this.state=1152,r.antecedentContiditon=this.expr(0),this.state=1153,this.match(c.THEN)),this.state=1157,r.consequentCondition=this.expr(0),this.state=1159,this._errHandler.sync(this),this._input.LA(1)===c.ERRORCODE&&(this.state=1158,this.erCode()),this.state=1162,this._errHandler.sync(this),this._input.LA(1)===c.ERRORLEVEL&&(this.state=1161,this.erLevel())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},$e.prototype=Object.create(l.ParserRuleContext.prototype),$e.prototype.constructor=$e,$e.prototype.ruleItemHierarchical=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ze):this.getTypedRuleContext(ze,e)},$e.prototype.EOL=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.EOL):this.getToken(c.EOL,e)},$e.prototype.enterRule=function(e){e instanceof R&&e.enterRuleClauseHierarchical(this)},$e.prototype.exitRule=function(e){e instanceof R&&e.exitRuleClauseHierarchical(this)},$e.prototype.accept=function(e){return e instanceof f?e.visitRuleClauseHierarchical(this):e.visitChildren(this)},c.RuleClauseHierarchicalContext=$e,c.prototype.ruleClauseHierarchical=function(){var r=new $e(this,this._ctx,this.state);this.enterRule(r,126,c.RULE_ruleClauseHierarchical);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1164,this.ruleItemHierarchical(),this.state=1169,this._errHandler.sync(this),t=this._input.LA(1);t===c.EOL;)this.state=1165,this.match(c.EOL),this.state=1166,this.ruleItemHierarchical(),this.state=1171,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ze.prototype=Object.create(l.ParserRuleContext.prototype),ze.prototype.constructor=ze,ze.prototype.codeItemRelation=function(){return this.getTypedRuleContext(er,0)},ze.prototype.COLON=function(){return this.getToken(c.COLON,0)},ze.prototype.erCode=function(){return this.getTypedRuleContext(Rr,0)},ze.prototype.erLevel=function(){return this.getTypedRuleContext(hr,0)},ze.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},ze.prototype.enterRule=function(e){e instanceof R&&e.enterRuleItemHierarchical(this)},ze.prototype.exitRule=function(e){e instanceof R&&e.exitRuleItemHierarchical(this)},ze.prototype.accept=function(e){return e instanceof f?e.visitRuleItemHierarchical(this):e.visitChildren(this)},c.RuleItemHierarchicalContext=ze,c.prototype.ruleItemHierarchical=function(){var r=new ze(this,this._ctx,this.state);this.enterRule(r,128,c.RULE_ruleItemHierarchical);try{this.enterOuterAlt(r,1),this.state=1174,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,129,this._ctx)&&(this.state=1172,r.ruleName=this.match(c.IDENTIFIER),this.state=1173,this.match(c.COLON)),this.state=1176,this.codeItemRelation(),this.state=1178,this._errHandler.sync(this),this._input.LA(1)===c.ERRORCODE&&(this.state=1177,this.erCode()),this.state=1181,this._errHandler.sync(this),this._input.LA(1)===c.ERRORLEVEL&&(this.state=1180,this.erLevel())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Qt.prototype=Object.create(l.ParserRuleContext.prototype),Qt.prototype.constructor=Qt,Qt.prototype.RULE=function(){return this.getToken(c.RULE,0)},Qt.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Qt.prototype.VALUE_DOMAIN=function(){return this.getToken(c.VALUE_DOMAIN,0)},Qt.prototype.VARIABLE=function(){return this.getToken(c.VARIABLE,0)},Qt.prototype.CONDITION=function(){return this.getToken(c.CONDITION,0)},Qt.prototype.valueDomainSignature=function(){return this.getTypedRuleContext(Zt,0)},Qt.prototype.enterRule=function(e){e instanceof R&&e.enterHierRuleSignature(this)},Qt.prototype.exitRule=function(e){e instanceof R&&e.exitHierRuleSignature(this)},Qt.prototype.accept=function(e){return e instanceof f?e.visitHierRuleSignature(this):e.visitChildren(this)},c.HierRuleSignatureContext=Qt,c.prototype.hierRuleSignature=function(){var r=new Qt(this,this._ctx,this.state);this.enterRule(r,130,c.RULE_hierRuleSignature);var t=0;try{this.enterOuterAlt(r,1),this.state=1183,(t=this._input.LA(1))!==c.VALUE_DOMAIN&&t!==c.VARIABLE?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=1186,this._errHandler.sync(this),(t=this._input.LA(1))===c.CONDITION&&(this.state=1184,this.match(c.CONDITION),this.state=1185,this.valueDomainSignature()),this.state=1188,this.match(c.RULE),this.state=1189,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Zt.prototype=Object.create(l.ParserRuleContext.prototype),Zt.prototype.constructor=Zt,Zt.prototype.signature=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Xe):this.getTypedRuleContext(Xe,e)},Zt.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Zt.prototype.enterRule=function(e){e instanceof R&&e.enterValueDomainSignature(this)},Zt.prototype.exitRule=function(e){e instanceof R&&e.exitValueDomainSignature(this)},Zt.prototype.accept=function(e){return e instanceof f?e.visitValueDomainSignature(this):e.visitChildren(this)},c.ValueDomainSignatureContext=Zt,c.prototype.valueDomainSignature=function(){var r=new Zt(this,this._ctx,this.state);this.enterRule(r,132,c.RULE_valueDomainSignature);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1191,this.signature(),this.state=1196,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=1192,this.match(c.COMMA),this.state=1193,this.signature(),this.state=1198,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},er.prototype=Object.create(l.ParserRuleContext.prototype),er.prototype.constructor=er,er.prototype.codeItemRelationClause=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(tr):this.getTypedRuleContext(tr,e)},er.prototype.valueDomainValue=function(){return this.getTypedRuleContext(rr,0)},er.prototype.WHEN=function(){return this.getToken(c.WHEN,0)},er.prototype.expr=function(){return this.getTypedRuleContext(g,0)},er.prototype.THEN=function(){return this.getToken(c.THEN,0)},er.prototype.comparisonOperand=function(){return this.getTypedRuleContext(Cr,0)},er.prototype.enterRule=function(e){e instanceof R&&e.enterCodeItemRelation(this)},er.prototype.exitRule=function(e){e instanceof R&&e.exitCodeItemRelation(this)},er.prototype.accept=function(e){return e instanceof f?e.visitCodeItemRelation(this):e.visitChildren(this)},c.CodeItemRelationContext=er,c.prototype.codeItemRelation=function(){var r=new er(this,this._ctx,this.state);this.enterRule(r,134,c.RULE_codeItemRelation);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1203,this._errHandler.sync(this),(t=this._input.LA(1))===c.WHEN&&(this.state=1199,this.match(c.WHEN),this.state=1200,this.expr(0),this.state=1201,this.match(c.THEN)),this.state=1205,r.codetemRef=this.valueDomainValue(),this.state=1207,this._errHandler.sync(this),0==(-32&(t=this._input.LA(1)))&&0!=(1<<t&(1<<c.EQ|1<<c.LT|1<<c.MT|1<<c.ME|1<<c.NEQ|1<<c.LE))&&(this.state=1206,this.comparisonOperand()),this.state=1209,this.codeItemRelationClause(),this.state=1213,this._errHandler.sync(this),t=this._input.LA(1);t===c.PLUS||t===c.MINUS||0==(-32&t-230)&&0!=(1<<t-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.IDENTIFIER-230));)this.state=1210,this.codeItemRelationClause(),this.state=1215,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},tr.prototype=Object.create(l.ParserRuleContext.prototype),tr.prototype.constructor=tr,tr.prototype.valueDomainValue=function(){return this.getTypedRuleContext(rr,0)},tr.prototype.QLPAREN=function(){return this.getToken(c.QLPAREN,0)},tr.prototype.QRPAREN=function(){return this.getToken(c.QRPAREN,0)},tr.prototype.expr=function(){return this.getTypedRuleContext(g,0)},tr.prototype.PLUS=function(){return this.getToken(c.PLUS,0)},tr.prototype.MINUS=function(){return this.getToken(c.MINUS,0)},tr.prototype.enterRule=function(e){e instanceof R&&e.enterCodeItemRelationClause(this)},tr.prototype.exitRule=function(e){e instanceof R&&e.exitCodeItemRelationClause(this)},tr.prototype.accept=function(e){return e instanceof f?e.visitCodeItemRelationClause(this):e.visitChildren(this)},c.CodeItemRelationClauseContext=tr,c.prototype.codeItemRelationClause=function(){var r=new tr(this,this._ctx,this.state);this.enterRule(r,136,c.RULE_codeItemRelationClause);var t=0;try{this.enterOuterAlt(r,1),this.state=1217,this._errHandler.sync(this),(t=this._input.LA(1))!==c.PLUS&&t!==c.MINUS||(this.state=1216,r.opAdd=this._input.LT(1),(t=this._input.LA(1))!==c.PLUS&&t!==c.MINUS?r.opAdd=this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())),this.state=1219,r.rightCodeItem=this.valueDomainValue(),this.state=1224,this._errHandler.sync(this),(t=this._input.LA(1))===c.QLPAREN&&(this.state=1220,this.match(c.QLPAREN),this.state=1221,r.rightCondition=this.expr(0),this.state=1222,this.match(c.QRPAREN))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},rr.prototype=Object.create(l.ParserRuleContext.prototype),rr.prototype.constructor=rr,rr.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},rr.prototype.INTEGER_CONSTANT=function(){return this.getToken(c.INTEGER_CONSTANT,0)},rr.prototype.NUMBER_CONSTANT=function(){return this.getToken(c.NUMBER_CONSTANT,0)},rr.prototype.enterRule=function(e){e instanceof R&&e.enterValueDomainValue(this)},rr.prototype.exitRule=function(e){e instanceof R&&e.exitValueDomainValue(this)},rr.prototype.accept=function(e){return e instanceof f?e.visitValueDomainValue(this):e.visitChildren(this)},c.ValueDomainValueContext=rr,c.prototype.valueDomainValue=function(){var r=new rr(this,this._ctx,this.state);this.enterRule(r,138,c.RULE_valueDomainValue);var t=0;try{this.enterOuterAlt(r,1),this.state=1226,0!=(-32&(t=this._input.LA(1))-230)||0==(1<<t-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.IDENTIFIER-230))?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},or.prototype=Object.create(l.ParserRuleContext.prototype),or.prototype.constructor=or,or.prototype.copyFrom=function(e){l.ParserRuleContext.prototype.copyFrom.call(this,e)},nr.prototype=Object.create(or.prototype),nr.prototype.constructor=nr,c.RangeConstraintContext=nr,nr.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},nr.prototype.constant=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Lr):this.getTypedRuleContext(Lr,e)},nr.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},nr.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},nr.prototype.enterRule=function(e){e instanceof R&&e.enterRangeConstraint(this)},nr.prototype.exitRule=function(e){e instanceof R&&e.exitRangeConstraint(this)},nr.prototype.accept=function(e){return e instanceof f?e.visitRangeConstraint(this):e.visitChildren(this)},ar.prototype=Object.create(or.prototype),ar.prototype.constructor=ar,c.ConditionConstraintContext=ar,ar.prototype.QLPAREN=function(){return this.getToken(c.QLPAREN,0)},ar.prototype.expr=function(){return this.getTypedRuleContext(g,0)},ar.prototype.QRPAREN=function(){return this.getToken(c.QRPAREN,0)},ar.prototype.enterRule=function(e){e instanceof R&&e.enterConditionConstraint(this)},ar.prototype.exitRule=function(e){e instanceof R&&e.exitConditionConstraint(this)},ar.prototype.accept=function(e){return e instanceof f?e.visitConditionConstraint(this):e.visitChildren(this)},c.ScalarTypeConstraintContext=or,c.prototype.scalarTypeConstraint=function(){var r=new or(this,this._ctx,this.state);this.enterRule(r,140,c.RULE_scalarTypeConstraint);var o=0;try{switch(this.state=1243,this._errHandler.sync(this),this._input.LA(1)){case c.QLPAREN:r=new ar(this,r),this.enterOuterAlt(r,1),this.state=1228,this.match(c.QLPAREN),this.state=1229,this.expr(0),this.state=1230,this.match(c.QRPAREN);break;case c.GLPAREN:for(r=new nr(this,r),this.enterOuterAlt(r,2),this.state=1232,this.match(c.GLPAREN),this.state=1233,this.constant(),this.state=1238,this._errHandler.sync(this),o=this._input.LA(1);o===c.COMMA;)this.state=1234,this.match(c.COMMA),this.state=1235,this.constant(),this.state=1240,this._errHandler.sync(this),o=this._input.LA(1);this.state=1241,this.match(c.GRPAREN);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ir.prototype=Object.create(l.ParserRuleContext.prototype),ir.prototype.constructor=ir,ir.prototype.componentType=function(){return this.getTypedRuleContext(He,0)},ir.prototype.componentID=function(){return this.getTypedRuleContext(xr,0)},ir.prototype.multModifier=function(){return this.getTypedRuleContext(pr,0)},ir.prototype.enterRule=function(e){e instanceof R&&e.enterCompConstraint(this)},ir.prototype.exitRule=function(e){e instanceof R&&e.exitCompConstraint(this)},ir.prototype.accept=function(e){return e instanceof f?e.visitCompConstraint(this):e.visitChildren(this)},c.CompConstraintContext=ir,c.prototype.compConstraint=function(){var r=new ir(this,this._ctx,this.state);this.enterRule(r,142,c.RULE_compConstraint);try{switch(this.enterOuterAlt(r,1),this.state=1245,this.componentType(),this.state=1248,this._errHandler.sync(this),this._input.LA(1)){case c.IDENTIFIER:this.state=1246,this.componentID();break;case c.OPTIONAL:this.state=1247,this.multModifier();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},pr.prototype=Object.create(l.ParserRuleContext.prototype),pr.prototype.constructor=pr,pr.prototype.OPTIONAL=function(){return this.getToken(c.OPTIONAL,0)},pr.prototype.PLUS=function(){return this.getToken(c.PLUS,0)},pr.prototype.MUL=function(){return this.getToken(c.MUL,0)},pr.prototype.enterRule=function(e){e instanceof R&&e.enterMultModifier(this)},pr.prototype.exitRule=function(e){e instanceof R&&e.exitMultModifier(this)},pr.prototype.accept=function(e){return e instanceof f?e.visitMultModifier(this):e.visitChildren(this)},c.MultModifierContext=pr,c.prototype.multModifier=function(){var r=new pr(this,this._ctx,this.state);this.enterRule(r,144,c.RULE_multModifier);var t=0;try{this.enterOuterAlt(r,1),this.state=1250,this.match(c.OPTIONAL),this.state=1252,this._errHandler.sync(this),(t=this._input.LA(1))!==c.PLUS&&t!==c.MUL||(this.state=1251,(t=this._input.LA(1))!==c.PLUS&&t!==c.MUL?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},sr.prototype=Object.create(l.ParserRuleContext.prototype),sr.prototype.constructor=sr,sr.prototype.INVALID=function(){return this.getToken(c.INVALID,0)},sr.prototype.ALL_MEASURES=function(){return this.getToken(c.ALL_MEASURES,0)},sr.prototype.ALL=function(){return this.getToken(c.ALL,0)},sr.prototype.enterRule=function(e){e instanceof R&&e.enterValidationOutput(this)},sr.prototype.exitRule=function(e){e instanceof R&&e.exitValidationOutput(this)},sr.prototype.accept=function(e){return e instanceof f?e.visitValidationOutput(this):e.visitChildren(this)},c.ValidationOutputContext=sr,c.prototype.validationOutput=function(){var r=new sr(this,this._ctx,this.state);this.enterRule(r,146,c.RULE_validationOutput);var t=0;try{this.enterOuterAlt(r,1),this.state=1254,(t=this._input.LA(1))!==c.ALL&&t!==c.INVALID&&t!==c.ALL_MEASURES?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},lr.prototype=Object.create(l.ParserRuleContext.prototype),lr.prototype.constructor=lr,lr.prototype.NON_NULL=function(){return this.getToken(c.NON_NULL,0)},lr.prototype.NON_ZERO=function(){return this.getToken(c.NON_ZERO,0)},lr.prototype.PARTIAL_NULL=function(){return this.getToken(c.PARTIAL_NULL,0)},lr.prototype.PARTIAL_ZERO=function(){return this.getToken(c.PARTIAL_ZERO,0)},lr.prototype.ALWAYS_NULL=function(){return this.getToken(c.ALWAYS_NULL,0)},lr.prototype.ALWAYS_ZERO=function(){return this.getToken(c.ALWAYS_ZERO,0)},lr.prototype.enterRule=function(e){e instanceof R&&e.enterValidationMode(this)},lr.prototype.exitRule=function(e){e instanceof R&&e.exitValidationMode(this)},lr.prototype.accept=function(e){return e instanceof f?e.visitValidationMode(this):e.visitChildren(this)},c.ValidationModeContext=lr,c.prototype.validationMode=function(){var r=new lr(this,this._ctx,this.state);this.enterRule(r,148,c.RULE_validationMode);var t=0;try{this.enterOuterAlt(r,1),this.state=1256,0!=(-32&(t=this._input.LA(1))-214)||0==(1<<t-214&(1<<c.NON_NULL-214|1<<c.NON_ZERO-214|1<<c.PARTIAL_NULL-214|1<<c.PARTIAL_ZERO-214|1<<c.ALWAYS_NULL-214|1<<c.ALWAYS_ZERO-214))?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},dr.prototype=Object.create(l.ParserRuleContext.prototype),dr.prototype.constructor=dr,dr.prototype.CONDITION=function(){return this.getToken(c.CONDITION,0)},dr.prototype.componentID=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(xr):this.getTypedRuleContext(xr,e)},dr.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},dr.prototype.enterRule=function(e){e instanceof R&&e.enterConditionClause(this)},dr.prototype.exitRule=function(e){e instanceof R&&e.exitConditionClause(this)},dr.prototype.accept=function(e){return e instanceof f?e.visitConditionClause(this):e.visitChildren(this)},c.ConditionClauseContext=dr,c.prototype.conditionClause=function(){var r=new dr(this,this._ctx,this.state);this.enterRule(r,150,c.RULE_conditionClause);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1258,this.match(c.CONDITION),this.state=1259,this.componentID(),this.state=1264,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=1260,this.match(c.COMMA),this.state=1261,this.componentID(),this.state=1266,this._errHandler.sync(this),t=this._input.LA(1)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},cr.prototype=Object.create(l.ParserRuleContext.prototype),cr.prototype.constructor=cr,cr.prototype.DATASET=function(){return this.getToken(c.DATASET,0)},cr.prototype.DATASET_PRIORITY=function(){return this.getToken(c.DATASET_PRIORITY,0)},cr.prototype.enterRule=function(e){e instanceof R&&e.enterInputMode(this)},cr.prototype.exitRule=function(e){e instanceof R&&e.exitInputMode(this)},cr.prototype.accept=function(e){return e instanceof f?e.visitInputMode(this):e.visitChildren(this)},c.InputModeContext=cr,c.prototype.inputMode=function(){var r=new cr(this,this._ctx,this.state);this.enterRule(r,152,c.RULE_inputMode);var t=0;try{this.enterOuterAlt(r,1),this.state=1267,(t=this._input.LA(1))!==c.DATASET&&t!==c.DATASET_PRIORITY?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},ur.prototype=Object.create(l.ParserRuleContext.prototype),ur.prototype.constructor=ur,ur.prototype.IMBALANCE=function(){return this.getToken(c.IMBALANCE,0)},ur.prototype.expr=function(){return this.getTypedRuleContext(g,0)},ur.prototype.enterRule=function(e){e instanceof R&&e.enterImbalanceExpr(this)},ur.prototype.exitRule=function(e){e instanceof R&&e.exitImbalanceExpr(this)},ur.prototype.accept=function(e){return e instanceof f?e.visitImbalanceExpr(this):e.visitChildren(this)},c.ImbalanceExprContext=ur,c.prototype.imbalanceExpr=function(){var r=new ur(this,this._ctx,this.state);this.enterRule(r,154,c.RULE_imbalanceExpr);try{this.enterOuterAlt(r,1),this.state=1269,this.match(c.IMBALANCE),this.state=1270,this.expr(0)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},yr.prototype=Object.create(l.ParserRuleContext.prototype),yr.prototype.constructor=yr,yr.prototype.RULE=function(){return this.getToken(c.RULE,0)},yr.prototype.DATASET=function(){return this.getToken(c.DATASET,0)},yr.prototype.RULE_PRIORITY=function(){return this.getToken(c.RULE_PRIORITY,0)},yr.prototype.enterRule=function(e){e instanceof R&&e.enterInputModeHierarchy(this)},yr.prototype.exitRule=function(e){e instanceof R&&e.exitInputModeHierarchy(this)},yr.prototype.accept=function(e){return e instanceof f?e.visitInputModeHierarchy(this):e.visitChildren(this)},c.InputModeHierarchyContext=yr,c.prototype.inputModeHierarchy=function(){var r=new yr(this,this._ctx,this.state);this.enterRule(r,156,c.RULE_inputModeHierarchy);var t=0;try{this.enterOuterAlt(r,1),this.state=1272,(t=this._input.LA(1))!==c.DATASET&&t!==c.RULE&&t!==c.RULE_PRIORITY?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},mr.prototype=Object.create(l.ParserRuleContext.prototype),mr.prototype.constructor=mr,mr.prototype.COMPUTED=function(){return this.getToken(c.COMPUTED,0)},mr.prototype.ALL=function(){return this.getToken(c.ALL,0)},mr.prototype.enterRule=function(e){e instanceof R&&e.enterOutputModeHierarchy(this)},mr.prototype.exitRule=function(e){e instanceof R&&e.exitOutputModeHierarchy(this)},mr.prototype.accept=function(e){return e instanceof f?e.visitOutputModeHierarchy(this):e.visitChildren(this)},c.OutputModeHierarchyContext=mr,c.prototype.outputModeHierarchy=function(){var r=new mr(this,this._ctx,this.state);this.enterRule(r,158,c.RULE_outputModeHierarchy);var t=0;try{this.enterOuterAlt(r,1),this.state=1274,(t=this._input.LA(1))!==c.ALL&&t!==c.COMPUTED?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},gr.prototype=Object.create(l.ParserRuleContext.prototype),gr.prototype.constructor=gr,gr.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},gr.prototype.enterRule=function(e){e instanceof R&&e.enterAlias(this)},gr.prototype.exitRule=function(e){e instanceof R&&e.exitAlias(this)},gr.prototype.accept=function(e){return e instanceof f?e.visitAlias(this):e.visitChildren(this)},c.AliasContext=gr,c.prototype.alias=function(){var r=new gr(this,this._ctx,this.state);this.enterRule(r,160,c.RULE_alias);try{this.enterOuterAlt(r,1),this.state=1276,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Er.prototype=Object.create(l.ParserRuleContext.prototype),Er.prototype.constructor=Er,Er.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Er.prototype.enterRule=function(e){e instanceof R&&e.enterVarID(this)},Er.prototype.exitRule=function(e){e instanceof R&&e.exitVarID(this)},Er.prototype.accept=function(e){return e instanceof f?e.visitVarID(this):e.visitChildren(this)},c.VarIDContext=Er,c.prototype.varID=function(){var r=new Er(this,this._ctx,this.state);this.enterRule(r,162,c.RULE_varID);try{this.enterOuterAlt(r,1),this.state=1278,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},fr.prototype=Object.create(l.ParserRuleContext.prototype),fr.prototype.constructor=fr,fr.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},fr.prototype.enterRule=function(e){e instanceof R&&e.enterSimpleComponentId(this)},fr.prototype.exitRule=function(e){e instanceof R&&e.exitSimpleComponentId(this)},fr.prototype.accept=function(e){return e instanceof f?e.visitSimpleComponentId(this):e.visitChildren(this)},c.SimpleComponentIdContext=fr,c.prototype.simpleComponentId=function(){var r=new fr(this,this._ctx,this.state);this.enterRule(r,164,c.RULE_simpleComponentId);try{this.enterOuterAlt(r,1),this.state=1280,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},xr.prototype=Object.create(l.ParserRuleContext.prototype),xr.prototype.constructor=xr,xr.prototype.IDENTIFIER=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.IDENTIFIER):this.getToken(c.IDENTIFIER,e)},xr.prototype.MEMBERSHIP=function(){return this.getToken(c.MEMBERSHIP,0)},xr.prototype.enterRule=function(e){e instanceof R&&e.enterComponentID(this)},xr.prototype.exitRule=function(e){e instanceof R&&e.exitComponentID(this)},xr.prototype.accept=function(e){return e instanceof f?e.visitComponentID(this):e.visitChildren(this)},c.ComponentIDContext=xr,c.prototype.componentID=function(){var r=new xr(this,this._ctx,this.state);this.enterRule(r,166,c.RULE_componentID);try{this.enterOuterAlt(r,1),this.state=1282,this.match(c.IDENTIFIER),this.state=1285,this._errHandler.sync(this),this._input.LA(1)===c.MEMBERSHIP&&(this.state=1283,this.match(c.MEMBERSHIP),this.state=1284,this.match(c.IDENTIFIER))}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Tr.prototype=Object.create(l.ParserRuleContext.prototype),Tr.prototype.constructor=Tr,Tr.prototype.GLPAREN=function(){return this.getToken(c.GLPAREN,0)},Tr.prototype.constant=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Lr):this.getTypedRuleContext(Lr,e)},Tr.prototype.GRPAREN=function(){return this.getToken(c.GRPAREN,0)},Tr.prototype.COMMA=function(e){return void 0===e&&(e=null),null===e?this.getTokens(c.COMMA):this.getToken(c.COMMA,e)},Tr.prototype.enterRule=function(e){e instanceof R&&e.enterLists(this)},Tr.prototype.exitRule=function(e){e instanceof R&&e.exitLists(this)},Tr.prototype.accept=function(e){return e instanceof f?e.visitLists(this):e.visitChildren(this)},c.ListsContext=Tr,c.prototype.lists=function(){var r=new Tr(this,this._ctx,this.state);this.enterRule(r,168,c.RULE_lists);var t=0;try{for(this.enterOuterAlt(r,1),this.state=1287,this.match(c.GLPAREN),this.state=1288,this.constant(),this.state=1293,this._errHandler.sync(this),t=this._input.LA(1);t===c.COMMA;)this.state=1289,this.match(c.COMMA),this.state=1290,this.constant(),this.state=1295,this._errHandler.sync(this),t=this._input.LA(1);this.state=1296,this.match(c.GRPAREN)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Rr.prototype=Object.create(l.ParserRuleContext.prototype),Rr.prototype.constructor=Rr,Rr.prototype.ERRORCODE=function(){return this.getToken(c.ERRORCODE,0)},Rr.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},Rr.prototype.enterRule=function(e){e instanceof R&&e.enterErCode(this)},Rr.prototype.exitRule=function(e){e instanceof R&&e.exitErCode(this)},Rr.prototype.accept=function(e){return e instanceof f?e.visitErCode(this):e.visitChildren(this)},c.ErCodeContext=Rr,c.prototype.erCode=function(){var r=new Rr(this,this._ctx,this.state);this.enterRule(r,170,c.RULE_erCode);try{this.enterOuterAlt(r,1),this.state=1298,this.match(c.ERRORCODE),this.state=1299,this.constant()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},hr.prototype=Object.create(l.ParserRuleContext.prototype),hr.prototype.constructor=hr,hr.prototype.ERRORLEVEL=function(){return this.getToken(c.ERRORLEVEL,0)},hr.prototype.constant=function(){return this.getTypedRuleContext(Lr,0)},hr.prototype.enterRule=function(e){e instanceof R&&e.enterErLevel(this)},hr.prototype.exitRule=function(e){e instanceof R&&e.exitErLevel(this)},hr.prototype.accept=function(e){return e instanceof f?e.visitErLevel(this):e.visitChildren(this)},c.ErLevelContext=hr,c.prototype.erLevel=function(){var r=new hr(this,this._ctx,this.state);this.enterRule(r,172,c.RULE_erLevel);try{this.enterOuterAlt(r,1),this.state=1301,this.match(c.ERRORLEVEL),this.state=1302,this.constant()}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Cr.prototype=Object.create(l.ParserRuleContext.prototype),Cr.prototype.constructor=Cr,Cr.prototype.MT=function(){return this.getToken(c.MT,0)},Cr.prototype.ME=function(){return this.getToken(c.ME,0)},Cr.prototype.LE=function(){return this.getToken(c.LE,0)},Cr.prototype.LT=function(){return this.getToken(c.LT,0)},Cr.prototype.EQ=function(){return this.getToken(c.EQ,0)},Cr.prototype.NEQ=function(){return this.getToken(c.NEQ,0)},Cr.prototype.enterRule=function(e){e instanceof R&&e.enterComparisonOperand(this)},Cr.prototype.exitRule=function(e){e instanceof R&&e.exitComparisonOperand(this)},Cr.prototype.accept=function(e){return e instanceof f?e.visitComparisonOperand(this):e.visitChildren(this)},c.ComparisonOperandContext=Cr,c.prototype.comparisonOperand=function(){var r=new Cr(this,this._ctx,this.state);this.enterRule(r,174,c.RULE_comparisonOperand);var t=0;try{this.enterOuterAlt(r,1),this.state=1304,0!=(-32&(t=this._input.LA(1)))||0==(1<<t&(1<<c.EQ|1<<c.LT|1<<c.MT|1<<c.ME|1<<c.NEQ|1<<c.LE))?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ar.prototype=Object.create(l.ParserRuleContext.prototype),Ar.prototype.constructor=Ar,Ar.prototype.expr=function(){return this.getTypedRuleContext(g,0)},Ar.prototype.OPTIONAL=function(){return this.getToken(c.OPTIONAL,0)},Ar.prototype.enterRule=function(e){e instanceof R&&e.enterOptionalExpr(this)},Ar.prototype.exitRule=function(e){e instanceof R&&e.exitOptionalExpr(this)},Ar.prototype.accept=function(e){return e instanceof f?e.visitOptionalExpr(this):e.visitChildren(this)},c.OptionalExprContext=Ar,c.prototype.optionalExpr=function(){var r=new Ar(this,this._ctx,this.state);this.enterRule(r,176,c.RULE_optionalExpr);try{switch(this.state=1308,this._errHandler.sync(this),this._input.LA(1)){case c.LPAREN:case c.PLUS:case c.MINUS:case c.EVAL:case c.IF:case c.CURRENT_DATE:case c.NOT:case c.BETWEEN:case c.NULL_CONSTANT:case c.ISNULL:case c.UNION:case c.SYMDIFF:case c.INTERSECT:case c.CHECK:case c.EXISTS_IN:case c.MIN:case c.MAX:case c.ABS:case c.LN:case c.LOG:case c.TRUNC:case c.ROUND:case c.POWER:case c.MOD:case c.LEN:case c.TRIM:case c.UCASE:case c.LCASE:case c.SUBSTR:case c.SUM:case c.AVG:case c.MEDIAN:case c.COUNT:case c.EXP:case c.CHARSET_MATCH:case c.NVL:case c.HIERARCHY:case c.LEVENSHTEIN:case c.LTRIM:case c.RTRIM:case c.INSTR:case c.REPLACE:case c.CEIL:case c.FLOOR:case c.SQRT:case c.SETDIFF:case c.STDDEV_POP:case c.STDDEV_SAMP:case c.VAR_POP:case c.VAR_SAMP:case c.FIRST_VALUE:case c.LAST_VALUE:case c.LAG:case c.LEAD:case c.RATIO_TO_REPORT:case c.FILL_TIME_SERIES:case c.FLOW_TO_STOCK:case c.STOCK_TO_FLOW:case c.TIMESHIFT:case c.INNER_JOIN:case c.LEFT_JOIN:case c.CROSS_JOIN:case c.FULL_JOIN:case c.PERIOD_INDICATOR:case c.TIME_AGG:case c.CAST:case c.CHECK_DATAPOINT:case c.CHECK_HIERARCHY:case c.INTEGER_CONSTANT:case c.NUMBER_CONSTANT:case c.BOOLEAN_CONSTANT:case c.STRING_CONSTANT:case c.IDENTIFIER:this.enterOuterAlt(r,1),this.state=1306,this.expr(0);break;case c.OPTIONAL:this.enterOuterAlt(r,2),this.state=1307,this.match(c.OPTIONAL);break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},_r.prototype=Object.create(l.ParserRuleContext.prototype),_r.prototype.constructor=_r,_r.prototype.MEASURE=function(){return this.getToken(c.MEASURE,0)},_r.prototype.COMPONENT=function(){return this.getToken(c.COMPONENT,0)},_r.prototype.DIMENSION=function(){return this.getToken(c.DIMENSION,0)},_r.prototype.ATTRIBUTE=function(){return this.getToken(c.ATTRIBUTE,0)},_r.prototype.viralAttribute=function(){return this.getTypedRuleContext(Nr,0)},_r.prototype.enterRule=function(e){e instanceof R&&e.enterComponentRole(this)},_r.prototype.exitRule=function(e){e instanceof R&&e.exitComponentRole(this)},_r.prototype.accept=function(e){return e instanceof f?e.visitComponentRole(this):e.visitChildren(this)},c.ComponentRoleContext=_r,c.prototype.componentRole=function(){var r=new _r(this,this._ctx,this.state);this.enterRule(r,178,c.RULE_componentRole);try{switch(this.state=1315,this._errHandler.sync(this),this._input.LA(1)){case c.MEASURE:this.enterOuterAlt(r,1),this.state=1310,this.match(c.MEASURE);break;case c.COMPONENT:this.enterOuterAlt(r,2),this.state=1311,this.match(c.COMPONENT);break;case c.DIMENSION:this.enterOuterAlt(r,3),this.state=1312,this.match(c.DIMENSION);break;case c.ATTRIBUTE:this.enterOuterAlt(r,4),this.state=1313,this.match(c.ATTRIBUTE);break;case c.VIRAL:this.enterOuterAlt(r,5),this.state=1314,this.viralAttribute();break;default:throw new l.error.NoViableAltException(this);}}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Nr.prototype=Object.create(l.ParserRuleContext.prototype),Nr.prototype.constructor=Nr,Nr.prototype.VIRAL=function(){return this.getToken(c.VIRAL,0)},Nr.prototype.ATTRIBUTE=function(){return this.getToken(c.ATTRIBUTE,0)},Nr.prototype.enterRule=function(e){e instanceof R&&e.enterViralAttribute(this)},Nr.prototype.exitRule=function(e){e instanceof R&&e.exitViralAttribute(this)},Nr.prototype.accept=function(e){return e instanceof f?e.visitViralAttribute(this):e.visitChildren(this)},c.ViralAttributeContext=Nr,c.prototype.viralAttribute=function(){var r=new Nr(this,this._ctx,this.state);this.enterRule(r,180,c.RULE_viralAttribute);try{this.enterOuterAlt(r,1),this.state=1317,this.match(c.VIRAL),this.state=1318,this.match(c.ATTRIBUTE)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Or.prototype=Object.create(l.ParserRuleContext.prototype),Or.prototype.constructor=Or,Or.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Or.prototype.enterRule=function(e){e instanceof R&&e.enterValueDomainID(this)},Or.prototype.exitRule=function(e){e instanceof R&&e.exitValueDomainID(this)},Or.prototype.accept=function(e){return e instanceof f?e.visitValueDomainID(this):e.visitChildren(this)},c.ValueDomainIDContext=Or,c.prototype.valueDomainID=function(){var r=new Or(this,this._ctx,this.state);this.enterRule(r,182,c.RULE_valueDomainID);try{this.enterOuterAlt(r,1),this.state=1320,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Ir.prototype=Object.create(l.ParserRuleContext.prototype),Ir.prototype.constructor=Ir,Ir.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Ir.prototype.enterRule=function(e){e instanceof R&&e.enterOperatorID(this)},Ir.prototype.exitRule=function(e){e instanceof R&&e.exitOperatorID(this)},Ir.prototype.accept=function(e){return e instanceof f?e.visitOperatorID(this):e.visitChildren(this)},c.OperatorIDContext=Ir,c.prototype.operatorID=function(){var r=new Ir(this,this._ctx,this.state);this.enterRule(r,184,c.RULE_operatorID);try{this.enterOuterAlt(r,1),this.state=1322,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Sr.prototype=Object.create(l.ParserRuleContext.prototype),Sr.prototype.constructor=Sr,Sr.prototype.IDENTIFIER=function(){return this.getToken(c.IDENTIFIER,0)},Sr.prototype.enterRule=function(e){e instanceof R&&e.enterRoutineName(this)},Sr.prototype.exitRule=function(e){e instanceof R&&e.exitRoutineName(this)},Sr.prototype.accept=function(e){return e instanceof f?e.visitRoutineName(this):e.visitChildren(this)},c.RoutineNameContext=Sr,c.prototype.routineName=function(){var r=new Sr(this,this._ctx,this.state);this.enterRule(r,186,c.RULE_routineName);try{this.enterOuterAlt(r,1),this.state=1324,this.match(c.IDENTIFIER)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},Lr.prototype=Object.create(l.ParserRuleContext.prototype),Lr.prototype.constructor=Lr,Lr.prototype.INTEGER_CONSTANT=function(){return this.getToken(c.INTEGER_CONSTANT,0)},Lr.prototype.NUMBER_CONSTANT=function(){return this.getToken(c.NUMBER_CONSTANT,0)},Lr.prototype.BOOLEAN_CONSTANT=function(){return this.getToken(c.BOOLEAN_CONSTANT,0)},Lr.prototype.STRING_CONSTANT=function(){return this.getToken(c.STRING_CONSTANT,0)},Lr.prototype.NULL_CONSTANT=function(){return this.getToken(c.NULL_CONSTANT,0)},Lr.prototype.enterRule=function(e){e instanceof R&&e.enterConstant(this)},Lr.prototype.exitRule=function(e){e instanceof R&&e.exitConstant(this)},Lr.prototype.accept=function(e){return e instanceof f?e.visitConstant(this):e.visitChildren(this)},c.ConstantContext=Lr,c.prototype.constant=function(){var r=new Lr(this,this._ctx,this.state);this.enterRule(r,188,c.RULE_constant);var t=0;try{this.enterOuterAlt(r,1),this.state=1326,(t=this._input.LA(1))===c.NULL_CONSTANT||0==(-32&t-230)&&0!=(1<<t-230&(1<<c.INTEGER_CONSTANT-230|1<<c.NUMBER_CONSTANT-230|1<<c.BOOLEAN_CONSTANT-230|1<<c.STRING_CONSTANT-230))?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},vr.prototype=Object.create(l.ParserRuleContext.prototype),vr.prototype.constructor=vr,vr.prototype.STRING=function(){return this.getToken(c.STRING,0)},vr.prototype.INTEGER=function(){return this.getToken(c.INTEGER,0)},vr.prototype.NUMBER=function(){return this.getToken(c.NUMBER,0)},vr.prototype.BOOLEAN=function(){return this.getToken(c.BOOLEAN,0)},vr.prototype.DATE=function(){return this.getToken(c.DATE,0)},vr.prototype.TIME=function(){return this.getToken(c.TIME,0)},vr.prototype.TIME_PERIOD=function(){return this.getToken(c.TIME_PERIOD,0)},vr.prototype.DURATION=function(){return this.getToken(c.DURATION,0)},vr.prototype.SCALAR=function(){return this.getToken(c.SCALAR,0)},vr.prototype.enterRule=function(e){e instanceof R&&e.enterBasicScalarType(this)},vr.prototype.exitRule=function(e){e instanceof R&&e.exitBasicScalarType(this)},vr.prototype.accept=function(e){return e instanceof f?e.visitBasicScalarType(this):e.visitChildren(this)},c.BasicScalarTypeContext=vr,c.prototype.basicScalarType=function(){var r=new vr(this,this._ctx,this.state);this.enterRule(r,190,c.RULE_basicScalarType);var t=0;try{this.enterOuterAlt(r,1),this.state=1328,0==(-32&(t=this._input.LA(1))-157)&&0!=(1<<t-157&(1<<c.BOOLEAN-157|1<<c.DATE-157|1<<c.TIME_PERIOD-157|1<<c.NUMBER-157|1<<c.STRING-157|1<<c.TIME-157|1<<c.INTEGER-157))||t===c.DURATION||t===c.SCALAR?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},br.prototype=Object.create(l.ParserRuleContext.prototype),br.prototype.constructor=br,br.prototype.BOOLEAN_CONSTANT=function(){return this.getToken(c.BOOLEAN_CONSTANT,0)},br.prototype.ALL=function(){return this.getToken(c.ALL,0)},br.prototype.enterRule=function(e){e instanceof R&&e.enterRetainType(this)},br.prototype.exitRule=function(e){e instanceof R&&e.exitRetainType(this)},br.prototype.accept=function(e){return e instanceof f?e.visitRetainType(this):e.visitChildren(this)},c.RetainTypeContext=br,c.prototype.retainType=function(){var r=new br(this,this._ctx,this.state);this.enterRule(r,192,c.RULE_retainType);var t=0;try{this.enterOuterAlt(r,1),this.state=1330,(t=this._input.LA(1))!==c.ALL&&t!==c.BOOLEAN_CONSTANT?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume())}catch(t){if(!(t instanceof l.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return r},c.prototype.sempred=function(r,t,e){switch(t){case 2:return this.expr_sempred(r,e);default:throw"No predicate with index:"+t;}},c.prototype.expr_sempred=function(r,t){switch(t){case 0:return this.precpred(this._ctx,9);case 1:return this.precpred(this._ctx,8);case 2:return this.precpred(this._ctx,7);case 3:return this.precpred(this._ctx,5);case 4:return this.precpred(this._ctx,4);case 5:return this.precpred(this._ctx,12);case 6:return this.precpred(this._ctx,11);case 7:return this.precpred(this._ctx,6);default:throw"No predicate with index:"+t;}};o.VtlLexer=u,o.VtlListener=s,o.VtlParser=c,o.VtlVisitor=a});unwrapExports(lib$2);var lib_1=lib$2.VtlLexer;lib$2.VtlListener;var lib_3=lib$2.VtlParser,lib_4=lib$2.VtlVisitor,moment=createCommonjsModule$1(function(e){var t=Math.round,r=Math.ceil,o=Math.pow,n=Math.abs,a=Math.floor,i=Math.max,p=Math.min;(function(t,r){e.exports=r()})(commonjsGlobal,function(){function s(){return rr.apply(null,arguments)}// This is done to register the method called with moment()
848
- // without creating circular dependencies.
849
- function l(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function d(e){// IE8 will treat undefined and null as object if it wasn't for
850
- // input != null
851
- return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return!1;return!0}function y(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function g(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function E(e,t){var r=[],o;for(o=0;o<e.length;++o)r.push(t(e[o],o));return r}function f(e,t){for(var r in t)c(t,r)&&(e[r]=t[r]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function x(e,t,r,o){return Ze(e,t,r,o,!0).utc()}function T(){// We need to deep clone this object.
852
- return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function R(e){return null==e._pf&&(e._pf=T()),e._pf}function h(e){if(null==e._isValid){var t=R(e),r=or.call(t.parsedDateParts,function(e){return null!=e}),o=!isNaN(e._d.getTime())&&0>t.overflow&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=o;else return o}return e._isValid}function C(e){var t=x(NaN);return null==e?R(t).userInvalidated=!0:f(R(t),e),t}// Plugins that add properties should also add the key here (null value),
853
- // so we can properly clone ourselves.
854
- function A(e,t){var r,o,n;if(y(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),y(t._i)||(e._i=t._i),y(t._f)||(e._f=t._f),y(t._l)||(e._l=t._l),y(t._strict)||(e._strict=t._strict),y(t._tzm)||(e._tzm=t._tzm),y(t._isUTC)||(e._isUTC=t._isUTC),y(t._offset)||(e._offset=t._offset),y(t._pf)||(e._pf=R(t)),y(t._locale)||(e._locale=t._locale),0<nr.length)for(r=0;r<nr.length;r++)o=nr[r],n=t[o],y(n)||(e[o]=n);return e}// Moment prototype object
855
- function _(e){A(this,e),this._d=new Date(null==e._d?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),!1===ar&&(ar=!0,s.updateOffset(this),ar=!1)}function N(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function O(e){!1===s.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function I(e,t){var r=!0;return f(function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),r){var o=[],n,a,p;for(a=0;a<arguments.length;a++){if(n="","object"==typeof arguments[a]){for(p in n+="\n["+a+"] ",arguments[0])c(arguments[0],p)&&(n+=p+": "+arguments[0][p]+", ");n=n.slice(0,-2)}else n=arguments[a];o.push(n)}O(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+new Error().stack),r=!1}return t.apply(this,arguments)},t)}function S(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),ir[e]||(O(t),ir[e]=!0)}function L(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function v(e,t){var r=f({},e),o;for(o in t)c(t,o)&&(d(e[o])&&d(t[o])?(r[o]={},f(r[o],e[o]),f(r[o],t[o])):null==t[o]?delete r[o]:r[o]=t[o]);for(o in e)c(e,o)&&!c(t,o)&&d(e[o])&&(// make sure changes to properties don't modify parent config
856
- r[o]=f({},r[o]));return r}function b(e){null!=e&&this.set(e)}function k(e,t,r){var o=this._calendar[e]||this._calendar.sameElse;return L(o)?o.call(t,r):o}function P(e,t,r){var a=""+n(e),p=t-a.length;return(0<=e?r?"+":"":"-")+o(10,i(0,p)).toString().substr(1)+a}// token: 'M'
857
- // padded: ['MM', 2]
858
- // ordinal: 'Mo'
859
- // callback: function () { this.month() + 1 }
860
- function D(e,t,r,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),e&&(cr[e]=n),t&&(cr[t[0]]=function(){return P(n.apply(this,arguments),t[1],t[2])}),r&&(cr[r]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function M(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t=e.match(sr),r,o;for(r=0,o=t.length;r<o;r++)t[r]=cr[t[r]]?cr[t[r]]:M(t[r]);return function(r){var n="",a;for(a=0;a<o;a++)n+=L(t[a])?t[a].call(r,e):t[a];return n}}// format date using native date object
861
- function F(e,t){return e.isValid()?(t=w(t,e.localeData()),dr[t]=dr[t]||U(t),dr[t](e)):e.localeData().invalidDate()}function w(e,t){function r(e){return t.longDateFormat(e)||e}var o=5;for(lr.lastIndex=0;0<=o&&lr.test(e);)e=e.replace(lr,r),lr.lastIndex=0,o-=1;return e}function H(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(sr).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}function V(e,t){var r=e.toLowerCase();ur[r]=ur[r+"s"]=ur[t]=e}function B(e){return"string"==typeof e?ur[e]||ur[e.toLowerCase()]:void 0}function G(e){var t={},r,o;for(o in e)c(e,o)&&(r=B(o),r&&(t[r]=e[o]));return t}function Y(e,t){yr[e]=t}function j(e){var t=[],r;for(r in e)c(e,r)&&t.push({unit:r,priority:yr[r]});return t.sort(function(e,t){return e.priority-t.priority}),t}function W(e){return 0==e%4&&0!=e%100||0==e%400}function z(e){return 0>e?r(e)||0:a(e)}function q(e){var t=+e,r=0;return 0!=t&&isFinite(t)&&(r=z(t)),r}function K(e,t){return function(r){return null==r?$(this,e):(J(this,e,r),s.updateOffset(this,t),this)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(r=q(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),ae(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}// MOMENTS
862
- function X(e,t,r){Lr[e]=L(t)?t:function(e){return e&&r?r:t}}function Q(e,t){return c(Lr,e)?Lr[e](t._strict,t._locale):new RegExp(Z(e))}// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
863
- function Z(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,o,n){return t||r||o||n}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var r=t,o;for("string"==typeof e&&(e=[e]),m(t)&&(r=function(e,r){r[t]=q(e)}),o=0;o<e.length;o++)vr[e[o]]=r}function re(e,t){te(e,function(e,r,o,n){o._w=o._w||{},t(e,o._w,o,n)})}function oe(e,t,r){null!=t&&c(vr,e)&&vr[e](t,r._a,r,e)}function ne(e,t){return(e%t+t)%t}function ae(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=ne(t,12);return e+=(t-r)/12,1===r?W(e)?29:28:31-r%7%2}// FORMATTING
864
- function ie(e,t,r){var o=e.toLocaleLowerCase(),n,a,p;if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;12>n;++n)p=x([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(p,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(p,"").toLocaleLowerCase();return r?"MMM"===t?(a=Fr.call(this._shortMonthsParse,o),-1===a?null:a):(a=Fr.call(this._longMonthsParse,o),-1===a?null:a):"MMM"===t?(a=Fr.call(this._shortMonthsParse,o),-1!==a)?a:(a=Fr.call(this._longMonthsParse,o),-1===a?null:a):(a=Fr.call(this._longMonthsParse,o),-1!==a)?a:(a=Fr.call(this._shortMonthsParse,o),-1===a?null:a)}// MOMENTS
865
- function pe(e,t){var r;if(!e.isValid())// No op
866
- return e;if("string"==typeof t)if(/^\d+$/.test(t))t=q(t);else// TODO: Another silent failure?
867
- if(t=e.localeData().monthsParse(t),!m(t))return e;return r=p(e.date(),ae(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function se(e){return null==e?$(this,"Month"):(pe(this,e),s.updateOffset(this,!0),this)}function le(){function e(e,t){return t.length-e.length}var t=[],r=[],o=[],n,a;for(n=0;12>n;n++)// make the regex if we don't have it already
868
- a=x([2e3,n]),t.push(this.monthsShort(a,"")),r.push(this.months(a,"")),o.push(this.months(a,"")),o.push(this.monthsShort(a,""));// Sorting makes sure if one month (or abbr) is a prefix of another it
869
- // will match the longer piece.
870
- for(t.sort(e),r.sort(e),o.sort(e),n=0;12>n;n++)t[n]=ee(t[n]),r[n]=ee(r[n]);for(n=0;24>n;n++)o[n]=ee(o[n]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}// FORMATTING
871
- // HELPERS
872
- function de(e){return W(e)?366:365}// HOOKS
873
- function ce(e,t,r,o,n,a,i){// can't just apply() to create a date:
874
- // https://stackoverflow.com/q/181348
875
- var p;// the date constructor remaps years 0-99 to 1900-1999
876
- return 100>e&&0<=e?(p=new Date(e+400,t,r,o,n,a,i),isFinite(p.getFullYear())&&p.setFullYear(e)):p=new Date(e,t,r,o,n,a,i),p}function ue(e){var t,r;// the Date.UTC function remaps years 0-99 to 1900-1999
877
- return 100>e&&0<=e?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}// start-of-first-week - start-of-year
878
- function ye(e,t,r){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
879
- o=7+t-r,// first-week day local weekday -- which local weekday is fwd
880
- n=(7+ue(e,0,o).getUTCDay()-t)%7;return-n+o-1}// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
881
- function me(e,t,r,o,n){var a=ye(e,o,n),i=1+7*(t-1)+(7+r-o)%7+a,p,s;return 0>=i?(p=e-1,s=de(p)+i):i>de(e)?(p=e+1,s=i-de(e)):(p=e,s=i),{year:p,dayOfYear:s}}function ge(e,t,r){var o=ye(e.year(),t,r),n=a((e.dayOfYear()-o-1)/7)+1,i,p;return 1>n?(p=e.year()-1,i=n+Ee(p,t,r)):n>Ee(e.year(),t,r)?(i=n-Ee(e.year(),t,r),p=e.year()+1):(p=e.year(),i=n),{week:i,year:p}}function Ee(e,t,r){var o=ye(e,t,r),n=ye(e+1,t,r);return(de(e)-o+n)/7}// FORMATTING
882
- // HELPERS
883
- function fe(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function xe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}// LOCALES
884
- function Te(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Re(e,t,r){var o=e.toLocaleLowerCase(),n,a,p;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;7>n;++n)p=x([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(p,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(p,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(p,"").toLocaleLowerCase();return r?"dddd"===t?(a=Fr.call(this._weekdaysParse,o),-1===a?null:a):"ddd"===t?(a=Fr.call(this._shortWeekdaysParse,o),-1===a?null:a):(a=Fr.call(this._minWeekdaysParse,o),-1===a?null:a):"dddd"===t?(a=Fr.call(this._weekdaysParse,o),-1!==a)?a:(a=Fr.call(this._shortWeekdaysParse,o),-1!==a)?a:(a=Fr.call(this._minWeekdaysParse,o),-1===a?null:a):"ddd"===t?(a=Fr.call(this._shortWeekdaysParse,o),-1!==a)?a:(a=Fr.call(this._weekdaysParse,o),-1!==a)?a:(a=Fr.call(this._minWeekdaysParse,o),-1===a?null:a):(a=Fr.call(this._minWeekdaysParse,o),-1!==a)?a:(a=Fr.call(this._weekdaysParse,o),-1!==a)?a:(a=Fr.call(this._shortWeekdaysParse,o),-1===a?null:a)}function he(){function e(e,t){return t.length-e.length}var t=[],r=[],o=[],n=[],a,p,s,l,d;for(a=0;7>a;a++)// make the regex if we don't have it already
885
- p=x([2e3,1]).day(a),s=ee(this.weekdaysMin(p,"")),l=ee(this.weekdaysShort(p,"")),d=ee(this.weekdays(p,"")),t.push(s),r.push(l),o.push(d),n.push(s),n.push(l),n.push(d);// Sorting makes sure if one weekday (or abbr) is a prefix of another it
886
- // will match the longer piece.
887
- t.sort(e),r.sort(e),o.sort(e),n.sort(e),this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}// FORMATTING
888
- function Ce(){return this.hours()%12||12}function Ae(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}// PARSING
889
- function _e(e,t){return t._meridiemParse}function Ne(e,t){var r=p(e.length,t.length),o;for(o=0;o<r;o+=1)if(e[o]!==t[o])return o;return r}function Oe(e){return e?e.toLowerCase().replace("_","-"):e}// pick the locale from the array
890
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
891
- // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
892
- function Ie(e){for(var t=0,r,o,n,a;t<e.length;){for(a=Oe(e[t]).split("-"),r=a.length,o=Oe(e[t+1]),o=o?o.split("-"):null;0<r;){if(n=Se(a.slice(0,r).join("-")),n)return n;if(o&&o.length>=r&&Ne(a,o)>=r-1)//the next array item is better than a shallower substring of this one
893
- break;r--}t++}return eo}function Se(t){var r=null,o;// TODO: Find a better way to register and load all the locales in Node
894
- if(void 0===jr[t]&&!0&&e&&e.exports)try{r=eo._abbr,o=require,o("./locale/"+t),Le(r)}catch(r){jr[t]=null}return jr[t]}// This function will load locale and then set the global locale. If
895
- // no arguments are passed in, it will simply return the current global
896
- // locale key.
897
- function Le(e,t){var r;return e&&(r=y(t)?be(e):ve(e,t),r?eo=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eo._abbr}function ve(e,t){if(null!==t){var r=Yr,o;if(t.abbr=e,null!=jr[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=jr[e]._config;else if(null!=t.parentLocale)if(null!=jr[t.parentLocale])r=jr[t.parentLocale]._config;else if(o=Se(t.parentLocale),null!=o)r=o._config;else return Wr[t.parentLocale]||(Wr[t.parentLocale]=[]),Wr[t.parentLocale].push({name:e,config:t}),null;return jr[e]=new b(v(r,t)),Wr[e]&&Wr[e].forEach(function(e){ve(e.name,e.config)}),Le(e),jr[e]}return delete jr[e],null}// returns locale data
898
- function be(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eo;if(!l(e)){if(t=Se(e),t)return t;e=[e]}return Ie(e)}function ke(){return pr(jr)}function Pe(e){var t=e._a,r;return t&&-2===R(e).overflow&&(r=0>t[1]||11<t[1]?1:1>t[2]||t[2]>ae(t[0],t[1])?2:0>t[3]||24<t[3]||24===t[3]&&(0!==t[4]||0!==t[5]||0!==t[6])?3:0>t[4]||59<t[4]?4:0>t[5]||59<t[5]?5:0>t[6]||999<t[6]?6:-1,R(e)._overflowDayOfYear&&(0>r||2<r)&&(r=2),R(e)._overflowWeeks&&-1===r&&(r=7),R(e)._overflowWeekday&&-1===r&&(r=8),R(e).overflow=r),e}// iso 8601 regex
899
- // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
900
- // date from iso format
901
- function De(e){var t=e._i,r=zr.exec(t)||qr.exec(t),o,n,a,p,s,d;if(r){for(R(e).iso=!0,o=0,n=$r.length;o<n;o++)if($r[o][1].exec(r[1])){p=$r[o][0],a=!1!==$r[o][2];break}if(null==p)return void(e._isValid=!1);if(r[3]){for(o=0,n=Jr.length;o<n;o++)if(Jr[o][1].exec(r[3])){s=(r[2]||" ")+Jr[o][0];break}if(null==s)return void(e._isValid=!1)}if(!a&&null!=s)return void(e._isValid=!1);if(r[4])if(Kr.exec(r[4]))d="Z";else return void(e._isValid=!1);e._f=p+(s||"")+(d||""),ze(e)}else e._isValid=!1}function Me(e,t,r,o,n,a){var i=[Ue(e),wr.indexOf(t),parseInt(r,10),parseInt(o,10),parseInt(n,10)];return a&&i.push(parseInt(a,10)),i}function Ue(e){var t=parseInt(e,10);return 49>=t?2e3+t:999>=t?1900+t:t}function Fe(e){// Remove comments and folding whitespace and replace multiple-spaces with a single space
902
- return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function we(e,t,r){if(e){// TODO: Replace the vanilla JS Date object with an independent day-of-week check.
903
- var o=Br.indexOf(e),n=new Date(t[0],t[1],t[2]).getDay();if(o!==n)return R(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function He(e,t,r){if(e)return Zr[e];if(t)// the only allowed military tz is Z
904
- return 0;var o=parseInt(r,10),n=o%100;return 60*((o-n)/100)+n}// date and time from ref 2822 format
905
- function Ve(e){var t=Qr.exec(Fe(e._i)),r;if(t){if(r=Me(t[4],t[3],t[2],t[5],t[6],t[7]),!we(t[1],r,e))return;e._a=r,e._tzm=He(t[8],t[9],t[10]),e._d=ue.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),R(e).rfc2822=!0}else e._isValid=!1}// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
906
- function Be(e){var t=Xr.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(De(e),!1===e._isValid)delete e._isValid;else return;if(Ve(e),!1===e._isValid)delete e._isValid;else return;e._strict?e._isValid=!1:s.createFromInputFallback(e)}// Pick the first defined of two or three arguments.
907
- function Ge(e,t,r){return null==e?null==t?r:t:e}function Ye(e){// hooks is actually the exported moment object
908
- var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}// convert an array to a date.
909
- // the array should mirror the parameters below
910
- // note: all values past the year are optional and will default to the lowest possible value.
911
- // [year, month, day , hour, minute, second, millisecond]
912
- function je(e){var t=[],r,o,n,a,p;if(!e._d){// Default to current date.
913
- // * if no year, month, day of month are given, default to today
914
- // * if day of month is given, default month and year
915
- // * if month is given, default only year
916
- // * if year is given, don't default anything
917
- for(n=Ye(e),e._w&&null==e._a[2]&&null==e._a[1]&&We(e),null!=e._dayOfYear&&(p=Ge(e._a[0],n[0]),(e._dayOfYear>de(p)||0===e._dayOfYear)&&(R(e)._overflowDayOfYear=!0),o=ue(p,0,e._dayOfYear),e._a[1]=o.getUTCMonth(),e._a[2]=o.getUTCDate()),r=0;3>r&&null==e._a[r];++r)e._a[r]=t[r]=n[r];// Zero out whatever was not defaulted, including time
918
- for(;7>r;r++)e._a[r]=t[r]=null==e._a[r]?2===r?1:0:e._a[r];// Check for 24:00:00.000
919
- 24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?ue:ce).apply(null,t),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==a&&(R(e).weekdayMismatch=!0)}}function We(e){var t,r,o,n,a,i,p,s,l;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(a=1,i=4,r=Ge(t.GG,e._a[0],ge(et(),1,4).year),o=Ge(t.W,1),n=Ge(t.E,1),(1>n||7<n)&&(s=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,l=ge(et(),a,i),r=Ge(t.gg,e._a[0],l.year),o=Ge(t.w,l.week),null==t.d?null==t.e?n=a:(n=t.e+a,(0>t.e||6<t.e)&&(s=!0)):(n=t.d,(0>n||6<n)&&(s=!0))),1>o||o>Ee(r,a,i)?R(e)._overflowWeeks=!0:null==s?(p=me(r,o,n,a,i),e._a[0]=p.year,e._dayOfYear=p.dayOfYear):R(e)._overflowWeekday=!0}// constant that refers to the ISO standard
920
- // date from string and format string
921
- function ze(e){// TODO: Move this to another part of the creation flow to prevent circular deps
922
- if(e._f===s.ISO_8601)return void De(e);if(e._f===s.RFC_2822)return void Ve(e);e._a=[],R(e).empty=!0;// This array is used to make a Date, either with `new Date` or `Date.UTC`
923
- var t=""+e._i,r=t.length,o=0,n,a,p,l,d,c;for(p=w(e._f,e._locale).match(sr)||[],n=0;n<p.length;n++)l=p[n],a=(t.match(Q(l,e))||[])[0],a&&(d=t.substr(0,t.indexOf(a)),0<d.length&&R(e).unusedInput.push(d),t=t.slice(t.indexOf(a)+a.length),o+=a.length),cr[l]?(a?R(e).empty=!1:R(e).unusedTokens.push(l),oe(l,a,e)):e._strict&&!a&&R(e).unusedTokens.push(l);// add remaining unparsed input length to the string
924
- R(e).charsLeftOver=r-o,0<t.length&&R(e).unusedInput.push(t),12>=e._a[3]&&!0===R(e).bigHour&&0<e._a[3]&&(R(e).bigHour=void 0),R(e).parsedDateParts=e._a.slice(0),R(e).meridiem=e._meridiem,e._a[3]=qe(e._locale,e._a[3],e._meridiem),c=R(e).era,null!==c&&(e._a[0]=e._locale.erasConvertYear(c,e._a[0])),je(e),Pe(e)}function qe(e,t,r){var o;return null==r?t:null==e.meridiemHour?null==e.isPM?t:(o=e.isPM(r),o&&12>t&&(t+=12),o||12!==t||(t=0),t):e.meridiemHour(t,r)}// date from string and array of format strings
925
- function Ke(e){var t=!1,r,o,n,a,p,s;if(0===e._f.length)return R(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)// if there is any input that was not parsed add a penalty for that format
926
- //or tokens
927
- p=0,s=!1,r=A({},e),null!=e._useUTC&&(r._useUTC=e._useUTC),r._f=e._f[a],ze(r),h(r)&&(s=!0),p+=R(r).charsLeftOver,p+=10*R(r).unusedTokens.length,R(r).score=p,t?p<n&&(n=p,o=r):(null==n||p<n||s)&&(n=p,o=r,s&&(t=!0));f(e,o||r)}function $e(e){if(!e._d){var t=G(e._i),r=void 0===t.day?t.date:t.day;e._a=E([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),je(e)}}function Je(e){var t=new _(Pe(Xe(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xe(e){var t=e._i,r=e._f;return(e._locale=e._locale||be(e._l),null===t||void 0===r&&""===t)?C({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),N(t))?new _(Pe(t)):(g(t)?e._d=t:l(r)?Ke(e):r?ze(e):Qe(e),h(e)||(e._d=null),e)}function Qe(e){var t=e._i;y(t)?e._d=new Date(s.now()):g(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Be(e):l(t)?(e._a=E(t.slice(0),function(e){return parseInt(e,10)}),je(e)):d(t)?$e(e):m(t)?e._d=new Date(t):s.createFromInputFallback(e)}function Ze(e,t,r,o,n){var a={};return(!0===t||!1===t)&&(o=t,t=void 0),(!0===r||!1===r)&&(o=r,r=void 0),(d(e)&&u(e)||l(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=n,a._l=r,a._i=e,a._f=t,a._strict=o,Je(a)}function et(e,t,r,o){return Ze(e,t,r,o,!1)}// Pick a moment m from moments so that m[fn](other) is true for all
928
- // other. This relies on the function fn to be transitive.
929
- //
930
- // moments should either be an array of moment objects or an array, whose
931
- // first element is an array of moment objects.
932
- function tt(e,t){var r,o;if(1===t.length&&l(t[0])&&(t=t[0]),!t.length)return et();for(r=t[0],o=1;o<t.length;++o)(!t[o].isValid()||t[o][e](r))&&(r=t[o]);return r}// TODO: Use [].sort instead?
933
- function rt(e){var t=!1,r,o;for(r in e)if(c(e,r)&&(-1===Fr.call(oo,r)||null!=e[r]&&isNaN(e[r])))return!1;for(o=0;o<oo.length;++o)if(e[oo[o]]){if(t)return!1;// only allow non-integers for smallest unit
934
- parseFloat(e[oo[o]])!==q(e[oo[o]])&&(t=!0)}return!0}function ot(e){var t=G(e),r=t.year||0,o=t.quarter||0,n=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,p=t.hour||0,s=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=rt(t),this._milliseconds=+d+1e3*l+// 1000
935
- 6e4*s+// 1000 * 60
936
- 60*(60*(1e3*p)),this._days=+i+7*a,this._months=+n+3*o+12*r,this._data={},this._locale=be(),this._bubble()}function nt(e){return e instanceof ot}function at(e){return 0>e?-1*t(-1*e):t(e)}// compare two arrays, return the number of differences
937
- function it(e,t,r){var o=p(e.length,t.length),a=n(e.length-t.length),s=0,l;for(l=0;l<o;l++)(r&&e[l]!==t[l]||!r&&q(e[l])!==q(t[l]))&&s++;return s+a}// FORMATTING
938
- function pt(e,t){D(e,0,0,function(){var e=this.utcOffset(),r="+";return 0>e&&(e=-e,r="-"),r+P(~~(e/60),2)+t+P(~~e%60,2)})}function st(e,t){var r=(t||"").match(e),o,n,a;return null===r?null:(o=r[r.length-1]||[],n=(o+"").match(no)||["-",0,0],a=+(60*n[1])+q(n[2]),0===a?0:"+"===n[0]?a:-a)}// Return a moment from input, that is local/utc/zone equivalent to model.
939
- function lt(e,t){var r,o;return t._isUTC?(r=t.clone(),o=(N(e)||g(e)?e.valueOf():et(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+o),s.updateOffset(r,!1),r):et(e).local()}function dt(e){// On Firefox.24 Date#getTimezoneOffset returns a floating point.
940
- // https://github.com/moment/moment/pull/1871
941
- return-t(e._d.getTimezoneOffset())}// HOOKS
942
- // This function will be called whenever a moment is mutated.
943
- // It is intended to keep the offset in sync with the timezone.
944
- function ct(){return!!this.isValid()&&this._isUTC&&0===this._offset}// ASP.NET json date format regex
945
- function ut(e,t){var r=e,// matching against regexp is expensive, do it on demand
946
- o=null,n,a,i;return nt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:m(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(o=ao.exec(e))?(n="-"===o[1]?-1:1,r={y:0,d:q(o[2])*n,h:q(o[3])*n,m:q(o[4])*n,s:q(o[5])*n,ms:q(at(1e3*o[6]))*n// the millisecond decimal point is included in the match
947
- }):(o=io.exec(e))?(n="-"===o[1]?-1:1,r={y:yt(o[2],n),M:yt(o[3],n),w:yt(o[4],n),d:yt(o[5],n),h:yt(o[6],n),m:yt(o[7],n),s:yt(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=gt(et(r.from),et(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),a=new ot(r),nt(e)&&c(e,"_locale")&&(a._locale=e._locale),nt(e)&&c(e,"_isValid")&&(a._isValid=e._isValid),a}function yt(e,t){// We'd normally use ~~inp for this, but unfortunately it also
948
- // converts floats to ints.
949
- // inp may be undefined, so careful calling replace on it.
950
- var r=e&&parseFloat(e.replace(",","."));// apply sign while we're at it
951
- return(isNaN(r)?0:r)*t}function mt(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function gt(e,t){var r;return e.isValid()&&t.isValid()?(t=lt(t,e),e.isBefore(t)?r=mt(e,t):(r=mt(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}// TODO: remove 'name' arg after deprecation is removed
952
- function Et(e,t){return function(r,o){var n,a;//invert the arguments, but complain about it
953
- return null===o||isNaN(+o)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=o,o=a),n=ut(r,o),ft(this,n,e),this}}function ft(e,t,r,o){var n=t._milliseconds,a=at(t._days),i=at(t._months);e.isValid()&&(o=null==o||o,i&&pe(e,$(e,"Month")+i*r),a&&J(e,"Date",$(e,"Date")+a*r),n&&e._d.setTime(e._d.valueOf()+n*r),o&&s.updateOffset(e,a||i))}function xt(e){return"string"==typeof e||e instanceof String}// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
954
- function Tt(e){return N(e)||g(e)||xt(e)||m(e)||ht(e)||Rt(e)||null===e||void 0===e}function Rt(e){var t=d(e)&&!u(e),r=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],n,a;for(n=0;n<o.length;n+=1)a=o[n],r=r||c(e,a);return t&&r}function ht(e){var t=l(e),r=!1;return t&&(r=0===e.filter(function(t){return!m(t)&&xt(e)}).length),t&&r}function Ct(e){var t=d(e)&&!u(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n,a;for(n=0;n<o.length;n+=1)a=o[n],r=r||c(e,a);return t&&r}function At(e,t){if(e.date()<t.date())// end-of-month calculations work correct when the start month has more
955
- // days than the end month.
956
- return-At(t,e);// difference in months
957
- var r=12*(t.year()-e.year())+(t.month()-e.month()),// b is in (anchor - 1 month, anchor + 1 month)
958
- o=e.clone().add(r,"months"),n,a;//check for negative zero, return zero if negative zero
959
- return 0>t-o?(n=e.clone().add(r-1,"months"),a=(t-o)/(o-n)):(n=e.clone().add(r+1,"months"),a=(t-o)/(n-o)),-(r+a)||0}// If passed a locale key, it will set the locale for this
960
- // instance. Otherwise, it will return the locale configuration
961
- // variables for this instance.
962
- function _t(e){var t;return void 0===e?this._locale._abbr:(t=be(e),null!=t&&(this._locale=t),this)}function Nt(){return this._locale}// actual modulo - handles negative numbers (for dates before 1970):
963
- function Ot(e,t){return(e%t+t)%t}function It(e,t,r){// the date constructor remaps years 0-99 to 1900-1999
964
- return 100>e&&0<=e?new Date(e+400,t,r)-12622780800000:new Date(e,t,r).valueOf()}function St(e,t,r){// Date.UTC remaps years 0-99 to 1900-1999
965
- return 100>e&&0<=e?Date.UTC(e+400,t,r)-12622780800000:Date.UTC(e,t,r)}function Lt(){var e=this._eras||be("en")._eras,t,r,o;for(t=0,r=e.length;t<r;++t){switch(typeof e[t].since){case"string":o=s(e[t].since).startOf("day"),e[t].since=o.valueOf();}switch(typeof e[t].until){case"undefined":e[t].until=+Infinity;break;case"string":o=s(e[t].until).startOf("day").valueOf(),e[t].until=o.valueOf();}}return e}function vt(e,t,r){var o=this.eras(),n,a,p,s,d;for(e=e.toUpperCase(),n=0,a=o.length;n<a;++n)if(p=o[n].name.toUpperCase(),s=o[n].abbr.toUpperCase(),d=o[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return o[n];break;case"NNNN":if(p===e)return o[n];break;case"NNNNN":if(d===e)return o[n];}else if(0<=[p,s,d].indexOf(e))return o[n]}function bt(){var e=this.localeData().eras(),t,r,o;for(t=0,r=e.length;t<r;++t){if(o=this.clone().startOf("day").valueOf(),e[t].since<=o&&o<=e[t].until)return e[t].name;if(e[t].until<=o&&o<=e[t].since)return e[t].name}return""}function kt(){var e=this.localeData().eras(),t,r,o;for(t=0,r=e.length;t<r;++t){if(o=this.clone().startOf("day").valueOf(),e[t].since<=o&&o<=e[t].until)return e[t].narrow;if(e[t].until<=o&&o<=e[t].since)return e[t].narrow}return""}function Pt(){var e=this.localeData().eras(),t,r,o;for(t=0,r=e.length;t<r;++t){if(o=this.clone().startOf("day").valueOf(),e[t].since<=o&&o<=e[t].until)return e[t].abbr;if(e[t].until<=o&&o<=e[t].since)return e[t].abbr}return""}function Dt(){var e=this.localeData().eras(),t,r,o,n;for(t=0,r=e.length;t<r;++t)if(o=e[t].since<=e[t].until?1:-1,n=this.clone().startOf("day").valueOf(),e[t].since<=n&&n<=e[t].until||e[t].until<=n&&n<=e[t].since)return(this.year()-s(e[t].since).year())*o+e[t].offset;return this.year()}function Mt(e,t){return t.erasAbbrRegex(e)}function Ut(){var e=[],t=[],r=[],o=[],n=this.eras(),a,p;for(a=0,p=n.length;a<p;++a)t.push(ee(n[a].name)),e.push(ee(n[a].abbr)),r.push(ee(n[a].narrow)),o.push(ee(n[a].name)),o.push(ee(n[a].abbr)),o.push(ee(n[a].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}// FORMATTING
966
- function Ft(e,t){D(0,[e,e.length],0,t)}function wt(e,t,r,o,n){var a;return null==e?ge(this,o,n).year:(a=Ee(e,o,n),t>a&&(t=a),Ht.call(this,e,t,r,o,n))}function Ht(e,t,r,o,n){var a=me(e,t,r,o,n),i=ue(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}// FORMATTING
967
- function Vt(e,t){t[6]=q(1e3*("0."+e))}function Bt(e){return e}function Gt(e,t,r,o){var n=be(),a=x().set(o,t);return n[r](a,e)}function Yt(e,t,r){if(m(e)&&(t=e,e=void 0),e=e||"",null!=t)return Gt(e,t,r,"month");var o=[],n;for(n=0;12>n;n++)o[n]=Gt(e,n,r,"month");return o}// ()
968
- // (5)
969
- // (fmt, 5)
970
- // (fmt)
971
- // (true)
972
- // (true, 5)
973
- // (true, fmt, 5)
974
- // (true, fmt)
975
- function jt(e,t,r,o){"boolean"==typeof e?(m(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,m(t)&&(r=t,t=void 0),t=t||"");var n=be(),a=e?n._week.dow:0,p=[],s;if(null!=r)return Gt(t,(r+a)%7,o,"day");for(s=0;7>s;s++)p[s]=Gt(t,(s+a)%7,o,"day");return p}function Wt(e,t,r,o){var n=ut(t,r);return e._milliseconds+=o*n._milliseconds,e._days+=o*n._days,e._months+=o*n._months,e._bubble()}// supports only 2.0-style add(1, 's') or add(duration)
976
- function zt(e){return 0>e?a(e):r(e)}function qt(e){// 400 years have 146097 days (taking into account leap year rules)
977
- // 400 years have 12 months === 4800
978
- return 4800*e/146097}function Kt(e){// the reverse of daysToMonths
979
- return 146097*e/4800}function $t(e){return function(){return this.as(e)}}function Jt(e){return function(){return this.isValid()?this._data[e]:NaN}}// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
980
- function Xt(e,t,r,o,n){return n.relativeTime(t||1,!!r,e,o)}function Qt(e,t,r,o){var n=ut(e).abs(),i=Mo(n.as("s")),p=Mo(n.as("m")),s=Mo(n.as("h")),l=Mo(n.as("d")),d=Mo(n.as("M")),c=Mo(n.as("w")),u=Mo(n.as("y")),y=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||1>=p&&["m"]||p<r.m&&["mm",p]||1>=s&&["h"]||s<r.h&&["hh",s]||1>=l&&["d"]||l<r.d&&["dd",l];return null!=r.w&&(y=y||1>=c&&["w"]||c<r.w&&["ww",c]),y=y||1>=d&&["M"]||d<r.M&&["MM",d]||1>=u&&["y"]||["yy",u],y[2]=t,y[3]=0<+e,y[4]=o,Xt.apply(null,y)}// This function allows you to set the rounding function for relative time strings
981
- function Zt(e){return void 0===e?Mo:"function"==typeof e&&(Mo=e,!0)}// This function allows you to set a threshold for relative time strings
982
- function er(e){return(0<e)-(0>e)||+e}function tr(){// for ISO strings we do not use the normal bubbling rules:
983
- // * milliseconds bubble up until they become hours
984
- // * days do not bubble at all
985
- // * months bubble up until they become years
986
- // This is because there is no context-free conversion between hours and days
987
- // (think of clock changes)
988
- // and also not between days and months (28-31 days per month)
989
- if(!this.isValid())return this.localeData().invalidDate();var e=Fo(this._milliseconds)/1e3,t=Fo(this._days),r=Fo(this._months),o=this.asSeconds(),n,a,i,p,l,d,c,u;return o?(n=z(e/60),a=z(n/60),e%=60,n%=60,i=z(r/12),r%=12,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=0>o?"-":"",d=er(this._months)===er(o)?"":"-",c=er(this._days)===er(o)?"":"-",u=er(this._milliseconds)===er(o)?"":"-",l+"P"+(i?d+i+"Y":"")+(r?d+r+"M":"")+(t?c+t+"D":"")+(a||n||e?"T":"")+(a?u+a+"H":"")+(n?u+n+"M":"")+(e?u+p+"S":"")):"P0D";// 3600 seconds -> 60 minutes -> 1 hour
990
- }var rr,or;or=Array.prototype.some?Array.prototype.some:function(e){var r=Object(this),t=r.length>>>0,o;for(o=0;o<t;o++)if(o in r&&e.call(this,r[o],o,r))return!0;return!1};var nr=s.momentProperties=[],ar=!1,ir={};s.suppressDeprecationWarnings=!1,s.deprecationHandler=null;var pr=Object.keys?Object.keys:function(e){var t=[],r;for(r in e)c(e,r)&&t.push(r);return t};var sr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,lr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,dr={},cr={},ur={},yr={},mr=/\d/,// 0 - 9
991
- gr=/\d\d/,// 00 - 99
992
- Er=/\d{3}/,// 000 - 999
993
- fr=/\d{4}/,// 0000 - 9999
994
- xr=/[+-]?\d{6}/,// -999999 - 999999
995
- Tr=/\d\d?/,// 0 - 99
996
- Rr=/\d\d\d\d?/,// 999 - 9999
997
- hr=/\d\d\d\d\d\d?/,// 99999 - 999999
998
- Cr=/\d{1,3}/,// 0 - 999
999
- Ar=/\d{1,4}/,// 0 - 9999
1000
- _r=/[+-]?\d{1,6}/,// -999999 - 999999
1001
- Nr=/\d+/,// 0 - inf
1002
- Or=/[+-]?\d+/,// +00:00 -00:00 +0000 -0000 or Z
1003
- Ir=/Z|[+-]\d\d(?::?\d\d)?/gi,// 123456789 123456789.123
1004
- // any word (or two) characters or numbers including two/three word month in arabic.
1005
- // includes scottish gaelic two word and hyphenated months
1006
- Sr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Lr;Lr={};var vr={},br=0,kr=1,Pr=2,Dr=3,Mr=4,Ur=5,Fr;Fr=Array.prototype.indexOf?Array.prototype.indexOf:function(e){// I know
1007
- var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),D("MMMM",0,0,function(e){return this.localeData().months(this,e)}),V("month","M"),Y("month",8),X("M",Tr),X("MM",Tr,gr),X("MMM",function(e,t){return t.monthsShortRegex(e)}),X("MMMM",function(e,t){return t.monthsRegex(e)}),te(["M","MM"],function(e,t){t[kr]=q(e)-1}),te(["MMM","MMMM"],function(e,t,r,o){var n=r._locale.monthsParse(e,o,r._strict);// if we didn't find a month name, mark the date as invalid.
1008
- null==n?R(r).invalidMonth=e:t[kr]=n});// LOCALES
1009
- var wr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Hr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;D("Y",0,0,function(){var e=this.year();return 9999>=e?P(e,4):"+"+e}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),V("year","y"),Y("year",1),X("Y",Or),X("YY",Tr,gr),X("YYYY",Ar,fr),X("YYYYY",_r,xr),X("YYYYYY",_r,xr),te(["YYYYY","YYYYYY"],br),te("YYYY",function(e,t){t[br]=2===e.length?s.parseTwoDigitYear(e):q(e)}),te("YY",function(e,t){t[br]=s.parseTwoDigitYear(e)}),te("Y",function(e,t){t[br]=parseInt(e,10)}),s.parseTwoDigitYear=function(e){return q(e)+(68<q(e)?1900:2e3)};// MOMENTS
1010
- var Vr=K("FullYear",!0);D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),V("week","w"),V("isoWeek","W"),Y("week",5),Y("isoWeek",5),X("w",Tr),X("ww",Tr,gr),X("W",Tr),X("WW",Tr,gr),re(["w","ww","W","WW"],function(e,t,r,o){t[o.substr(0,1)]=q(e)});D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),V("day","d"),V("weekday","e"),V("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),X("d",Tr),X("e",Tr),X("E",Tr),X("dd",function(e,t){return t.weekdaysMinRegex(e)}),X("ddd",function(e,t){return t.weekdaysShortRegex(e)}),X("dddd",function(e,t){return t.weekdaysRegex(e)}),re(["dd","ddd","dddd"],function(e,t,r,o){var n=r._locale.weekdaysParse(e,o,r._strict);// if we didn't get a weekday name, mark the date as invalid
1011
- null==n?R(r).invalidWeekday=e:t.d=n}),re(["d","e","E"],function(e,t,r,o){t[o]=q(e)});var Br=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];D("H",["HH",2],0,"hour"),D("h",["hh",2],0,Ce),D("k",["kk",2],0,function(){return this.hours()||24}),D("hmm",0,0,function(){return""+Ce.apply(this)+P(this.minutes(),2)}),D("hmmss",0,0,function(){return""+Ce.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),Ae("a",!0),Ae("A",!1),V("hour","h"),Y("hour",13),X("a",_e),X("A",_e),X("H",Tr),X("h",Tr),X("k",Tr),X("HH",Tr,gr),X("hh",Tr,gr),X("kk",Tr,gr),X("hmm",Rr),X("hmmss",hr),X("Hmm",Rr),X("Hmmss",hr),te(["H","HH"],Dr),te(["k","kk"],function(e,t){var r=q(e);t[Dr]=24===r?0:r}),te(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),te(["h","hh"],function(e,t,r){t[Dr]=q(e),R(r).bigHour=!0}),te("hmm",function(e,t,r){var o=e.length-2;t[Dr]=q(e.substr(0,o)),t[Mr]=q(e.substr(o)),R(r).bigHour=!0}),te("hmmss",function(e,t,r){var o=e.length-4,n=e.length-2;t[Dr]=q(e.substr(0,o)),t[Mr]=q(e.substr(o,2)),t[Ur]=q(e.substr(n)),R(r).bigHour=!0}),te("Hmm",function(e,t){var r=e.length-2;t[Dr]=q(e.substr(0,r)),t[Mr]=q(e.substr(r))}),te("Hmmss",function(e,t){var r=e.length-4,o=e.length-2;t[Dr]=q(e.substr(0,r)),t[Mr]=q(e.substr(r,2)),t[Ur]=q(e.substr(o))});var// Setting the hour should keep the time, because the user explicitly
1012
- // specified which hour they want. So trying to maintain the same hour (in
1013
- // a new timezone) makes sense. Adding/subtracting hours does not follow
1014
- // this rule.
1015
- Gr=K("Hours",!0),Yr={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:wr,week:{dow:0,// Sunday is the first day of the week.
1016
- doy:6// The week that contains Jan 6th is the first week of the year.
1017
- },weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekdaysShort:Br,meridiemParse:/[ap]\.?m?\.?/i},jr={},Wr={},zr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Kr=/Z|[+-]\d\d(?::?\d\d)?/,$r=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],// iso time formats and regexes
1018
- Jr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Xr=/^\/?Date\((-?\d+)/i,// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
1019
- Qr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Zr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},eo;s.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),s.ISO_8601=function(){},s.RFC_2822=function(){};var to=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=et.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:C()}),ro=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=et.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:C()}),oo=["year","quarter","month","week","day","hour","minute","second","millisecond"];pt("Z",":"),pt("ZZ",""),X("Z",Ir),X("ZZ",Ir),te(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=st(Ir,e)});// HELPERS
1020
- // timezone chunker
1021
- // '+10:00' > ['10', '00']
1022
- // '-1530' > ['-15', '30']
1023
- var no=/([\+\-]|\d\d)/gi;s.updateOffset=function(){};var ao=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
1024
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
1025
- // and further modified to allow for strings containing both week and day
1026
- io=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;ut.fn=ot.prototype,ut.invalid=function(){return ut(NaN)};var po=Et(1,"add"),so=Et(-1,"subtract");s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lo=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),X("N",Mt),X("NN",Mt),X("NNN",Mt),X("NNNN",function(e,t){return t.erasNameRegex(e)}),X("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,o){var n=r._locale.erasParse(e,o,r._strict);n?R(r).era=n:R(r).invalidEra=e}),X("y",Nr),X("yy",Nr),X("yyy",Nr),X("yyyy",Nr),X("yo",function(e,t){return t._eraYearOrdinalRegex||Nr}),te(["y","yy","yyy","yyyy"],br),te(["yo"],function(e,t,r){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),t[br]=r._locale.eraYearOrdinalParse?r._locale.eraYearOrdinalParse(e,o):parseInt(e,10)}),D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ft("gggg","weekYear"),Ft("ggggg","weekYear"),Ft("GGGG","isoWeekYear"),Ft("GGGGG","isoWeekYear"),V("weekYear","gg"),V("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),X("G",Or),X("g",Or),X("GG",Tr,gr),X("gg",Tr,gr),X("GGGG",Ar,fr),X("gggg",Ar,fr),X("GGGGG",_r,xr),X("ggggg",_r,xr),re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,o){t[o.substr(0,2)]=q(e)}),re(["gg","GG"],function(e,t,r,o){t[o]=s.parseTwoDigitYear(e)}),D("Q",0,"Qo","quarter"),V("quarter","Q"),Y("quarter",7),X("Q",mr),te("Q",function(e,t){t[kr]=3*(q(e)-1)}),D("D",["DD",2],"Do","date"),V("date","D"),Y("date",9),X("D",Tr),X("DD",Tr,gr),X("Do",function(e,t){// TODO: Remove "ordinalParse" fallback in next major release.
1027
- return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),te(["D","DD"],Pr),te("Do",function(e,t){t[Pr]=q(e.match(Tr)[0])});// MOMENTS
1028
- var co=K("Date",!0);// FORMATTING
1029
- D("DDD",["DDDD",3],"DDDo","dayOfYear"),V("dayOfYear","DDD"),Y("dayOfYear",4),X("DDD",Cr),X("DDDD",Er),te(["DDD","DDDD"],function(e,t,r){r._dayOfYear=q(e)}),D("m",["mm",2],0,"minute"),V("minute","m"),Y("minute",14),X("m",Tr),X("mm",Tr,gr),te(["m","mm"],Mr);// MOMENTS
1030
- var uo=K("Minutes",!1);// FORMATTING
1031
- D("s",["ss",2],0,"second"),V("second","s"),Y("second",15),X("s",Tr),X("ss",Tr,gr),te(["s","ss"],Ur);// MOMENTS
1032
- var yo=K("Seconds",!1);// FORMATTING
1033
- D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return 10*this.millisecond()}),D(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),D(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),D(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),D(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),D(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),V("millisecond","ms"),Y("millisecond",16),X("S",Cr,mr),X("SS",Cr,gr),X("SSS",Cr,Er);var mo,go;for(mo="SSSS";9>=mo.length;mo+="S")X(mo,Nr);for(mo="S";9>=mo.length;mo+="S")te(mo,Vt);go=K("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");var Eo=_.prototype;Eo.add=po,Eo.calendar=function(e,t){1===arguments.length&&(arguments[0]?Tt(arguments[0])?(e=arguments[0],t=void 0):Ct(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));// We want to compare the start of today, vs this.
1034
- // Getting start-of-today depends on whether we're local/utc/offset or not.
1035
- var r=e||et(),o=lt(r,this).startOf("day"),n=s.calendarFormat(this,o)||"sameElse",a=t&&(L(t[n])?t[n].call(this,r):t[n]);return this.format(a||this.localeData().calendar(n,this,et(r)))},Eo.clone=function(){return new _(this)},Eo.diff=function(e,t,r){var o,n,a;return this.isValid()?(o=lt(e,this),!o.isValid())?NaN:(n=6e4*(o.utcOffset()-this.utcOffset()),t=B(t),(a="year"===t?At(this,o)/12:"month"===t?At(this,o):"quarter"===t?At(this,o)/3:"second"===t?(this-o)/1e3:"minute"===t?(this-o)/6e4:"hour"===t?(this-o)/36e5:"day"===t?(this-o-n)/864e5:"week"===t?(this-o-n)/6048e5:this-o,r?a:z(a))):NaN},Eo.endOf=function(e){var t,r;return(e=B(e),void 0===e||"millisecond"===e||!this.isValid())?this:(r=this._isUTC?St:It,"year"===e?t=r(this.year()+1,0,1)-1:"quarter"===e?t=r(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?t=r(this.year(),this.month()+1,1)-1:"week"===e?t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?t=r(this.year(),this.month(),this.date()+1)-1:"hour"===e?(t=this._d.valueOf(),t+=3600000-Ot(t+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(t=this._d.valueOf(),t+=60000-Ot(t,60000)-1):"second"===e?(t=this._d.valueOf(),t+=1000-Ot(t,1000)-1):void 0,(this._d.setTime(t),s.updateOffset(this,!0),this))},Eo.format=function(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},Eo.from=function(e,t){return this.isValid()&&(N(e)&&e.isValid()||et(e).isValid())?ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Eo.fromNow=function(e){return this.from(et(),e)},Eo.to=function(e,t){return this.isValid()&&(N(e)&&e.isValid()||et(e).isValid())?ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Eo.toNow=function(e){return this.to(et(),e)},Eo.get=function(e){return e=B(e),L(this[e])?this[e]():this},Eo.invalidAt=function(){return R(this).overflow},Eo.isAfter=function(e,t){var r=N(e)?e:et(e);return!!(this.isValid()&&r.isValid())&&(t=B(t)||"millisecond","millisecond"===t?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},Eo.isBefore=function(e,t){var r=N(e)?e:et(e);return!!(this.isValid()&&r.isValid())&&(t=B(t)||"millisecond","millisecond"===t?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},Eo.isBetween=function(e,t,r,o){var n=N(e)?e:et(e),a=N(t)?t:et(t);return!!(this.isValid()&&n.isValid()&&a.isValid())&&(o=o||"()",("("===o[0]?this.isAfter(n,r):!this.isBefore(n,r))&&(")"===o[1]?this.isBefore(a,r):!this.isAfter(a,r)))},Eo.isSame=function(e,t){var r=N(e)?e:et(e),o;return!!(this.isValid()&&r.isValid())&&(t=B(t)||"millisecond","millisecond"===t?this.valueOf()===r.valueOf():(o=r.valueOf(),this.clone().startOf(t).valueOf()<=o&&o<=this.clone().endOf(t).valueOf()))},Eo.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Eo.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Eo.isValid=function(){return h(this)},Eo.lang=lo,Eo.locale=_t,Eo.localeData=Nt,Eo.max=ro,Eo.min=to,Eo.parsingFlags=function(){return f({},R(this))},Eo.set=function(e,t){if("object"==typeof e){e=G(e);var r=j(e),o;for(o=0;o<r.length;o++)this[r[o].unit](e[r[o].unit])}else if(e=B(e),L(this[e]))return this[e](t);return this},Eo.startOf=function(e){var t,r;return(e=B(e),void 0===e||"millisecond"===e||!this.isValid())?this:(r=this._isUTC?St:It,"year"===e?t=r(this.year(),0,1):"quarter"===e?t=r(this.year(),this.month()-this.month()%3,1):"month"===e?t=r(this.year(),this.month(),1):"week"===e?t=r(this.year(),this.month(),this.date()-this.weekday()):"isoWeek"===e?t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)):"day"===e||"date"===e?t=r(this.year(),this.month(),this.date()):"hour"===e?(t=this._d.valueOf(),t-=Ot(t+(this._isUTC?0:60000*this.utcOffset()),3600000)):"minute"===e?(t=this._d.valueOf(),t-=Ot(t,60000)):"second"===e?(t=this._d.valueOf(),t-=Ot(t,1000)):void 0,(this._d.setTime(t),s.updateOffset(this,!0),this))},Eo.subtract=so,Eo.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Eo.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Eo.toDate=function(){return new Date(this.valueOf())},Eo.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return 0>r.year()||9999<r.year()?F(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+1e3*(60*this.utcOffset())).toISOString().replace("Z",F(r,"Z")):F(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}/**
1036
- * Return a human readable representation of a moment that can
1037
- * also be evaluated to get a new moment which is the same
1038
- *
1039
- * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
1040
- */,Eo.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,o,n,a;return this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z"),r="["+e+"(\"]",o=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",a=t+"[\")]",this.format(r+o+n+a)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Eo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Eo.toJSON=function(){// new Date(NaN).toJSON() === null
1041
- return this.isValid()?this.toISOString():null},Eo.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Eo.unix=function(){return a(this.valueOf()/1e3)},Eo.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Eo.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Eo.eraName=bt,Eo.eraNarrow=kt,Eo.eraAbbr=Pt,Eo.eraYear=Dt,Eo.year=Vr,Eo.isLeapYear=function(){return W(this.year())},Eo.weekYear=// MOMENTS
1042
- function(e){return wt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Eo.isoWeekYear=function(e){return wt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Eo.quarter=Eo.quarters=// MOMENTS
1043
- function(e){return null==e?r((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}// FORMATTING
1044
- ,Eo.month=se,Eo.daysInMonth=function(){return ae(this.year(),this.month())},Eo.week=Eo.weeks=// MOMENTS
1045
- function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Eo.isoWeek=Eo.isoWeeks=function(e){var t=ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}// FORMATTING
1046
- ,Eo.weeksInYear=function(){var e=this.localeData()._week;return Ee(this.year(),e.dow,e.doy)},Eo.weeksInWeekYear=function(){var e=this.localeData()._week;return Ee(this.weekYear(),e.dow,e.doy)},Eo.isoWeeksInYear=function(){return Ee(this.year(),1,4)},Eo.isoWeeksInISOWeekYear=function(){return Ee(this.isoWeekYear(),1,4)},Eo.date=co,Eo.day=Eo.days=// MOMENTS
1047
- function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=fe(e,this.localeData()),this.add(e-t,"d"))},Eo.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Eo.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;// behaves the same as moment#day except
1048
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
1049
- // as a setter, sunday should belong to the previous week.
1050
- if(null!=e){var t=xe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Eo.dayOfYear=// HELPERS
1051
- // MOMENTS
1052
- function(e){var r=t((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?r:this.add(e-r,"d")}// FORMATTING
1053
- ,Eo.hour=Eo.hours=Gr,Eo.minute=Eo.minutes=uo,Eo.second=Eo.seconds=yo,Eo.millisecond=Eo.milliseconds=go,Eo.utcOffset=// MOMENTS
1054
- // keepLocalTime = true means only change the timezone, without
1055
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
1056
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
1057
- // +0200, so we adjust the time as needed, to be valid.
1058
- //
1059
- // Keeping the time actually adds/subtracts (one hour)
1060
- // from the actual represented time. That is why we call updateOffset
1061
- // a second time. In case it wants us to change the offset again
1062
- // _changeInProgress == true case, then we have to adjust, because
1063
- // there is no such time in the given timezone.
1064
- function(e,t,r){var o=this._offset||0,a;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>n(e)&&!r&&(e*=60);else if(e=st(Ir,e),null===e)return this;return!this._isUTC&&t&&(a=dt(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),o!==e&&(!t||this._changeInProgress?ft(this,ut(e-o,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:dt(this)},Eo.utc=function(e){return this.utcOffset(0,e)},Eo.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(dt(this),"m")),this},Eo.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=st(/Z|[+-]\d\d:?\d\d/gi,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},Eo.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?et(e).utcOffset():0,0==(this.utcOffset()-e)%60)},Eo.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Eo.isLocal=function(){return!!this.isValid()&&!this._isUTC},Eo.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Eo.isUtc=ct,Eo.isUTC=ct,Eo.zoneAbbr=// MOMENTS
1065
- function(){return this._isUTC?"UTC":""},Eo.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Eo.dates=I("dates accessor is deprecated. Use date instead.",co),Eo.months=I("months accessor is deprecated. Use month instead",se),Eo.years=I("years accessor is deprecated. Use year instead",Vr),Eo.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),Eo.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!y(this._isDSTShifted))return this._isDSTShifted;var e={},t;return A(e,this),e=Xe(e),e._a?(t=e._isUTC?x(e._a):et(e._a),this._isDSTShifted=this.isValid()&&0<it(e._a,t.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var fo=b.prototype;fo.calendar=k,fo.longDateFormat=H,fo.invalidDate=function(){return this._invalidDate},fo.ordinal=function(e){return this._ordinal.replace("%d",e)},fo.preparse=Bt,fo.postformat=Bt,fo.relativeTime=function(e,t,r,o){var n=this._relativeTime[r];return L(n)?n(e,t,r,o):n.replace(/%d/i,e)},fo.pastFuture=function(e,t){var r=this._relativeTime[0<e?"future":"past"];return L(r)?r(t):r.replace(/%s/i,t)},fo.set=function(e){var t,r;for(r in e)c(e,r)&&(t=e[r],L(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fo.eras=Lt,fo.erasParse=vt,fo.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*r},fo.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||Ut.call(this),e?this._erasAbbrRegex:this._erasRegex},fo.erasNameRegex=function(e){return c(this,"_erasNameRegex")||Ut.call(this),e?this._erasNameRegex:this._erasRegex},fo.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||Ut.call(this),e?this._erasNarrowRegex:this._erasRegex},fo.months=function(e,t){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Hr).test(t)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone},fo.monthsShort=function(e,t){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Hr.test(t)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fo.monthsParse=function(e,t,r){var o,n,a;if(this._monthsParseExact)return ie.call(this,e,t,r);// TODO: add sorting
1066
- // Sorting makes sure if one month (or abbr) is a prefix of another
1067
- // see sorting in computeMonthsParse
1068
- for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;12>o;o++){// test the regex
1069
- if(n=x([2e3,o]),r&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),r||this._monthsParse[o]||(a="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[o].test(e))return o;if(r&&"MMM"===t&&this._shortMonthsParse[o].test(e))return o;if(!r&&this._monthsParse[o].test(e))return o}},fo.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||le.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Sr),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},fo.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||le.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Sr),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},fo.week=// HELPERS
1070
- // LOCALES
1071
- function(e){return ge(e,this._week.dow,this._week.doy).week},fo.firstDayOfYear=function(){return this._week.doy},fo.firstDayOfWeek=function(){return this._week.dow},fo.weekdays=function(e,t){var r=l(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Te(r,this._week.dow):e?r[e.day()]:r},fo.weekdaysMin=function(e){return!0===e?Te(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},fo.weekdaysShort=function(e){return!0===e?Te(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},fo.weekdaysParse=function(e,t,r){var o,n,a;if(this._weekdaysParseExact)return Re.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){// test the regex
1072
- if(n=x([2e3,1]).day(o),r&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(a="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(a.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[o].test(e))return o;if(r&&"ddd"===t&&this._shortWeekdaysParse[o].test(e))return o;if(r&&"dd"===t&&this._minWeekdaysParse[o].test(e))return o;if(!r&&this._weekdaysParse[o].test(e))return o}},fo.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Sr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},fo.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Sr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fo.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Sr),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fo.isPM=// LOCALES
1073
- function(e){// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
1074
- // Using charAt should be more compatible.
1075
- return"p"===(e+"").toLowerCase().charAt(0)},fo.meridiem=function(e,t,r){return 11<e?r?"pm":"PM":r?"am":"AM"},Le("en",{eras:[{since:"0001-01-01",until:+Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),s.lang=I("moment.lang is deprecated. Use moment.locale instead.",Le),s.langData=I("moment.langData is deprecated. Use moment.localeData instead.",be);var xo=n,To=$t("ms"),Ro=$t("s"),ho=$t("m"),Co=$t("h"),Ao=$t("d"),_o=$t("w"),No=$t("M"),Oo=$t("Q"),Io=$t("y"),So=Jt("milliseconds"),Lo=Jt("seconds"),vo=Jt("minutes"),bo=Jt("hours"),ko=Jt("days"),Po=Jt("months"),Do=Jt("years"),Mo=t,Uo={ss:44,// a few seconds to seconds
1076
- s:45,// seconds to minute
1077
- m:45,// minutes to hour
1078
- h:22,// hours to day
1079
- d:26,// days to month/week
1080
- w:null,// weeks to month
1081
- M:11// months to year
1082
- },Fo=n,wo=ot.prototype;return wo.isValid=function(){return this._isValid},wo.abs=function(){var e=this._data;return this._milliseconds=xo(this._milliseconds),this._days=xo(this._days),this._months=xo(this._months),e.milliseconds=xo(e.milliseconds),e.seconds=xo(e.seconds),e.minutes=xo(e.minutes),e.hours=xo(e.hours),e.months=xo(e.months),e.years=xo(e.years),this},wo.add=function(e,t){return Wt(this,e,t,1)}// supports only 2.0-style subtract(1, 's') or subtract(duration)
1083
- ,wo.subtract=function(e,t){return Wt(this,e,t,-1)},wo.as=function(e){if(!this.isValid())return NaN;var r=this._milliseconds,o,n;if(e=B(e),"month"===e||"quarter"===e||"year"===e)switch(o=this._days+r/864e5,n=this._months+qt(o),e){case"month":return n;case"quarter":return n/3;case"year":return n/12;}else switch(o=this._days+t(Kt(this._months)),e){case"week":return o/7+r/6048e5;case"day":return o+r/864e5;case"hour":return 24*o+r/36e5;case"minute":return 1440*o+r/6e4;case"second":return 86400*o+r/1e3;// Math.floor prevents floating point math errors here
1084
- case"millisecond":return a(864e5*o)+r;default:throw new Error("Unknown unit "+e);}}// TODO: Use this.as('ms')?
1085
- ,wo.asMilliseconds=To,wo.asSeconds=Ro,wo.asMinutes=ho,wo.asHours=Co,wo.asDays=Ao,wo.asWeeks=_o,wo.asMonths=No,wo.asQuarters=Oo,wo.asYears=Io,wo.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*q(this._months/12):NaN},wo._bubble=function(){var e=this._milliseconds,t=this._days,r=this._months,o=this._data,n,a,i,p,s;// if we have a mix of positive and negative values, bubble down first
1086
- // check: https://github.com/moment/moment/issues/2166
1087
- return 0<=e&&0<=t&&0<=r||0>=e&&0>=t&&0>=r||(e+=864e5*zt(Kt(r)+t),t=0,r=0),o.milliseconds=e%1e3,n=z(e/1e3),o.seconds=n%60,a=z(n/60),o.minutes=a%60,i=z(a/60),o.hours=i%24,t+=z(i/24),s=z(qt(t)),r+=s,t-=zt(Kt(s)),p=z(r/12),r%=12,o.days=t,o.months=r,o.years=p,this},wo.clone=function(){return ut(this)},wo.get=function(e){return e=B(e),this.isValid()?this[e+"s"]():NaN},wo.milliseconds=So,wo.seconds=Lo,wo.minutes=vo,wo.hours=bo,wo.days=ko,wo.weeks=function(){return z(this.days()/7)},wo.months=Po,wo.years=Do,wo.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,o=Uo,n,a;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(o=Object.assign({},Uo,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=this.localeData(),a=Qt(this,!r,o,n),r&&(a=n.pastFuture(+this,a)),n.postformat(a)},wo.toISOString=tr,wo.toString=tr,wo.toJSON=tr,wo.locale=_t,wo.localeData=Nt,wo.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",tr),wo.lang=lo,D("X",0,0,"unix"),D("x",0,0,"valueOf"),X("x",Or),X("X",/[+-]?\d+(\.\d{1,3})?/),te("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),te("x",function(e,t,r){r._d=new Date(q(e))}),s.version="2.29.1",function(e){rr=e}(et),s.fn=Eo,s.min=function(){var e=[].slice.call(arguments,0);return tt("isBefore",e)},s.max=function(){var e=[].slice.call(arguments,0);return tt("isAfter",e)},s.now=function(){return Date.now?Date.now():+new Date},s.utc=x,s.unix=function(e){return et(1e3*e)},s.months=function(e,t){return Yt(e,t,"months")},s.isDate=g,s.locale=Le,s.invalid=C,s.duration=ut,s.isMoment=N,s.weekdays=function(e,t,r){return jt(e,t,r,"weekdays")},s.parseZone=function(){return et.apply(null,arguments).parseZone()},s.localeData=be,s.isDuration=nt,s.monthsShort=function(e,t){return Yt(e,t,"monthsShort")},s.weekdaysMin=function(e,t,r){return jt(e,t,r,"weekdaysMin")},s.defineLocale=ve,s.updateLocale=function(e,t){if(null!=t){var r=Yr,o,n;null!=jr[e]&&null!=jr[e].parentLocale?jr[e].set(v(jr[e]._config,t)):(n=Se(e),null!=n&&(r=n._config),t=v(r,t),null==n&&(t.abbr=e),o=new b(t),o.parentLocale=jr[e],jr[e]=o),Le(e)}else null!=jr[e]&&(null==jr[e].parentLocale?null!=jr[e]&&delete jr[e]:(jr[e]=jr[e].parentLocale,e===Le()&&Le(e)));return jr[e]},s.locales=ke,s.weekdaysShort=function(e,t,r){return jt(e,t,r,"weekdaysShort")},s.normalizeUnits=B,s.relativeTimeRounding=Zt,s.relativeTimeThreshold=function(e,t){return void 0!==Uo[e]&&(void 0===t?Uo[e]:(Uo[e]=t,"s"===e&&(Uo.ss=t-1),!0))},s.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse"},s.prototype=Eo,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",// <input type="datetime-local" />
1088
- DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",// <input type="datetime-local" step="1" />
1089
- DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",// <input type="datetime-local" step="0.001" />
1090
- DATE:"YYYY-MM-DD",// <input type="date" />
1091
- TIME:"HH:mm",// <input type="time" />
1092
- TIME_SECONDS:"HH:mm:ss",// <input type="time" step="1" />
1093
- TIME_MS:"HH:mm:ss.SSS",// <input type="time" step="0.001" />
1094
- WEEK:"GGGG-[W]WW",// <input type="week" />
1095
- MONTH:"YYYY-MM"// <input type="month" />
1096
- },s})}),clone_1=createCommonjsModule$1(function(e){var t=function(){/**
1097
- * Clones (copies) an Object using deep copying.
1098
- *
1099
- * This function supports circular references by default, but if you are certain
1100
- * there are no circular references in your object, you can save some CPU time
1101
- * by calling clone(obj, false).
1102
- *
1103
- * Caution: if `circular` is false and `parent` contains circular references,
1104
- * your program may enter an infinite loop and crash.
1105
- *
1106
- * @param `parent` - the object to be cloned
1107
- * @param `circular` - set to true if the object to be cloned may contain
1108
- * circular references. (optional - true by default)
1109
- * @param `depth` - set to a number if the object is only to be cloned to
1110
- * a particular depth. (optional - defaults to Infinity)
1111
- * @param `prototype` - sets the prototype to be used when cloning an object.
1112
- * (optional - defaults to parent prototype).
1113
- */function e(t,o,n,a){// recurse this function so we don't reset allParents and allChildren
1114
- function p(t,n){// cloning null always returns null
1115
- if(null===t)return null;if(0==n)return t;var c,u;if("object"!=typeof t)return t;if(e.__isArray(t))c=[];else if(e.__isRegExp(t))c=new RegExp(t.source,r(t)),t.lastIndex&&(c.lastIndex=t.lastIndex);else if(e.__isDate(t))c=new Date(t.getTime());else{if(d&&Buffer.isBuffer(t))return c=Buffer.allocUnsafe?Buffer.allocUnsafe(t.length):new Buffer(t.length),t.copy(c),c;"undefined"==typeof a?(u=Object.getPrototypeOf(t),c=Object.create(u)):(c=Object.create(a),u=a)}if(o){var y=s.indexOf(t);if(-1!=y)return l[y];s.push(t),l.push(c)}for(var m in t){var i;(u&&(i=Object.getOwnPropertyDescriptor(u,m)),!(i&&null==i.set))&&(c[m]=p(t[m],n-1))}return c}"object"==typeof o&&(n=o.depth,a=o.prototype,o.filter,o=o.circular);// maintain two arrays for circular references, where corresponding parents
1116
- // and children have the same index
1117
- var s=[],l=[],d="undefined"!=typeof Buffer;return"undefined"==typeof o&&(o=!0),"undefined"==typeof n&&(n=1/0),p(t,n)}/**
1118
- * Simple flat clone using prototype, accepts only objects, usefull for property
1119
- * override on FLAT configuration object (no nested props).
1120
- *
1121
- * USE WITH CAUTION! This may not behave as you wish if you do not know how this
1122
- * works.
1123
- */ // private utility functions
1124
- function t(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=r,e}();e.exports&&(e.exports=t)}),defaults=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){"undefined"==typeof e[r]&&(e[r]=clone_1(t[r]))}),e},combining=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],DEFAULTS={nul:0,control:0},wcwidth_1=function(e){return wcswidth(e,DEFAULTS)},config=function(e){return e=defaults(e||{},DEFAULTS),function(t){return wcswidth(t,e)}};/*
1125
- * The following functions define the column width of an ISO 10646
1126
- * character as follows:
1127
- * - The null character (U+0000) has a column width of 0.
1128
- * - Other C0/C1 control characters and DEL will lead to a return value
1129
- * of -1.
1130
- * - Non-spacing and enclosing combining characters (general category
1131
- * code Mn or Me in the
1132
- * Unicode database) have a column width of 0.
1133
- * - SOFT HYPHEN (U+00AD) has a column width of 1.
1134
- * - Other format characters (general category code Cf in the Unicode
1135
- * database) and ZERO WIDTH
1136
- * SPACE (U+200B) have a column width of 0.
1137
- * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
1138
- * have a column width of 0.
1139
- * - Spacing characters in the East Asian Wide (W) or East Asian
1140
- * Full-width (F) category as
1141
- * defined in Unicode Technical Report #11 have a column width of 2.
1142
- * - All remaining characters (including all printable ISO 8859-1 and
1143
- * WGL4 characters, Unicode control characters, etc.) have a column
1144
- * width of 1.
1145
- * This implementation assumes that characters are encoded in ISO 10646.
1146
- */function wcswidth(e,t){if("string"!=typeof e)return wcwidth$1(e,t);for(var r=0,o=0,a;o<e.length;o++){if(a=wcwidth$1(e.charCodeAt(o),t),0>a)return-1;r+=a}return r}function wcwidth$1(e,t){// test for 8-bit control characters
1147
- return 0===e?t.nul:32>e||127<=e&&160>e?t.control:bisearch(e)?0:1+(4352<=e&&(4447>=e||// Hangul Jamo init. consonants
1148
- 9001==e||9002==e||11904<=e&&42191>=e&&12351!=e||// CJK ... Yi
1149
- 44032<=e&&55203>=e||// Hangul Syllables
1150
- 63744<=e&&64255>=e||// CJK Compatibility Ideographs
1151
- 65040<=e&&65049>=e||// Vertical forms
1152
- 65072<=e&&65135>=e||// CJK Compatibility Forms
1153
- 65280<=e&&65376>=e||// Fullwidth Forms
1154
- 65504<=e&&65510>=e||131072<=e&&196605>=e||196608<=e&&262141>=e));// binary search in table of non-spacing characters
1155
- // if we arrive here, ucs is not a combining or C0/C1 control character
1156
- }function bisearch(e){var t=Math.floor,r=0,o=combining.length-1,n;if(e<combining[0][0]||e>combining[o][1])return!1;for(;o>=r;)if(n=t((r+o)/2),e>combining[n][1])r=n+1;else if(e<combining[n][0])o=n-1;else return!0;return!1}wcwidth_1.config=config;var wcwidth;try{wcwidth=wcwidth_1}catch(t){}var table$1=Table$1;function Table$1(){this.rows=[],this.row={__printers:{}}}/**
1157
- * Push the current row to the table and start a new one
1158
- *
1159
- * @returns {Table} `this`
1160
- */Table$1.prototype.newRow=function(){return this.rows.push(this.row),this.row={__printers:{}},this},Table$1.prototype.cell=function(e,t,r){return this.row[e]=t,this.row.__printers[e]=r||string,this},Table$1.prototype.separator=" ";function string(e){return e===void 0?"":""+e}function length(e){var t=e.replace(/\u001b\[\d+m/g,"");return null==wcwidth?t.length:wcwidth(t)}/**
1161
- * Default printer
1162
- */Table$1.string=string,Table$1.leftPadder=leftPadder;function leftPadder(e){return function(t,r){var o=string(t),n=length(o),a=r>n?Array(r-n+1).join(e):"";return a+o}}/**
1163
- * Printer which right aligns the content
1164
- */var padLeft=Table$1.padLeft=leftPadder(" ");/**
1165
- * Create a printer which pads with `ch` on the right
1166
- *
1167
- * @param {String} ch
1168
- * @returns {Function}
1169
- */Table$1.rightPadder=rightPadder;function rightPadder(e){return function(t,r){var o=string(t),n=length(o),a=r>n?Array(r-n+1).join(e):"";return o+a}}var padRight=rightPadder(" ");/**
1170
- * Create a printer for numbers
1171
- *
1172
- * Will do right alignment and optionally fix the number of digits after decimal point
1173
- *
1174
- * @param {Number} [digits] - Number of digits for fixpoint notation
1175
- * @returns {Function}
1176
- */Table$1.number=function(e){return function(t,r){if(null==t)return"";if("number"!=typeof t)throw new Error(""+t+" is not a number");var o=null==e?t+"":t.toFixed(e);return padLeft(o,r)}};function each(e,t){for(var r in e)"__printers"!=r&&t(r,e[r])}/**
1177
- * Get list of columns in printing order
1178
- *
1179
- * @returns {string[]}
1180
- */Table$1.prototype.columns=function(){for(var e={},t=0;2>t;t++)// do 2 times
1181
- this.rows.forEach(function(t){var r=0;each(t,function(t){r=Math.max(r,e[t]||0),e[t]=r,r++})});return Object.keys(e).sort(function(t,r){return e[t]-e[r]})},Table$1.prototype.print=function(){var e=Math.max,t=this.columns(),r=this.separator,o={},n="";return this.rows.forEach(function(t){each(t,function(r,n){var a=t.__printers[r].call(t,n);o[r]=e(length(a),o[r]||0)})}),this.rows.forEach(function(e){var a="";t.forEach(function(t){var n=o[t],i=e.hasOwnProperty(t)?""+e.__printers[t].call(e,e[t],n):"";a+=padRight(i,n)+r}),a=a.slice(0,-r.length),n+=a+"\n"}),n},Table$1.prototype.toString=function(){var e=this.columns(),t=new Table$1;return t.separator=this.separator,e.forEach(function(e){t.cell(e,e)}),t.newRow(),t.pushDelimeter(e),t.rows=t.rows.concat(this.rows),this.totals&&this.rows.length&&(t.pushDelimeter(e),this.forEachTotal(t.cell.bind(t)),t.newRow()),t.print()},Table$1.prototype.pushDelimeter=function(e){return e=e||this.columns(),e.forEach(function(e){this.cell(e,void 0,leftPadder("-"))},this),this.newRow()},Table$1.prototype.forEachTotal=function(e){for(var t in this.totals){var r=this.totals[t],o=r.init,n=this.rows.length;this.rows.forEach(function(e,a){o=r.reduce.call(e,o,e[t],a,n)}),e(t,o,r.printer)}},Table$1.prototype.printTransposed=function(e){e=e||{};var t=new Table$1;return t.separator=e.separator||this.separator,this.columns().forEach(function(r){t.cell(0,r,e.namePrinter),this.rows.forEach(function(e,o){t.cell(o+1,e[r],e.__printers[r])}),t.newRow()},this),t.print()},Table$1.prototype.sort=function(e){if("function"==typeof e)return this.rows.sort(e),this;var t=Array.isArray(e)?e:this.columns(),r=t.map(function(e){var t="asc",r=/(.*)\|\s*(asc|des)\s*$/.exec(e);return r&&(e=r[1],t=r[2]),function(r,o){return"asc"==t?compare(r[e],o[e]):compare(o[e],r[e])}});return this.sort(function(e,t){for(var o=0,n;o<r.length;o++)if(n=r[o](e,t),0!=n)return n;return 0})};function compare(e,t){return e===t?0:void 0===e?1:void 0===t?-1:null===e?1:null===t?-1:e>t?1:e<t?-1:compare(e+"",t+"")}/**
1182
- * Add a total for the column
1183
- *
1184
- * @param {String} col - column name
1185
- * @param {Object} [opts]
1186
- * @param {Function} [opts.reduce = sum] - reduce(acc, val, idx, length) function to compute the total value
1187
- * @param {Function} [opts.printer = padLeft] - Printer to format the total cell
1188
- * @param {Any} [opts.init = 0] - Initial value for reduction
1189
- * @returns {Table} `this`
1190
- */Table$1.prototype.total=function(e,t){return t=t||{},this.totals=this.totals||{},this.totals[e]={reduce:t.reduce||Table$1.aggr.sum,printer:t.printer||padLeft,init:null==t.init?0:t.init},this},Table$1.aggr={},Table$1.aggr.printer=function(e,t){return t=t||string,function(r,o){return padLeft(e+t(r),o)}},Table$1.aggr.sum=function(e,t){return e+t},Table$1.aggr.avg=function(e,t,r,o){return e+=t,r+1==o?e/o:e},Table$1.print=function(e,r,o){var n=r||{};r="function"==typeof r?r:function(e,t){for(var r in e)if(e.hasOwnProperty(r)){var o=n[r]||{};t(o.name||r,e[r],o.printer)}};var a=new Table$1,t=a.cell.bind(a);return Array.isArray(e)?(o=o||function(e){return e.toString()},e.forEach(function(e){r(e,t),a.newRow()})):(o=o||function(e){return e.printTransposed({separator:" : "})},r(e,t),a.newRow()),o(a)},Table$1.log=function(e,t,r){console.log(Table$1.print(e,t,r))},Table$1.prototype.log=function(){console.log(this.toString())};var SECONDS_A_MINUTE=60,SECONDS_A_HOUR=3600,SECONDS_A_DAY=24*SECONDS_A_HOUR,SECONDS_A_WEEK=7*SECONDS_A_DAY,MILLISECONDS_A_SECOND=1e3,MILLISECONDS_A_MINUTE=60*MILLISECONDS_A_SECOND,MILLISECONDS_A_HOUR=SECONDS_A_HOUR*MILLISECONDS_A_SECOND,MILLISECONDS_A_DAY=SECONDS_A_DAY*MILLISECONDS_A_SECOND,MILLISECONDS_A_WEEK=SECONDS_A_WEEK*MILLISECONDS_A_SECOND,MS="millisecond",S$1="second",MIN="minute",H$1="hour",D$1="day",W$1="week",M$1="month",Q$1="quarter",Y$1="year",DATE="date",FORMAT_DEFAULT="YYYY-MM-DDTHH:mm:ssZ",INVALID_DATE_STRING="Invalid Date",REGEX_PARSE=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,REGEX_FORMAT=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,en={name:"en",weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},padStart=function(e,t,r){var o=e+"";return!o||o.length>=t?e:""+Array(t+1-o.length).join(r)+e},padZoneStr=function(e){var t=-e.utcOffset(),r=Math.abs(t),o=Math.floor(r/60);return""+(0>=t?"+":"-")+padStart(o,2,"0")+":"+padStart(r%60,2,"0")},monthDiff=function e(t,r){// function from moment.js in order to keep the same result
1191
- if(t.date()<r.date())return-e(r,t);var o=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(o,M$1),a=0>r-n,i=t.clone().add(o+(a?-1:1),M$1);return+(-(o+(r-n)/(a?n-i:i-n))||0)},absFloor=function(e){return 0>e?Math.ceil(e)||0:Math.floor(e)},prettyUnit=function(e){return{M:M$1,y:Y$1,w:W$1,d:D$1,D:DATE,h:H$1,m:MIN,s:S$1,ms:MS,Q:Q$1}[e]||((e||"")+"").toLowerCase().replace(/s$/,"")},isUndefined$1=function(e){return e===void 0},U$1={s:padStart,z:padZoneStr,m:monthDiff,a:absFloor,p:prettyUnit,u:isUndefined$1},L$1="en",Ls={};Ls[L$1]=en;var isDayjs=function(e){return e instanceof Dayjs},parseLocale=function(e,t,r){var o;if(!e)return L$1;if("string"==typeof e)Ls[e]&&(o=e),t&&(Ls[e]=t,o=e);else{var n=e.name;Ls[n]=e,o=n}return!r&&o&&(L$1=o),o||!r&&L$1},dayjs=function(e,t){if(isDayjs(e))return e.clone();// eslint-disable-next-line no-nested-ternary
1192
- var r="object"==typeof t?t:{};// eslint-disable-line prefer-rest-params
1193
- return r.date=e,r.args=arguments,new Dayjs(r);// eslint-disable-line no-use-before-define
1194
- },wrapper=function(e,t){return dayjs(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset// todo: refactor; do not use this.$offset in you code
1195
- })},Utils=U$1;// eslint-disable-line no-use-before-define
1196
- Utils.l=parseLocale,Utils.i=isDayjs,Utils.w=wrapper;var parseDate=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);// null is invalid
1197
- if(Utils.u(t))return new Date;// today
1198
- if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(REGEX_PARSE);if(o){var n=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(t);// everything else
1199
- },Dayjs=/*#__PURE__*/function(){var e=Math.round,t=Math.floor,r=Math.min;function o(e){this.$L=parseLocale(e.locale,null,!0),this.parse(e)}var n=o.prototype;return n.parse=function(e){this.$d=parseDate(e),this.$x=e.x||{},this.init()},n.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()}// eslint-disable-next-line class-methods-use-this
1200
- ,n.$utils=function(){return Utils},n.isValid=function(){return this.$d.toString()!==INVALID_DATE_STRING},n.isSame=function(e,t){var r=dayjs(e);return this.startOf(t)<=r&&r<=this.endOf(t)},n.isAfter=function(e,t){return dayjs(e)<this.startOf(t)},n.isBefore=function(e,t){return this.endOf(t)<dayjs(e)},n.$g=function(e,t,r){return Utils.u(e)?this[t]:this.set(r,e)},n.unix=function(){return t(this.valueOf()/1e3)},n.valueOf=function(){// timezone(hour) * 60 * 60 * 1000 => ms
1201
- return this.$d.getTime()},n.startOf=function(e,t){var r=this,o=!!Utils.u(t)||t,n=Utils.p(e),a=function(e,t){var n=Utils.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return o?n:n.endOf(D$1)},i=function(e,t){return Utils.w(r.toDate()[e].apply(// eslint-disable-line prefer-spread
1202
- r.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},p=this.$W,s=this.$M,l=this.$D,d="set"+(this.$u?"UTC":"");// startOf -> endOf
1203
- switch(n){case Y$1:return o?a(1,0):a(31,11);case M$1:return o?a(1,s):a(0,s+1);case W$1:{var c=this.$locale().weekStart||0,u=(p<c?p+7:p)-c;return a(o?l-u:l+(6-u),s)}case D$1:case DATE:return i(d+"Hours",0);case H$1:return i(d+"Minutes",1);case MIN:return i(d+"Seconds",2);case S$1:return i(d+"Milliseconds",3);default:return this.clone();}},n.endOf=function(e){return this.startOf(e,!1)},n.$set=function(e,t){var o=Utils.p(e),n="set"+(this.$u?"UTC":""),a=(p={},p[D$1]=n+"Date",p[DATE]=n+"Date",p[M$1]=n+"Month",p[Y$1]=n+"FullYear",p[H$1]=n+"Hours",p[MIN]=n+"Minutes",p[S$1]=n+"Seconds",p[MS]=n+"Milliseconds",p)[o],i=o===D$1?this.$D+(t-this.$W):t,p;// private set
1204
- if(o===M$1||o===Y$1){// clone is for badMutable plugin
1205
- var s=this.clone().set(DATE,1);s.$d[a](i),s.init(),this.$d=s.set(DATE,r(this.$D,s.daysInMonth())).$d}else a&&this.$d[a](i);return this.init(),this},n.set=function(e,t){return this.clone().$set(e,t)},n.get=function(e){return this[Utils.p(e)]()},n.add=function(t,r){var o=this,n;t=+t;// eslint-disable-line no-param-reassign
1206
- var a=Utils.p(r),i=function(r){var n=dayjs(o);return Utils.w(n.date(n.date()+e(r*t)),o)};if(a===M$1)return this.set(M$1,this.$M+t);if(a===Y$1)return this.set(Y$1,this.$y+t);if(a===D$1)return i(1);if(a===W$1)return i(7);var p=(n={},n[MIN]=MILLISECONDS_A_MINUTE,n[H$1]=MILLISECONDS_A_HOUR,n[S$1]=MILLISECONDS_A_SECOND,n)[a]||1,s=this.$d.getTime()+t*p;// ms
1207
- return Utils.w(s,this)},n.subtract=function(e,t){return this.add(-1*e,t)},n.format=function(e){var t=this;if(!this.isValid())return INVALID_DATE_STRING;var r=e||FORMAT_DEFAULT,o=Utils.z(this),n=this.$locale(),a=this.$H,i=this.$m,p=this.$M,s=n.weekdays,l=n.months,d=n.meridiem,c=function(e,o,n,a){return e&&(e[o]||e(t,r))||n[o].substr(0,a)},u=function(e){return Utils.s(a%12||12,e,"0")},y=d||function(e,t,r){var o=12>e?"AM":"PM";return r?o.toLowerCase():o},m={YY:(this.$y+"").slice(-2),YYYY:this.$y,M:p+1,MM:Utils.s(p+1,2,"0"),MMM:c(n.monthsShort,p,l,3),MMMM:c(l,p),D:this.$D,DD:Utils.s(this.$D,2,"0"),d:this.$W+"",dd:c(n.weekdaysMin,this.$W,s,2),ddd:c(n.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:a+"",HH:Utils.s(a,2,"0"),h:u(1),hh:u(2),a:y(a,i,!0),A:y(a,i,!1),m:i+"",mm:Utils.s(i,2,"0"),s:this.$s+"",ss:Utils.s(this.$s,2,"0"),SSS:Utils.s(this.$ms,3,"0"),Z:o// 'ZZ' logic below
1208
- };return r.replace(REGEX_FORMAT,function(e,t){return t||m[e]||o.replace(":","")});// 'ZZ'
1209
- },n.utcOffset=function(){// Because a bug at FF24, we're rounding the timezone offset around 15 minutes
1210
- // https://github.com/moment/moment/pull/1871
1211
- return 15*-e(this.$d.getTimezoneOffset()/15)},n.diff=function e(t,r,o){var n=Utils.p(r),a=dayjs(t),i=(a.utcOffset()-this.utcOffset())*MILLISECONDS_A_MINUTE,e=this-a,p=Utils.m(this,a),s;// milliseconds
1212
- return p=(s={},s[Y$1]=p/12,s[M$1]=p,s[Q$1]=p/3,s[W$1]=(e-i)/MILLISECONDS_A_WEEK,s[D$1]=(e-i)/MILLISECONDS_A_DAY,s[H$1]=e/MILLISECONDS_A_HOUR,s[MIN]=e/MILLISECONDS_A_MINUTE,s[S$1]=e/MILLISECONDS_A_SECOND,s)[n]||e,o?p:Utils.a(p)},n.daysInMonth=function(){return this.endOf(M$1).$D},n.$locale=function(){// get locale object
1213
- return Ls[this.$L]},n.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),o=parseLocale(e,t,!0);return o&&(r.$L=o),r},n.clone=function(){return Utils.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){// ie 8 return
1214
- // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000)
1215
- // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]')
1216
- return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},o}(),proto=Dayjs.prototype;dayjs.prototype=proto,[["$ms",MS],["$s",S$1],["$m",MIN],["$H",H$1],["$W",D$1],["$M",M$1],["$y",Y$1],["$D",DATE]].forEach(function(e){proto[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),dayjs.extend=function(e,t){return e.$i||(e(t,Dayjs,dayjs),e.$i=!0),dayjs},dayjs.locale=parseLocale,dayjs.isDayjs=isDayjs,dayjs.unix=function(e){return dayjs(1e3*e)},dayjs.en=Ls[L$1],dayjs.Ls=Ls,dayjs.p={};var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},getNestedObject=function(e,t){if(void 0===t||"string"==typeof t){if("undefined"!=typeof e&&"string"==typeof t){var r=t.split(/[.\[\]'"]/g).filter(function(e){return""!==e});e=r.reduce(function(e,t){return e&&"undefined"!==e[t]?e[t]:void 0},e)}return e}},buildSchema=function(e){if("[object Array]"===Object.prototype.toString.call(e))e.forEach(function(e){return buildSchema(e)});else if("[object Object]"===Object.prototype.toString.call(e))Object.keys(e).forEach(function(t){return buildSchema(e[t])});else return"undefined"==typeof e?"undefined":_typeof(e);return e},getSchemaMatch=function(t,r){var o=!1;if("[object Array]"===Object.prototype.toString.call(t)){if(r.length)for(var n=0;n<t.length;n+=1){if(!getSchemaMatch(t[n],r[n])){o=!1;break}o=!0}else return!0;}else if("[object Object]"===Object.prototype.toString.call(t))for(var a in t){if(!getSchemaMatch(t[a],r[a])){o=!1;break}o=!0}else return("undefined"==typeof r?"undefined":_typeof(r))===("undefined"==typeof t?"undefined":_typeof(t));return o},convertSchemaAndGetMatch=function(e,t){var r=buildSchema(t);return getSchemaMatch(e,r)?e:-1},util$2={getNestedObject:getNestedObject,buildSchema:buildSchema,getSchemaMatch:getSchemaMatch,convertSchemaAndGetMatch:convertSchemaAndGetMatch},typy=createCommonjsModule$1(function(e,t){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){function e(e,t){for(var r=0,o;r<t.length;r++)o=t[r],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),a=function(){function e(){var t=this;r(this,e),this.t=function(e,r){if(t.input=e,t.schemaCheck=null,r)if("string"==typeof r)t.input=(0,util$2.getNestedObject)(t.input,r);else{var o=(0,util$2.convertSchemaAndGetMatch)(t.input,r);-1===o?(t.schemaCheck=!1,t.input=e):(t.schemaCheck=!0,t.input=o)}return t}}return n(e,[{key:"isValid",get:function(){return null!==this.schemaCheck&&!0===this.schemaCheck&&null!==this.input&&void 0!==this.input}},{key:"isDefined",get:function(){return"undefined"!=typeof this.input}},{key:"isUndefined",get:function(){return"undefined"==typeof this.input}},{key:"isNull",get:function(){return null===this.input&&"object"===o(this.input)}},{key:"isNullOrUndefined",get:function(){return!!(this.isNull||this.isUndefined)}},{key:"isBoolean",get:function(){return o(this.input)===o(!0)}},{key:"isTrue",get:function(){return!0===this.input}},{key:"isFalse",get:function(){return!1===this.input}},{key:"isTruthy",get:function(){return!!this.input}},{key:"isFalsy",get:function(){return!this.input}},{key:"isObject",get:function(){return"object"===o(this.input)&&this.input===Object(this.input)&&"[object Array]"!==Object.prototype.toString.call(this.input)&&"[object Date]"!==Object.prototype.toString.call(this.input)}},{key:"isEmptyObject",get:function(){return!!(this.isObject&&0===Object.keys(this.input).length)}},{key:"isString",get:function(){return"string"==typeof this.input}},{key:"isEmptyString",get:function(){return!!(this.isString&&0===this.input.length)}},{key:"isNumber",get:function(){return!!Number.isFinite(this.input)}},{key:"isArray",get:function(){return!!Array.isArray(this.input)}},{key:"isEmptyArray",get:function(){return!!(this.isArray&&0===this.input.length)}},{key:"isFunction",get:function(){return"function"==typeof this.input}},{key:"isDate",get:function(){return this.input instanceof Date||"[object Date]"===Object.prototype.toString.call(this.input)}},{key:"isSymbol",get:function(){return"symbol"===o(this.input)||"object"===o(this.input)&&"[object Symbol]"===Object.prototype.toString.call(this.input)}},{key:"safeObject",get:function(){return this.input}},{key:"safeObjectOrEmpty",get:function(){return this.input?this.input:{}}},{key:"safeString",get:function(){return this.isString?this.input:""}},{key:"safeNumber",get:function(){return this.isNumber?this.input:0}},{key:"safeBoolean",get:function(){return!!this.isBoolean&&this.input}},{key:"safeFunction",get:function(){return this.isFunction?this.input:function(){}}},{key:"safeArray",get:function(){return this.isArray?this.input:this.isNullOrUndefined?[]:[this.input]}}]),e}();a.Schema={Number:1,String:"typy",Boolean:!0,Null:null,Undefined:void 0,Array:[],Function:function(){},Date:new Date,Symbol:Symbol("")},t.default=a,e.exports=t["default"]});unwrapExports(typy);var lib$1=createCommonjsModule$1(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addCustomTypes=r.Schema=r.t=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(typy),n=function(e,t){return new o.default().t(e,t)},t=o.default.Schema;r.default=n,r.t=n,r.Schema=t,r.addCustomTypes=function(e){if(n(e).isObject)Object.keys(e).forEach(function(t){if(n(e[t]).isFunction)o.default.prototype.__defineGetter__(t,function(){return e[t](this.input)});else throw new Error("validator "+t+" is not a function")});else throw new Error("validators must be key value pairs")}}),t$1=unwrapExports(lib$1);lib$1.addCustomTypes,lib$1.Schema,lib$1.t;// This is a generated file. Do not edit.
1217
- var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue},util$1={isSpaceSeparator(e){return"string"==typeof e&&unicode.Space_Separator.test(e)},isIdStartChar(e){return"string"==typeof e&&("a"<=e&&"z">=e||"A"<=e&&"Z">=e||"$"===e||"_"===e||unicode.ID_Start.test(e))},isIdContinueChar(e){return"string"==typeof e&&("a"<=e&&"z">=e||"A"<=e&&"Z">=e||"0"<=e&&"9">=e||"$"===e||"_"===e||"\u200C"===e||"\u200D"===e||unicode.ID_Continue.test(e))},isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)},isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(e,t){source=e+"",parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do// This code is unreachable.
1218
- // if (!parseStates[parseState]) {
1219
- // throw invalidParseState()
1220
- // }
1221
- token=lex(),parseStates[parseState]();while("eof"!==token.type);return"function"==typeof t?internalize({"":root},"",t):root};function internalize(e,t,r){const o=e[t];if(null!=o&&"object"==typeof o)for(const e in o){const t=internalize(o,e,r);void 0===t?delete o[e]:o[e]=t}return r.call(e,t,o)}let lexState,buffer,doubleQuote,sign,c$1;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c$1=peek();// This code is unreachable.
1222
- // if (!lexStates[lexState]) {
1223
- // throw invalidLexState(lexState)
1224
- // }
1225
- const e=lexStates[lexState]();if(e)return e}}function peek(){var e=String.fromCodePoint;if(source[pos])return e(source.codePointAt(pos))}function read(){const e=peek();return"\n"===e?(line++,column=0):e?column+=e.length:column++,e&&(pos+=e.length),e}const lexStates={default(){switch(c$1){case"\t":case"\x0B":case"\f":case" ":case"\xA0":case"\uFEFF":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof");}return util$1.isSpaceSeparator(c$1)?void read():lexStates[parseState]();// This code is unreachable.
1226
- // if (!lexStates[parseState]) {
1227
- // throw invalidLexState(parseState)
1228
- // }
1229
- },comment(){switch(c$1){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment");}throw invalidChar(read())},multiLineComment(){switch(c$1){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read());}read()},multiLineCommentAsterisk(){switch(c$1){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read());}read(),lexState="multiLineComment"},singleLineComment(){switch(c$1){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof");}read()},value(){switch(c$1){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case"\"":case"'":return doubleQuote="\""===read(),buffer="",void(lexState="string");}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c$1)throw invalidChar(read());read();const e=unicodeEscape();switch(e){case"$":case"_":break;default:if(!util$1.isIdStartChar(e))throw invalidIdentifier();}buffer+=e,lexState="identifierName"},identifierName(){switch(c$1){case"$":case"_":case"\u200C":case"\u200D":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape");}return util$1.isIdContinueChar(c$1)?void(buffer+=read()):newToken("identifier",buffer)},identifierNameEscape(){if("u"!==c$1)throw invalidChar(read());read();const e=unicodeEscape();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!util$1.isIdContinueChar(e))throw invalidIdentifier();}buffer+=e,lexState="identifierName"},sign(){switch(c$1){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN);}throw invalidChar(read())},zero(){return"."===c$1?(buffer+=read(),void(lexState="decimalPoint")):"e"===c$1||"E"===c$1?(buffer+=read(),void(lexState="decimalExponent")):"x"===c$1||"X"===c$1?(buffer+=read(),void(lexState="hexadecimal")):newToken("numeric",0*sign)},decimalInteger(){switch(c$1){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");}return util$1.isDigit(c$1)?void(buffer+=read()):newToken("numeric",sign*+buffer)},decimalPointLeading(){if(util$1.isDigit(c$1))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c$1){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");}return util$1.isDigit(c$1)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*+buffer)},decimalFraction(){switch(c$1){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");}return util$1.isDigit(c$1)?void(buffer+=read()):newToken("numeric",sign*+buffer)},decimalExponent(){switch(c$1){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign");}if(util$1.isDigit(c$1))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util$1.isDigit(c$1))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){return util$1.isDigit(c$1)?void(buffer+=read()):newToken("numeric",sign*+buffer)},hexadecimal(){if(util$1.isHexDigit(c$1))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){return util$1.isHexDigit(c$1)?void(buffer+=read()):newToken("numeric",sign*+buffer)},string(){switch(c$1){case"\\":return read(),void(buffer+=escape());case"\"":return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c$1);break;case void 0:throw invalidChar(read());}buffer+=read()},start(){switch(c$1){case"{":case"[":return newToken("punctuator",read());// This code is unreachable since the default lexState handles eof.
1230
- // case undefined:
1231
- // return newToken('eof')
1232
- }lexState="value"},beforePropertyName(){switch(c$1){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case"\"":case"'":return doubleQuote="\""===read(),void(lexState="string");}if(util$1.isIdStartChar(c$1))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c$1)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c$1){case",":case"}":return newToken("punctuator",read());}throw invalidChar(read())},beforeArrayValue(){return"]"===c$1?newToken("punctuator",read()):void(lexState="value")},afterArrayValue(){switch(c$1){case",":case"]":return newToken("punctuator",read());}throw invalidChar(read())},end(){// This code is unreachable since it's handled by the default lexState.
1233
- // if (c === undefined) {
1234
- // read()
1235
- // return newToken('eof')
1236
- // }
1237
- throw invalidChar(read())}};function newToken(e,t){return{type:e,value:t,line,column}}function literal(e){for(const t of e){const e=peek();if(e!==t)throw invalidChar(read());read()}}function escape(){const e=peek();switch(e){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\x0B";case"0":if(read(),util$1.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case void 0:throw invalidChar(read());}return read()}function hexEscape(){var e=String.fromCodePoint;let t="",r=peek();if(!util$1.isHexDigit(r))throw invalidChar(read());if(t+=read(),r=peek(),!util$1.isHexDigit(r))throw invalidChar(read());return t+=read(),e(parseInt(t,16))}function unicodeEscape(){let e="",t=4;for(;0<t--;){const t=peek();if(!util$1.isHexDigit(t))throw invalidChar(read());e+=read()}return String.fromCodePoint(parseInt(e,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF();}// This code is unreachable since it's handled by the lexState.
1238
- // throw invalidToken()
1239
- },afterPropertyName(){// This code is unreachable since it's handled by the lexState.
1240
- // if (token.type !== 'punctuator' || token.value !== ':') {
1241
- // throw invalidToken()
1242
- // }
1243
- if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();return"punctuator"===token.type&&"]"===token.value?void pop():void push()},afterPropertyValue(){// This code is unreachable since it's handled by the lexState.
1244
- // if (token.type !== 'punctuator') {
1245
- // throw invalidToken()
1246
- // }
1247
- if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop();}// This code is unreachable since it's handled by the lexState.
1248
- // throw invalidToken()
1249
- },afterArrayValue(){// This code is unreachable since it's handled by the lexState.
1250
- // if (token.type !== 'punctuator') {
1251
- // throw invalidToken()
1252
- // }
1253
- if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop();}// This code is unreachable since it's handled by the lexState.
1254
- // throw invalidToken()
1255
- },end(){// This code is unreachable since it's handled by the lexState.
1256
- // if (token.type !== 'eof') {
1257
- // throw invalidToken()
1258
- // }
1259
- }};function push(){let e;switch(token.type){case"punctuator":switch(token.value){case"{":e={};break;case"[":e=[];}break;case"null":case"boolean":case"numeric":case"string":e=token.value;// This code is unreachable.
1260
- // default:
1261
- // throw invalidToken()
1262
- }if(root===void 0)root=e;else{const t=stack[stack.length-1];Array.isArray(t)?t.push(e):t[key]=e}if(null!==e&&"object"==typeof e)stack.push(e),parseState=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=stack[stack.length-1];parseState=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const e=stack[stack.length-1];parseState=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}// This code is unreachable.
1263
- // function invalidParseState () {
1264
- // return new Error(`JSON5: invalid parse state '${parseState}'`)
1265
- // }
1266
- // This code is unreachable.
1267
- // function invalidLexState (state) {
1268
- // return new Error(`JSON5: invalid lex state '${state}'`)
1269
- // }
1270
- function invalidChar(e){return void 0===e?syntaxError(`JSON5: invalid end of input at ${line}:${column}`):syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}// This code is unreachable.
1271
- // function invalidToken () {
1272
- // if (token.type === 'eof') {
1273
- // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
1274
- // }
1275
- // const c = String.fromCodePoint(token.value.codePointAt(0))
1276
- // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
1277
- // }
1278
- function invalidIdentifier(){return column-=5,syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const t={"'":"\\'",'"':"\\\"","\\":"\\\\","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\v","":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(" ">e){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function syntaxError(e){const t=new SyntaxError(e);return t.lineNumber=line,t.columnNumber=column,t}var stringify=function(e,t,r){var o=String.fromCodePoint,n=Math.floor,a=Math.min;function p(e,t){let r=t[e];switch(null!=r&&("function"==typeof r.toJSON5?r=r.toJSON5(e):"function"==typeof r.toJSON&&(r=r.toJSON(e))),E&&(r=E.call(t,e,r)),r instanceof Number?r=+r:r instanceof String?r+="":r instanceof Boolean&&(r=r.valueOf()),r){case null:return"null";case!0:return"true";case!1:return"false";}return"string"==typeof r?s(r):"number"==typeof r?r+"":"object"==typeof r?Array.isArray(r)?c(r):l(r):void 0}function s(e){const t={"'":.1,'"':.2},r={"'":"\\'",'"':"\\\"","\\":"\\\\","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\v","":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let o="";for(let n=0;n<e.length;n++){const a=e[n];switch(a){case"'":case"\"":t[a]++,o+=a;continue;case"\0":if(util$1.isDigit(e[n+1])){o+="\\x00";continue}}if(r[a]){o+=r[a];continue}if(" ">a){let e=a.charCodeAt(0).toString(16);o+="\\x"+("00"+e).substring(e.length);continue}o+=a}const n=f||Object.keys(t).reduce((e,r)=>t[e]<t[r]?e:r);return o=o.replace(new RegExp(n,"g"),r[n]),n+o+n}function l(e){if(0<=u.indexOf(e))throw TypeError("Converting circular structure to JSON5");u.push(e);let t=y;y+=m;let r=g||Object.keys(e),o=[];for(const t of r){const r=p(t,e);if(void 0!==r){let e=d(t)+":";""!==m&&(e+=" "),e+=r,o.push(e)}}let n;if(0===o.length)n="{}";else{let e;if(""===m)e=o.join(","),n="{"+e+"}";else{let r=",\n"+y;e=o.join(r),n="{\n"+y+e+",\n"+t+"}"}}return u.pop(),y=t,n}function d(e){if(0===e.length)return s(e);const t=o(e.codePointAt(0));if(!util$1.isIdStartChar(t))return s(e);for(let r=t.length;r<e.length;r++)if(!util$1.isIdContinueChar(o(e.codePointAt(r))))return s(e);return e}function c(e){if(0<=u.indexOf(e))throw TypeError("Converting circular structure to JSON5");u.push(e);let t=y;y+=m;let r=[];for(let t=0;t<e.length;t++){const o=p(t+"",e);r.push(void 0===o?"null":o)}let o;if(0===r.length)o="[]";else if(""===m){let e=r.join(",");o="["+e+"]"}else{let e=",\n"+y,n=r.join(e);o="[\n"+y+n+",\n"+t+"]"}return u.pop(),y=t,o}const u=[];let y="",m="",g,E,f;if(null==t||"object"!=typeof t||Array.isArray(t)||(r=t.space,f=t.quote,t=t.replacer),"function"==typeof t)E=t;else if(Array.isArray(t)){g=[];for(const e of t){let t;"string"==typeof e?t=e:("number"==typeof e||e instanceof String||e instanceof Number)&&(t=e+""),void 0!==t&&0>g.indexOf(t)&&g.push(t)}}return r instanceof Number?r=+r:r instanceof String&&(r+=""),"number"==typeof r?0<r&&(r=a(10,n(r)),m=" ".substr(0,r)):"string"==typeof r&&(m=r.substr(0,10)),p("",{"":e})};const JSON5={parse,stringify};var lib=JSON5,papaparse=createCommonjsModule$1(function(e){var t=Math.pow,r=Math.abs,o=String.fromCharCode,n=Math.min;/* @license
1279
- Papa Parse
1280
- v5.2.0
1281
- https://github.com/mholt/PapaParse
1282
- License: MIT
1283
- */(function(t,r){e.exports=r()})(commonjsGlobal,function e(){function a(){var t=C.URL||C.webkitURL||null,r=e.toString();return I.BLOB_URL||(I.BLOB_URL=t.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))}/** ChunkStreamer is the base prototype for various streamer implementations. */function i(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){// Deep-copy the config so we can edit it
1284
- var t=T(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new u(t),this._handle.streamer=this,this._config=t}.call(this,e),this.parseChunk=function(e,t){// First chunk pre-processing
1285
- if(this.isFirstChunk&&h(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;// Rejoin the line we likely just split in two by chunking the file
1286
- var o=this._partialLine+e;this._partialLine="";var n=this._handle.parse(o,this._baseIndex,!this._finished);if(this._handle.paused()||this._handle.aborted())return void(this._halted=!0);var a=n.meta.cursor;this._finished||(this._partialLine=o.substring(a-this._baseIndex),this._baseIndex=a),n&&n.data&&(this._rowCount+=n.data.length);var i=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(_)C.postMessage({results:n,workerId:I.WORKER_ID,finished:i});else if(h(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!i||!h(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||n&&n.meta.paused||this._nextChunk(),n},this._sendError=function(e){h(this._config.error)?this._config.error(e):_&&this._config.error&&C.postMessage({workerId:I.WORKER_ID,error:e,finished:!1})}}function p(e){function t(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=I.RemoteChunkSize),i.call(this,e);var r;this._nextChunk=A?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();// Headers can only be set when once the request state is OPENED
1287
- if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),A||(r.onload=R(this._chunkLoaded,this),r.onerror=R(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!A),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;// minus one because byte range is inclusive
1288
- r.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{r.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}A&&0===r.status&&this._chunkError()},this._chunkLoaded=function(){return 4===r.readyState?200>r.status||400<=r.status?void this._chunkError():void(// Use chunckSize as it may be a diference on reponse lentgh due to characters with more than 1 byte
1289
- this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=t(r),this.parseChunk(r.responseText)):void 0},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t))}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=I.LocalChunkSize),i.call(this,e);var t="undefined"!=typeof FileReader,r,o;// FileReader is better than FileReaderSync (even in worker) - see http://stackoverflow.com/q/24708649/1048862
1290
- // But Firefox is a pill, too - see issue #76: https://github.com/mholt/PapaParse/issues/76
1291
- this.stream=function(e){this._input=e,o=e.slice||e.webkitSlice||e.mozSlice,t?(r=new FileReader,r.onload=R(this._chunkLoaded,this),r.onerror=R(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var a=n(this._start+this._config.chunkSize,this._input.size);e=o.call(e,this._start,a)}var i=r.readAsText(e,this._config.encoding);t||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(r.error)}}function l(e){e=e||{},i.call(this,e);var t;this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,r;return e?(r=t.substring(0,e),t=t.substring(e)):(r=t,t=""),this._finished=!t,this.parseChunk(r)}}}function d(e){e=e||{},i.call(this,e);var t=[],r=!0,o=!1;this.pause=function(){i.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){i.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=R(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=R(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=R(function(){this._streamCleanUp(),o=!0,this._streamData("")},this),this._streamCleanUp=R(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t=stream__default["default"].Duplex,r=T(e),o=!0,n=!1,a=[],p=null;this._onCsvData=function(e){var t=e.data;p.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){p.push(null)},r.step=R(this._onCsvData,this),r.complete=R(this._onCsvComplete,this),i.call(this,r),this._nextChunk=function(){n&&1===a.length&&(this._finished=!0),a.length?a.shift()():o=!0},this._addToParseQueue=function(e,t){a.push(R(function(){if(this.parseChunk("string"==typeof e?e:e.toString(r.encoding)),h(t))return t()},this)),o&&(o=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,r){this._addToParseQueue(e,r)},this._onWriteComplete=function(){n=!0,this._addToParseQueue("")},this.getStream=function(){return p},p=new t({readableObjectMode:!0,decodeStrings:!1,read:R(this._onRead,this),write:R(this._onWrite,this)}),p.once("finish",R(this._onWriteComplete,this))}// Use one ParserHandle per entire CSV file or string
1292
- function u(e){function o(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function n(e){if(x.test(e)){var t=parseFloat(e);if(-9007199254740992<t&&9007199254740992>t)return!0}return!1}function a(){if(L&&k&&(E("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+I.DefaultDelimiter+"'"),k=!1),e.skipEmptyLines)for(var t=0;t<L.data.length;t++)o(L.data[t])&&L.data.splice(t--,1);return p()&&s(),c()}function p(){return e.header&&0===S.length}function s(){function t(t){h(e.transformHeader)&&(t=e.transformHeader(t)),S.push(t)}if(L)if(Array.isArray(L.data[0])){for(var r=0;p()&&r<L.data.length;r++)L.data[r].forEach(t);L.data.splice(0,1)}// if _results.data[0] is not an array, we are in a step where _results.data is the row.
1293
- else L.data.forEach(t)}function l(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function d(e,t){return l(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(n(t)?parseFloat(t):R.test(t)?new Date(t):""===t?null:t):t}function c(){function t(t,r){var o=e.header?{}:[],n;for(n=0;n<t.length;n++){var a=n,i=t[n];e.header&&(a=n>=S.length?"__parsed_extra":S[n]),e.transform&&(i=e.transform(i,a)),i=d(a,i),"__parsed_extra"===a?(o[a]=o[a]||[],o[a].push(i)):o[a]=i}return e.header&&(n>S.length?E("FieldMismatch","TooManyFields","Too many fields: expected "+S.length+" fields but parsed "+n,_+r):n<S.length&&E("FieldMismatch","TooFewFields","Too few fields: expected "+S.length+" fields but parsed "+n,_+r)),o}if(!L||!e.header&&!e.dynamicTyping&&!e.transform)return L;var r=1;return!L.data.length||Array.isArray(L.data[0])?(L.data=L.data.map(t),r=L.data.length):L.data=t(L.data,0),e.header&&L.meta&&(L.meta.fields=S),_+=r,L}function u(t,n,a,p,s){var l,d,c,u;s=s||[",","\t","|",";",I.RECORD_SEP,I.UNIT_SEP];for(var y=0;y<s.length;y++){var g=s[y],E=0,f=0,x=0;c=void 0;for(var T=new m({comments:p,delimiter:g,newline:n,preview:10}).parse(t),R=0;R<T.data.length;R++){if(a&&o(T.data[R])){x++;continue}var h=T.data[R].length;if(f+=h,"undefined"==typeof c){c=h;continue}else 0<h&&(E+=r(h-c),c=h)}0<T.data.length&&(f/=T.data.length-x),("undefined"==typeof d||E<=d)&&("undefined"==typeof u||f>u)&&1.99<f&&(d=E,l=g,u=f)}return e.delimiter=l,{successful:!!l,bestDelimiter:l}}function g(e,t){e=e.substring(0,1048576);// max length 1 MB
1294
- // Replace all the text inside quotes
1295
- var o=new RegExp(y(t)+"([^]*?)"+y(t),"gm");e=e.replace(o,"");var a=e.split("\r"),r=e.split("\n"),n=1<r.length&&r[0].length<a[0].length;if(1===a.length||n)return"\n";for(var p=0,s=0;s<a.length;s++)"\n"===a[s][0]&&p++;return p>=a.length/2?"\r\n":"\r"}function E(e,t,r,o){var n={type:e,code:t,message:r};void 0!==o&&(n.row=o),L.errors.push(n)}// One goal is to minimize the use of regular expressions...
1296
- var f=t(2,53),x=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,R=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,C=this,A=0,_=0,N=!1,O=!1,S=[],L={// The last results returned from the parser
1297
- data:[],errors:[],meta:{}},v,b,k;if(h(e.step)){var P=e.step;e.step=function(t){if(L=t,p())a();else// only call user's step function after header row
1298
- {// It's possbile that this line was empty and there's no row here after all
1299
- if(a(),0===L.data.length)return;A+=t.data.length,e.preview&&A>e.preview?b.abort():(L.data=L.data[0],P(L,C))}}}/**
1300
- * Parses input. Most users won't need, and shouldn't mess with, the baseIndex
1301
- * and ignoreLastRow parameters. They are used by streamers (wrapper functions)
1302
- * when an input comes in multiple chunks, like from a file.
1303
- */this.parse=function(t,r,o){var n=e.quoteChar||"\"";if(e.newline||(e.newline=g(t,n)),k=!1,!e.delimiter){var i=u(t,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);i.successful?e.delimiter=i.bestDelimiter:(k=!0,e.delimiter=I.DefaultDelimiter),L.meta.delimiter=e.delimiter}else h(e.delimiter)&&(e.delimiter=e.delimiter(t),L.meta.delimiter=e.delimiter);var p=T(e);return e.preview&&e.header&&p.preview++,v=t,b=new m(p),L=b.parse(v,r,o),a(),N?{meta:{paused:!0}}:L||{meta:{paused:!1}}},this.paused=function(){return N},this.pause=function(){N=!0,b.abort(),v=h(e.chunk)?"":v.substring(b.getCharIndex())},this.resume=function(){C.streamer._halted?(N=!1,C.streamer.parseChunk(v,!0)):setTimeout(C.resume,3)},this.aborted=function(){return O},this.abort=function(){O=!0,b.abort(),L.meta.aborted=!0,h(e.complete)&&e.complete(L),v=""}}/** https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions */function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");// $& means the whole matched string
1304
- }/** The core parser implements speedy and correct CSV parsing */function m(e){e=e||{};var t=e.delimiter,r=e.newline,o=e.comments,a=e.step,p=e.preview,s=e.fastMode,l;l=void 0===e.quoteChar?"\"":e.quoteChar;var d=l;// Comment character must be valid
1305
- if(void 0!==e.escapeChar&&(d=e.escapeChar),("string"!=typeof t||-1<I.BAD_DELIMITERS.indexOf(t))&&(t=","),o===t)throw new Error("Comment character same as delimiter");else!0===o?o="#":("string"!=typeof o||-1<I.BAD_DELIMITERS.indexOf(o))&&(o=!1);// Newline must be valid: \r, \n, or \r\n
1306
- "\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");// We're gonna need these at the Parser scope
1307
- var c=0,u=!1;this.parse=function(e,m,g){function E(e){L.push(e),k=c}/**
1308
- * checks if there are extra spaces after closing quote and given index without any text
1309
- * if Yes, returns the number of spaces
1310
- */function f(t){var r=0;if(-1!==t){var o=e.substring(w+1,t);o&&""===o.trim()&&(r=o.length)}return r}/**
1311
- * Appends the remaining input from cursor to the end into
1312
- * row, saves the row, calls step, and returns the results.
1313
- */function x(t){return g?R():("undefined"==typeof t&&(t=e.substring(c)),b.push(t),c=_,E(b),S&&C(),R())}/**
1314
- * Appends the current row to the results. It sets the cursor
1315
- * to newCursor and finds the nextNewline. The caller should
1316
- * take care to execute user's step function and check for
1317
- * preview and end parsing if necessary.
1318
- */function T(t){c=t,E(b),b=[],U=e.indexOf(r,c)}/** Returns an object with the results, errors, and meta. */function R(e){return{data:L,errors:v,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:k+(m||0)}}}/** Executes the user's step function and resets data & errors. */function C(){a(R()),L=[],v=[]}/** Gets the delimiter character, which is not inside the quoted field */function A(r,o,n){var a={nextDelim:void 0,quoteSearch:void 0},i=e.indexOf(l,o+1);// get the next closing quote character
1319
- // if next delimiter is part of a field enclosed in quotes
1320
- if(r>o&&r<i&&(i<n||-1===n)){// get the next delimiter character after this one
1321
- var p=e.indexOf(t,i);// if there is no next delimiter, return default result
1322
- if(-1===p)return a;// find the next opening quote char position
1323
- p>i&&(i=e.indexOf(l,i+1)),a=A(p,i,n)}else a={nextDelim:r,quoteSearch:o};return a}// For some reason, in Chrome, this speeds things up (!?)
1324
- if("string"!=typeof e)throw new Error("Input must be a string");// We don't need to compute some of these every time parse() is called,
1325
- // but having them in a more local scope seems to perform better
1326
- var _=e.length,N=t.length,O=r.length,I=o.length,S=h(a);c=0;var L=[],v=[],b=[],k=0;if(!e)return R();if(s||!1!==s&&-1===e.indexOf(l)){for(var P=e.split(r),D=0;D<P.length;D++){if(b=P[D],c+=b.length,D!=P.length-1)c+=r.length;else if(g)return R();if(!(o&&b.substring(0,I)===o)){if(!S)E(b.split(t));else if(L=[],E(b.split(t)),C(),u)return R();if(p&&D>=p)return L=L.slice(0,p),R(!0)}}return R()}// Parser loop
1327
- for(var M=e.indexOf(t,c),U=e.indexOf(r,c),F=new RegExp(y(d)+y(l),"g"),w=e.indexOf(l,c);;){// Field has opening quote
1328
- if(e[c]===l){for(w=c,c++;;){//No other quotes are found - no other delimiters
1329
- if(w=e.indexOf(l,w+1),-1===w)return g||v.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:L.length,// row has yet to be inserted
1330
- index:c}),x();// Closing quote at EOF
1331
- if(w===_-1){var H=e.substring(c,w).replace(F,l);return x(H)}// If this quote is escaped, it's part of the data; skip it
1332
- // If the quote character is the escape character, then check if the next character is the escape character
1333
- if(l===d&&e[w+1]===d){w++;continue}// If the quote character is not the escape character, then check if the previous character was the escape character
1334
- if(l===d||0===w||e[w-1]!==d){-1!==M&&M<w+1&&(M=e.indexOf(t,w+1)),-1!==U&&U<w+1&&(U=e.indexOf(r,w+1));// Check up to nextDelim or nextNewline, whichever is closest
1335
- var V=-1===U?M:n(M,U),B=f(V);// Closing quote followed by delimiter or 'unnecessary spaces + delimiter'
1336
- if(e[w+1+B]===t){b.push(e.substring(c,w).replace(F,l)),c=w+1+B+N,e[w+1+B+N]!==l&&(w=e.indexOf(l,c)),M=e.indexOf(t,c),U=e.indexOf(r,c);break}var G=f(U);// Closing quote followed by newline or 'unnecessary spaces + newLine'
1337
- if(e.substring(w+1+G,w+1+G+O)===r){// we search for first quote in next line
1338
- if(b.push(e.substring(c,w).replace(F,l)),T(w+1+G+O),M=e.indexOf(t,c),w=e.indexOf(l,c),S&&(C(),u))return R();if(p&&L.length>=p)return R(!0);break}// Checks for valid closing quotes are complete (escaped quotes or quote followed by EOF/delimiter/newline) -- assume these quotes are part of an invalid text string
1339
- v.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:L.length,// row has yet to be inserted
1340
- index:c}),w++;continue}}continue}// Comment found at start of new line
1341
- if(o&&0===b.length&&e.substring(c,c+I)===o){if(-1===U)// Comment ends at EOF
1342
- return R();c=U+O,U=e.indexOf(r,c),M=e.indexOf(t,c);continue}// Next delimiter comes before next newline, so we've reached end of field
1343
- if(-1!==M&&(M<U||-1===U))// we check, if we have quotes, because delimiter char may be part of field enclosed in quotes
1344
- if(w>M){// we have quotes, so we try to find the next delimiter not enclosed in quotes and also next starting quote char
1345
- var Y=A(M,w,U);// if we have next delimiter char which is not enclosed in quotes
1346
- if(Y&&"undefined"!=typeof Y.nextDelim){M=Y.nextDelim,w=Y.quoteSearch,b.push(e.substring(c,M)),c=M+N,M=e.indexOf(t,c);continue}}else{b.push(e.substring(c,M)),c=M+N,M=e.indexOf(t,c);continue}// End of row
1347
- if(-1!==U){if(b.push(e.substring(c,U)),T(U+O),S&&(C(),u))return R();if(p&&L.length>=p)return R(!0);continue}break}return x()},this.abort=function(){u=!0},this.getCharIndex=function(){return c}}function g(){if(!I.WORKERS_SUPPORTED)return!1;var e=a(),t=new C.Worker(e);return t.onmessage=E,t.id=O++,N[t.id]=t,t}/** Callback when main thread receives a message */function E(t){var e=t.data,r=N[e.workerId],o=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var n=function(){o=!0,f(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},a={abort:n,pause:x,resume:x};if(h(r.userStep)){for(var p=0;p<e.results.data.length&&(r.userStep({data:e.results.data[p],errors:e.results.errors,meta:e.results.meta},a),!o);p++);delete e.results}else h(r.userChunk)&&(r.userChunk(e.results,a,e.file),delete e.results)}e.finished&&!o&&f(e.workerId,e.results)}function f(e,t){var r=N[e];h(r.userComplete)&&r.userComplete(t),r.terminate(),delete N[e]}function x(){throw new Error("Not implemented.")}/** Callback when worker thread receives a message */ /** Makes a deep copy of an array or object (mostly) */function T(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=T(e[r]);return t}function R(e,t){return function(){e.apply(t,arguments)}}function h(e){return"function"==typeof e}var C=function(){// alternative method, similar to `Function('return this')()`
1348
- // but without using `eval` (which is disabled when
1349
- // using Content Security Policy).
1350
- return"undefined"==typeof self?"undefined"==typeof window?"undefined"==typeof C?{}:C:window:self;// When running tests none of the above have been defined
1351
- }(),A=!C.document&&!!C.postMessage,_=A&&/blob:/i.test((C.location||{}).protocol),N={},O=0,I={};if(I.parse=function(e,t){t=t||{};var r=t.dynamicTyping||!1;if(h(r)&&(t.dynamicTypingFunction=r,r={}),t.dynamicTyping=r,t.transform=!!h(t.transform)&&t.transform,t.worker&&I.WORKERS_SUPPORTED){var o=g();return o.userStep=t.step,o.userChunk=t.chunk,o.userComplete=t.complete,o.userError=t.error,t.step=h(t.step),t.chunk=h(t.chunk),t.complete=h(t.complete),t.error=h(t.error),delete t.worker,void o.postMessage({input:e,config:t,workerId:o.id})}var n=null;return e===I.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(n=new c(t),n.getStream()):("string"==typeof e?n=t.download?new p(t):new l(t):!0===e.readable&&h(e.read)&&h(e.on)?n=new d(t):(C.File&&e instanceof File||e instanceof Object)&&(n=new s(t)),n.stream(e))},I.unparse=function(e,t){function r(){if("object"==typeof t){if("string"!=typeof t.delimiter||I.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(l=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(p=t.quotes),("boolean"==typeof t.skipEmptyLines||"string"==typeof t.skipEmptyLines)&&(m=t.skipEmptyLines),"string"==typeof t.newline&&(d=t.newline),"string"==typeof t.quoteChar&&(c=t.quoteChar),"boolean"==typeof t.header&&(s=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");g=t.columns}void 0!==t.escapeChar&&(u=t.escapeChar+c)}}/** Turns an object's keys into an array */function o(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}/** The double for loop that iterates the data and writes out a CSV string including header row */function n(e,t,r){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,p=!Array.isArray(t[0]);// If there a header row, write it first
1352
- if(n&&s){for(var u=0;u<e.length;u++)0<u&&(o+=l),o+=a(e[u],u);0<t.length&&(o+=d)}// Then write out the data
1353
- for(var y=0;y<t.length;y++){var m=n?e.length:t[y].length,g=!1,E=n?0===Object.keys(t[y]).length:0===t[y].length;if(r&&!n&&(g="greedy"===r?""===t[y].join("").trim():1===t[y].length&&0===t[y][0].length),"greedy"===r&&n){for(var f=[],x=0,T;x<m;x++)T=p?e[x]:x,f.push(t[y][T]);g=""===f.join("").trim()}if(!g){for(var R=0;R<m;R++){0<R&&!E&&(o+=l);var h=n&&p?e[R]:R;o+=a(t[y][h],R)}y<t.length-1&&(!r||0<m&&!E)&&(o+=d)}}return o}/** Encloses a value around quotes if needed (makes a value safe for CSV insertion) */function a(e,t){if("undefined"==typeof e||null===e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=e.toString().replace(E,u),o="boolean"==typeof p&&p||"function"==typeof p&&p(e,t)||Array.isArray(p)&&p[t]||i(r,I.BAD_DELIMITERS)||-1<r.indexOf(l)||" "===r.charAt(0)||" "===r.charAt(r.length-1);return o?c+r+c:r}function i(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}// Default configuration
1354
- /** whether to surround every datum with quotes */var p=!1,s=!0,l=",",d="\r\n",c="\"",u=c+c,m=!1,g=null;/** whether to write headers */r();var E=new RegExp(y(c),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return n(null,e,m);if("object"==typeof e[0])return n(g||o(e[0]),e,m)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(!e.fields&&(e.fields=e.meta&&e.meta.fields),!e.fields&&(e.fields=Array.isArray(e.data[0])?e.fields:o(e.data[0])),!Array.isArray(e.data[0])&&"object"!=typeof e.data[0]&&(e.data=[e.data])),n(e.fields||[],e.data||[],m);// Default (any valid paths should return before this)
1355
- throw new Error("Unable to serialize unrecognized input")},I.RECORD_SEP=o(30),I.UNIT_SEP=o(31),I.BYTE_ORDER_MARK="\uFEFF",I.BAD_DELIMITERS=["\r","\n","\"",I.BYTE_ORDER_MARK],I.WORKERS_SUPPORTED=!A&&!!C.Worker,I.NODE_STREAM_INPUT=1,I.LocalChunkSize=10485760,I.RemoteChunkSize=5242880,I.DefaultDelimiter=",",I.Parser=m,I.ParserHandle=u,I.NetworkStreamer=p,I.FileStreamer=s,I.StringStreamer=l,I.ReadableStreamStreamer=d,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(I.DuplexStreamStreamer=c),C.jQuery){var S=C.jQuery;S.fn.parse=function(e){// maintains chainability
1356
- function t(){if(0===a.length)return void(h(e.complete)&&e.complete());var t=a[0];if(h(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void r("AbortError",t.file,t.inputElem,n.reason);// Aborts all queued files immediately
1357
- if("skip"===n.action)// parse the next file in the queue, if any
1358
- return void o();"object"==typeof n.config&&(t.instanceConfig=S.extend(t.instanceConfig,n.config))}else if("skip"===n)// parse the next file in the queue, if any
1359
- return void o()}// Wrap up the user's complete callback, if any, so that ours also gets executed
1360
- var i=t.instanceConfig.complete;t.instanceConfig.complete=function(e){h(i)&&i(e,t.file,t.inputElem),o()},I.parse(t.file,t.instanceConfig)}function r(t,r,o,n){h(e.error)&&e.error({name:t},r,o,n)}function o(){a.splice(0,1),t()}var n=e.config||{},a=[];// begin parsing
1361
- return this.each(function(){var e="INPUT"===S(this).prop("tagName").toUpperCase()&&"file"===S(this).attr("type").toLowerCase()&&C.FileReader;if(!e||!this.files||0===this.files.length)return!0;// continue to next input element
1362
- for(var t=0;t<this.files.length;t++)a.push({file:this.files[t],inputElem:this,instanceConfig:S.extend({},n)})}),t(),this}}return _&&(C.onmessage=function(t){var e=t.data;if("undefined"==typeof I.WORKER_ID&&e&&(I.WORKER_ID=e.workerId),"string"==typeof e.input)C.postMessage({workerId:I.WORKER_ID,results:I.parse(e.input,e.config),finished:!0});else if(C.File&&e.input instanceof File||e.input instanceof Object)// thank you, Safari (see issue #106)
1363
- {var r=I.parse(e.input,e.config);r&&C.postMessage({workerId:I.WORKER_ID,results:r,finished:!0})}}),p.prototype=Object.create(i.prototype),p.prototype.constructor=p,s.prototype=Object.create(i.prototype),s.prototype.constructor=s,l.prototype=Object.create(l.prototype),l.prototype.constructor=l,d.prototype=Object.create(i.prototype),d.prototype.constructor=d,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(c.prototype=Object.create(i.prototype),c.prototype.constructor=c),I})}),t=function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})},englishFormats={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},u$1=function(e,r){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,o,n){var a=n&&n.toUpperCase();return o||r[n]||englishFormats[n]||t(r[a])})},formattingTokens=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match1to2=/\d\d?/,matchSigned=/[+-]?\d+/,matchOffset=/[+-]\d\d:?(\d\d)?/,matchWord=/\d*[^\s\d-_:/()]+/,locale={};function offsetFromString(e){if(!e)return 0;var t=e.match(/([+-]|\d\d)/g),r=+(60*t[1])+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r;// eslint-disable-line no-nested-ternary
1364
- }var addInput=function(e){return function(t){this[e]=+t}},zoneExpressions=[matchOffset,function(e){var t=this.zone||(this.zone={});t.offset=offsetFromString(e)}],getLocalePart=function(e){var t=locale[e];return t&&(t.indexOf?t:t.s.concat(t.f))},meridiemMatch=function(e,t){var r=locale,o=r.meridiem,n;if(!o)n=e===(t?"pm":"PM");else for(var a=1;24>=a;a+=1)// todo: fix input === meridiem(i, 0, isLowerCase)
1365
- if(-1<e.indexOf(o(a,0,t))){n=12<a;break}return n},expressions={A:[matchWord,function(e){this.afternoon=meridiemMatch(e,!1)}],a:[matchWord,function(e){this.afternoon=meridiemMatch(e,!0)}],S:[match1,function(e){this.milliseconds=100*+e}],SS:[match2,function(e){this.milliseconds=10*+e}],SSS:[match3,function(e){this.milliseconds=+e}],s:[match1to2,addInput("seconds")],ss:[match1to2,addInput("seconds")],m:[match1to2,addInput("minutes")],mm:[match1to2,addInput("minutes")],H:[match1to2,addInput("hours")],h:[match1to2,addInput("hours")],HH:[match1to2,addInput("hours")],hh:[match1to2,addInput("hours")],D:[match1to2,addInput("day")],DD:[match2,addInput("day")],Do:[matchWord,function(e){var t=locale,r=t.ordinal,o=e.match(/\d+/);if(this.day=o[0],!!r)for(var n=1;31>=n;n+=1)r(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[match1to2,addInput("month")],MM:[match2,addInput("month")],MMM:[matchWord,function(e){var t=getLocalePart("months"),r=getLocalePart("monthsShort"),o=(r||t.map(function(e){return e.substr(0,3)})).indexOf(e)+1;if(1>o)throw new Error;this.month=o%12||o}],MMMM:[matchWord,function(e){var t=getLocalePart("months"),r=t.indexOf(e)+1;if(1>r)throw new Error;this.month=r%12||r}],Y:[matchSigned,addInput("year")],YY:[match2,function(e){e=+e,this.year=e+(68<e?1900:2e3)}],YYYY:[match4,addInput("year")],Z:zoneExpressions,ZZ:zoneExpressions};function correctHours(e){var t=e.afternoon;if(t!==void 0){var r=e.hours;t?12>r&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}function makeParser(e){e=u$1(e,locale&&locale.formats);for(var t=e.match(formattingTokens),r=t.length,o=0;o<r;o+=1){var n=t[o],a=expressions[n],p=a&&a[0],s=a&&a[1];t[o]=s?{regex:p,parser:s}:n.replace(/^\[|\]$/g,"")}return function(e){for(var o={},n=0,a=0,i;n<r;n+=1)if(i=t[n],"string"==typeof i)a+=i.length;else{var p=i.regex,s=i.parser,l=e.substr(a),d=p.exec(l),c=d[0];s.call(o,c),e=e.replace(c,"")}return correctHours(o),o}}var parseFormattedInput=function(e,t,r){try{var o=makeParser(t),n=o(e),a=n.year,i=n.month,p=n.day,l=n.hours,c=n.minutes,u=n.seconds,g=n.milliseconds,E=n.zone,f=new Date,x=p||(a||i?1:f.getDate()),d=a||f.getFullYear(),y=0;a&&!i||(y=0<i?i-1:f.getMonth());var T=l||0,R=c||0,m=u||0,s=g||0;return E?new Date(Date.UTC(d,y,x,T,R,m,s+1e3*(60*E.offset))):r?new Date(Date.UTC(d,y,x,T,R,m,s)):new Date(d,y,x,T,R,m,s)}catch(t){return new Date("");// Invalid Date
1366
- }},customParseFormat=function(e,t,r){r.p.customParseFormat=!0;var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,a=e.args;this.$u=o;var p=a[1];if("string"==typeof p){var s=!0===a[2],l=!0===a[3],d=a[2];// reset global locale to make parallel unit test
1367
- l&&(d=a[2]),locale=this.$locale(),!s&&d&&(locale=r.Ls[d]),this.$d=parseFormattedInput(t,p,o),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),(s||l)&&t!==this.format(p)&&(this.$d=new Date("")),locale={}}else if(p instanceof Array)for(var c=p.length,u=1;u<=c;u+=1){a[1]=p[u-1];var y=r.apply(this,a);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}u===c&&(this.$d=new Date(""))}else n.call(this,e)}},numeral=createCommonjsModule$1(function(e){var t=Math.round,r=Math.pow,o=Math.abs,n=Math.floor,a=Math.max,i=Math.min;/*! @preserve
1368
- * numeral.js
1369
- * version : 2.0.6
1370
- * author : Adam Draper
1371
- * license : MIT
1372
- * http://adamwdraper.github.com/Numeral-js/
1373
- */(function(t,r){e.exports?e.exports=r():t.numeral=r()})(commonjsGlobal,function(){/************************************
1374
- Constructors
1375
- ************************************/ // Numeral prototype object
1376
- function e(e,t){this._input=e,this._value=t}/************************************
1377
- Variables
1378
- ************************************/var p={},s={},l={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},d={currentLocale:l.currentLocale,zeroFormat:l.zeroFormat,nullFormat:l.nullFormat,defaultFormat:l.defaultFormat,scalePercentBy100:l.scalePercentBy100},c,u;return c=function(t){var r,o,n,a;if(c.isNumeral(t))r=t.value();else if(0===t||"undefined"==typeof t)r=0;else if(null===t||u.isNaN(t))r=null;else if("string"!=typeof t)r=+t||null;else if(d.zeroFormat&&t===d.zeroFormat)r=0;else if(d.nullFormat&&t===d.nullFormat||!t.replace(/[^0-9]+/g,"").length)r=null;else{for(o in p)if(a="function"==typeof p[o].regexps.unformat?p[o].regexps.unformat():p[o].regexps.unformat,a&&t.match(a)){n=p[o].unformat;break}n=n||c._.stringToNumber,r=n(t)}return new e(t,r)},c.version="2.0.6",c.isNumeral=function(t){return t instanceof e},c._=u={// formats numbers separators, decimals places, signs, abbreviations
1379
- numberToFormat:function(e,t,r){var n=s[c.options.currentLocale],a=!1,p=!1,l=0,d="",u="",y=!1,m,// force abbreviation
1380
- g,E,f,x,T,R;// make sure we never format a null value
1381
- if(e=e||0,g=o(e),c._.includes(t,"(")?(a=!0,t=t.replace(/[\(|\)]/g,"")):(c._.includes(t,"+")||c._.includes(t,"-"))&&(x=c._.includes(t,"+")?t.indexOf("+"):0>e?t.indexOf("-"):-1,t=t.replace(/[\+|\-]/g,"")),c._.includes(t,"a")&&(m=t.match(/a(k|m|b|t)?/),m=!!m&&m[1],c._.includes(t," a")&&(d=" "),t=t.replace(new RegExp(d+"a[kmbt]?"),""),1000000000000<=g&&!m||"t"===m?(d+=n.abbreviations.trillion,e/=1000000000000):1000000000000>g&&1000000000<=g&&!m||"b"===m?(d+=n.abbreviations.billion,e/=1000000000):1000000000>g&&1000000<=g&&!m||"m"===m?(d+=n.abbreviations.million,e/=1000000):(1000000>g&&1000<=g&&!m||"k"===m)&&(d+=n.abbreviations.thousand,e/=1000)),c._.includes(t,"[.]")&&(p=!0,t=t.replace("[.]",".")),E=e.toString().split(".")[0],f=t.split(".")[1],T=t.indexOf(","),l=(t.split(".")[0].split(",")[0].match(/0/g)||[]).length,f?(c._.includes(f,"[")?(f=f.replace("]",""),f=f.split("["),u=c._.toFixed(e,f[0].length+f[1].length,r,f[1].length)):u=c._.toFixed(e,f.length,r),E=u.split(".")[0],u=c._.includes(u,".")?n.delimiters.decimal+u.split(".")[1]:"",p&&0===+u.slice(1)&&(u="")):E=c._.toFixed(e,0,r),d&&!m&&1e3<=+E&&d!==n.abbreviations.trillion&&(E=+E/1e3+"",d===n.abbreviations.thousand?d=n.abbreviations.million:d===n.abbreviations.million?d=n.abbreviations.billion:d===n.abbreviations.billion?d=n.abbreviations.trillion:void 0),(c._.includes(E,"-")&&(E=E.slice(1),y=!0),E.length<l))for(var h=l-E.length;0<h;h--)E="0"+E;return-1<T&&(E=E.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n.delimiters.thousands)),0===t.indexOf(".")&&(E=""),R=E+u+(d?d:""),a?R=(a&&y?"(":"")+R+(a&&y?")":""):0<=x?R=0===x?(y?"-":"+")+R:R+(y?"-":"+"):y&&(R="-"+R),R},// unformats numbers separators, decimals places, signs, abbreviations
1382
- stringToNumber:function(e){var t=s[d.currentLocale],o=e,n={thousand:3,million:6,billion:9,trillion:12},a,p,l;if(d.zeroFormat&&e===d.zeroFormat)p=0;else if(d.nullFormat&&e===d.nullFormat||!e.replace(/[^0-9]+/g,"").length)p=null;else{for(a in p=1,"."!==t.delimiters.decimal&&(e=e.replace(/\./g,"").replace(t.delimiters.decimal,".")),n)if(l=new RegExp("[^a-zA-Z]"+t.abbreviations[a]+"(?:\\)|(\\"+t.currency.symbol+")?(?:\\))?)?$"),o.match(l)){p*=r(10,n[a]);break}// check for negative number
1383
- p*=(e.split("-").length+i(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),p*=+e}return p},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,r){return e.slice(0,r)+t+e.slice(r)},reduce:function(e,r/*, initialValue*/){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof r)throw new TypeError(r+" is not a function");var o=Object(e),t=o.length>>>0,n=0,a;if(3===arguments.length)a=arguments[2];else{for(;n<t&&!(n in o);)n++;if(n>=t)throw new TypeError("Reduce of empty array with no initial value");a=o[n++]}for(;n<t;n++)n in o&&(a=r(a,o[n],n,o));return a},/**
1384
- * Computes the multiplier necessary to make x >= 1,
1385
- * effectively eliminating miscalculations caused by
1386
- * finite precision.
1387
- */multiplier:function(e){var t=e.toString().split(".");return 2>t.length?1:r(10,t[1].length)},/**
1388
- * Given a variable number of arguments, returns the maximum
1389
- * multiplier that must be used to normalize an operation involving
1390
- * all of them.
1391
- */correctionFactor:function(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var r=u.multiplier(t);return e>r?e:r},1)},/**
1392
- * Implementation of toFixed() that treats floats more like decimals
1393
- *
1394
- * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present
1395
- * problems for accounting- and finance-related software.
1396
- */toFixed:function(e,t,o,n){var p=e.toString().split("."),s=t-(n||0),l,d,c,u;// Use the smallest precision value possible to avoid errors from floating point representation
1397
- return l=2===p.length?i(a(p[1].length,s),t):s,c=r(10,l),u=(o(e+"e+"+l)/c).toFixed(l),n>t-l&&(d=new RegExp("\\.?0{1,"+(n-(t-l))+"}$"),u=u.replace(d,"")),u}},c.options=d,c.formats=p,c.locales=s,c.locale=function(e){return e&&(d.currentLocale=e.toLowerCase()),d.currentLocale},c.localeData=function(e){if(!e)return s[d.currentLocale];if(e=e.toLowerCase(),!s[e])throw new Error("Unknown locale : "+e);return s[e]},c.reset=function(){for(var e in l)d[e]=l[e]},c.zeroFormat=function(e){d.zeroFormat="string"==typeof e?e:null},c.nullFormat=function(e){d.nullFormat="string"==typeof e?e:null},c.defaultFormat=function(e){d.defaultFormat="string"==typeof e?e:"0.0"},c.register=function(e,t,r){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=r,r},c.validate=function(e,t){var r,o,n,a,i,p,s,l;//coerce val to string
1398
- //if val is just digits return true
1399
- if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),!!e.match(/^\d+$/))return!0;//if val is empty return false
1400
- if(""===e)return!1;//get the decimal and thousands separator from numeral.localeData
1401
- try{s=c.localeData(t)}catch(t){s=c.localeData(c.locale())}//setup the delimiters and currency symbol based on culture/locale
1402
- return(n=s.currency.symbol,i=s.abbreviations,r=s.delimiters.decimal,o="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,l=e.match(/^[^\d]+/),!(null!==l&&(e=e.substr(1),l[0]!==n)))&&(l=e.match(/[^\d]+$/),!(null!==l&&(e=e.slice(0,-1),l[0]!==i.thousand&&l[0]!==i.million&&l[0]!==i.billion&&l[0]!==i.trillion)))&&(p=new RegExp(o+"{2}"),!e.match(/[^\d.,]/g)&&(a=e.split(r),!(2<a.length)&&(2>a.length?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(p):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(p)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(p)&&!!a[1].match(/^\d+$/))));//validating abbreviation symbol
1403
- },c.fn=e.prototype={clone:function(){return c(this)},format:function(e,r){var o=this._value,n=e||d.defaultFormat,a,i,s;// make sure we have a roundingFunction
1404
- // format based on value
1405
- if(r=r||t,0===o&&null!==d.zeroFormat)i=d.zeroFormat;else if(null===o&&null!==d.nullFormat)i=d.nullFormat;else{for(a in p)if(n.match(p[a].regexps.format)){s=p[a].format;break}s=s||c._.numberToFormat,i=s(o,n,r)}return i},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=+e,this},add:function(e){var r=u.correctionFactor.call(null,this._value,e);return this._value=u.reduce([this._value,e],function(e,o){return e+t(r*o)},0)/r,this},subtract:function(e){var r=u.correctionFactor.call(null,this._value,e);return this._value=u.reduce([e],function(e,o){return e-t(r*o)},t(this._value*r))/r,this},multiply:function(e){function r(e,r){var o=u.correctionFactor(e,r);return t(e*o)*t(r*o)/t(o*o)}return this._value=u.reduce([this._value,e],r,1),this},divide:function(e){function r(e,r){var o=u.correctionFactor(e,r);return t(e*o)/t(r*o)}return this._value=u.reduce([this._value,e],r),this},difference:function(e){return o(c(this._value).subtract(e).value())}},c.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),function(){c.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,t,r){var o=c._.includes(t," BPS")?" ":"",n;return e*=1e4,t=t.replace(/\s?BPS/,""),n=c._.numberToFormat(e,t,r),c._.includes(n,")")?(n=n.split(""),n.splice(-1,0,o+"BPS"),n=n.join("")):n=n+o+"BPS",n},unformat:function(e){return+(1e-4*c._.stringToNumber(e)).toFixed(15)}})}(),function(){var e={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},t={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o=e.suffixes.concat(t.suffixes.filter(function(t){return 0>e.suffixes.indexOf(t)})),n=o.join("|");n="("+n.replace("B","B(?!PS)")+")",c.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(n)},format:function(o,n,a){var i=c._.includes(n,"ib")?t:e,p=c._.includes(n," b")||c._.includes(n," ib")?" ":"",s,l,d,u;// check for space before
1406
- for(n=n.replace(/\s?i?b/,""),l=0;l<=i.suffixes.length;l++)if(d=r(i.base,l),u=r(i.base,l+1),null===o||0===o||o>=d&&o<u){p+=i.suffixes[l],0<d&&(o/=d);break}return s=c._.numberToFormat(o,n,a),s+p},unformat:function(o){var n=c._.stringToNumber(o),a,i;if(n){for(a=e.suffixes.length-1;0<=a;a--){if(c._.includes(o,e.suffixes[a])){i=r(e.base,a);break}if(c._.includes(o,t.suffixes[a])){i=r(t.base,a);break}}n*=i||1}return n}})}(),function(){c.register("format","currency",{regexps:{format:/(\$)/},format:function(e,t,r){var o=c.locales[c.options.currentLocale],n={before:t.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:t.match(/([\+|\-|\)|\s|\$]*)$/)[0]},a,p,s;// strip format of spaces and $
1407
- // loop through each before symbol
1408
- for(t=t.replace(/\s?\$\s?/,""),a=c._.numberToFormat(e,t,r),0<=e?(n.before=n.before.replace(/[\-\(]/,""),n.after=n.after.replace(/[\-\)]/,"")):0>e&&!c._.includes(n.before,"-")&&!c._.includes(n.before,"(")&&(n.before="-"+n.before),s=0;s<n.before.length;s++)p=n.before[s],"$"===p?a=c._.insert(a,o.currency.symbol,s):" "===p?a=c._.insert(a," ",s+o.currency.symbol.length-1):void 0;// loop through each after symbol
1409
- for(s=n.after.length-1;0<=s;s--)p=n.after[s],"$"===p?a=s===n.after.length-1?a+o.currency.symbol:c._.insert(a,o.currency.symbol,-(n.after.length-(1+s))):" "===p?a=s===n.after.length-1?a+" ":c._.insert(a," ",-(n.after.length-(1+s)+o.currency.symbol.length-1)):void 0;return a}})}(),function(){c.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(e,t,r){var o="number"!=typeof e||c._.isNaN(e)?"0e+0":e.toExponential(),n=o.split("e"),a;return t=t.replace(/e[\+|\-]{1}0/,""),a=c._.numberToFormat(+n[0],t,r),a+"e"+n[1]},unformat:function(e){function t(e,t){var r=c._.correctionFactor(e,t);return e*r*(t*r)/(r*r)}var o=c._.includes(e,"e+")?e.split("e+"):e.split("e-"),n=+o[0],a=+o[1];return a=c._.includes(e,"e-")?a*=-1:a,c._.reduce([n,r(10,a)],t,1)}})}(),function(){c.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,t,r){var o=c.locales[c.options.currentLocale],n=c._.includes(t," o")?" ":"",a;// check for space before
1410
- return t=t.replace(/\s?o/,""),n+=o.ordinal(e),a=c._.numberToFormat(e,t,r),a+n}})}(),function(){c.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,t,r){var o=c._.includes(t," %")?" ":"",n;return c.options.scalePercentBy100&&(e*=100),t=t.replace(/\s?\%/,""),n=c._.numberToFormat(e,t,r),c._.includes(n,")")?(n=n.split(""),n.splice(-1,0,o+"%"),n=n.join("")):n=n+o+"%",n},unformat:function(e){var t=c._.stringToNumber(e);return c.options.scalePercentBy100?.01*t:t}})}(),function(){c.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e){var r=n(e/60/60),o=n((e-60*(60*r))/60),a=t(e-60*(60*r)-60*o);return r+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)},unformat:function(e){var t=e.split(":"),r=0;// turn hours and minutes into seconds and add them all up
1411
- return 3===t.length?(r+=60*(60*+t[0]),r+=60*+t[1],r+=+t[2]):2===t.length&&(r+=60*+t[0],r+=+t[1]),+r}})}(),c})}),extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},extendStatics(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(t,o){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var p=a.call(t),i=[],s,l;try{for(;(void 0===o||0<o--)&&!(s=p.next()).done;)i.push(s.value)}catch(e){l={error:e}}finally{try{s&&!s.done&&(a=p["return"])&&a.call(p)}finally{if(l)throw l.error}}return i}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}//
1412
- // An iterator that returns no values.
1413
- //
1414
- var EmptyIterator=/** @class */function(){function e(){}return e.prototype.next=function(){return{done:!0,value:null}},e}(),EmptyIterable=/** @class */function(){function e(){}return e.prototype[Symbol.iterator]=function(){return new EmptyIterator},e}(),CountIterator=/** @class */function(){function e(){this.index=0}return e.prototype.next=function(){return{done:!1,value:this.index++}},e}(),CountIterable=/** @class */function(){function e(){}return e.prototype[Symbol.iterator]=function(){return new CountIterator},e}(),MultiIterator=/** @class */function(){function e(e){this.iterators=e}return e.prototype.next=function(){if(0===this.iterators.length)return{done:!0,value:[]};var e=[];try{for(var t=__values(this.iterators),r=t.next();!r.done;r=t.next()){var o=r.value,n=o.next();if(n.done)return{done:!0,value:[]};e.push(n.value)}}catch(e){a={error:e}}finally{try{r&&!r.done&&(i=t.return)&&i.call(t)}finally{if(a)throw a.error}}return{done:!1,value:e};var a,i},e}(),MultiIterable=/** @class */function(){function e(e){this.iterables=e}return e.prototype[Symbol.iterator]=function(){var e=[];try{for(var t=__values(this.iterables),r=t.next(),o;!r.done;r=t.next())o=r.value,e.push(o[Symbol.iterator]())}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return new MultiIterator(e);var n,a},e}(),SelectIterator=/** @class */function(){function e(e,t){this.index=0,this.iterator=e,this.selector=t}return e.prototype.next=function(){var e=this.iterator.next();return e.done?{done:!0}:{done:!1,value:this.selector(e.value,this.index++)}},e}(),SelectIterable=/** @class */function(){function e(e,t){this.iterable=e,this.selector=t}return e.prototype[Symbol.iterator]=function(){var e=this.iterable[Symbol.iterator]();return new SelectIterator(e,this.selector)},e}(),SelectManyIterator=/** @class */function(){function e(e,t){this.index=0,this.iterator=e,this.selector=t,this.outputIterator=null}return e.prototype.next=function(){// eslint-disable-next-line no-constant-condition
1415
- for(;;){if(null===this.outputIterator){var e=this.iterator.next();if(e.done)// https://github.com/Microsoft/TypeScript/issues/8938
1416
- return{done:!0};// <= explicit cast here!;
1417
- var t=this.selector(e.value,this.index++);this.outputIterator=t[Symbol.iterator]()}var r=this.outputIterator.next();if(r.done){this.outputIterator=null;continue}else return r}},e}(),SelectManyIterable=/** @class */function(){function e(e,t){this.iterable=e,this.selector=t}return e.prototype[Symbol.iterator]=function(){var e=this.iterable[Symbol.iterator]();return new SelectManyIterator(e,this.selector)},e}(),TakeIterator=/** @class */function(){function e(e,t){this.childIterator=e,this.numElements=t}return e.prototype.next=function(){return 0>=this.numElements?{done:!0}:(--this.numElements,this.childIterator.next())},e}(),TakeIterable=/** @class */function(){function e(e,t){this.childIterable=e,this.numElements=t}return e.prototype[Symbol.iterator]=function(){var e=this.childIterable[Symbol.iterator]();return new TakeIterator(e,this.numElements)},e}(),TakeWhileIterator=/** @class */function(){function e(e,t){this.done=!1,this.childIterator=e,this.predicate=t}return e.prototype.next=function(){if(!this.done){var e=this.childIterator.next();if(e.done)this.done=!0;else{if(this.predicate(e.value))return e;this.done=!0}}// https://github.com/Microsoft/TypeScript/issues/8938
1418
- return{done:!0};// <= explicit cast here!;
1419
- },e}(),TakeWhileIterable=/** @class */function(){function e(e,t){this.childIterable=e,this.predicate=t}return e.prototype[Symbol.iterator]=function(){var e=this.childIterable[Symbol.iterator]();return new TakeWhileIterator(e,this.predicate)},e}(),WhereIterator=/** @class */function(){function e(e,t){this.childIterator=e,this.predicate=t}return e.prototype.next=function(){// eslint-disable-next-line no-constant-condition
1420
- for(;;){var e=this.childIterator.next();if(e.done)return e;if(this.predicate(e.value))// It matches the predicate.
1421
- return e}},e}(),WhereIterable=/** @class */function(){function e(e,t){this.childIterable=e,this.predicate=t}return e.prototype[Symbol.iterator]=function(){var e=this.childIterable[Symbol.iterator]();return new WhereIterator(e,this.predicate)},e}(),ConcatIterator=/** @class */function(){function e(e){this.curIterator=null,this.iterables=e,this.iterator=e[Symbol.iterator](),this.moveToNextIterable()}//
1422
- // Move onto the next iterable.
1423
- //
1424
- return e.prototype.moveToNextIterable=function(){var e=this.iterator.next();this.curIterator=e.done?null:e.value[Symbol.iterator]()},e.prototype.next=function(){// eslint-disable-next-line no-constant-condition
1425
- for(;;){if(null==this.curIterator)// Finished iterating all sub-iterators.
1426
- // https://github.com/Microsoft/TypeScript/issues/8938
1427
- return{done:!0};// <= explicit cast here!;
1428
- var e=this.curIterator.next();if(!e.done)return e;// Found a valid result from the current iterable.
1429
- // Find the next non empty iterable.
1430
- this.moveToNextIterable()}},e}(),ConcatIterable=/** @class */function(){function e(e){this.iterables=e}return e.prototype[Symbol.iterator]=function(){return new ConcatIterator(this.iterables)},e}(),SeriesWindowIterator=/** @class */function(){function e(e,t,r){this.iterable=e,this.period=t,this.whichIndex=r}return e.prototype.next=function(){this.iterator||(this.iterator=this.iterable[Symbol.iterator]());for(var e=[],t=0,r;t<this.period&&(r=this.iterator.next(),!r.done);++t)e.push(r.value);if(0===e.length)// Underlying iterator doesn't have required number of elements.
1431
- return{done:!0};var o=new Series({pairs:e});return{//TODO: The way the index is figured out could have much better performance.
1432
- value:[this.whichIndex===WhichIndex.Start?o.getIndex().first():o.getIndex().last(),o],done:!1}},e}(),SeriesWindowIterable=/** @class */function(){function e(e,t,r){this.iterable=e,this.period=t,this.whichIndex=r}return e.prototype[Symbol.iterator]=function(){return new SeriesWindowIterator(this.iterable,this.period,this.whichIndex)},e}(),ArrayIterator=/** @class */function(){function e(e){this.index=0,this.arr=e}return e.prototype.next=function(){return this.index<this.arr.length?{done:!1,value:this.arr[this.index++]}:{done:!0}},e}(),ReverseIterable=/** @class */function(){function e(e){this.iterable=e}return e.prototype[Symbol.iterator]=function(){var e=[];try{for(var t=__values(this.iterable),r=t.next(),o;!r.done;r=t.next())o=r.value,e.push(o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e.reverse(),new ArrayIterator(e);var n,a},e}(),ZipIterator=/** @class */function(){function e(e,t){this.iterators=e.map(function(e){return e[Symbol.iterator]()}),this.zipper=t}return e.prototype.next=function(){var e=this.iterators.map(function(e){return e.next()});try{for(var t=__values(e),r=t.next(),o;!r.done;r=t.next())if(o=r.value,o.done)// If any are done we are all done.
1433
- // https://github.com/Microsoft/TypeScript/issues/8938
1434
- return{done:!0};// <= explicit cast here!;
1435
- }catch(e){i={error:e}}finally{try{r&&!r.done&&(p=t.return)&&p.call(t)}finally{if(i)throw i.error}}var n=e.map(function(e){return e.value}),a=new Series(n);return{done:!1,value:this.zipper(a)};var i,p},e}(),ZipIterable=/** @class */function(){function e(e,t){this.iterables=e,this.zipper=t}return e.prototype[Symbol.iterator]=function(){return new ZipIterator(this.iterables,this.zipper)},e}(),DistinctIterator=/** @class */function(){function e(e,t){this.valuesAlreadySeen=new Set,this.iterator=e[Symbol.iterator](),this.selector=t}return e.prototype.next=function(){// eslint-disable-next-line no-constant-condition
1436
- for(;;){var e=this.iterator.next();if(e.done)return{done:!0};var t=void 0;if(t=this.selector?this.selector(e.value):e.value,!this.valuesAlreadySeen.has(t))// Already seen this value.
1437
- // Skip it and continue to next item.
1438
- return this.valuesAlreadySeen.add(t),{done:!1,value:e.value}}},e}(),DistinctIterable=/** @class */function(){function e(e,t){this.iterable=e,this.selector=t}return e.prototype[Symbol.iterator]=function(){return new DistinctIterator(this.iterable,this.selector)},e}(),SeriesRollingWindowIterator=/** @class */function(){function e(e,t,r){this.iterable=e,this.period=t,this.whichIndex=r}return e.prototype.next=function(){if(!this.curWindow){this.curWindow=[],this.iterator=this.iterable[Symbol.iterator]();for(var e=0,t;e<this.period;++e){if(t=this.iterator.next(),t.done)// Underlying iterator doesn't have required number of elements.
1439
- return{done:!0};this.curWindow.push(t.value)}}else{this.curWindow.shift();// Remove first item from window.
1440
- var t=this.iterator.next();if(t.done)// Underlying iterator doesn't have enough elements left.
1441
- return{done:!0};this.curWindow.push(t.value)}var r=new Series({pairs:this.curWindow});return{//TODO: The way the index is figured out could have much better performance.
1442
- value:[this.whichIndex===WhichIndex.Start?r.getIndex().first():r.getIndex().last(),r],done:!1}},e}(),SeriesRollingWindowIterable=/** @class */function(){function e(e,t,r){this.iterable=e,this.period=t,this.whichIndex=r}return e.prototype[Symbol.iterator]=function(){return new SeriesRollingWindowIterator(this.iterable,this.period,this.whichIndex)},e}(),SeriesVariableWindowIterator=/** @class */function(){function e(e,t){this.iterator=e[Symbol.iterator](),this.nextValue=this.iterator.next(),this.comparer=t}return e.prototype.next=function(){if(this.nextValue.done)// Nothing more to read.
1443
- // https://github.com/Microsoft/TypeScript/issues/8938
1444
- return{done:!0};// <= explicit cast here!;
1445
- // Pull values until there is one that doesn't compare.
1446
- // eslint-disable-next-line no-constant-condition
1447
- for(var e=[this.nextValue.value],t=this.nextValue.value;this.nextValue=this.iterator.next(),!this.nextValue.done;){if(!this.comparer(t[1],this.nextValue.value[1])){t=this.nextValue.value;break;// Doesn't compare. Start a new window.
1448
- }e.push(this.nextValue.value),t=this.nextValue.value}var r=new Series({pairs:e});return{value:r,done:!1}},e}(),SeriesVariableWindowIterable=/** @class */function(){function e(e,t){this.iterable=e,this.comparer=t}return e.prototype[Symbol.iterator]=function(){return new SeriesVariableWindowIterator(this.iterable,this.comparer)},e}(),Direction;//
1449
- (function(e){e[e.Ascending=0]="Ascending",e[e.Descending=1]="Descending"})(Direction||(Direction={}));var SortOperation=/** @class */function(){function e(e,t){this.values=e,this.sortSpec=t,this.keys=[]}return e.prototype.genKeys=function(){if(!(0<this.keys.length))// Already cached.
1450
- {try{for(var e=__values(this.values),t=e.next(),r;!t.done;t=e.next())r=t.value,this.keys.push(this.sortSpec.selector(r,0))}catch(e){o={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(o)throw o.error}}var o,n}},e.prototype.compare=function(e,t){this.genKeys();var r=this.keys[e],o=this.keys[t],n=-1;return r===o?n=0:r>o&&(n=1),this.sortSpec.direction===Direction.Descending?-n:n},e}(),OrderedIterable=/** @class */function(){function e(e,t){this.iterable=e,this.sortSpec=t}return e.prototype[Symbol.iterator]=function(){var e=[],t=[],r=0;try{for(var o=__values(this.iterable),n=o.next(),a;!n.done;n=o.next())a=n.value,e.push(r),t.push(a),++r}catch(e){m={error:e}}finally{try{n&&!n.done&&(g=o.return)&&g.call(o)}finally{if(m)throw m.error}}var i=[];try{for(var p=__values(this.sortSpec),s=p.next(),l;!s.done;s=p.next())l=s.value,i.push(new SortOperation(t,l))}catch(e){E={error:e}}finally{try{s&&!s.done&&(f=p.return)&&f.call(p)}finally{if(E)throw E.error}}i[0].genKeys(),e.sort(function(e,t){try{for(var r=__values(i),o=r.next();!o.done;o=r.next()){var n=o.value,a=n.compare(e,t);if(0!==a)return a}}catch(e){p={error:e}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(p)throw p.error}}return 0;var p,s});var d=[];try{for(var c=__values(e),u=c.next(),y;!u.done;u=c.next())y=u.value,d.push(t[y])}catch(e){x={error:e}}finally{try{u&&!u.done&&(T=c.return)&&T.call(c)}finally{if(x)throw x.error}}return new ArrayIterator(d);var m,g,E,f,x,T},e}(),ExtractElementIterator=/** @class */function(){function e(e,t){this.iterator=e,this.extractIndex=t}return e.prototype.next=function(){var e=this.iterator.next();return e.done?e:{done:!1,value:e.value[this.extractIndex]}},e}(),ExtractElementIterable=/** @class */function(){function e(e,t){this.arrayIterable=e,this.extractIndex=t}return e.prototype[Symbol.iterator]=function(){var e=this.arrayIterable[Symbol.iterator]();return new ExtractElementIterator(e,this.extractIndex)},e}(),SkipIterator=/** @class */function(){function e(e,t){this.iterator=e,this.numValues=t}return e.prototype.next=function(){for(;0<=--this.numValues;){var e=this.iterator.next();if(e.done)return e}return this.iterator.next()},e}(),SkipIterable=/** @class */function(){function e(e,t){this.iterable=e,this.numValues=t}return e.prototype[Symbol.iterator]=function(){var e=this.iterable[Symbol.iterator]();return new SkipIterator(e,this.numValues)},e}(),SkipWhileIterator=/** @class */function(){function e(e,t){this.doneSkipping=!1,this.childIterator=e,this.predicate=t}return e.prototype.next=function(){// eslint-disable-next-line no-constant-condition
1451
- for(;;){var e=this.childIterator.next();if(e.done)return e;// Done.
1452
- if(this.doneSkipping||!this.predicate(e.value))return this.doneSkipping=!0,e;// Skip it.
1453
- // It matches, stop skipping.
1454
- }},e}(),SkipWhileIterable=/** @class */function(){function e(e,t){this.childIterable=e,this.predicate=t}return e.prototype[Symbol.iterator]=function(){var e=this.childIterable[Symbol.iterator]();return new SkipWhileIterator(e,this.predicate)},e}(),DataFrameWindowIterator=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterable=t,this.period=r}return e.prototype.next=function(){this.iterator||(this.iterator=this.iterable[Symbol.iterator]());for(var e=[],t=0,r;t<this.period&&(r=this.iterator.next(),!r.done);++t)e.push(r.value);if(0===e.length)// Underlying iterator doesn't have required number of elements.
1455
- return{done:!0};var o=new DataFrame({columnNames:this.columnNames,pairs:e});return{value:o,done:!1}},e}(),DataFrameWindowIterable=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterable=t,this.period=r}return e.prototype[Symbol.iterator]=function(){return new DataFrameWindowIterator(this.columnNames,this.iterable,this.period)},e}(),CsvRowsIterator=/** @class */function(){function e(e,t){this.index=0,this.columnNames=Array.from(e),this.rowsIterator=t[Symbol.iterator]()}return e.prototype.next=function(){var e=this.rowsIterator.next();if(e.done)// https://github.com/Microsoft/TypeScript/issues/8938
1456
- return{done:!0};// <= explicit cast here!;
1457
- for(var t=e.value,r={},o=0,n;o<this.columnNames.length;++o)n=this.columnNames[o],r[n]=t[o];return{done:!1,value:r}},e}(),CsvRowsIterable=/** @class */function(){function e(e,t){this.columnNames=e,this.rows=t}return e.prototype[Symbol.iterator]=function(){return new CsvRowsIterator(this.columnNames,this.rows)},e}(),DataFrameRollingWindowIterator=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterable=t,this.period=r}return e.prototype.next=function(){if(!this.curWindow){this.curWindow=[],this.iterator=this.iterable[Symbol.iterator]();for(var e=0,t;e<this.period;++e){if(t=this.iterator.next(),t.done)// Underlying iterator doesn't have required number of elements.
1458
- return{done:!0};this.curWindow.push(t.value)}}else{this.curWindow.shift();// Remove first item from window.
1459
- var t=this.iterator.next();if(t.done)// Underlying iterator doesn't have enough elements left.
1460
- return{done:!0};this.curWindow.push(t.value)}var r=new DataFrame({columnNames:this.columnNames,pairs:this.curWindow});return{value:r,done:!1}},e}(),DataFrameRollingWindowIterable=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterable=t,this.period=r}return e.prototype[Symbol.iterator]=function(){return new DataFrameRollingWindowIterator(this.columnNames,this.iterable,this.period)},e}(),DataFrameVariableWindowIterator=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterator=t[Symbol.iterator](),this.nextValue=this.iterator.next(),this.comparer=r}return e.prototype.next=function(){if(this.nextValue.done)// Nothing more to read.
1461
- // https://github.com/Microsoft/TypeScript/issues/8938
1462
- return{done:!0};// <= explicit cast here!;
1463
- // Pull values until there is one that doesn't compare.
1464
- // eslint-disable-next-line no-constant-condition
1465
- for(var e=[this.nextValue.value],t=this.nextValue.value;this.nextValue=this.iterator.next(),!this.nextValue.done;){if(!this.comparer(t[1],this.nextValue.value[1])){t=this.nextValue.value;break;// Doesn't compare. Start a new window.
1466
- }e.push(this.nextValue.value),t=this.nextValue.value}var r=new DataFrame({columnNames:this.columnNames,pairs:e});return{value:r,done:!1}},e}(),DataFrameVariableWindowIterable=/** @class */function(){function e(e,t,r){this.columnNames=e,this.iterable=t,this.comparer=r}return e.prototype[Symbol.iterator]=function(){return new DataFrameVariableWindowIterator(this.columnNames,this.iterable,this.comparer)},e}(),RepeatIterator=/** @class */function(){function e(e,t){this.repetition=0,this.iterator=e[Symbol.iterator](),this.count=t,this.result=this.iterator.next()}return e.prototype.next=function(){return 0==this.count?{done:!0}:(this.repetition==this.count&&(this.result=this.iterator.next(),this.repetition=0),this.repetition+=1,this.result.done?{done:!0}:{done:!1,value:this.result.value})},e}(),RepeatIterable=/** @class */function(){function e(e,t){this.iterable=e,this.count=t}return e.prototype[Symbol.iterator]=function(){return new RepeatIterator(this.iterable,this.count)},e}(),TileIterator=/** @class */function(){function e(e,t){this.count=0,this.repetition=0,this.firstIteration=!0,this.iterable=e,this.iterator=e[Symbol.iterator](),this.count=t}return e.prototype.next=function(){var e=this.iterator.next();// Return done for empty iterable
1467
- return this.firstIteration&&e.done?{done:!0}:(this.firstIteration=!1,e.done&&(this.repetition+=1,this.iterator=this.iterable[Symbol.iterator](),e=this.iterator.next()),this.repetition<this.count?{done:!1,value:e.value}:{done:!0})},e}(),TileIterable=/** @class */function(){function e(e,t){this.iterable=e,this.count=t}return e.prototype[Symbol.iterator]=function(){return new TileIterator(this.iterable,this.count)},e}(),RavelIterator=/** @class */function(){function e(e){this.iteratorIndex=0,this.iterators=e.map(function(e){return e[Symbol.iterator]()})}return e.prototype.next=function(){if(0<this.iterators.length){for(var e=this.iterators[this.iteratorIndex].next();e.done;)if(this.iteratorIndex+=1,this.iteratorIndex<this.iterators.length)e=this.iterators[this.iteratorIndex].next();else// https://github.com/Microsoft/TypeScript/issues/8938
1468
- return{done:!0};// <= explicit cast here!;
1469
- return{done:!1,value:e.value}}// Return done if empty array passed
1470
- return{done:!0}},e}(),RavelIterable=/** @class */function(){function e(e){this.iterables=e}return e.prototype[Symbol.iterator]=function(){return new RavelIterator(this.iterables)},e}(),ColumnNamesIterator=/** @class */function(){function e(e,t){this.columnNamesIterator=null,this.values=e,this.considerAllRows=t}return e.prototype.next=function(){if(null===this.columnNamesIterator)if(this.considerAllRows){var e={};try{// Check all items.
1471
- for(var t=__values(this.values),r=t.next(),o;!r.done;r=t.next()){o=r.value;try{for(var n=__values(Object.keys(o)),a=n.next(),i;!a.done;a=n.next())i=a.value,e[i]=!0}catch(e){c={error:e}}finally{try{a&&!a.done&&(u=n.return)&&u.call(n)}finally{if(c)throw c.error}}}}catch(e){l={error:e}}finally{try{r&&!r.done&&(d=t.return)&&d.call(t)}finally{if(l)throw l.error}}this.columnNamesIterator=new ArrayIterator(Object.keys(e))}else{// Just check the first item.
1472
- var p=this.values[Symbol.iterator](),s=p.next();if(s.done)return{done:!0,value:""};this.columnNamesIterator=new ArrayIterator(Object.keys(s.value))}return this.columnNamesIterator.next();var l,d,c,u},e}(),ColumnNamesIterable=/** @class */function(){function e(e,t){this.values=e,this.considerAllRows=t}return e.prototype[Symbol.iterator]=function(){return new ColumnNamesIterator(this.values,this.considerAllRows)},e}();//
1473
- // Helper function to only return distinct items.
1474
- //
1475
- function makeDistinct(e,t){var r={},o=[];try{for(var n=__values(e),a=n.next();!a.done;a=n.next()){var i=a.value,p=t&&t(i)||i;r[p]||(r[p]=!0,o.push(i))}}catch(e){s={error:e}}finally{try{a&&!a.done&&(l=n.return)&&l.call(n)}finally{if(s)throw s.error}}return o;var s,l}//
1476
- // Helper function to map an array of objects.
1477
- //
1478
- function toMap(e,t,r){var o={};try{for(var n=__values(e),a=n.next();!a.done;a=n.next()){var i=a.value,p=t(i);o[p]=r(i)}}catch(e){s={error:e}}finally{try{a&&!a.done&&(l=n.return)&&l.call(n)}finally{if(s)throw s.error}}return o;var s,l}//
1479
- // Helper function to map an array of objects.
1480
- //
1481
- function toMap2(e,t,r){var o=new Map;try{for(var n=__values(e),a=n.next(),i;!a.done;a=n.next())i=a.value,o.set(t(i),r(i))}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return o;var p,s}//
1482
- // Determine the type of a value.
1483
- //
1484
- function determineType(e){return void 0===e?"undefined":isNumber(e)?"number":isString(e)?"string":e instanceof Date?"date":isBoolean(e)?"boolean":"unsupported"}function isObject(e){return t$1(e).isObject&&!isDate(e)}function isFunction(e){return t$1(e).isFunction}function isString(e){return t$1(e).isString}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function isBoolean(e){return t$1(e).isBoolean}function isNumber(e){return t$1(e).isNumber}function isArray(e){return t$1(e).isArray}function isUndefined(e){return e===void 0}/**
1485
- * Class that represents a dataframe.
1486
- * A dataframe contains an indexed sequence of data records.
1487
- * Think of it as a spreadsheet or CSV file in memory.
1488
- *
1489
- * Each data record contains multiple named fields, the value of each field represents one row in a column of data.
1490
- * Each column of data is a named {@link Series}.
1491
- * You think of a dataframe a collection of named data series.
1492
- *
1493
- * @typeparam IndexT The type to use for the index.
1494
- * @typeparam ValueT The type to use for each row/data record.
1495
- */var DataFrame=/** @class */function(){var e=Math.abs;/**
1496
- * Create a dataframe.
1497
- *
1498
- * @param config This can be an array, a configuration object or a function that lazily produces a configuration object.
1499
- *
1500
- * It can be an array that specifies the data records that the dataframe contains.
1501
- *
1502
- * It can be a {@link IDataFrameConfig} that defines the data and configuration of the dataframe.
1503
- *
1504
- * Or it can be a function that lazily produces a {@link IDataFrameConfig}.
1505
- *
1506
- * @example
1507
- * <pre>
1508
- *
1509
- * const df = new DataFrame();
1510
- * </pre>
1511
- *
1512
- * @example
1513
- * <pre>
1514
- *
1515
- * const df = new DataFrame([ { A: 10 }, { A: 20 }, { A: 30 }, { A: 40 }]);
1516
- * </pre>
1517
- *
1518
- * @example
1519
- * <pre>
1520
- *
1521
- * const df = new DataFrame({ index: [1, 2, 3, 4], values: [ { A: 10 }, { A: 20 }, { A: 30 }, { A: 40 }] });
1522
- * </pre>
1523
- *
1524
- * @example
1525
- * <pre>
1526
- *
1527
- * const lazyInit = () => ({ index: [1, 2, 3, 4], values: [ { A: 10 }, { A: 20 }, { A: 30 }, { A: 40 }] });
1528
- * const df = new DataFrame(lazyInit);
1529
- * </pre>
1530
- */function t(e){this.configFn=null,this.content=null,this.indexedContent=null,e?isFunction(e)?this.configFn=e:isArray(e)||isFunction(e[Symbol.iterator])?this.content=t.initFromArray(e):this.content=t.initFromConfig(e):this.content=t.initEmpty()}//
1531
- // Initialise dataframe content from an iterable of values.
1532
- //
1533
- return t.initFromArray=function(e){var r=e[Symbol.iterator]().next(),o=r.done?[]:Object.keys(r.value);return{index:t.defaultCountIterable,values:e,pairs:new MultiIterable([t.defaultCountIterable,e]),isBaked:!0,columnNames:o}},t.initEmpty=function(){return{index:t.defaultEmptyIterable,values:t.defaultEmptyIterable,pairs:t.defaultEmptyIterable,isBaked:!0,columnNames:[]}},t.initColumnNames=function(e,t){var r=[],o={},n=Array.from(e).map(function(e){return e.toString()});try{// Search for duplicate column names.
1534
- for(var a=__values(n),i=a.next();!i.done;i=a.next()){var p=i.value,s=void 0!==t&&t?p:p.toLowerCase();void 0===o[s]?o[s]=1:o[s]+=1}}catch(e){y={error:e}}finally{try{i&&!i.done&&(m=a.return)&&m.call(a)}finally{if(y)throw y.error}}var l={};try{for(var d=__values(n),c=d.next();!c.done;c=d.next()){var p=c.value,s=void 0!==t&&t?p:p.toLowerCase();if(1<o[s]){var u=1;// There are duplicates of this column.
1535
- void 0!==l[s]&&(u=l[s]),r.push(p+"."+u),l[s]=u+1}else// No duplicates.
1536
- r.push(p)}}catch(e){g={error:e}}finally{try{c&&!c.done&&(E=d.return)&&E.call(d)}finally{if(g)throw g.error}}return r;var y,m,g,E},t.checkIterable=function(e,t){if(isArray(e));else if(isFunction(e[Symbol.iterator]));else// Not ok
1537
- throw new Error("Expected '"+t+"' field of DataFrame config object to be an array of values or an iterable of values.")},t.initFromConfig=function(e){var r=!1,o,n,a,i;if(e.pairs&&(t.checkIterable(e.pairs,"pairs"),a=e.pairs),e.columns){var p=e.columns;if(isArray(p)||isFunction(p[Symbol.iterator])){var s=p;i=Array.from(s).map(function(e){return e.name}),p=toMap(s,function(e){return e.name},function(e){return e.series})}else{if(!isObject(p))throw new Error("Expected 'columns' member of 'config' parameter to DataFrame constructor to be an object with fields that define columns.");i=Object.keys(p)}var l=[];try{for(var d=__values(i),c=d.next(),u;!c.done;c=d.next())u=c.value,t.checkIterable(p[u],u),l.push(p[u])}catch(e){y={error:e}}finally{try{c&&!c.done&&(m=d.return)&&m.call(d)}finally{if(y)throw y.error}}n=new CsvRowsIterable(i,new MultiIterable(l))}else e.columnNames&&(i=this.initColumnNames(e.columnNames,e.caseSensitive)),e.rows?(!e.columnNames&&(i=new SelectIterable(new CountIterable(),function(e){return"Column."+e.toString()})),t.checkIterable(e.rows,"rows"),n=new CsvRowsIterable(i,e.rows)):e.values?(t.checkIterable(e.values,"values"),n=e.values,!e.columnNames&&(i=new ColumnNamesIterable(n,e.considerAllRows||!1))):a?(n=new ExtractElementIterable(a,1),!e.columnNames&&(i=new ColumnNamesIterable(n,e.considerAllRows||!1))):(n=t.defaultEmptyIterable,!e.columnNames&&(i=t.defaultEmptyIterable));return e.index?(t.checkIterable(e.index,"index"),o=e.index):a?o=new ExtractElementIterable(a,0):o=t.defaultCountIterable,a||(a=new MultiIterable([o,n])),void 0!==e.baked&&(r=e.baked),{index:o,values:n,pairs:a,isBaked:r,columnNames:i};var y,m},t.prototype.lazyInit=function(){null===this.content&&null!==this.configFn&&(this.content=t.initFromConfig(this.configFn()))},t.prototype.getContent=function(){return this.lazyInit(),this.content},t.prototype.getRowByIndex=function(e){if(!this.indexedContent){this.indexedContent=new Map;try{for(var t=__values(this.getContent().pairs),r=t.next(),o;!r.done;r=t.next())o=r.value,this.indexedContent.set(o[0],o[1])}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}}return this.indexedContent.get(e);var n,a},t.prototype[Symbol.iterator]=function(){return this.getContent().values[Symbol.iterator]()},t.prototype.getColumnNames=function(){return Array.from(this.getContent().columnNames)},t.prototype.getColumns=function(){var e=this;return new Series(function(){var t=e.getColumnNames();return{values:t.map(function(t){var r=e.getSeries(t).skipWhile(function(e){return void 0===e||null===e}),o=r.any()?r.first():void 0;return{name:t,type:determineType(o),series:r}})}})},t.prototype.cast=function(){return this},t.prototype.getIndex=function(){var e=this;return new Index(function(){return{values:e.getContent().index}})},t.prototype.setIndex=function(e){if(!isString(e))throw new Error("Expected 'columnName' parameter to 'DataFrame.setIndex' to be a string that specifies the name of the column to set as the index for the dataframe.");return this.withIndex(this.getSeries(e))},t.prototype.withIndex=function(e){var r=this;return isFunction(e)?new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:t.values,index:r.deflate(e)}}):(t.checkIterable(e,"newIndex"),new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:t.values,index:e}}))},t.prototype.resetIndex=function(){var e=this;return new t(function(){var t=e.getContent();return{columnNames:t.columnNames,values:t.values}})},t.prototype.getSeries=function(e){var t=this;if(!isString(e))throw new Error("Expected 'columnName' parameter to 'DataFrame.getSeries' function to be a string that specifies the name of the column to retreive.");return new Series(function(){return{values:new SelectIterable(t.getContent().values,function(t){return t[e]}),index:t.getContent().index}})},t.prototype.hasSeries=function(e){var t=e.toLowerCase();try{for(var r=__values(this.getColumnNames()),o=r.next(),n;!o.done;o=r.next())if(n=o.value,n.toLowerCase()===t)return!0}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return!1;var a,i},t.prototype.expectSeries=function(e){if(!this.hasSeries(e))throw new Error("Expected dataframe to contain series with column name: '"+e+"'.");return this.getSeries(e)},t.prototype.withSeries=function(e,r){var o=this;if(!isObject(e)){if(!isString(e))throw new Error("Expected 'columnNameOrSpec' parameter to 'DataFrame.withSeries' function to be a string that specifies the column to set or replace.");if(!isFunction(r)&&!isObject(r))throw new Error("Expected 'series' parameter to 'DataFrame.withSeries' to be a Series object or a function that takes a dataframe and produces a Series.")}else if(!isUndefined(r))throw new Error("Expected 'series' parameter to 'DataFrame.withSeries' to not be set when 'columnNameOrSpec is an object.");if(isObject(e)){var n=e,a=Object.keys(n),i=this;try{for(var p=__values(a),s=p.next(),l;!s.done;s=p.next())l=s.value,i=i.withSeries(l,n[l])}catch(e){u={error:e}}finally{try{s&&!s.done&&(y=p.return)&&y.call(p)}finally{if(u)throw u.error}}return i.cast()}var d=e;if(this.none()){// We have an empty data frame.
1538
- var c;return c=isFunction(r)?r(this):r,c.inflate(function(e){var t={};return t[d]=e,t}).cast()}return new t(function(){var e=isFunction(r)?r(o):r;var t=toMap2(e.toPairs(),function(e){return e[0]},function(e){return e[1]}),n=makeDistinct(o.getColumnNames().concat([d]));return{columnNames:n,index:o.getContent().index,pairs:new SelectIterable(o.getContent().pairs,function(e){var r=e[0],o=e[1],n=Object.assign({},o);return n[d]=t.get(r),[r,n]})}});var u,y},t.merge=function(e){var r=new Map;try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next()){a=n.value;try{for(var i=__values(a.toPairs()),p=i.next();!p.done;p=i.next()){var s=p.value,l=s[0];if(!r.has(l)){var d=Object.assign({},s[1]);r.set(l,d)}else r.set(l,Object.assign(r.get(l),s[1]))}}catch(e){E={error:e}}finally{try{p&&!p.done&&(f=i.return)&&f.call(i)}finally{if(E)throw E.error}}}}catch(e){m={error:e}}finally{try{n&&!n.done&&(g=o.return)&&g.call(o)}finally{if(m)throw m.error}}var c=Array.from(e).map(function(e){return e.getColumnNames()}).reduce(function(e,t){return e.concat(t)},[]),u=makeDistinct(c),y=Array.from(r.keys()).map(function(e){return[e,r.get(e)]});return y.sort(function(e,t){return e[0]===t[0]?0:e[0]>t[0]?1:-1}),new t({columnNames:u,pairs:y});var m,g,E,f},t.prototype.merge=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.merge([this].concat(e))},t.prototype.ensureSeries=function(e,t){if(!isObject(e)){if(!isString(e))throw new Error("Expected 'columnNameOrSpec' parameter to 'DataFrame.ensureSeries' function to be a string that specifies the column to set or replace.");if(!isFunction(t)&&!isObject(t))throw new Error("Expected 'series' parameter to 'DataFrame.ensureSeries' to be a Series object or a function that takes a dataframe and produces a Series.")}else if(!isUndefined(t))throw new Error("Expected 'series' parameter to 'DataFrame.ensureSeries' to not be set when 'columnNameOrSpec is an object.");if(isObject(e)){var r=Object.keys(e),o=this;try{for(var n=__values(r),a=n.next(),i;!a.done;a=n.next())i=a.value,o=o.ensureSeries(i,e[i])}catch(e){s={error:e}}finally{try{a&&!a.done&&(l=n.return)&&l.call(n)}finally{if(s)throw s.error}}return o}var p=e;return this.hasSeries(p)?this:this.withSeries(p,t);var s,l},t.prototype.subset=function(e){var r=this;if(!isArray(e))throw new Error("Expected 'columnNames' parameter to 'DataFrame.subset' to be an array of column names to keep.");return new t(function(){var t=r.getContent();return{columnNames:e,index:t.index,values:new SelectIterable(t.values,function(t){var r={};try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())a=n.value,r[a]=t[a]}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return r;var i,p}),pairs:new SelectIterable(t.pairs,function(t){var r={},o=t[1];try{for(var n=__values(e),a=n.next(),i;!a.done;a=n.next())i=a.value,r[i]=o[i]}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return[t[0],r];var p,s})}})},t.prototype.dropSeries=function(e){var r=this;if(!isArray(e)){if(!isString(e))throw new Error("'DataFrame.dropSeries' expected either a string or an array or strings.");e=[e]}return new t(function(){var t=r.getContent(),o=[];try{for(var n=__values(t.columnNames),a=n.next(),i;!a.done;a=n.next())i=a.value,-1===e.indexOf(i)&&o.push(i)}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return{columnNames:o,index:t.index,values:new SelectIterable(t.values,function(t){var r=Object.assign({},t);try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())a=n.value,delete r[a]}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return r;var i,p}),pairs:new SelectIterable(t.pairs,function(t){var r=Object.assign({},t[1]);try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())a=n.value,delete r[a]}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return[t[0],r];var i,p})};var p,s})},t.prototype.reorderSeries=function(e){var r=this;if(!isArray(e))throw new Error("Expected parameter 'columnNames' to 'DataFrame.reorderSeries' to be an array with column names.");try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())if(a=n.value,!isString(a))throw new Error("Expected parameter 'columnNames' to 'DataFrame.reorderSeries' to be an array with column names.")}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return new t(function(){var t=r.getContent();return{columnNames:e,index:t.index,values:new SelectIterable(t.values,function(t){var r={};try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())a=n.value,r[a]=t[a]}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return r;var i,p}),pairs:new SelectIterable(t.pairs,function(t){var r=t[1],o={};try{for(var n=__values(e),a=n.next(),i;!a.done;a=n.next())i=a.value,o[i]=r[i]}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return[t[0],o];var p,s})}});var i,p},t.prototype.bringToFront=function(e){var r=this;if(isArray(e))try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())if(a=n.value,!isString(a))throw new Error("Expect 'columnOrColumns' parameter to 'DataFrame.bringToFront' function to specify a column or columns via a string or an array of strings.")}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}else{if(!isString(e))throw new Error("Expect 'columnOrColumns' parameter to 'DataFrame.bringToFront' function to specify a column or columns via a string or an array of strings.");e=[e]}return new t(function(){var t=r.getContent(),o=Array.from(t.columnNames),n=[];try{for(var a=__values(e),i=a.next(),p;!i.done;i=a.next())p=i.value,-1!==o.indexOf(p)&&n.push(p)}catch(e){u={error:e}}finally{try{i&&!i.done&&(y=a.return)&&y.call(a)}finally{if(u)throw u.error}}var s=[];try{for(var l=__values(o),d=l.next(),c;!d.done;d=l.next())c=d.value,-1===e.indexOf(c)&&s.push(c)}catch(e){m={error:e}}finally{try{d&&!d.done&&(g=l.return)&&g.call(l)}finally{if(m)throw m.error}}return{columnNames:n.concat(s),index:t.index,values:t.values,pairs:t.pairs};var u,y,m,g});var i,p},t.prototype.bringToBack=function(e){var r=this;if(isArray(e))try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())if(a=n.value,!isString(a))throw new Error("Expect 'columnOrColumns' parameter to 'DataFrame.bringToBack' function to specify a column or columns via a string or an array of strings.")}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}else{if(!isString(e))throw new Error("Expect 'columnOrColumns' parameter to 'DataFrame.bringToBack' function to specify a column or columns via a string or an array of strings.");e=[e]}return new t(function(){var t=r.getContent(),o=Array.from(t.columnNames),n=[];try{for(var a=__values(e),i=a.next(),p;!i.done;i=a.next())p=i.value,-1!==o.indexOf(p)&&n.push(p)}catch(e){u={error:e}}finally{try{i&&!i.done&&(y=a.return)&&y.call(a)}finally{if(u)throw u.error}}var s=[];try{for(var l=__values(o),d=l.next(),c;!d.done;d=l.next())c=d.value,-1===e.indexOf(c)&&s.push(c)}catch(e){m={error:e}}finally{try{d&&!d.done&&(g=l.return)&&g.call(l)}finally{if(m)throw m.error}}return{columnNames:s.concat(n),index:t.index,values:t.values,pairs:t.pairs};var u,y,m,g});var i,p},t.prototype.renameSeries=function(e){var r=this;if(!isObject(e))throw new Error("Expected parameter 'newColumnNames' to 'DataFrame.renameSeries' to be an array with column names.");var o=Object.keys(e);try{for(var n=__values(o),a=n.next(),i;!a.done;a=n.next()){if(i=a.value,!isString(i))throw new Error("Expected existing column name '"+i+"' of 'newColumnNames' parameter to 'DataFrame.renameSeries' to be a string.");if(!isString(e[i]))throw new Error("Expected new column name '"+e[i]+"' for existing column '"+i+"' of 'newColumnNames' parameter to 'DataFrame.renameSeries' to be a string.")}}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return new t(function(){//
1539
- // Remap each row of the data frame to the new column names.
1540
- //
1541
- function t(t){var r=Object.assign({},t);try{for(var n=__values(o),a=n.next(),i;!a.done;a=n.next())i=a.value,r[e[i]]=r[i],delete r[i]}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return r;var p,s}var n=r.getContent(),a=[];try{for(var i=__values(n.columnNames),p=i.next();!p.done;p=i.next()){var s=p.value,l=o.indexOf(s);-1===l?a.push(s):a.push(e[s])}}catch(e){d={error:e}}finally{try{p&&!p.done&&(c=i.return)&&c.call(i)}finally{if(d)throw d.error}}return{columnNames:a,index:n.index,values:new SelectIterable(n.values,t),pairs:new SelectIterable(n.pairs,function(e){return[e[0],t(e[1])]})};var d,c});var p,s},t.prototype.toArray=function(){var e=[];try{for(var t=__values(this.getContent().values),r=t.next(),o;!r.done;r=t.next())o=r.value,void 0!==o&&null!==o&&e.push(o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},t.prototype.toPairs=function(){var e=[];try{for(var t=__values(this.getContent().pairs),r=t.next(),o;!r.done;r=t.next())o=r.value,null!=o[1]&&null!==o[1]&&e.push(o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},t.prototype.toObject=function(e,t){if(!isFunction(e))throw new Error("Expected 'keySelector' parameter to DataFrame.toObject to be a function.");if(!isFunction(t))throw new Error("Expected 'valueSelector' parameter to DataFrame.toObject to be a function.");return toMap(this,e,t)},t.prototype.toRows=function(){var e=this.getColumnNames(),t=[];try{for(var r=__values(this.getContent().values),o=r.next();!o.done;o=r.next()){for(var n=o.value,a=[],i=0;i<e.length;++i)a.push(n[e[i]]);t.push(a)}}catch(e){p={error:e}}finally{try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(p)throw p.error}}return t;var p,s},t.prototype.select=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.select' function to be a function.");return new t(function(){var t=r.getContent();return{values:new SelectIterable(t.values,e),index:t.index}})},t.prototype.selectMany=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.selectMany' to be a function.");return new t(function(){return{pairs:new SelectManyIterable(r.getContent().pairs,function(t,r){var o=[];try{for(var n=__values(e(t[1],r)),a=n.next(),i;!a.done;a=n.next())i=a.value,o.push([t[0],i])}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return o;var p,s})}})},t.prototype.transformSeries=function(e){if(!isObject(e))throw new Error("Expected 'columnSelectors' parameter of 'DataFrame.transformSeries' function to be an object. Field names should specify columns to transform. Field values should be selector functions that specify the transformation for each column.");var t=this;try{for(var r=__values(Object.keys(e)),o=r.next(),n;!o.done;o=r.next())n=o.value,t.hasSeries(n)&&(t=t.withSeries(n,t.getSeries(n).select(e[n])))}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return t;var a,i},t.prototype.generateSeries=function(e){if(!isObject(e)){if(!isFunction(e))throw new Error("Expected 'generator' parameter to 'DataFrame.generateSeries' function to be a function or an object.");var t=this.select(e)// Build a new dataframe.
1542
- .bake(),r=t.getColumnNames(),o=this;try{//TODO: There must be a cheaper implementation!
1543
- for(var n=__values(r),a=n.next(),i;!a.done;a=n.next())i=a.value,o=o.withSeries(i,t.getSeries(i))}catch(e){d={error:e}}finally{try{a&&!a.done&&(c=n.return)&&c.call(n)}finally{if(d)throw d.error}}return o}var p=e,r=Object.keys(p),o=this;try{for(var s=__values(r),l=s.next(),i;!l.done;l=s.next())i=l.value,o=o.withSeries(i,o.select(p[i]).deflate())}catch(e){u={error:e}}finally{try{l&&!l.done&&(y=s.return)&&y.call(s)}finally{if(u)throw u.error}}return o;var d,c,u,y},t.prototype.deflate=function(e){var t=this;if(e&&!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.deflate' function to be a selector function.");return new Series(function(){var r=t.getContent();return e?{index:r.index,values:new SelectIterable(r.values,e),pairs:new SelectIterable(r.pairs,function(t,r){return[t[0],e(t[1],r)]})}:{index:r.index,values:r.values,pairs:r.pairs}})},t.prototype.inflateSeries=function(e,t){if(!isString(e))throw new Error("Expected 'columnName' parameter to 'DataFrame.inflateSeries' to be a string that is the name of the column to inflate.");if(t&&!isFunction(t))throw new Error("Expected optional 'selector' parameter to 'DataFrame.inflateSeries' to be a selector function, if it is specified.");return this.zip(this.getSeries(e).inflate(t),function(e,t){return Object.assign({},e,t)}//todo: this be should zip's default operation.
1544
- )},t.prototype.window=function(e){var t=this;if(!isNumber(e))throw new Error("Expected 'period' parameter to 'DataFrame.window' to be a number.");return new Series(function(){var r=t.getContent();return{values:new DataFrameWindowIterable(r.columnNames,r.pairs,e)}})},t.prototype.rollingWindow=function(e){var t=this;if(!isNumber(e))throw new Error("Expected 'period' parameter to 'DataFrame.rollingWindow' to be a number.");return new Series(function(){var r=t.getContent();return{values:new DataFrameRollingWindowIterable(r.columnNames,r.pairs,e)}})},t.prototype.variableWindow=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'comparer' parameter to 'DataFrame.variableWindow' to be a function.");return new Series(function(){var r=t.getContent();return{values:new DataFrameVariableWindowIterable(r.columnNames,r.pairs,e)}})},t.prototype.sequentialDistinct=function(e){if(!e)e=function(e){return e};else if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.sequentialDistinct' to be a selector function that determines the value to compare for duplicates.");return this.variableWindow(function(t,r){return e(t)===e(r)}).select(function(e){return[e.getIndex().first(),e.first()]}).withIndex(function(e){return e[0]}).inflate(function(e){return e[1]});//TODO: Should this be select?
1545
- },t.prototype.aggregate=function(e,t){var r=this;if(isFunction(e)&&!t)return this.skip(1).aggregate(this.first(),e);if(t){if(!isFunction(t))throw new Error("Expected 'selector' parameter to aggregate to be a function.");var o=e;try{for(var n=__values(this),a=n.next(),i;!a.done;a=n.next())i=a.value,o=t(o,i)}catch(e){d={error:e}}finally{try{a&&!a.done&&(c=n.return)&&c.call(n)}finally{if(d)throw d.error}}return o}//
1546
- //TODO:
1547
- // This approach is fairly limited because I can't provide a seed.
1548
- // Consider removing this and replacing it with a 'summarize' function.
1549
- //
1550
- if(!isObject(e))throw new Error("Expected 'seed' parameter to aggregate to be an object.");var p=e,s=Object.keys(p),l=s.map(function(e){var t=p[e];if(!isFunction(t))throw new Error("Expected column/selector pairs in 'seed' parameter to aggregate.");return[e,r.getSeries(e).aggregate(t)]});return toMap(l,function(e){return e[0]},function(e){return e[1]});var d,c},t.prototype.skip=function(e){var r=this;if(!isNumber(e))throw new Error("Expected 'numValues' parameter to 'DataFrame.skip' to be a number.");return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:new SkipIterable(t.values,e),index:new SkipIterable(t.index,e),pairs:new SkipIterable(t.pairs,e)}})},t.prototype.skipWhile=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.skipWhile' function to be a predicate function that returns true/false.");return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:new SkipWhileIterable(t.values,e),pairs:new SkipWhileIterable(t.pairs,function(t){return e(t[1])})}})},t.prototype.skipUntil=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.skipUntil' function to be a predicate function that returns true/false.");return this.skipWhile(function(t){return!e(t)})},t.prototype.take=function(e){var r=this;if(!isNumber(e))throw new Error("Expected 'numRows' parameter to 'DataFrame.take' function to be a number.");return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,index:new TakeIterable(t.index,e),values:new TakeIterable(t.values,e),pairs:new TakeIterable(t.pairs,e)}})},t.prototype.takeWhile=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.takeWhile' function to be a predicate function that returns true/false.");return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:new TakeWhileIterable(t.values,e),pairs:new TakeWhileIterable(t.pairs,function(t){return e(t[1])})}})},t.prototype.takeUntil=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.takeUntil' function to be a predicate function that returns true/false.");return this.takeWhile(function(t){return!e(t)})},t.prototype.count=function(){var e=0;try{for(var t=__values(this.getContent().values),r=t.next(),o;!r.done;r=t.next())o=r.value,++e}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},t.prototype.first=function(){try{for(var e=__values(this),t=e.next(),r;!t.done;t=e.next())return r=t.value,r;// Only need the first value.
1551
- }catch(e){o={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(o)throw o.error}}throw new Error("DataFrame.first: No values in DataFrame.");var o,n},t.prototype.last=function(){var e=null;try{for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())o=r.value,e=o}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}if(null===e)throw new Error("DataFrame.last: No values in DataFrame.");return e;var n,a},t.prototype.at=function(e){return this.none()?void 0:this.getRowByIndex(e)},t.prototype.head=function(r){if(!isNumber(r))throw new Error("Expected 'numValues' parameter to 'DataFrame.head' function to be a number.");if(0===r)return new t;// Empty dataframe.
1552
- var o=0>r?this.count()-e(r):r;return this.take(o)},t.prototype.tail=function(r){if(!isNumber(r))throw new Error("Expected 'numValues' parameter to 'DataFrame.tail' function to be a number.");if(0===r)return new t;// Empty dataframe.
1553
- var o=0<r?this.count()-r:e(r);return this.skip(o)},t.prototype.where=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.where' function to be a function.");return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:new WhereIterable(t.values,e),pairs:new WhereIterable(t.pairs,function(t){return e(t[1])})}})},t.prototype.forEach=function(e){if(!isFunction(e))throw new Error("Expected 'callback' parameter to 'DataFrame.forEach' to be a function.");var t=0;try{for(var r=__values(this),o=r.next(),n;!o.done;o=r.next())n=o.value,e(n,t++)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return this;var a,i},t.prototype.all=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.all' to be a function.");var t=0;try{for(var r=__values(this),o=r.next(),n;!o.done;o=r.next()){if(n=o.value,!e(n))return!1;++t}}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return 0<t;var a,i},t.prototype.any=function(e){if(e&&!isFunction(e))throw new Error("Expected optional 'predicate' parameter to 'DataFrame.any' to be a function.");if(e)try{// Use the predicate to check each value.
1554
- for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())if(o=r.value,e(o))return!0}catch(e){a={error:e}}finally{try{r&&!r.done&&(i=t.return)&&i.call(t)}finally{if(a)throw a.error}}else{// Just check if there is at least one item.
1555
- var n=this[Symbol.iterator]();return!n.next().done}return!1;// Nothing passed.
1556
- var a,i},t.prototype.none=function(e){if(e&&!isFunction(e))throw new Error("Expected 'predicate' parameter to 'DataFrame.none' to be a function.");if(e)try{// Use the predicate to check each value.
1557
- for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())if(o=r.value,e(o))return!1}catch(e){a={error:e}}finally{try{r&&!r.done&&(i=t.return)&&i.call(t)}finally{if(a)throw a.error}}else{// Just check if empty.
1558
- var n=this[Symbol.iterator]();return n.next().done||!1}return!0;// Nothing failed the predicate.
1559
- var a,i},t.prototype.startAt=function(e){var r=this;return new t(function(){var t=r.getContent(),o=r.getIndex().getLessThan();return{columnNames:t.columnNames,index:new SkipWhileIterable(t.index,function(t){return o(t,e)}),pairs:new SkipWhileIterable(t.pairs,function(t){return o(t[0],e)})}})},t.prototype.endAt=function(e){var r=this;return new t(function(){var t=r.getContent(),o=r.getIndex().getLessThanOrEqualTo();return{columnNames:t.columnNames,index:new TakeWhileIterable(t.index,function(t){return o(t,e)}),pairs:new TakeWhileIterable(t.pairs,function(t){return o(t[0],e)})}})},t.prototype.before=function(e){var r=this;return new t(function(){var t=r.getContent(),o=r.getIndex().getLessThan();return{columnNames:t.columnNames,index:new TakeWhileIterable(t.index,function(t){return o(t,e)}),pairs:new TakeWhileIterable(t.pairs,function(t){return o(t[0],e)})}})},t.prototype.after=function(e){var r=this;return new t(function(){var t=r.getContent(),o=r.getIndex().getLessThanOrEqualTo();return{columnNames:t.columnNames,index:new SkipWhileIterable(t.index,function(t){return o(t,e)}),pairs:new SkipWhileIterable(t.pairs,function(t){return o(t[0],e)})}})},t.prototype.between=function(e,t){return this.startAt(e).endAt(t)},t.prototype.toString=function(){var e=this.getColumnNames(),t=["__index__"].concat(e),r=new table$1;try{//TODO: for (const pair of this.asPairs()) {
1560
- for(var o=__values(this.toPairs()),n=o.next();!n.done;n=o.next()){var a=n.value,i=a[0],p=a[1];r.cell(t[0],i);for(var s=0,l;s<e.length;++s)l=e[s],r.cell(t[s+1],p[l]);r.newRow()}}catch(e){d={error:e}}finally{try{n&&!n.done&&(c=o.return)&&c.call(o)}finally{if(d)throw d.error}}return r.toString();var d,c},t.prototype.parseInts=function(e){if(isArray(e)){var t=this;try{for(var r=__values(e),o=r.next(),n;!o.done;o=r.next())n=o.value,t=t.parseInts(n)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return t}return this.withSeries(e,this.getSeries(e).parseInts());var a,i},t.prototype.parseFloats=function(e){if(isArray(e)){var t=this;try{for(var r=__values(e),o=r.next(),n;!o.done;o=r.next())n=o.value,t=t.parseFloats(n)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return t}return this.withSeries(e,this.getSeries(e).parseFloats());var a,i},t.prototype.parseDates=function(e,t){if(t&&!isString(t))throw new Error("Expected optional 'formatString' parameter to 'DataFrame.parseDates' to be a string (if specified).");if(isArray(e)){var r=this;try{for(var o=__values(e),n=o.next(),a;!n.done;n=o.next())a=n.value,r=r.parseDates(a,t)}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return r}return this.withSeries(e,this.getSeries(e).parseDates(t));var i,p},t.prototype.toStrings=function(e,t){if(isObject(e)){try{for(var r=__values(Object.keys(e)),o=r.next(),n;!o.done;o=r.next())if(n=o.value,!isString(e[n]))throw new Error("Expected values of 'columnNames' parameter to be strings when a format spec is passed in.")}catch(e){u={error:e}}finally{try{o&&!o.done&&(y=r.return)&&y.call(r)}finally{if(u)throw u.error}}if(!isUndefined(t))throw new Error("Optional 'formatString' parameter to 'DataFrame.toStrings' should not be set when passing in a format spec.")}else{if(!isArray(e)&&!isString(e))throw new Error("Expected 'columnNames' parameter to 'DataFrame.toStrings' to be a string, array of strings or format spec that specifes which columns should be converted to strings.");if(t&&!isString(t))throw new Error("Expected optional 'formatString' parameter to 'DataFrame.toStrings' to be a string (if specified).")}if(isObject(e)){var a=this;try{for(var i=__values(Object.keys(e)),p=i.next(),n;!p.done;p=i.next())n=p.value,a=a.toStrings(n,t)}catch(e){m={error:e}}finally{try{p&&!p.done&&(g=i.return)&&g.call(i)}finally{if(m)throw m.error}}return a}if(isArray(e)){var a=this;try{for(var s=__values(e),l=s.next();!l.done;l=s.next()){var n=l.value,d=e[n];a=a.toStrings(n,d)}}catch(e){E={error:e}}finally{try{l&&!l.done&&(f=s.return)&&f.call(s)}finally{if(E)throw E.error}}return a}var c=e;return this.withSeries(c,this.getSeries(c).toStrings(t));var u,y,m,g,E,f},t.prototype.truncateStrings=function(e){if(!isNumber(e))throw new Error("Expected 'maxLength' parameter to 'truncateStrings' to be an integer.");return this.select(function(t){var r={};try{for(var o=__values(Object.keys(t)),n=o.next();!n.done;n=o.next()){var a=n.value,i=t[a];r[a]=isString(i)?i.substring(0,e):i}}catch(e){p={error:e}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(p)throw p.error}}return r;var p,s})},t.prototype.round=function(e){if(void 0===e)e=2;else if(!isNumber(e))throw new Error("Expected 'numDecimalPlaces' parameter to 'DataFrame.round' to be a number.");return this.select(function(t){var r={};try{for(var o=__values(Object.keys(t)),n=o.next();!n.done;n=o.next()){var a=n.value,i=t[a];r[a]=isNumber(i)?parseFloat(i.toFixed(e)):i}}catch(e){p={error:e}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(p)throw p.error}}return r;var p,s})},t.prototype.bake=function(){return this.getContent().isBaked?this:new t({columnNames:this.getColumnNames(),values:this.toArray(),pairs:this.toPairs(),baked:!0})},t.prototype.reverse=function(){var e=this;return new t(function(){var t=e.getContent();return{columnNames:t.columnNames,values:new ReverseIterable(t.values),index:new ReverseIterable(t.index),pairs:new ReverseIterable(t.pairs)}})},t.prototype.distinct=function(e){var r=this;return new t(function(){var t=r.getContent();return{columnNames:t.columnNames,values:new DistinctIterable(t.values,e),pairs:new DistinctIterable(t.pairs,function(t){return e&&e(t[1])||t[1]})}})},t.prototype.groupBy=function(e){var r=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.groupBy' to be a selector function that determines the value to group the series by.");return new Series(function(){var o=[],n={},a=0;// Each group, in order of discovery.
1561
- try{for(var i=__values(r.getContent().pairs),p=i.next();!p.done;p=i.next()){var s=p.value,l=e(s[1],a);++a;var d=n[l];if(d)d.push(s);else{var c=[];c.push(s),o.push(c),n[l]=c}}}catch(e){u={error:e}}finally{try{p&&!p.done&&(y=i.return)&&y.call(i)}finally{if(u)throw u.error}}return{values:o.map(function(e){return new t({pairs:e})})};var u,y})},t.prototype.groupSequentialBy=function(e){if(!e)e=function(e){return e};else if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'DataFrame.groupSequentialBy' to be a selector function that determines the value to group the series by.");return this.variableWindow(function(t,r){return e(t)===e(r)})},t.concat=function(e){if(!isArray(e))throw new Error("Expected 'dataframes' parameter to 'DataFrame.concat' to be an array of dataframes.");return new t(function(){var t=e.map(function(e){return e.getContent()}),r=[];// Upcast so that we can access private index, values and pairs.
1562
- try{for(var o=__values(t),n=o.next(),a;!n.done;n=o.next()){a=n.value;try{for(var i=__values(a.columnNames),p=i.next(),s;!p.done;p=i.next())s=p.value,r.push(s)}catch(e){c={error:e}}finally{try{p&&!p.done&&(u=i.return)&&u.call(i)}finally{if(c)throw c.error}}}}catch(e){l={error:e}}finally{try{n&&!n.done&&(d=o.return)&&d.call(o)}finally{if(l)throw l.error}}return r=makeDistinct(r),{columnNames:r,values:new ConcatIterable(t.map(function(e){return e.values})),pairs:new ConcatIterable(t.map(function(e){return e.pairs}))};var l,d,c,u})},t.prototype.concat=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=[this];try{for(var n=__values(e),a=n.next(),i;!a.done;a=n.next())if(i=a.value,isArray(i))try{for(var p=__values(i),s=p.next(),l;!s.done;s=p.next())l=s.value,o.push(l)}catch(e){u={error:e}}finally{try{s&&!s.done&&(y=p.return)&&y.call(p)}finally{if(u)throw u.error}}else o.push(i)}catch(e){d={error:e}}finally{try{a&&!a.done&&(c=n.return)&&c.call(n)}finally{if(d)throw d.error}}return t.concat(o);var d,c,u,y},t.zip=function(e,r){var o=Array.from(e);if(0===o.length)return new t;var n=o[0];return n.none()?new t:new t(function(){// Upcast so that we can access private index, values and pairs.
1563
- return{index:n.getContent().index,values:new ZipIterable(o.map(function(e){return e.getContent().values}),r)}})},t.prototype.zip=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=e[e.length-1],n=[this].concat(e.slice(0,e.length-1));return t.zip(n,function(e){return o.apply(void 0,__spread(e))})},t.prototype.orderBy=function(e){var t=this.getContent();return new OrderedDataFrame({columnNames:t.columnNames,values:t.values,pairs:t.pairs,selector:e,direction:Direction.Ascending,parent:null})},t.prototype.orderByDescending=function(e){var t=this.getContent();return new OrderedDataFrame({columnNames:t.columnNames,values:t.values,pairs:t.pairs,selector:e,direction:Direction.Descending,parent:null})},t.prototype.union=function(e,t){if(t&&!isFunction(t))throw new Error("Expected optional 'selector' parameter to 'DataFrame.union' to be a selector function.");return this.concat(e).distinct(t)},t.prototype.intersection=function(e,t,r){if(!t)t=function(e){return e};else if(!isFunction(t))throw new Error("Expected optional 'outerSelector' parameter to 'DataFrame.intersection' to be a function.");if(!r)r=function(e){return e};else if(!isFunction(r))throw new Error("Expected optional 'innerSelector' parameter to 'DataFrame.intersection' to be a function.");var o=this;return o.where(function(o){var n=t(o);return e.where(function(e){return n===r(e)}).any()})},t.prototype.except=function(e,t,r){if(!t)t=function(e){return e};else if(!isFunction(t))throw new Error("Expected optional 'outerSelector' parameter to 'DataFrame.except' to be a function.");if(!r)r=function(e){return e};else if(!isFunction(r))throw new Error("Expected optional 'innerSelector' parameter to 'DataFrame.except' to be a function.");var o=this;return o.where(function(o){var n=t(o);return e.where(function(e){return n===r(e)}).none()})},t.prototype.join=function(e,r,o,n){if(!isFunction(r))throw new Error("Expected 'outerKeySelector' parameter of 'DataFrame.join' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'innerKeySelector' parameter of 'DataFrame.join' to be a selector function.");if(!isFunction(n))throw new Error("Expected 'resultSelector' parameter of 'DataFrame.join' to be a selector function.");var a=this;return new t(function(){var t=e.groupBy(o).toObject(function(e){return o(e.first())},function(e){return e});a.getContent();var i=[];try{for(var p=__values(a),s=p.next();!s.done;s=p.next()){var l=s.value,d=r(l),c=t[d];if(c)try{for(var u=__values(c),y=u.next(),m;!y.done;y=u.next())m=y.value,i.push(n(l,m))}catch(e){f={error:e}}finally{try{y&&!y.done&&(x=u.return)&&x.call(u)}finally{if(f)throw f.error}}}}catch(e){g={error:e}}finally{try{s&&!s.done&&(E=p.return)&&E.call(p)}finally{if(g)throw g.error}}return{values:i};var g,E,f,x})},t.prototype.joinOuter=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'DataFrame.joinOuter' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'DataFrame.joinOuter' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'DataFrame.joinOuter' to be a selector function.");// Get the results in the outer that are not in the inner.
1564
- var n=this,a=n.except(e,t,r).select(function(e){return o(e,null)}).resetIndex(),i=e.except(n,r,t).select(function(e){return o(null,e)}).resetIndex(),p=n.join(e,t,r,o);return a.concat(p).concat(i).resetIndex()},t.prototype.joinOuterLeft=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'DataFrame.joinOuterLeft' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'DataFrame.joinOuterLeft' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'DataFrame.joinOuterLeft' to be a selector function.");// Get the results in the outer that are not in the inner.
1565
- var n=this,a=n.except(e,t,r).select(function(e){return o(e,null)}).resetIndex(),i=n.join(e,t,r,o);return a.concat(i).resetIndex()},t.prototype.joinOuterRight=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'DataFrame.joinOuterRight' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'DataFrame.joinOuterRight' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'DataFrame.joinOuterRight' to be a selector function.");// Get the results in the inner that are not in the outer.
1566
- var n=this,a=e.except(n,r,t).select(function(e){return o(null,e)}).resetIndex(),i=n.join(e,t,r,o);return i.concat(a).resetIndex()},t.prototype.summarize=function(e){if(e&&!isObject(e))throw new Error("Expected 'spec' parameter to 'DataFrame.summarize' to be an object that specifies how to summarize the dataframe.");if(!e){e={};try{for(var t=__values(this.getColumnNames()),r=t.next();!r.done;r=t.next()){var o=r.value,n={};n[o+"_sum"]=Series.sum,n[o+"_average"]=Series.average,n[o+"_count"]=Series.count,e[o]=n}}catch(e){T={error:e}}finally{try{r&&!r.done&&(R=t.return)&&R.call(t)}finally{if(T)throw T.error}}}try{for(var a=__values(Object.keys(e)),i=a.next();!i.done;i=a.next()){var p=i.value,s=e[p];isFunction(s)&&(e[p]={},e[p][p]=s)}}catch(e){h={error:e}}finally{try{i&&!i.done&&(C=a.return)&&C.call(a)}finally{if(h)throw h.error}}var l=Object.keys(e),d=toMap(l,function(e){return e},function(t){return Object.keys(e[t])}),c={};try{for(var u=__values(l),y=u.next();!y.done;y=u.next()){var p=y.value,m=d[p];try{for(var g=__values(m),E=g.next();!E.done;E=g.next()){var f=E.value,x=e[p][f];c[f]=x(this.getSeries(p))}}catch(e){N={error:e}}finally{try{E&&!E.done&&(O=g.return)&&O.call(g)}finally{if(N)throw N.error}}}}catch(e){A={error:e}}finally{try{y&&!y.done&&(_=u.return)&&_.call(u)}finally{if(A)throw A.error}}return c;var T,R,h,C,A,_,N,O},t.prototype.pivot=function(e,t,r){var o;if(isString(e))o=[e];else{if(!isArray(e))throw new Error("Expected 'columnOrColumns' parameter to 'DataFrame.pivot' to be a string or an array of strings that identifies the column(s) whose values make the new DataFrame's columns.");if(o=Array.from(e),0===o.length)throw new Error("Expected 'columnOrColumns' parameter to 'DataFrame.pivot' to contain at least one string.");try{for(var n=__values(o),a=n.next(),i;!a.done;a=n.next())if(i=a.value,!isString(i))throw new Error("Expected 'columnOrColumns' parameter to 'DataFrame.pivot' to be an array of strings, each string identifies a column in the DataFrame on which to pivot.")}catch(e){A={error:e}}finally{try{a&&!a.done&&(_=n.return)&&_.call(n)}finally{if(A)throw A.error}}}var p;if(!isObject(t)){if(!isString(t))throw new Error("Expected 'value' parameter to 'DataFrame.pivot' to be a string that identifies the column whose values to aggregate or a column spec that defines which column contains the value ot aggregate and the ways to aggregate that value.");if(!isFunction(r))throw new Error("Expected 'aggregator' parameter to 'DataFrame.pivot' to be a function to aggregate pivoted values.");var s=t,l={};l[s]=r,p={},p[s]=l}else{p=t;try{for(var d=__values(Object.keys(p)),c=d.next();!c.done;c=d.next()){var u=c.value,y=p[u];isFunction(y)&&(p[u]={},p[u][u]=y)}}catch(e){N={error:e}}finally{try{c&&!c.done&&(O=d.return)&&O.call(d)}finally{if(N)throw N.error}}}for(var m=o[0],g=this.groupBy(function(e){return e[m]}).select(function(e){var t={};return t[m]=e.first()[m],t.src=e,t}),E=function(e){var t=o[e];g=g.selectMany(function(e){var r=e.src;return r.groupBy(function(e){return e[t]}).select(function(r){var o=Object.assign({},e);return o[t]=r.first()[t],o.src=r,o})})},f=1;f<o.length;++f)E(f);for(var x=Object.keys(p),T=toMap(x,function(e){return e},function(e){return Object.keys(p[e])}),R=g.inflate(function(e){var t=function(t){var r=T[t];try{for(var o=__values(r),n=o.next();!n.done;n=o.next()){var a=n.value,i=p[t][a];e[a]=i(e.src.deflate(function(e){return e[t]}))}}catch(e){s={error:e}}finally{try{n&&!n.done&&(l=o.return)&&l.call(o)}finally{if(s)throw s.error}}var s,l};try{for(var r=__values(x),o=r.next(),n;!o.done;o=r.next())n=o.value,t(n)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return delete e.src,e;var a,i}),h=R.orderBy(function(e){return e[m]}),C=function(e){var t=o[e];h=h.thenBy(function(e){return e[t]})},f=1;f<o.length;++f)C(f);return h;var A,_,N,O},t.prototype.melt=function(e,r){var o,n;if(isString(e))o=[e];else{if(!isArray(e))throw new Error("Expected 'idColumnOrColumns' parameter to 'DataFrame.melt' to be a string or an array of strings that identifies the column(s) whose values make the new DataFrame's identity columns.");o=Array.from(e);try{for(var a=__values(o),i=a.next(),p;!i.done;i=a.next())if(p=i.value,!isString(p))throw new Error("Expected 'idColumnOrColumns' parameter to 'DataFrame.melt' to be a string or an array of strings that identifies the column(s) whose values make the new DataFrame's identity columns.")}catch(e){I={error:e}}finally{try{i&&!i.done&&(S=a.return)&&S.call(a)}finally{if(I)throw I.error}}}if(isString(r))n=[r];else{if(!isArray(r))throw new Error("Expected 'valueColumnOrColumns' parameter to 'DataFrame.melt' to be a string or an array of strings that identifies the column(s) whose molten values make the new DataFrame's 'variable' and 'value' columns.");n=Array.from(r);try{for(var s=__values(n),l=s.next(),p;!l.done;l=s.next())if(p=l.value,!isString(p))throw new Error("Expected 'valueColumnOrColumns' parameter to 'DataFrame.melt' to be a string or an array of strings that identifies the column(s) whose molten values make the new DataFrame's 'variable' and 'value' columns.")}catch(e){L={error:e}}finally{try{l&&!l.done&&(v=s.return)&&v.call(s)}finally{if(L)throw L.error}}}var d=n.length,c=this.count(),u=new t,y=this.subset(o.concat(n));try{for(var m=__values(o),g=m.next(),E;!g.done;g=m.next()){E=g.value,y=y.dropSeries(E);var f=this.getSeries(E),x=new TileIterable(f,d),T=new Series(x);u=u.withSeries(E,T)}}catch(e){b={error:e}}finally{try{g&&!g.done&&(k=m.return)&&k.call(m)}finally{if(b)throw b.error}}var R=[];try{for(var h=__values(y.getColumns()),C=h.next(),E;!C.done;C=h.next())E=C.value,R.push(this.getSeries(E.name))}catch(e){P={error:e}}finally{try{C&&!C.done&&(D=h.return)&&D.call(h)}finally{if(P)throw P.error}}var A=new RavelIterable(R),_=new Series(A);u=u.withSeries("value",_);var N=new RepeatIterable(n,c),O=new Series(N);return u=u.withSeries("variable",O),u;var I,S,L,v,b,k,P,D},t.prototype.insertPair=function(e){if(!isArray(e))throw new Error("Expected 'pair' parameter to 'DataFrame.insertPair' to be an array.");if(2!==e.length)throw new Error("Expected 'pair' parameter to 'DataFrame.insertPair' to be an array with two elements. The first element is the index, the second is the value.");return new t({pairs:[e]}).concat(this)},t.prototype.appendPair=function(e){if(!isArray(e))throw new Error("Expected 'pair' parameter to 'DataFrame.appendPair' to be an array.");if(2!==e.length)throw new Error("Expected 'pair' parameter to 'DataFrame.appendPair' to be an array with two elements. The first element is the index, the second is the value.");return this.concat(new t({pairs:[e]}))},t.prototype.fillGaps=function(e,t){if(!isFunction(e))throw new Error("Expected 'comparer' parameter to 'DataFrame.fillGaps' to be a comparer function that compares two values and returns a boolean.");if(!isFunction(t))throw new Error("Expected 'generator' parameter to 'DataFrame.fillGaps' to be a generator function that takes two values and returns an array of generated pairs to span the gap.");return this.rollingWindow(2).selectMany(function(r){var o=r.toPairs(),n=o[0],a=o[1];if(!e(n,a))return[n];var i=t(n,a);if(!isArray(i))throw new Error("Expected return from 'generator' parameter to 'DataFrame.fillGaps' to be an array of pairs, instead got a "+typeof i);return[n].concat(i)}).withIndex(function(e){return e[0]}).inflate(function(e){return e[1]}).concat(this.tail(1))},t.prototype.defaultIfEmpty=function(e){if(this.none()){if(e instanceof t)return e;if(isArray(e))return new t(e);throw new Error("Expected 'defaultSequence' parameter to 'DataFrame.defaultIfEmpty' to be an array or a series.")}else return this},t.prototype.detectTypes=function(){var e=this;return new t(function(){var t=e.getColumns().selectMany(function(e){return e.series.detectTypes().select(function(t){var r=Object.assign({},t);return r.Column=e.name,r})});return{columnNames:["Type","Frequency","Column"],values:t}})},t.prototype.detectValues=function(){var e=this;return new t(function(){var t=e.getColumns().selectMany(function(e){return e.series.detectValues().select(function(t){var r=Object.assign({},t);return r.Column=e.name,r})});return{columnNames:["Value","Frequency","Column"],values:t}})},t.prototype.toJSON=function(){return JSON.stringify(this.toArray(),null,4)},t.prototype.toJSON5=function(){return lib.stringify(this.toArray(),null,4)},t.prototype.toCSV=function(e){var t=void 0===e||void 0===e.header||e.header?[this.getColumnNames()]:[],r=t.concat(this.toRows());return papaparse.unparse(r,e)},t.prototype.toHTML=function(){var e=this.getColumnNames(),t=e.map(function(e){return" <th>"+e+"</th>"}).join("\n"),r=this.toPairs();return"<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n"+t+"\n </tr>\n </thead>\n <tbody>\n"+r.map(function(t){var r=t[0],o=t[1];return" <tr>\n <th>"+r+"</th>\n"+e.map(function(e){return" <td>"+o[e]+"</td>"}).join("\n")+"\n </tr>"}).join("\n")+"\n </tbody>\n</table>"},t.prototype.serialize=function(){var e=this.toArray(),t=this.getIndex(),r=t.head(e.length).toArray(),o=this.getColumns(),n=toMap(o,function(e){return e.name},function(e){return e.type}),a=t.getType();// Bake the dataframe to an array.
1567
- "date"===a&&(r=r.map(function(e){return dayjs(e).toISOString()}));var i=!1;try{// Serialize date values.
1568
- for(var p=__values(o),s=p.next(),l;!s.done;s=p.next())if(l=s.value,"date"===l.type){i||(e=e.map(function(e){return Object.assign({},e)}),i=!0);try{for(var d=__values(e),c=d.next(),u;!c.done;c=d.next())u=c.value,u[l.name]=dayjs(u[l.name]).toISOString()}catch(e){g={error:e}}finally{try{c&&!c.done&&(E=d.return)&&E.call(d)}finally{if(g)throw g.error}}}}catch(e){y={error:e}}finally{try{s&&!s.done&&(m=p.return)&&m.call(p)}finally{if(y)throw y.error}}return{columnOrder:this.getColumnNames(),columns:n,index:{type:a,values:r},values:e};var y,m,g,E},t.deserialize=function(e){var r=e.index&&e.index.values||[],o=e.values&&e.values||[],n=!1;// Deserialize dates.
1569
- if(e.columns)try{for(var a=__values(Object.keys(e.columns)),i=a.next(),p;!i.done;i=a.next())if(p=i.value,"date"===e.columns[p]){n||(o=o.map(function(e){return Object.assign({},e)}),n=!0);try{for(var s=__values(o),l=s.next(),d;!l.done;l=s.next())d=l.value,d[p]=dayjs(d[p]).toDate()}catch(e){y={error:e}}finally{try{l&&!l.done&&(m=s.return)&&m.call(s)}finally{if(y)throw y.error}}}// No need to process other types, they are natively supported by JSON.
1570
- }catch(e){c={error:e}}finally{try{i&&!i.done&&(u=a.return)&&u.call(a)}finally{if(c)throw c.error}}return e.index&&"date"===e.index.type&&(r=r.map(function(e){return dayjs(e).toDate()})),new t({columnNames:e.columnOrder||[],index:r,values:o});var c,u,y,m},t.prototype.getTypeCode=function(){return"dataframe"},t.defaultCountIterable=new CountIterable,t.defaultEmptyIterable=new EmptyIterable,t}(),OrderedDataFrame=/** @class */function(e){function t(r){for(var o=this,n=[],a=[],i=0,p=r.parent,s=[];null!==p;)s.push(p),p=p.config.parent;s.reverse();try{for(var l=__values(s),d=l.next();!d.done;d=l.next()){var c=d.value,u=c.config;n.push(t.makeSortSpec(i,u.selector,u.direction)),a.push(t.makeSortSpec(i,t.makePairsSelector(u.selector),u.direction)),++i}}catch(e){y={error:e}}finally{try{d&&!d.done&&(m=l.return)&&m.call(l)}finally{if(y)throw y.error}}return n.push(t.makeSortSpec(i,r.selector,r.direction)),a.push(t.makeSortSpec(i,t.makePairsSelector(r.selector),r.direction)),o=e.call(this,{columnNames:r.columnNames,values:new OrderedIterable(r.values,n),pairs:new OrderedIterable(r.pairs,a)})||this,o.config=r,o;var y,m}//
1571
- // Helper function to create a sort spec.
1572
- //
1573
- return __extends(t,e),t.makeSortSpec=function(e,t,r){return{sortLevel:e,selector:t,direction:r}},t.makePairsSelector=function(e){return function(t,r){return e(t[1],r)}},t.prototype.thenBy=function(e){return new t({columnNames:this.config.columnNames,values:this.config.values,pairs:this.config.pairs,selector:e,direction:Direction.Ascending,parent:this})},t.prototype.thenByDescending=function(e){return new t({columnNames:this.config.columnNames,values:this.config.values,pairs:this.config.pairs,selector:e,direction:Direction.Descending,parent:this})},t}(DataFrame);/**
1574
- * @hidden
1575
- * Represents a dataframe that has been sorted.
1576
- */dayjs.extend(customParseFormat);/**
1577
- * Specifies where from a data window the index is pulled from: the start of the window, the end or from the middle.
1578
- */var WhichIndex;(function(e){e.Start="start",e.End="end"})(WhichIndex||(WhichIndex={}));/**
1579
- * Class that represents a series containing a sequence of indexed values.
1580
- */var Series=/** @class */function(){var e=Math.sqrt,t=Math.abs,r=Math.floor,o=Math.max,n=Math.min;/**
1581
- * Create a series.
1582
- *
1583
- * @param config This can be an array, a configuration object or a function that lazily produces a configuration object.
1584
- *
1585
- * It can be an array that specifies the values that the series contains.
1586
- *
1587
- * It can be a {@link ISeriesConfig} that defines the values and configuration of the series.
1588
- *
1589
- * Or it can be a function that lazily produces a {@link ISeriesConfig}.
1590
- *
1591
- * @example
1592
- * <pre>
1593
- *
1594
- * const series = new Series();
1595
- * </pre>
1596
- *
1597
- * @example
1598
- * <pre>
1599
- *
1600
- * const series = new Series([10, 20, 30, 40]);
1601
- * </pre>
1602
- *
1603
- * @example
1604
- * <pre>
1605
- *
1606
- * const series = new Series({ index: [1, 2, 3, 4], values: [10, 20, 30, 40]});
1607
- * </pre>
1608
- *
1609
- * @example
1610
- * <pre>
1611
- *
1612
- * const lazyInit = () => ({ index: [1, 2, 3, 4], values: [10, 20, 30, 40] });
1613
- * const series = new Series(lazyInit);
1614
- * </pre>
1615
- */function a(e){this.configFn=null,this.content=null,this.indexedContent=null,e?isFunction(e)?this.configFn=e:isArray(e)||isFunction(e[Symbol.iterator])?this.content=a.initFromArray(e):this.content=a.initFromConfig(e):this.content=a.initEmpty()}//
1616
- // Initialise series content from an array of values.
1617
- //
1618
- return a.initFromArray=function(e){return{index:a.defaultCountIterable,values:e,pairs:new MultiIterable([a.defaultCountIterable,e]),isBaked:!0}},a.initEmpty=function(){return{index:a.defaultEmptyIterable,values:a.defaultEmptyIterable,pairs:a.defaultEmptyIterable,isBaked:!0}},a.checkIterable=function(e,t){if(isArray(e));else if(isFunction(e[Symbol.iterator]));else// Not ok
1619
- throw new Error("Expected '"+t+"' field of Series config object to be an array of values or an iterable of values.")},a.initFromConfig=function(e){var t=!1,r,o,n;return e.pairs&&(a.checkIterable(e.pairs,"pairs"),n=e.pairs),e.index?(a.checkIterable(e.index,"index"),r=e.index):n?r=new ExtractElementIterable(n,0):r=a.defaultCountIterable,e.values?(a.checkIterable(e.values,"values"),o=e.values):n?o=new ExtractElementIterable(n,1):o=a.defaultEmptyIterable,n||(n=new MultiIterable([r,o])),void 0!==e.baked&&(t=e.baked),{index:r,values:o,pairs:n,isBaked:t}},a.prototype.lazyInit=function(){null===this.content&&null!==this.configFn&&(this.content=a.initFromConfig(this.configFn()))},a.prototype.getContent=function(){return this.lazyInit(),this.content},a.prototype.getRowByIndex=function(e){if(!this.indexedContent){this.indexedContent=new Map;try{for(var t=__values(this.getContent().pairs),r=t.next(),o;!r.done;r=t.next())o=r.value,this.indexedContent.set(o[0],o[1])}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}}return this.indexedContent.get(e);var n,a},a.prototype[Symbol.iterator]=function(){return this.getContent().values[Symbol.iterator]()},a.prototype.cast=function(){return this},a.prototype.getIndex=function(){var e=this;return new Index(function(){return{values:e.getContent().index}})},a.prototype.withIndex=function(e){var t=this;return isFunction(e)?new a(function(){return{values:t.getContent().values,index:t.select(e)}}):(a.checkIterable(e,"newIndex"),new a(function(){return{values:t.getContent().values,index:e}}))},a.prototype.resetIndex=function(){var e=this;return new a(function(){return{values:e.getContent().values// Just strip the index.
1620
- }})},a.merge=function(e){var t=new Map,r=Array.from(e).length,o=0;try{for(var n=__values(e),i=n.next(),p;!i.done;i=n.next()){p=i.value;try{for(var s=__values(p.toPairs()),l=s.next();!l.done;l=s.next()){var d=l.value,c=d[0];t.has(c)||t.set(c,Array(r)),t.get(c)[o]=d[1]}}catch(e){g={error:e}}finally{try{l&&!l.done&&(E=s.return)&&E.call(s)}finally{if(g)throw g.error}}++o}}catch(e){y={error:e}}finally{try{i&&!i.done&&(m=n.return)&&m.call(n)}finally{if(y)throw y.error}}var u=Array.from(t.keys()).map(function(e){return[e,t.get(e)]});return u.sort(function(e,t){return e[0]===t[0]?0:e[0]>t[0]?1:-1}),new a({pairs:u});var y,m,g,E},a.prototype.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.merge([this].concat(e))},a.prototype.toArray=function(){var e=[];try{for(var t=__values(this.getContent().values),r=t.next(),o;!r.done;r=t.next())o=r.value,void 0!==o&&null!==o&&e.push(o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},a.prototype.toPairs=function(){var e=[];try{for(var t=__values(this.getContent().pairs),r=t.next(),o;!r.done;r=t.next())o=r.value,void 0!==o[1]&&null!==o[1]&&e.push(o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},a.prototype.toObject=function(e,t){if(!isFunction(e))throw new Error("Expected 'keySelector' parameter to Series.toObject to be a function.");if(!isFunction(t))throw new Error("Expected 'valueSelector' parameter to Series.toObject to be a function.");return toMap(this,e,t)},a.prototype.select=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'Series.select' function to be a function.");return new a(function(){return{values:new SelectIterable(t.getContent().values,e),index:t.getContent().index}})},a.prototype.selectMany=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'Series.selectMany' to be a function.");return new a(function(){return{pairs:new SelectManyIterable(t.getContent().pairs,function(t,r){var o=[];try{for(var n=__values(e(t[1],r)),a=n.next(),i;!a.done;a=n.next())i=a.value,o.push([t[0],i])}catch(e){p={error:e}}finally{try{a&&!a.done&&(s=n.return)&&s.call(n)}finally{if(p)throw p.error}}return o;var p,s})}})},a.prototype.window=function(e,t){var r=this;if(!isNumber(e))throw new Error("Expected 'period' parameter to 'Series.window' to be a number.");return new a(function(){return{pairs:new SeriesWindowIterable(r.getContent().pairs,e,t||WhichIndex.End)}})},a.prototype.rollingWindow=function(e,t){var r=this;if(!isNumber(e))throw new Error("Expected 'period' parameter to 'Series.rollingWindow' to be a number.");return new a(function(){return{pairs:new SeriesRollingWindowIterable(r.getContent().pairs,e,t||WhichIndex.End)}})},a.prototype.variableWindow=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'comparer' parameter to 'Series.variableWindow' to be a function.");return new a(function(){return{values:new SeriesVariableWindowIterable(t.getContent().pairs,e)}})},a.prototype.sequentialDistinct=function(e){if(!e)e=function(e){return e};else if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'Series.sequentialDistinct' to be a selector function that determines the value to compare for duplicates.");return this.variableWindow(function(t,r){return e(t)===e(r)}).select(function(e){return[e.getIndex().first(),e.first()]}).withIndex(function(e){return e[0]}).select(function(e){return e[1]})},a.prototype.aggregate=function(e,t){if(isFunction(e)&&!t)return this.skip(1).aggregate(this.first(),e);if(!isFunction(t))throw new Error("Expected 'selector' parameter to aggregate to be a function.");var r=e;try{for(var o=__values(this),n=o.next(),a;!n.done;n=o.next())a=n.value,r=t(r,a)}catch(e){i={error:e}}finally{try{n&&!n.done&&(p=o.return)&&p.call(o)}finally{if(i)throw i.error}}return r;var i,p},a.prototype.amountRange=function(e,t){return this// Have to assume this is a number series.
1621
- .rollingWindow(e,t).select(function(e){return e.max()-e.min()})},a.prototype.proportionRange=function(e,t){return this// Have to assume this is a number series.
1622
- .rollingWindow(e,t).select(function(e){return(e.max()-e.min())/e.last()})},a.prototype.percentRange=function(e,t){return this.proportionRange(e,t).select(function(e){return 100*e})},a.prototype.amountChange=function(e,t){return this// Have to assume this is a number series.
1623
- .rollingWindow(void 0===e?2:e,t).select(function(e){return e.last()-e.first()})},a.prototype.proportionChange=function(e,t){return this// Have to assume this is a number series.
1624
- .rollingWindow(void 0===e?2:e,t).select(function(e){return(e.last()-e.first())/e.first()})},a.prototype.percentChange=function(e,t){return this.proportionChange(e,t).select(function(e){return 100*e})},a.prototype.proportionRank=function(e){if(void 0===e&&(e=2),!isNumber(e))throw new Error("Expected 'period' parameter to 'Series.proportionRank' to be a number that specifies the time period for the ranking.");return this.rollingWindow(e+1)// +1 to account for the last value being used.
1625
- .select(function(t){var r=t.last(),o=t.head(-1).where(function(e){return e<r}).count(),n=o/e;return n})},a.prototype.percentRank=function(e){if(void 0===e&&(e=2),!isNumber(e))throw new Error("Expected 'period' parameter to 'Series.percentRank' to be a number that specifies the time period for the ranking.");return this.proportionRank(e).select(function(e){return 100*e})},a.prototype.cumsum=function(){var e=this;return new a(function(){var t=0,r=e.toPairs(),o=r.map(function(e){var r=__read(e,2),o=r[0],n=r[1];return[o,t+=n]});return{pairs:o}})},a.prototype.skip=function(e){var t=this;return new a(function(){return{values:new SkipIterable(t.getContent().values,e),index:new SkipIterable(t.getContent().index,e),pairs:new SkipIterable(t.getContent().pairs,e)}})},a.prototype.skipWhile=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.skipWhile' function to be a predicate function that returns true/false.");return new a(function(){return{values:new SkipWhileIterable(t.getContent().values,e),pairs:new SkipWhileIterable(t.getContent().pairs,function(t){return e(t[1])})}})},a.prototype.skipUntil=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.skipUntil' function to be a predicate function that returns true/false.");return this.skipWhile(function(t){return!e(t)})},a.prototype.take=function(e){var t=this;if(!isNumber(e))throw new Error("Expected 'numRows' parameter to 'Series.take' function to be a number.");return new a(function(){return{index:new TakeIterable(t.getContent().index,e),values:new TakeIterable(t.getContent().values,e),pairs:new TakeIterable(t.getContent().pairs,e)}})},a.prototype.takeWhile=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.takeWhile' function to be a predicate function that returns true/false.");return new a(function(){return{values:new TakeWhileIterable(t.getContent().values,e),pairs:new TakeWhileIterable(t.getContent().pairs,function(t){return e(t[1])})}})},a.prototype.takeUntil=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.takeUntil' function to be a predicate function that returns true/false.");return this.takeWhile(function(t){return!e(t)})},a.count=function(e){return e.count()},a.prototype.count=function(){var e=0;try{for(var t=__values(this.getContent().values),r=t.next(),o;!r.done;r=t.next())o=r.value,++e}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},a.prototype.first=function(){try{for(var e=__values(this),t=e.next(),r;!t.done;t=e.next())return r=t.value,r;// Only need the first value.
1626
- }catch(e){o={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(o)throw o.error}}throw new Error("Series.first: No values in Series.");var o,n},a.prototype.last=function(){var e=null;try{for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())o=r.value,e=o}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}if(null===e)throw new Error("Series.last: No values in Series.");return e;var n,a},a.prototype.at=function(e){return this.none()?void 0:this.getRowByIndex(e)},a.prototype.head=function(e){if(!isNumber(e))throw new Error("Expected 'numValues' parameter to 'Series.head' function to be a number.");if(0===e)return new a;// Empty series.
1627
- var r=0>e?this.count()-t(e):e;return this.take(r)},a.prototype.tail=function(e){if(!isNumber(e))throw new Error("Expected 'numValues' parameter to 'Series.tail' function to be a number.");if(0===e)return new a;// Empty series.
1628
- var r=0<e?this.count()-e:t(e);return this.skip(r)},a.prototype.where=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.where' function to be a function.");return new a(function(){return{values:new WhereIterable(t.getContent().values,e),pairs:new WhereIterable(t.getContent().pairs,function(t){return e(t[1])})}})},a.prototype.forEach=function(e){if(!isFunction(e))throw new Error("Expected 'callback' parameter to 'Series.forEach' to be a function.");var t=0;try{for(var r=__values(this),o=r.next(),n;!o.done;o=r.next())n=o.value,e(n,t++)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return this;var a,i},a.prototype.all=function(e){if(!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.all' to be a function.");var t=0;try{for(var r=__values(this),o=r.next(),n;!o.done;o=r.next()){if(n=o.value,!e(n))return!1;++t}}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return 0<t;var a,i},a.prototype.any=function(e){if(e&&!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.any' to be a function.");if(e)try{// Use the predicate to check each value.
1629
- for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())if(o=r.value,e(o))return!0}catch(e){a={error:e}}finally{try{r&&!r.done&&(i=t.return)&&i.call(t)}finally{if(a)throw a.error}}else{// Just check if there is at least one item.
1630
- var n=this[Symbol.iterator]();return!n.next().done}return!1;// Nothing passed.
1631
- var a,i},a.prototype.none=function(e){if(e&&!isFunction(e))throw new Error("Expected 'predicate' parameter to 'Series.none' to be a function.");if(e)try{// Use the predicate to check each value.
1632
- for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())if(o=r.value,e(o))return!1}catch(e){a={error:e}}finally{try{r&&!r.done&&(i=t.return)&&i.call(t)}finally{if(a)throw a.error}}else{// Just check if empty.
1633
- var n=this[Symbol.iterator]();return n.next().done}return!0;// Nothing failed the predicate.
1634
- var a,i},a.prototype.startAt=function(e){var t=this;return new a(function(){var r=t.getIndex().getLessThan();return{index:new SkipWhileIterable(t.getContent().index,function(t){return r(t,e)}),pairs:new SkipWhileIterable(t.getContent().pairs,function(t){return r(t[0],e)})}})},a.prototype.endAt=function(e){var t=this;return new a(function(){var r=t.getIndex().getLessThanOrEqualTo();return{index:new TakeWhileIterable(t.getContent().index,function(t){return r(t,e)}),pairs:new TakeWhileIterable(t.getContent().pairs,function(t){return r(t[0],e)})}})},a.prototype.before=function(e){var t=this;return new a(function(){var r=t.getIndex().getLessThan();return{index:new TakeWhileIterable(t.getContent().index,function(t){return r(t,e)}),pairs:new TakeWhileIterable(t.getContent().pairs,function(t){return r(t[0],e)})}})},a.prototype.after=function(e){var t=this;return new a(function(){var r=t.getIndex().getLessThanOrEqualTo();return{index:new SkipWhileIterable(t.getContent().index,function(t){return r(t,e)}),pairs:new SkipWhileIterable(t.getContent().pairs,function(t){return r(t[0],e)})}})},a.prototype.between=function(e,t){return this.startAt(e).endAt(t)},a.prototype.toString=function(){for(var e=["__index__","__value__"],t=this.toPairs(),r=new table$1,o=0,n;o<t.length;++o){n=t[o];for(var a=0,i;a<n.length;++a)i=n[a],r.cell(e[a],i);r.newRow()}return r.toString()},a.parseInt=function(e,t){if(void 0!==e&&null!==e){if(!isString(e))throw new Error("Called Series.parseInts, expected all values in the series to be strings, instead found a '"+typeof e+"' at index "+t);return 0===e.length?void 0:parseInt(e)}},a.prototype.parseInts=function(){return this.select(a.parseInt)},a.parseFloat=function(e,t){if(void 0!==e&&null!==e){if(!isString(e))throw new Error("Called Series.parseFloats, expected all values in the series to be strings, instead found a '"+typeof e+"' at index "+t);return 0===e.length?void 0:parseFloat(e)}},a.prototype.parseFloats=function(){return this.select(a.parseFloat)},a.parseDate=function(e,t,r){if(void 0!==e&&null!==e){if(!isString(e))throw new Error("Called Series.parseDates, expected all values in the series to be strings, instead found a '"+typeof e+"' at index "+t);return 0===e.length?void 0:dayjs(e,r).toDate()}},a.prototype.parseDates=function(e){if(e&&!isString(e))throw new Error("Expected optional 'formatString' parameter to Series.parseDates to be a string (if specified).");return this.select(function(t,r){return a.parseDate(t,r,e)})},a.toString=function(e,t){return void 0===e?void 0:null===e?null:t&&isDate(e)?dayjs(e).format(t):t&&isNumber(e)?numeral(e).format(t):e.toString()},a.prototype.toStrings=function(e){if(e&&!isString(e))throw new Error("Expected optional 'formatString' parameter to Series.toStrings to be a string (if specified).");return this.select(function(t){return a.toString(t,e)})},a.prototype.bake=function(){return this.getContent().isBaked?this:new a({values:this.toArray(),pairs:this.toPairs(),baked:!0})},a.prototype.inflate=function(e){var t=this;if(e){if(!isFunction(e))throw new Error("Expected 'selector' parameter to Series.inflate to be a selector function.");return new DataFrame(function(){var r=t.getContent();return{values:new SelectIterable(r.values,e),index:r.index,pairs:new SelectIterable(r.pairs,function(t,r){return[t[0],e(t[1],r)]})}})}return new DataFrame(function(){var e=t.getContent();return{values:e.values,index:e.index,pairs:e.pairs}})},a.sum=function(e){return e.sum()},a.prototype.sum=function(){var e=0;try{for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())(o=r.value,null!==o&&void 0!==o)&&(e+=o)}catch(e){n={error:e}}finally{try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(n)throw n.error}}return e;var n,a},a.average=function(e){return e.average()},a.prototype.average=function(){var e=0,t=0;try{for(var r=__values(this),o=r.next(),n;!o.done;o=r.next())(n=o.value,null!==n&&void 0!==n)&&(t+=1,e+=n)}catch(e){a={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(a)throw a.error}}return 0===t?0:e/t;var a,i},a.median=function(e){return e.median()},a.prototype.median=function(){//
1635
- // From here: http://stackoverflow.com/questions/5275115/add-a-median-method-to-a-list
1636
- //
1637
- // Have to assume we are working with a number series here.
1638
- var e=this.where(function(e){return null!==e&&void 0!==e}),t=e.count();if(0===t)return 0;var o=e.orderBy(function(e){return e}).toArray();if(0==t%2){// Even.
1639
- var n=o[t/2-1],a=o[t/2];return(n+a)/2}// Odd
1640
- return o[r(t/2)]},a.std=function(e){return e.std()},a.prototype.std=function(){// https://en.wikipedia.org/wiki/Standard_deviation
1641
- var t=this.average(),r=0,o=0;try{for(var n=__values(this),a=n.next(),i;!a.done;a=n.next())if(i=a.value,null!==i&&void 0!==i)// Skip empty values.
1642
- {r+=1;var p=i,s=p-t;o+=s*s}}catch(e){l={error:e}}finally{try{a&&!a.done&&(d=n.return)&&d.call(n)}finally{if(l)throw l.error}}return 0===r?0:e(o/r);var l,d},a.min=function(e){return e.min()},a.prototype.min=function(){var e;try{for(var t=__values(this),r=t.next(),o;!r.done;r=t.next())if(o=r.value,null!==o&&void 0!==o){var a=o;// Have to assume we are working with a number series here.;
1643
- e=void 0===e?a:n(e,a)}// Skip empty values.
1644
- }catch(e){i={error:e}}finally{try{r&&!r.done&&(p=t.return)&&p.call(t)}finally{if(i)throw i.error}}return void 0===e?0:e;var i,p},a.max=function(e){return e.max()},a.prototype.max=function(){var e;try{for(var t=__values(this),r=t.next(),n;!r.done;r=t.next())if(n=r.value,null!==n&&void 0!==n){var a=n;// Have to assume we are working with a number series here.;
1645
- e=void 0===e?a:o(e,a)}// Skip empty values.
1646
- }catch(e){i={error:e}}finally{try{r&&!r.done&&(p=t.return)&&p.call(t)}finally{if(i)throw i.error}}return void 0===e?0:e;var i,p},a.prototype.invert=function(){return this.select(function(e){return null===e||void 0===e?e:-e})},a.prototype.counter=function(e){return this.groupSequentialBy(e).selectMany(function(t){return e(t.first())?range(1,t.count()).withIndex(t.getIndex()).toPairs():replicate(0,t.count()).withIndex(t.getIndex()).toPairs()}).withIndex(function(e){return e[0]}).select(function(e){return e[1]})},a.prototype.reverse=function(){var e=this;return new a(function(){return{values:new ReverseIterable(e.getContent().values),index:new ReverseIterable(e.getContent().index),pairs:new ReverseIterable(e.getContent().pairs)}})},a.prototype.distinct=function(e){var t=this;return new a(function(){return{values:new DistinctIterable(t.getContent().values,e),pairs:new DistinctIterable(t.getContent().pairs,function(t){return e&&e(t[1])||t[1]})}})},a.prototype.groupBy=function(e){var t=this;if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'Series.groupBy' to be a selector function that determines the value to group the series by.");return new a(function(){var r=[],o={},n=0;// Each group, in order of discovery.
1647
- try{for(var i=__values(t.getContent().pairs),p=i.next();!p.done;p=i.next()){var s=p.value,l=e(s[1],n);++n;var d=o[l];if(d)d.push(s);else{var c=[];c.push(s),r.push(c),o[l]=c}}}catch(e){u={error:e}}finally{try{p&&!p.done&&(y=i.return)&&y.call(i)}finally{if(u)throw u.error}}return{values:r.map(function(e){return new a({pairs:e})})};var u,y})},a.prototype.groupSequentialBy=function(e){if(!e)e=function(e){return e};else if(!isFunction(e))throw new Error("Expected 'selector' parameter to 'Series.groupSequentialBy' to be a selector function that determines the value to group the series by.");return this.variableWindow(function(t,r){return e(t)===e(r)})},a.concat=function(e){if(!isArray(e))throw new Error("Expected 'series' parameter to 'Series.concat' to be an array of series.");return new a(function(){var t=e.map(function(e){return e.getContent()});// Upcast so that we can access private index, values and pairs.
1648
- return{values:new ConcatIterable(t.map(function(e){return e.values})),pairs:new ConcatIterable(t.map(function(e){return e.pairs}))}})},a.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=[this];try{for(var o=__values(e),n=o.next(),i;!n.done;n=o.next())if(i=n.value,isArray(i))try{for(var p=__values(i),s=p.next(),l;!s.done;s=p.next())l=s.value,r.push(l)}catch(e){u={error:e}}finally{try{s&&!s.done&&(y=p.return)&&y.call(p)}finally{if(u)throw u.error}}else r.push(i)}catch(e){d={error:e}}finally{try{n&&!n.done&&(c=o.return)&&c.call(o)}finally{if(d)throw d.error}}return a.concat(r);var d,c,u,y},a.zip=function(e,t){var r=Array.from(e);if(0===r.length)return new a;var o=r[0];return o.none()?new a:new a(function(){// Upcast so that we can access private index, values and pairs.
1649
- return{index:o.getContent().index,values:new ZipIterable(r.map(function(e){return e.getContent().values}),t)}})},a.prototype.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1],o=[this].concat(e.slice(0,e.length-1));return a.zip(o,function(e){return r.apply(void 0,__spread(e))})},a.prototype.orderBy=function(e){var t=this.getContent();return new OrderedSeries({values:t.values,pairs:t.pairs,selector:e,direction:Direction.Ascending,parent:null})},a.prototype.orderByDescending=function(e){var t=this.getContent();return new OrderedSeries({values:t.values,pairs:t.pairs,selector:e,direction:Direction.Descending,parent:null})},a.prototype.union=function(e,t){if(t&&!isFunction(t))throw new Error("Expected optional 'selector' parameter to 'Series.union' to be a selector function.");return this.concat(e).distinct(t)},a.prototype.intersection=function(e,t,r){if(!t)t=function(e){return e};else if(!isFunction(t))throw new Error("Expected optional 'outerSelector' parameter to 'Series.intersection' to be a function.");if(!r)r=function(e){return e};else if(!isFunction(r))throw new Error("Expected optional 'innerSelector' parameter to 'Series.intersection' to be a function.");var o=this;return o.where(function(o){var n=t(o);return e.where(function(e){return n===r(e)}).any()})},a.prototype.except=function(e,t,r){if(!t)t=function(e){return e};else if(!isFunction(t))throw new Error("Expected optional 'outerSelector' parameter to 'Series.except' to be a function.");if(!r)r=function(e){return e};else if(!isFunction(r))throw new Error("Expected optional 'innerSelector' parameter to 'Series.except' to be a function.");var o=this;return o.where(function(o){var n=t(o);return e.where(function(e){return n===r(e)}).none()})},a.prototype.join=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'Series.join' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'Series.join' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'Series.join' to be a selector function.");var n=this;return new a(function(){var a=e.groupBy(r).toObject(function(e){return r(e.first())},function(e){return e});n.getContent();var i=[];try{for(var p=__values(n),s=p.next();!s.done;s=p.next()){var l=s.value,d=t(l),c=a[d];if(c)try{for(var u=__values(c),y=u.next(),m;!y.done;y=u.next())m=y.value,i.push(o(l,m))}catch(e){f={error:e}}finally{try{y&&!y.done&&(x=u.return)&&x.call(u)}finally{if(f)throw f.error}}}}catch(e){g={error:e}}finally{try{s&&!s.done&&(E=p.return)&&E.call(p)}finally{if(g)throw g.error}}return{values:i};var g,E,f,x})},a.prototype.joinOuter=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'Series.joinOuter' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'Series.joinOuter' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'Series.joinOuter' to be a selector function.");// Get the results in the outer that are not in the inner.
1650
- var n=this,a=n.except(e,t,r).select(function(e){return o(e,null)}).resetIndex(),i=e.except(n,r,t).select(function(e){return o(null,e)}).resetIndex(),p=n.join(e,t,r,o);return a.concat(p).concat(i).resetIndex()},a.prototype.joinOuterLeft=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'Series.joinOuterLeft' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'Series.joinOuterLeft' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'Series.joinOuterLeft' to be a selector function.");// Get the results in the outer that are not in the inner.
1651
- var n=this,a=n.except(e,t,r).select(function(e){return o(e,null)}).resetIndex(),i=n.join(e,t,r,o);return a.concat(i).resetIndex()},a.prototype.joinOuterRight=function(e,t,r,o){if(!isFunction(t))throw new Error("Expected 'outerKeySelector' parameter of 'Series.joinOuterRight' to be a selector function.");if(!isFunction(r))throw new Error("Expected 'innerKeySelector' parameter of 'Series.joinOuterRight' to be a selector function.");if(!isFunction(o))throw new Error("Expected 'resultSelector' parameter of 'Series.joinOuterRight' to be a selector function.");// Get the results in the inner that are not in the outer.
1652
- var n=this,a=e.except(n,r,t).select(function(e){return o(null,e)}).resetIndex(),i=n.join(e,t,r,o);return i.concat(a).resetIndex()},a.prototype.truncateStrings=function(e){if(!isNumber(e))throw new Error("Expected 'maxLength' parameter to 'Series.truncateStrings' to be a number.");return this.select(function(t){return isString(t)&&t.length>e?t.substring(0,e):t})},a.prototype.round=function(e){if(void 0===e)e=2;else if(!isNumber(e))throw new Error("Expected 'numDecimalPlaces' parameter to 'Series.round' to be a number.");return this.select(function(t){return isNumber(t)?parseFloat(t.toFixed(e)):t})},a.prototype.insertPair=function(e){if(!isArray(e))throw new Error("Expected 'pair' parameter to 'Series.insertPair' to be an array.");if(2!==e.length)throw new Error("Expected 'pair' parameter to 'Series.insertPair' to be an array with two elements. The first element is the index, the second is the value.");return new a({pairs:[e]}).concat(this)},a.prototype.appendPair=function(e){if(!isArray(e))throw new Error("Expected 'pair' parameter to 'Series.appendPair' to be an array.");if(2!==e.length)throw new Error("Expected 'pair' parameter to 'Series.appendPair' to be an array with two elements. The first element is the index, the second is the value.");return this.concat(new a({pairs:[e]}))},a.prototype.fillGaps=function(e,t){if(!isFunction(e))throw new Error("Expected 'comparer' parameter to 'Series.fillGaps' to be a comparer function that compares two values and returns a boolean.");if(!isFunction(t))throw new Error("Expected 'generator' parameter to 'Series.fillGaps' to be a generator function that takes two values and returns an array of generated pairs to span the gap.");return this.rollingWindow(2).selectMany(function(r){var o=r.toPairs(),n=o[0],a=o[1];if(!e(n,a))return[n];var i=t(n,a);if(!isArray(i))throw new Error("Expected return from 'generator' parameter to 'Series.fillGaps' to be an array of pairs, instead got a "+typeof i);return[n].concat(i)}).withIndex(function(e){return e[0]}).select(function(e){return e[1]}).concat(this.tail(1))},a.prototype.defaultIfEmpty=function(e){if(this.none()){if(e instanceof a)return e;if(isArray(e))return new a(e);throw new Error("Expected 'defaultSequence' parameter to 'Series.defaultIfEmpty' to be an array or a series.")}else return this},a.prototype.detectTypes=function(){var e=this;return new DataFrame(function(){var t=e.count(),r=e.select(function(e){var t=typeof e;return"object"==t&&isDate(e)&&(t="date"),t}).aggregate({},function(e,t){var r=e[t];return r||(r={count:0},e[t]=r),++r.count,e});return{columnNames:["Type","Frequency"],rows:Object.keys(r).map(function(e){return[e,100*(r[e].count/t)]})}})},a.prototype.detectValues=function(){var e=this;return new DataFrame(function(){var t=e.count(),r=e.aggregate(new Map,function(e,t){var r=e.get(t);return r||(r={count:0,value:t},e.set(t,r)),++r.count,e});return{columnNames:["Value","Frequency"],rows:Array.from(r.keys()).map(function(e){var o=r.get(e);return[o.value,100*(o.count/t)]})}})},a.prototype.bucket=function(e){if(!isNumber(e))throw new Error("Expected 'numBuckets' parameter to 'Series.bucket' to be a number.");if(this.none())return new DataFrame;var t=this,o=t.min(),n=t.max(),a=(n-o)/(e-1);return t.select(function(e){var t=r((e-o)/a),n=t*a+o;return{Value:e,Bucket:t,Min:n,Mid:n+.5*a,Max:n+a}}).inflate()},a.prototype.getTypeCode=function(){return"series"},a.defaultCountIterable=new CountIterable,a.defaultEmptyIterable=new EmptyIterable,a}(),OrderedSeries=/** @class */function(e){function t(r){for(var o=this,n=[],a=[],i=0,p=r.parent,s=[];null!==p;)s.push(p),p=p.config.parent;s.reverse();try{for(var l=__values(s),d=l.next();!d.done;d=l.next()){var c=d.value,u=c.config;n.push(t.makeSortSpec(i,u.selector,u.direction)),a.push(t.makeSortSpec(i,t.makePairsSelector(u.selector),u.direction)),++i}}catch(e){y={error:e}}finally{try{d&&!d.done&&(m=l.return)&&m.call(l)}finally{if(y)throw y.error}}return n.push(t.makeSortSpec(i,r.selector,r.direction)),a.push(t.makeSortSpec(i,t.makePairsSelector(r.selector),r.direction)),o=e.call(this,{values:new OrderedIterable(r.values,n),pairs:new OrderedIterable(r.pairs,a)})||this,o.config=r,o;var y,m}//
1653
- // Helper function to create a sort spec.
1654
- //
1655
- return __extends(t,e),t.makeSortSpec=function(e,t,r){return{sortLevel:e,selector:t,direction:r}},t.makePairsSelector=function(e){return function(t,r){return e(t[1],r)}},t.prototype.thenBy=function(e){return new t({values:this.config.values,pairs:this.config.pairs,selector:e,direction:Direction.Ascending,parent:this})},t.prototype.thenByDescending=function(e){return new t({values:this.config.values,pairs:this.config.pairs,selector:e,direction:Direction.Descending,parent:this})},t}(Series),Index=/** @class */function(e){function t(t){return e.call(this,t)||this}/**
1656
- * Get the type of the index.
1657
- *
1658
- * @returns Returns a string that specifies the type of the index.
1659
- */return __extends(t,e),t.prototype.getType=function(){return this._type||(this.any()?this._type=determineType(this.first()):this._type="empty"),this._type},t.prototype.getLessThan=function(){switch(this.getType()){case"date":return function(e,t){return dayjs(e).isBefore(t)};case"string":case"number":return function(e,t){return e<t};case"empty":return function(){return!0};// Series is empty, so this makes no difference.
1660
- default:throw new Error("No less than operation available for type: "+this.getType());}},t.prototype.getLessThanOrEqualTo=function(){var e=this;return function(t,r){return!e.getGreaterThan()(t,r)};//TODO: Should expand this out.
1661
- },t.prototype.getGreaterThan=function(){switch(this.getType()){case"date":return function(e,t){return dayjs(e).isAfter(t)};case"string":case"number":return function(e,t){return e>t};case"empty":return function(){return!0};// Series is empty, so this makes no difference.
1662
- default:throw new Error("No greater than operation available for type: "+this.getType());}},t}(Series);/**
1663
- * @hidden
1664
- * A series that has been ordered.
1665
- */function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}var isBuffer=function(e){return e instanceof Buffer},inherits_browser=createCommonjsModule(function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),inherits=createCommonjsModule(function(t){try{var r=util;if("function"!=typeof r.inherits)throw"";t.exports=r.inherits}catch(r){t.exports=inherits_browser}}),util=createCommonjsModule(function(e,t){/**
1666
- * Echos the value of a value. Trys to print the value out
1667
- * in the best way possible given the different types.
1668
- *
1669
- * @param {Object} obj The object to print out.
1670
- * @param {Object} opts Optional options object that alters the output.
1671
- */ /* legacy: obj, showHidden, depth, colors*/function r(e,r){// default options
1672
- var a={seen:[],stylize:n};// legacy...
1673
- return 3<=arguments.length&&(a.depth=arguments[2]),4<=arguments.length&&(a.colors=arguments[3]),y(r)?a.showHidden=r:r&&t._extend(a,r),f(a.showHidden)&&(a.showHidden=!1),f(a.depth)&&(a.depth=2),f(a.colors)&&(a.colors=!1),f(a.customInspect)&&(a.customInspect=!0),a.colors&&(a.stylize=o),i(a,e,a.depth)}function o(e,t){var o=r.styles[t];return o?"\x1B["+r.colors[o][0]+"m"+e+"\x1B["+r.colors[o][1]+"m":e}function n(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function i(e,r,o){// Provide a hook for user-specified inspect functions.
1674
- // Check that value is an object with an inspect function on it
1675
- if(e.customInspect&&r&&C(r.inspect)&&// Filter out the util module, it's inspect function is special
1676
- r.inspect!==t.inspect&&// Also filter out any prototype objects using the circular check.
1677
- !(r.constructor&&r.constructor.prototype===r)){var y=r.inspect(o,e);return E(y)||(y=i(e,y,o)),y}// Primitive types cannot have properties
1678
- var m=p(e,r);if(m)return m;// Look up the keys of the object.
1679
- var g=Object.keys(r),f=a(g);// IE doesn't make error fields non-enumerable
1680
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
1681
- if(e.showHidden&&(g=Object.getOwnPropertyNames(r)),h(r)&&(0<=g.indexOf("message")||0<=g.indexOf("description")))return s(r);// Some type of object without properties can be shortcutted.
1682
- if(0===g.length){if(C(r)){var T=r.name?": "+r.name:"";return e.stylize("[Function"+T+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(R(r))return e.stylize(Date.prototype.toString.call(r),"date");if(h(r))return s(r)}var A="",_=!1,N=["{","}"];// Make Array say that they are Array
1683
- // Make functions say that they are functions
1684
- if(u(r)&&(_=!0,N=["[","]"]),C(r)){var O=r.name?": "+r.name:"";A=" [Function"+O+"]"}// Make RegExps say that they are RegExps
1685
- if(x(r)&&(A=" "+RegExp.prototype.toString.call(r)),R(r)&&(A=" "+Date.prototype.toUTCString.call(r)),h(r)&&(A=" "+s(r)),0===g.length&&(!_||0==r.length))return N[0]+A+N[1];if(0>o)return x(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var n;return n=_?l(e,r,o,f,g):g.map(function(t){return d(e,r,o,f,t,_)}),e.seen.pop(),c(n,A,N)}function p(e,t){if(f(t))return e.stylize("undefined","undefined");if(E(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0;// For some reason typeof null is "object", so special case here.
1686
- }function s(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,o,n){for(var a=[],p=0,s=t.length;p<s;++p)O(t,p+"")?a.push(d(e,t,r,o,p+"",!0)):a.push("");return n.forEach(function(n){n.match(/^\d+$/)||a.push(d(e,t,r,o,n,!0))}),a}function d(e,t,r,o,n,a){var p,s,l;if(l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},l.get?l.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),O(o,n)||(p="["+n+"]"),s||(0>e.seen.indexOf(l.value)?(s=m(r)?i(e,l.value,null):i(e,l.value,r-1),-1<s.indexOf("\n")&&(a?s=s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):s="\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),f(p)){if(a&&n.match(/^\d+$/))return s;p=JSON.stringify(""+n),p.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(p=p.substr(1,p.length-2),p=e.stylize(p,"name")):(p=p.replace(/'/g,"\\'").replace(/\\"/g,"\"").replace(/(^"|"$)/g,"'"),p=e.stylize(p,"string"))}return p+": "+s}function c(e,t,r){var o=e.reduce(function(e,t){if(0<=t.indexOf("\n"));return e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return 60<o?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}// NOTE: These type checking functions intentionally don't use `instanceof`
1687
- // because it is fragile and can be easily faked with `Object.create()`.
1688
- function u(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function E(e){return"string"==typeof e}function f(e){return void 0===e}function x(e){return T(e)&&"[object RegExp]"===A(e)}function T(e){return"object"==typeof e&&null!==e}function R(e){return T(e)&&"[object Date]"===A(e)}function h(t){return T(t)&&("[object Error]"===A(t)||t instanceof Error)}function C(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function _(e){return 10>e?"0"+e.toString(10):e.toString(10)}// 26 Feb 16:19:34
1689
- function N(){var e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),b[e.getMonth()],t].join(" ")}// log is just a thin wrapper to console.log that prepends a timestamp
1690
- function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function I(e,t){// `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
1691
- // Because `null` is a special error value in callbacks which means "no error
1692
- // occurred", we error-wrap so the callback consumer can distinguish between
1693
- // "the promise rejected with null" or "the promise fulfilled with undefined".
1694
- if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}// Copyright Joyent, Inc. and other Node contributors.
1695
- //
1696
- // Permission is hereby granted, free of charge, to any person obtaining a
1697
- // copy of this software and associated documentation files (the
1698
- // "Software"), to deal in the Software without restriction, including
1699
- // without limitation the rights to use, copy, modify, merge, publish,
1700
- // distribute, sublicense, and/or sell copies of the Software, and to permit
1701
- // persons to whom the Software is furnished to do so, subject to the
1702
- // following conditions:
1703
- //
1704
- // The above copyright notice and this permission notice shall be included
1705
- // in all copies or substantial portions of the Software.
1706
- //
1707
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1708
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1709
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1710
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1711
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1712
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1713
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
1714
- var S=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},o=0;o<t.length;o++)r[t[o]]=Object.getOwnPropertyDescriptor(e,t[o]);return r};t.format=function(e){if(!E(e)){for(var t=[],o=0;o<arguments.length;o++)t.push(r(arguments[o]));return t.join(" ")}for(var o=1,n=arguments,a=n.length,p=(e+"").replace(/%[sdj%]/g,function(e){if("%%"===e)return"%";if(o>=a)return e;switch(e){case"%s":return n[o++]+"";case"%d":return+n[o++];case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}default:return e;}}),s=n[o];o<a;s=n[++o])p+=m(s)||!T(s)?" "+s:" "+r(s);return p},t.deprecate=function(e,r){function o(){if(!n){if(process.throwDeprecation)throw new Error(r);else process.traceDeprecation?console.trace(r):console.error(r);n=!0}return e.apply(this,arguments)}if("undefined"!=typeof process&&!0===process.noDeprecation)return e;// Allow for deprecating things in the process of starting up.
1715
- if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return o};var L={},v;t.debuglog=function(e){if(f(v)&&(v=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(v)){var r=process.pid;L[e]=function(){var o=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,o)}}else L[e]=function(){};return L[e]},t.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",// "name": intentionally not styling
1716
- regexp:"red"},t.isArray=u,t.isBoolean=y,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=E,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=f,t.isRegExp=x,t.isObject=T,t.isDate=R,t.isError=h,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||// ES6 symbol
1717
- "undefined"==typeof e},t.isBuffer=isBuffer;var b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",N(),t.format.apply(t,arguments))},t.inherits=inherits,t._extend=function(e,t){// Don't do anything if add isn't an object
1718
- if(!t||!T(t))return e;for(var r=Object.keys(t),o=r.length;o--;)e[r[o]]=t[r[o]];return e};var k="undefined"==typeof Symbol?void 0:Symbol("util.promisify.custom");t.promisify=function(e){function t(){for(var t=new Promise(function(e,t){n=e,a=t}),r=[],o=0,n,a;o<arguments.length;o++)r.push(arguments[o]);r.push(function(e,t){e?a(e):n(t)});try{e.apply(this,r)}catch(e){a(e)}return t}if("function"!=typeof e)throw new TypeError("The \"original\" argument must be of type Function");if(k&&e[k]){var t=e[k];if("function"!=typeof t)throw new TypeError("The \"util.promisify.custom\" argument must be of type Function");return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),k&&Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,S(e))},t.promisify.custom=k,t.callbackify=function(e){// We DO NOT return the promise as it gives the user a false sense that
1719
- // the promise is actually somehow related to the callback's execution
1720
- // and that the callback throwing will reject the promise.
1721
- function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var n=this,a=function(){return o.apply(n,arguments)};e.apply(this,t).then(function(e){process.nextTick(a,null,e)},function(e){process.nextTick(I,e,a)})}if("function"!=typeof e)throw new TypeError("The \"original\" argument must be of type Function");return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,S(e)),t}});util.format,util.deprecate,util.debuglog,util.inspect,util.isArray,util.isBoolean,util.isNull,util.isNullOrUndefined,util.isNumber,util.isString,util.isSymbol,util.isUndefined,util.isRegExp,util.isObject,util.isDate,util.isError,util.isFunction,util.isPrimitive,util.isBuffer,util.log,util.inherits,util._extend,util.promisify,util.callbackify,dayjs.extend(customParseFormat);/**
1722
- * Generate a series from a range of numbers.
1723
- *
1724
- * @param start - The value of the first number in the range.
1725
- * @param count - The number of sequential values in the range.
1726
- *
1727
- * @returns Returns a series with a sequence of generated values. The series contains 'count' values beginning at 'start'.
1728
- */function range(e,t){if(!isNumber(e))throw new Error("Expect 'start' parameter to 'dataForge.range' function to be a number.");if(!isNumber(t))throw new Error("Expect 'count' parameter to 'dataForge.range' function to be a number.");for(var r=[],o=0;o<t;++o)r.push(e+o);return new Series(r)}/**
1729
- * Replicate a particular value N times to create a series.
1730
- *
1731
- * @param value The value to replicate.
1732
- * @param count The number of times to replicate the value.
1733
- *
1734
- * @returns Returns a new series that contains N copies of the value.
1735
- */function replicate(e,t){for(var r=[],o=0;o<t;++o)r.push(e);return new Series(r)}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function u(o,t){for(var e=0,a;e<t.length;e++)a=t[e],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}function c(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}function p(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&h(r,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(r,t){return(h=Object.setPrototypeOf||function(r,t){return r.__proto__=t,r})(r,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(r,t){return t&&("object"==typeof t||"function"==typeof t)?t:f(r)}function v(a){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e=l(a),n;if(t){var i=l(this).constructor;n=Reflect.construct(e,arguments,i)}else n=e.apply(this,arguments);return y(this,n)}}function E(r,t){return function(e){if(Array.isArray(e))return e}(r)||function(p,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(p)){var e=[],r=!0,l=!1,d;try{for(var c=p[Symbol.iterator](),a;!(r=(a=c.next()).done)&&(e.push(a.value),!t||e.length!==t);r=!0);}catch(e){l=!0,d=e}finally{try{r||null==c.return||c.return()}finally{if(l)throw d}}return e}}(r,t)||d(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(o,t){if(o){if("string"==typeof o)return T(o,t);var e=Object.prototype.toString.call(o).slice(8,-1);return"Object"===e&&o.constructor&&(e=o.constructor.name),"Map"===e||"Set"===e?Array.from(o):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?T(o,t):void 0}}function T(o,t){(null==t||t>o.length)&&(t=o.length);for(var a=0,i=Array(t);a<t;a++)i[a]=o[a];return i}function O(p,l){var e;if("undefined"==typeof Symbol||null==p[Symbol.iterator]){if(Array.isArray(p)||(e=d(p))||l&&p&&"number"==typeof p.length){e&&(p=e);var c=0,u=function(){};return{s:u,n:function(){return c>=p.length?{done:!0}:{done:!1,value:p[c++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o=!0,y=!1,m;return{s:function(){e=p[Symbol.iterator]()},n:function(){var r=e.next();return o=r.done,r},e:function(e){y=!0,m=e},f:function(){try{o||null==e.return||e.return()}finally{if(y)throw m}}}}function g(){return this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null,this}function N(a,t,e,r,n){return g.call(this),this.source=void 0===a?N.EMPTY_SOURCE:a,this.type=void 0===t?null:t,this.channel=void 0===e?g.DEFAULT_CHANNEL:e,this.start=void 0===r?-1:r,this.stop=void 0===n?-1:n,this.tokenIndex=-1,null===this.source[0]?this.column=-1:(this.line=a[0].line,this.column=a[0].column),this}g.INVALID_TYPE=0,g.EPSILON=-2,g.MIN_USER_TOKEN_TYPE=1,g.EOF=-1,g.DEFAULT_CHANNEL=0,g.HIDDEN_CHANNEL=1,Object.defineProperty(g.prototype,"text",{get:function(){return this._text},set:function(e){this._text=e}}),g.prototype.getTokenSource=function(){return this.source[0]},g.prototype.getInputStream=function(){return this.source[1]},N.prototype=Object.create(g.prototype),N.prototype.constructor=N,N.EMPTY_SOURCE=[null,null],N.prototype.clone=function(){var e=new N(this.source,this.type,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,e.text=this.text,e},Object.defineProperty(N.prototype,"text",{get:function(){if(null!==this._text)return this._text;var r=this.getInputStream();if(null===r)return null;var t=r.size;return this.start<t&&this.stop<t?r.getText(this.start,this.stop):"<EOF>"},set:function(e){this._text=e}}),N.prototype.toString=function(){var e=this.text;return e=null===e?"<no text>":e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+(0<this.channel?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"};var R={Token:g,CommonToken:N},S=R.Token;function I(r,t){return this.start=r,this.stop=t,this}function A(){this.intervals=null,this.readOnly=!1}I.prototype.contains=function(e){return e>=this.start&&e<this.stop},I.prototype.toString=function(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()},Object.defineProperty(I.prototype,"length",{get:function(){return this.stop-this.start}}),A.prototype.first=function(){return null===this.intervals||0===this.intervals.length?S.INVALID_TYPE:this.intervals[0].start},A.prototype.addOne=function(e){this.addInterval(new I(e,e+1))},A.prototype.addRange=function(r,t){this.addInterval(new I(r,t+1))},A.prototype.addInterval=function(o){var t=Math.max,n=Math.min;if(null===this.intervals)this.intervals=[],this.intervals.push(o);else{for(var a=0,i;a<this.intervals.length;a++){if(i=this.intervals[a],o.stop<i.start)return void this.intervals.splice(a,0,o);if(o.stop===i.start)return void(this.intervals[a].start=o.start);if(o.start<=i.stop)return this.intervals[a]=new I(n(i.start,o.start),t(i.stop,o.stop)),void this.reduce(a)}this.intervals.push(o)}},A.prototype.addSet=function(o){if(null!==o.intervals)for(var t=0,n;t<o.intervals.length;t++)n=o.intervals[t],this.addInterval(new I(n.start,n.stop));return this},A.prototype.reduce=function(o){if(o<this.intervalslength-1){var t=this.intervals[o],e=this.intervals[o+1];t.stop>=e.stop?(this.intervals.pop(o+1),this.reduce(o)):t.stop>=e.start&&(this.intervals[o]=new I(t.start,e.stop),this.intervals.pop(o+1))}},A.prototype.complement=function(o,t){var e=new A;e.addInterval(new I(o,t+1));for(var r=0;r<this.intervals.length;r++)e.removeRange(this.intervals[r]);return e},A.prototype.contains=function(r){if(null===this.intervals)return!1;for(var t=0;t<this.intervals.length;t++)if(this.intervals[t].contains(r))return!0;return!1},Object.defineProperty(A.prototype,"length",{get:function(){var r=0;return this.intervals.map(function(t){r+=t.length}),r}}),A.prototype.removeRange=function(a){if(a.start===a.stop-1)this.removeOne(a.start);else if(null!==this.intervals)for(var t=0,i=0,p;i<this.intervals.length;i++){if(p=this.intervals[t],a.stop<=p.start)return;if(a.start>p.start&&a.stop<p.stop){this.intervals[t]=new I(p.start,a.start);var s=new I(a.stop,p.stop);return void this.intervals.splice(t,0,s)}a.start<=p.start&&a.stop>=p.stop?(this.intervals.splice(t,1),t-=1):a.start<p.stop?this.intervals[t]=new I(p.start,a.start):a.stop<p.stop&&(this.intervals[t]=new I(a.stop,p.stop)),t+=1}},A.prototype.removeOne=function(o){if(null!==this.intervals)for(var t=0,a;t<this.intervals.length;t++){if(a=this.intervals[t],o<a.start)return;if(o===a.start&&o===a.stop-1)return void this.intervals.splice(t,1);if(o===a.start)return void(this.intervals[t]=new I(a.start+1,a.stop));if(o===a.stop-1)return void(this.intervals[t]=new I(a.start,a.stop-1));if(o<a.stop-1){var i=new I(a.start,o);return a.start=o+1,void this.intervals.splice(t,0,i)}}},A.prototype.toString=function(o,n,a){return o=o||null,n=n||null,a=a||!1,null===this.intervals?"{}":null!==o||null!==n?this.toTokenString(o,n):a?this.toCharString():this.toIndexString()},A.prototype.toCharString=function(){for(var o=String.fromCharCode,n=[],t=0,a;t<this.intervals.length;t++)a=this.intervals[t],a.stop===a.start+1?a.start===S.EOF?n.push("<EOF>"):n.push("'"+o(a.start)+"'"):n.push("'"+o(a.start)+"'..'"+o(a.stop-1)+"'");return 1<n.length?"{"+n.join(", ")+"}":n[0]},A.prototype.toIndexString=function(){for(var o=[],t=0,n;t<this.intervals.length;t++)n=this.intervals[t],n.stop===n.start+1?n.start===S.EOF?o.push("<EOF>"):o.push(n.start.toString()):o.push(n.start.toString()+".."+(n.stop-1).toString());return 1<o.length?"{"+o.join(", ")+"}":o[0]},A.prototype.toTokenString=function(a,t){for(var e=[],r=0;r<this.intervals.length;r++)for(var p=this.intervals[r],o=p.start;o<p.stop;o++)e.push(this.elementName(a,t,o));return 1<e.length?"{"+e.join(", ")+"}":e[0]},A.prototype.elementName=function(o,t,e){return e===S.EOF?"<EOF>":e===S.EPSILON?"<EPSILON>":o[e]||t[e]};var m={Interval:I,IntervalSet:A};function x(e){return"["+e.join(", ")+"]"}function b(r,t){return r.equals(t)}function w(e){return e.hashCode()}function C(r,t){return this.data={},this.hashFunction=r||w,this.equalsFunction=t||b,this}function k(){return this.data=[],this}function L(r,t){return this.data={},this.hashFunction=r||w,this.equalsFunction=t||b,this}function D(){return this.data={},this}function _(e){return this.defaultMapCtor=e||L,this.cacheMap=new this.defaultMapCtor,this}function M(){return this.count=0,this.hash=0,this}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){var p=this.toString(),l,d,c,u,y,m,g,E;for(l=3&p.length,d=p.length-l,c=String.prototype.seed,y=3432918353,m=461845907,E=0;E<d;)g=255&p.charCodeAt(E)|(255&p.charCodeAt(++E))<<8|(255&p.charCodeAt(++E))<<16|(255&p.charCodeAt(++E))<<24,++E,c=27492+(65535&(u=4294967295&5*(65535&(c=(c^=g=4294967295&(65535&(g=(g=4294967295&(65535&g)*y+((65535&(g>>>16)*y)<<16))<<15|g>>>17))*m+((65535&(g>>>16)*m)<<16))<<13|c>>>19))+((65535&5*(c>>>16))<<16)))+((65535&58964+(u>>>16))<<16);switch(g=0,l){case 3:g^=(255&p.charCodeAt(E+2))<<16;case 2:g^=(255&p.charCodeAt(E+1))<<8;case 1:c^=g=4294967295&(65535&(g=(g=4294967295&(65535&(g^=255&p.charCodeAt(E)))*y+((65535&(g>>>16)*y)<<16))<<15|g>>>17))*m+((65535&(g>>>16)*m)<<16);}return c^=p.length,c=4294967295&2246822507*(65535&(c^=c>>>16))+((65535&2246822507*(c>>>16))<<16),c=4294967295&3266489909*(65535&(c^=c>>>13))+((65535&3266489909*(c>>>16))<<16),(c^=c>>>16)>>>0},Object.defineProperty(C.prototype,"length",{get:function(){var r=0;for(var o in this.data)0===o.indexOf("hash_")&&(r+=this.data[o].length);return r}}),C.prototype.add=function(o){var t="hash_"+this.hashFunction(o);if(t in this.data){for(var e=this.data[t],r=0;r<e.length;r++)if(this.equalsFunction(o,e[r]))return e[r];return e.push(o),o}return this.data[t]=[o],o},C.prototype.contains=function(e){return null!=this.get(e)},C.prototype.get=function(o){var t="hash_"+this.hashFunction(o);if(t in this.data)for(var e=this.data[t],r=0;r<e.length;r++)if(this.equalsFunction(o,e[r]))return e[r];return null},C.prototype.values=function(){var r=[];for(var o in this.data)0===o.indexOf("hash_")&&(r=r.concat(this.data[o]));return r},C.prototype.toString=function(){return x(this.values())},k.prototype.add=function(e){this.data[e]=!0},k.prototype.or=function(r){var o=this;Object.keys(r.data).map(function(e){o.add(e)})},k.prototype.remove=function(e){delete this.data[e]},k.prototype.contains=function(e){return!0===this.data[e]},k.prototype.values=function(){return Object.keys(this.data)},k.prototype.minValue=function(){return Math.min.apply(null,this.values())},k.prototype.hashCode=function(){var e=new M;return e.update(this.values()),e.finish()},k.prototype.equals=function(e){return e instanceof k&&this.hashCode()===e.hashCode()},Object.defineProperty(k.prototype,"length",{get:function(){return this.values().length}}),k.prototype.toString=function(){return"{"+this.values().join(", ")+"}"},Object.defineProperty(L.prototype,"length",{get:function(){var r=0;for(var o in this.data)0===o.indexOf("hash_")&&(r+=this.data[o].length);return r}}),L.prototype.put=function(a,t){var e="hash_"+this.hashFunction(a);if(e in this.data){for(var r=this.data[e],n=0,p;n<r.length;n++)if(p=r[n],this.equalsFunction(a,p.key)){var l=p.value;return p.value=t,l}return r.push({key:a,value:t}),t}return this.data[e]=[{key:a,value:t}],t},L.prototype.containsKey=function(a){var t="hash_"+this.hashFunction(a);if(t in this.data)for(var e=this.data[t],r=0,i;r<e.length;r++)if(i=e[r],this.equalsFunction(a,i.key))return!0;return!1},L.prototype.get=function(a){var t="hash_"+this.hashFunction(a);if(t in this.data)for(var e=this.data[t],r=0,i;r<e.length;r++)if(i=e[r],this.equalsFunction(a,i.key))return i.value;return null},L.prototype.entries=function(){var r=[];for(var o in this.data)0===o.indexOf("hash_")&&(r=r.concat(this.data[o]));return r},L.prototype.getKeys=function(){return this.entries().map(function(e){return e.key})},L.prototype.getValues=function(){return this.entries().map(function(e){return e.value})},L.prototype.toString=function(){return"["+this.entries().map(function(e){return"{"+e.key+":"+e.value+"}"}).join(", ")+"]"},D.prototype.get=function(e){return(e="k-"+e)in this.data?this.data[e]:null},D.prototype.put=function(r,o){r="k-"+r,this.data[r]=o},D.prototype.values=function(){var r=this.data;return Object.keys(this.data).map(function(t){return r[t]})},M.prototype.update=function(){for(var o=0,a;o<arguments.length;o++)if(a=arguments[o],null!=a)if(Array.isArray(a))this.update.apply(this,a);else{var i=0;switch(typeof a){case"undefined":case"function":continue;case"number":case"boolean":i=a;break;case"string":i=a.hashCode();break;default:a.updateHashCode?a.updateHashCode(this):console.log("No updateHashCode for "+a.toString());continue;}i=(i*=3432918353)<<15|i>>>17,i*=461845907,++this.count;var p=this.hash^i;p=5*(p=p<<13|p>>>19)+3864292196,this.hash=p}},M.prototype.finish=function(){var e=this.hash^4*this.count;return e^=e>>>16,e*=2246822507,e^=e>>>13,e*=3266489909,e^=e>>>16},_.prototype.get=function(o,t){var e=this.cacheMap.get(o)||null;return null===e?null:e.get(t)||null},_.prototype.set=function(o,t,e){var r=this.cacheMap.get(o)||null;null===r&&(r=new this.defaultMapCtor,this.cacheMap.put(o,r)),r.put(t,e)};var P={Hash:M,Set:C,Map:L,BitSet:k,AltDict:D,DoubleDict:_,hashStuff:function(){var e=new M;return e.update.apply(e,arguments),e.finish()},escapeWhitespace:function(r,o){return r=r.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),o&&(r=r.replace(/ /g,"\xB7")),r},arrayToString:x,titleCase:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1)})},equalArrays:function(o,t){if(!Array.isArray(o)||!Array.isArray(t))return!1;if(o==t)return!0;if(o.length!=t.length)return!1;for(var e=0;e<o.length;e++)if(o[e]!=t[e]&&!o[e].equals(t[e]))return!1;return!0}},B=P.Set,U=P.Hash;function G(){return this}function V(o,t,e){return G.call(this),this.ruleIndex=void 0===o?-1:o,this.predIndex=void 0===t?-1:t,this.isCtxDependent=void 0!==e&&e,this}function j(e){G.call(this),this.precedence=void 0===e?0:e}function F(a,t){G.call(this);var e=new B;a instanceof F?a.opnds.map(function(r){e.add(r)}):e.add(a),t instanceof F?t.opnds.map(function(r){e.add(r)}):e.add(t);var r=j.filterPrecedencePredicates(e);if(0<r.length){var n=null;r.map(function(e){(null===n||e.precedence<n.precedence)&&(n=e)}),e.add(n)}return this.opnds=e.values(),this}function z(a,t){G.call(this);var e=new B;a instanceof z?a.opnds.map(function(r){e.add(r)}):e.add(a),t instanceof z?t.opnds.map(function(r){e.add(r)}):e.add(t);var r=j.filterPrecedencePredicates(e);if(0<r.length){var n=r.sort(function(r,t){return r.compareTo(t)}),o=n[n.length-1];e.add(o)}return this.opnds=e.values(),this}G.prototype.hashCode=function(){var e=new U;return this.updateHashCode(e),e.finish()},G.prototype.evaluate=function(){},G.prototype.evalPrecedence=function(){return this},G.andContext=function(o,t){if(null===o||o===G.NONE)return t;if(null===t||t===G.NONE)return o;var e=new F(o,t);return 1===e.opnds.length?e.opnds[0]:e},G.orContext=function(o,t){if(null===o)return t;if(null===t)return o;if(o===G.NONE||t===G.NONE)return G.NONE;var e=new z(o,t);return 1===e.opnds.length?e.opnds[0]:e},V.prototype=Object.create(G.prototype),V.prototype.constructor=V,G.NONE=new V,V.prototype.evaluate=function(o,t){var e=this.isCtxDependent?t:null;return o.sempred(e,this.ruleIndex,this.predIndex)},V.prototype.updateHashCode=function(e){e.update(this.ruleIndex,this.predIndex,this.isCtxDependent)},V.prototype.equals=function(e){return this===e||e instanceof V&&this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent},V.prototype.toString=function(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"},j.prototype=Object.create(G.prototype),j.prototype.constructor=j,j.prototype.evaluate=function(r,t){return r.precpred(t,this.precedence)},j.prototype.evalPrecedence=function(r,t){return r.precpred(t,this.precedence)?G.NONE:null},j.prototype.compareTo=function(e){return this.precedence-e.precedence},j.prototype.updateHashCode=function(e){e.update(31)},j.prototype.equals=function(e){return this===e||e instanceof j&&this.precedence===e.precedence},j.prototype.toString=function(){return"{"+this.precedence+">=prec}?"},j.filterPrecedencePredicates=function(r){var o=[];return r.values().map(function(e){e instanceof j&&o.push(e)}),o},F.prototype=Object.create(G.prototype),F.prototype.constructor=F,F.prototype.equals=function(e){return this===e||e instanceof F&&this.opnds===e.opnds},F.prototype.updateHashCode=function(e){e.update(this.opnds,"AND")},F.prototype.evaluate=function(o,t){for(var e=0;e<this.opnds.length;e++)if(!this.opnds[e].evaluate(o,t))return!1;return!0},F.prototype.evalPrecedence=function(p,t){for(var e=!1,l=[],n=0;n<this.opnds.length;n++){var d=this.opnds[n],i=d.evalPrecedence(p,t);if(e|=i!==d,null===i)return null;i!==G.NONE&&l.push(i)}if(!e)return this;if(0===l.length)return G.NONE;var s=null;return l.map(function(e){s=null===s?e:G.andContext(s,e)}),s},F.prototype.toString=function(){var r="";return this.opnds.map(function(t){r+="&& "+t.toString()}),3<r.length?r.slice(3):r},z.prototype=Object.create(G.prototype),z.prototype.constructor=z,z.prototype.constructor=function(e){return this===e||e instanceof z&&this.opnds===e.opnds},z.prototype.updateHashCode=function(e){e.update(this.opnds,"OR")},z.prototype.evaluate=function(o,t){for(var e=0;e<this.opnds.length;e++)if(this.opnds[e].evaluate(o,t))return!0;return!1},z.prototype.evalPrecedence=function(a,t){for(var e=!1,p=[],n=0;n<this.opnds.length;n++){var l=this.opnds[n],i=l.evalPrecedence(a,t);if(e|=i!==l,i===G.NONE)return G.NONE;null!==i&&p.push(i)}return e?0===p.length?null:null:this},z.prototype.toString=function(){var r="";return this.opnds.map(function(t){r+="|| "+t.toString()}),3<r.length?r.slice(3):r};var K={SemanticContext:G,PrecedencePredicate:j,Predicate:V},q=R.Token,H=m.IntervalSet,W=K.Predicate,Y=K.PrecedencePredicate;function Q(e){if(null==e)throw"target cannot be null.";return this.target=e,this.isEpsilon=!1,this.label=null,this}function X(r,t){return Q.call(this,r),this.label_=t,this.label=this.makeLabel(),this.serializationType=Q.ATOM,this}function J(o,t,e,r){return Q.call(this,o),this.ruleIndex=t,this.precedence=e,this.followState=r,this.serializationType=Q.RULE,this.isEpsilon=!0,this}function $(r,t){return Q.call(this,r),this.serializationType=Q.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=t,this}function Z(o,t,e){return Q.call(this,o),this.serializationType=Q.RANGE,this.start=t,this.stop=e,this.label=this.makeLabel(),this}function tt(e){return Q.call(this,e),this}function et(o,t,e,r){return tt.call(this,o),this.serializationType=Q.PREDICATE,this.ruleIndex=t,this.predIndex=e,this.isCtxDependent=r,this.isEpsilon=!0,this}function rt(o,t,e,r){return Q.call(this,o),this.serializationType=Q.ACTION,this.ruleIndex=t,this.actionIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==r&&r,this.isEpsilon=!0,this}function nt(r,t){return Q.call(this,r),this.serializationType=Q.SET,null==t?(this.label=new H,this.label.addOne(q.INVALID_TYPE)):this.label=t,this}function ot(r,t){return nt.call(this,r,t),this.serializationType=Q.NOT_SET,this}function it(e){return Q.call(this,e),this.serializationType=Q.WILDCARD,this}function st(r,t){return tt.call(this,r),this.serializationType=Q.PRECEDENCE,this.precedence=t,this.isEpsilon=!0,this}Q.EPSILON=1,Q.RANGE=2,Q.RULE=3,Q.PREDICATE=4,Q.ATOM=5,Q.ACTION=6,Q.SET=7,Q.NOT_SET=8,Q.WILDCARD=9,Q.PRECEDENCE=10,Q.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],Q.serializationTypes={EpsilonTransition:Q.EPSILON,RangeTransition:Q.RANGE,RuleTransition:Q.RULE,PredicateTransition:Q.PREDICATE,AtomTransition:Q.ATOM,ActionTransition:Q.ACTION,SetTransition:Q.SET,NotSetTransition:Q.NOT_SET,WildcardTransition:Q.WILDCARD,PrecedencePredicateTransition:Q.PRECEDENCE},X.prototype=Object.create(Q.prototype),X.prototype.constructor=X,X.prototype.makeLabel=function(){var e=new H;return e.addOne(this.label_),e},X.prototype.matches=function(e){return this.label_===e},X.prototype.toString=function(){return this.label_},J.prototype=Object.create(Q.prototype),J.prototype.constructor=J,J.prototype.matches=function(){return!1},$.prototype=Object.create(Q.prototype),$.prototype.constructor=$,$.prototype.matches=function(){return!1},$.prototype.toString=function(){return"epsilon"},Z.prototype=Object.create(Q.prototype),Z.prototype.constructor=Z,Z.prototype.makeLabel=function(){var e=new H;return e.addRange(this.start,this.stop),e},Z.prototype.matches=function(e){return e>=this.start&&e<=this.stop},Z.prototype.toString=function(){var e=String.fromCharCode;return"'"+e(this.start)+"'..'"+e(this.stop)+"'"},tt.prototype=Object.create(Q.prototype),tt.prototype.constructor=tt,et.prototype=Object.create(tt.prototype),et.prototype.constructor=et,et.prototype.matches=function(){return!1},et.prototype.getPredicate=function(){return new W(this.ruleIndex,this.predIndex,this.isCtxDependent)},et.prototype.toString=function(){return"pred_"+this.ruleIndex+":"+this.predIndex},rt.prototype=Object.create(Q.prototype),rt.prototype.constructor=rt,rt.prototype.matches=function(){return!1},rt.prototype.toString=function(){return"action_"+this.ruleIndex+":"+this.actionIndex},nt.prototype=Object.create(Q.prototype),nt.prototype.constructor=nt,nt.prototype.matches=function(e){return this.label.contains(e)},nt.prototype.toString=function(){return this.label.toString()},ot.prototype=Object.create(nt.prototype),ot.prototype.constructor=ot,ot.prototype.matches=function(o,t,e){return o>=t&&o<=e&&!nt.prototype.matches.call(this,o,t,e)},ot.prototype.toString=function(){return"~"+nt.prototype.toString.call(this)},it.prototype=Object.create(Q.prototype),it.prototype.constructor=it,it.prototype.matches=function(o,t,e){return o>=t&&o<=e},it.prototype.toString=function(){return"."},st.prototype=Object.create(tt.prototype),st.prototype.constructor=st,st.prototype.matches=function(){return!1},st.prototype.getPredicate=function(){return new Y(this.precedence)},st.prototype.toString=function(){return this.precedence+" >= _p"};var at={Transition:Q,AtomTransition:X,SetTransition:nt,NotSetTransition:ot,RuleTransition:J,ActionTransition:rt,EpsilonTransition:$,RangeTransition:Z,WildcardTransition:it,PredicateTransition:et,PrecedencePredicateTransition:st,AbstractPredicateTransition:tt}.PredicateTransition;function ut(e){return Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,ut),this.message=e.message,this.recognizer=e.recognizer,this.input=e.input,this.ctx=e.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state),this}function ct(o,t,e,r){return ut.call(this,{message:"",recognizer:o,input:t,ctx:null}),this.startIndex=e,this.deadEndConfigs=r,this}function pt(a,t,p,s,l,o){o=o||a._ctx,s=s||a.getCurrentToken(),p=p||a.getCurrentToken(),t=t||a.getInputStream(),ut.call(this,{message:"",recognizer:a,input:t,ctx:o}),this.deadEndConfigs=l,this.startToken=p,this.offendingToken=s}function lt(e){ut.call(this,{message:"",recognizer:e,input:e.getInputStream(),ctx:e._ctx}),this.offendingToken=e.getCurrentToken()}function ht(o,t,e){ut.call(this,{message:this.formatMessage(t,e||null),recognizer:o,input:o.getInputStream(),ctx:o._ctx});var r=o._interp.atn.states[o.state].transitions[0];return r instanceof at?(this.ruleIndex=r.ruleIndex,this.predicateIndex=r.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=t,this.offendingToken=o.getCurrentToken(),this}function ft(){return Error.call(this),Error.captureStackTrace(this,ft),this}ut.prototype=Object.create(Error.prototype),ut.prototype.constructor=ut,ut.prototype.getExpectedTokens=function(){return null===this.recognizer?null:this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx)},ut.prototype.toString=function(){return this.message},ct.prototype=Object.create(ut.prototype),ct.prototype.constructor=ct,ct.prototype.toString=function(){var e="";return 0<=this.startIndex&&this.startIndex<this.input.size&&(e=this.input.getText((this.startIndex,this.startIndex))),"LexerNoViableAltException"+e},pt.prototype=Object.create(ut.prototype),pt.prototype.constructor=pt,lt.prototype=Object.create(ut.prototype),lt.prototype.constructor=lt,ht.prototype=Object.create(ut.prototype),ht.prototype.constructor=ht,ht.prototype.formatMessage=function(r,t){return null===t?"failed predicate: {"+r+"}?":t},ft.prototype=Object.create(Error.prototype),ft.prototype.constructor=ft;var yt={RecognitionException:ut,NoViableAltException:pt,LexerNoViableAltException:ct,InputMismatchException:lt,FailedPredicateException:ht,ParseCancellationException:ft};function vt(){return this}function Et(){return vt.call(this),this}function dt(e){if(vt.call(this),null===e)throw"delegates";return this.delegates=e,this}vt.prototype.syntaxError=function(){},vt.prototype.reportAmbiguity=function(){},vt.prototype.reportAttemptingFullContext=function(){},vt.prototype.reportContextSensitivity=function(){},Et.prototype=Object.create(vt.prototype),Et.prototype.constructor=Et,Et.INSTANCE=new Et,Et.prototype.syntaxError=function(a,t,e,r,n){console.error("line "+e+":"+r+" "+n)},dt.prototype=Object.create(vt.prototype),dt.prototype.constructor=dt,dt.prototype.syntaxError=function(a,t,e,r,n,o){this.delegates.map(function(i){i.syntaxError(a,t,e,r,n,o)})},dt.prototype.reportAmbiguity=function(p,t,e,r,n,o,i){this.delegates.map(function(s){s.reportAmbiguity(p,t,e,r,n,o,i)})},dt.prototype.reportAttemptingFullContext=function(a,t,e,r,n,o){this.delegates.map(function(i){i.reportAttemptingFullContext(a,t,e,r,n,o)})},dt.prototype.reportContextSensitivity=function(a,t,e,r,n,o){this.delegates.map(function(i){i.reportContextSensitivity(a,t,e,r,n,o)})};var Tt={ErrorListener:vt,ConsoleErrorListener:Et,ProxyErrorListener:dt},Ot=P.BitSet,gt=Tt.ErrorListener,Nt=m.Interval;function Rt(e){return gt.call(this),e=e||!0,this.exactOnly=e,this}function St(){return this.atn=null,this.stateNumber=St.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null,this}function It(){return St.call(this),this.stateType=St.BASIC,this}function At(){return St.call(this),this.decision=-1,this.nonGreedy=!1,this}function mt(){return At.call(this),this.endState=null,this}function xt(){return mt.call(this),this.stateType=St.BLOCK_START,this}function bt(){return St.call(this),this.stateType=St.BLOCK_END,this.startState=null,this}function wt(){return St.call(this),this.stateType=St.RULE_STOP,this}function Ct(){return St.call(this),this.stateType=St.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}function kt(){return At.call(this),this.stateType=St.PLUS_LOOP_BACK,this}function Lt(){return mt.call(this),this.stateType=St.PLUS_BLOCK_START,this.loopBackState=null,this}function Dt(){return mt.call(this),this.stateType=St.STAR_BLOCK_START,this}function _t(){return St.call(this),this.stateType=St.STAR_LOOP_BACK,this}function Mt(){return At.call(this),this.stateType=St.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}function Pt(){return St.call(this),this.stateType=St.LOOP_END,this.loopBackState=null,this}function Bt(){return At.call(this),this.stateType=St.TOKEN_START,this}Rt.prototype=Object.create(gt.prototype),Rt.prototype.constructor=Rt,Rt.prototype.reportAmbiguity=function(p,t,e,r,n,o,i){if(!this.exactOnly||n){var s="reportAmbiguity d="+this.getDecisionDescription(p,t)+": ambigAlts="+this.getConflictingAlts(o,i)+", input='"+p.getTokenStream().getText(new Nt(e,r))+"'";p.notifyErrorListeners(s)}},Rt.prototype.reportAttemptingFullContext=function(o,t,e,r){var n="reportAttemptingFullContext d="+this.getDecisionDescription(o,t)+", input='"+o.getTokenStream().getText(new Nt(e,r))+"'";o.notifyErrorListeners(n)},Rt.prototype.reportContextSensitivity=function(o,t,e,r){var n="reportContextSensitivity d="+this.getDecisionDescription(o,t)+", input='"+o.getTokenStream().getText(new Nt(e,r))+"'";o.notifyErrorListeners(n)},Rt.prototype.getDecisionDescription=function(a,t){var e=t.decision,r=t.atnStartState.ruleIndex,n=a.ruleNames;if(0>r||r>=n.length)return""+e;var o=n[r]||null;return null===o||0===o.length?""+e:e+" ("+o+")"},Rt.prototype.getConflictingAlts=function(o,t){if(null!==o)return o;for(var e=new Ot,r=0;r<t.items.length;r++)e.add(t.items[r].alt);return"{"+e.values().join(", ")+"}"},St.INVALID_TYPE=0,St.BASIC=1,St.RULE_START=2,St.BLOCK_START=3,St.PLUS_BLOCK_START=4,St.STAR_BLOCK_START=5,St.TOKEN_START=6,St.RULE_STOP=7,St.BLOCK_END=8,St.STAR_LOOP_BACK=9,St.STAR_LOOP_ENTRY=10,St.PLUS_LOOP_BACK=11,St.LOOP_END=12,St.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],St.INVALID_STATE_NUMBER=-1,St.prototype.toString=function(){return this.stateNumber},St.prototype.equals=function(e){return e instanceof St&&this.stateNumber===e.stateNumber},St.prototype.isNonGreedyExitState=function(){return!1},St.prototype.addTransition=function(r,t){void 0===t&&(t=-1),0===this.transitions.length?this.epsilonOnlyTransitions=r.isEpsilon:this.epsilonOnlyTransitions!==r.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===t?this.transitions.push(r):this.transitions.splice(t,1,r)},It.prototype=Object.create(St.prototype),It.prototype.constructor=It,At.prototype=Object.create(St.prototype),At.prototype.constructor=At,mt.prototype=Object.create(At.prototype),mt.prototype.constructor=mt,xt.prototype=Object.create(mt.prototype),xt.prototype.constructor=xt,bt.prototype=Object.create(St.prototype),bt.prototype.constructor=bt,wt.prototype=Object.create(St.prototype),wt.prototype.constructor=wt,Ct.prototype=Object.create(St.prototype),Ct.prototype.constructor=Ct,kt.prototype=Object.create(At.prototype),kt.prototype.constructor=kt,Lt.prototype=Object.create(mt.prototype),Lt.prototype.constructor=Lt,Dt.prototype=Object.create(mt.prototype),Dt.prototype.constructor=Dt,_t.prototype=Object.create(St.prototype),_t.prototype.constructor=_t,Mt.prototype=Object.create(At.prototype),Mt.prototype.constructor=Mt,Pt.prototype=Object.create(St.prototype),Pt.prototype.constructor=Pt,Bt.prototype=Object.create(At.prototype),Bt.prototype.constructor=Bt;var Ut=R.Token,Gt=yt.NoViableAltException,Vt=yt.InputMismatchException,jt=yt.FailedPredicateException,Ft=yt.ParseCancellationException,zt={ATNState:St,BasicState:It,DecisionState:At,BlockStartState:mt,BlockEndState:bt,LoopEndState:Pt,RuleStartState:Ct,RuleStopState:wt,TokensStartState:Bt,PlusLoopbackState:kt,StarLoopbackState:_t,StarLoopEntryState:Mt,PlusBlockStartState:Lt,StarBlockStartState:Dt,BasicBlockStartState:xt}.ATNState,Kt=m.Interval,qt=m.IntervalSet;function Ht(){}function Wt(){return Ht.call(this),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this}function Yt(){return Wt.call(this),this}Ht.prototype.reset=function(){},Ht.prototype.recoverInline=function(){},Ht.prototype.recover=function(){},Ht.prototype.sync=function(){},Ht.prototype.inErrorRecoveryMode=function(){},Ht.prototype.reportError=function(){},Wt.prototype=Object.create(Ht.prototype),Wt.prototype.constructor=Wt,Wt.prototype.reset=function(e){this.endErrorCondition(e)},Wt.prototype.beginErrorCondition=function(){this.errorRecoveryMode=!0},Wt.prototype.inErrorRecoveryMode=function(){return this.errorRecoveryMode},Wt.prototype.endErrorCondition=function(){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1},Wt.prototype.reportMatch=function(e){this.endErrorCondition(e)},Wt.prototype.reportError=function(r,t){this.inErrorRecoveryMode(r)||(this.beginErrorCondition(r),t instanceof Gt?this.reportNoViableAlternative(r,t):t instanceof Vt?this.reportInputMismatch(r,t):t instanceof jt?this.reportFailedPredicate(r,t):(console.log("unknown recognition error type: "+t.constructor.name),console.log(t.stack),r.notifyErrorListeners(t.getOffendingToken(),t.getMessage(),t)))},Wt.prototype.recover=function(e){this.lastErrorIndex===e.getInputStream().index&&null!==this.lastErrorStates&&0<=this.lastErrorStates.indexOf(e.state)&&e.consume(),this.lastErrorIndex=e._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(e.state);var t=this.getErrorRecoverySet(e);this.consumeUntil(e,t)},Wt.prototype.sync=function(a){if(!this.inErrorRecoveryMode(a)){var t=a._interp.atn.states[a.state],e=a.getTokenStream().LA(1),r=a.atn.nextTokens(t);if(!r.contains(Ut.EPSILON)&&!r.contains(e))switch(t.stateType){case zt.BLOCK_START:case zt.STAR_BLOCK_START:case zt.PLUS_BLOCK_START:case zt.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(a))return;throw new Vt(a);case zt.PLUS_LOOP_BACK:case zt.STAR_LOOP_BACK:this.reportUnwantedToken(a);var n=new qt;n.addSet(a.getExpectedTokens());var o=n.addSet(this.getErrorRecoverySet(a));this.consumeUntil(a,o);}}},Wt.prototype.reportNoViableAlternative=function(a,t){var e=a.getTokenStream(),n;n=null===e?"<unknown input>":t.startToken.type===Ut.EOF?"<EOF>":e.getText(new Kt(t.startToken.tokenIndex,t.offendingToken.tokenIndex));var i="no viable alternative at input "+this.escapeWSAndQuote(n);a.notifyErrorListeners(i,t.offendingToken,t)},Wt.prototype.reportInputMismatch=function(o,t){var e="mismatched input "+this.getTokenErrorDisplay(t.offendingToken)+" expecting "+t.getExpectedTokens().toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(e,t.offendingToken,t)},Wt.prototype.reportFailedPredicate=function(o,t){var e="rule "+o.ruleNames[o._ctx.ruleIndex]+" "+t.message;o.notifyErrorListeners(e,t.offendingToken,t)},Wt.prototype.reportUnwantedToken=function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var t=o.getCurrentToken(),e="extraneous input "+this.getTokenErrorDisplay(t)+" expecting "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(e,t,null)}},Wt.prototype.reportMissingToken=function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var t=o.getCurrentToken(),e="missing "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames)+" at "+this.getTokenErrorDisplay(t);o.notifyErrorListeners(e,t,null)}},Wt.prototype.recoverInline=function(r){var t=this.singleTokenDeletion(r);if(null!==t)return r.consume(),t;if(this.singleTokenInsertion(r))return this.getMissingSymbol(r);throw new Vt(r)},Wt.prototype.singleTokenInsertion=function(o){var t=o.getTokenStream().LA(1),e=o._interp.atn,r=e.states[o.state].transitions[0].target;return!!e.nextTokens(r,o._ctx).contains(t)&&(this.reportMissingToken(o),!0)},Wt.prototype.singleTokenDeletion=function(o){var t=o.getTokenStream().LA(2);if(this.getExpectedTokens(o).contains(t)){this.reportUnwantedToken(o),o.consume();var e=o.getCurrentToken();return this.reportMatch(o),e}return null},Wt.prototype.getMissingSymbol=function(a){var t=a.getCurrentToken(),r=this.getExpectedTokens(a).first(),n;n=r===Ut.EOF?"<missing EOF>":"<missing "+a.literalNames[r]+">";var p=t,s=a.getTokenStream().LT(-1);return p.type===Ut.EOF&&null!==s&&(p=s),a.getTokenFactory().create(p.source,r,n,Ut.DEFAULT_CHANNEL,-1,-1,p.line,p.column)},Wt.prototype.getExpectedTokens=function(e){return e.getExpectedTokens()},Wt.prototype.getTokenErrorDisplay=function(r){if(null===r)return"<no token>";var t=r.text;return null===t&&(t=r.type===Ut.EOF?"<EOF>":"<"+r.type+">"),this.escapeWSAndQuote(t)},Wt.prototype.escapeWSAndQuote=function(e){return"'"+(e=(e=(e=e.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"},Wt.prototype.getErrorRecoverySet=function(a){for(var t=a._interp.atn,e=a._ctx,p=new qt;null!==e&&0<=e.invokingState;){var n=t.states[e.invokingState].transitions[0],o=t.nextTokens(n.followState);p.addSet(o),e=e.parentCtx}return p.removeOne(Ut.EPSILON),p},Wt.prototype.consumeUntil=function(o,t){for(var e=o.getTokenStream().LA(1);e!==Ut.EOF&&!t.contains(e);)o.consume(),e=o.getTokenStream().LA(1)},Yt.prototype=Object.create(Wt.prototype),Yt.prototype.constructor=Yt,Yt.prototype.recover=function(o,t){for(var e=o._ctx;null!==e;)e.exception=t,e=e.parentCtx;throw new Ft(t)},Yt.prototype.recoverInline=function(e){this.recover(e,new Vt(e))},Yt.prototype.sync=function(){};var Qt=yt.RecognitionException,Xt=Tt.ErrorListener,Jt=function(){function i(e,t,n){return a(this,i),r.call(this,{message:"Can not cast '".concat(t,"' into '").concat(n,"'"),input:e.parser.getInputStream(),recognizer:e.parser,ctx:e})}p(i,Qt);var r=v(i);return i}(),$t=function(e){return e===lib_3.STRING_CONSTANT?lib_3.STRING:e===lib_3.INTEGER_CONSTANT?lib_3.INTEGER:e===lib_3.NUMBER_CONSTANT?lib_3.NUMBER:e===lib_3.BOOLEAN_CONSTANT?lib_3.BOOLEAN:e===lib_3.DATE_FORMAT?lib_3.DATE:e===lib_3.NULL_CONSTANT?lib_3.NULL_CONSTANT:e},Zt=function(e){return e.start.type},te=function(o){var e=Object.entries(lib_3).find(function(t){return t[1]===o});return e?e[0]:"[unknown]"},ee=function(){function l(e,t,n){a(this,l);var o=te(t),i=te(n);return r.call(this,{message:"incompatible type, required '".concat(o,"' but found '").concat(i,"' for then operand"),input:e.parser.getInputStream(),recognizer:e.parser,ctx:e})}p(l,Qt);var r=v(l);return l}(),re=function(){function l(e,t,n,o){a(this,l);var i=te(n),p=te(o);return r.call(this,{message:"operator '".concat(t,"' cannot be applied to '").concat(i,"', '").concat(p,"'"),input:e.parser.getInputStream(),recognizer:e.parser,ctx:e})}p(l,Qt);var r=v(l);return l}(),ne=function(){function l(e,t,n){var o;a(this,l),o=Array.isArray(t)?t.map(function(e){return te(e)}).join(" or "):te(t);var p=te(n);return r.call(this,{message:"type mismatch, expected ".concat(o,", got ").concat(p),input:e.parser.getInputStream(),recognizer:e.parser,ctx:e})}p(l,Qt);var r=v(l);return l}();function oe(o){if(1>o.length)throw new Error("column list was empty");return function(t){return Object.entries(t).filter(function(t){var e=E(t,1)[0];return o.includes(e)}).map(function(r){var t=E(r,2);return t[0],t[1]}).reduce(function(r,t){return r+t},"")}}var ie=function(){function e(n){var d;return a(this,e),c(f(d=o.call(this)),"visitUnaryExpr",function(e){var a=e.op,t=e.right,o=d.exprVisitor.visit(t),r=[lib_3.INTEGER,lib_3.NUMBER];if(!r.includes(o.type))throw new ne(t,r,o.type);return{resolve:function(e){var t=o.resolve(e);return a.type===lib_3.PLUS?t:-t},type:o.type}}),c(f(d),"visitArithmeticExprOrConcat",function(e){if(e.op.type===lib_3.CONCAT)throw new Error("Arithmetic visitor got CONCAT context");return d.visitArithmeticExpr(e)}),c(f(d),"visitArithmeticExpr",function(e){var t=e.left,r=e.right,o=e.op,m=d.exprVisitor.visit(t),a=d.exprVisitor.visit(r),i=[lib_3.INTEGER,lib_3.NUMBER,lib_3.DATASET],c;if(!i.includes(m.type))throw new ne(t,i,m.type);if(!i.includes(a.type))throw new ne(r,i,a.type);var s=[m.type,a.type].includes(lib_3.NUMBER)?lib_3.NUMBER:lib_3.INTEGER,u,g;switch(o.type){case lib_3.PLUS:c=function(r,t){return r+t};break;case lib_3.MINUS:c=function(r,t){return r-t};break;case lib_3.MUL:c=function(r,t){return r*t};break;case lib_3.DIV:c=function(r,t){return r/t},s=lib_3.NUMBER;break;default:throw new Error("unknown operator ".concat(o.getText()));}if(m.type===lib_3.DATASET&&a.type===lib_3.DATASET){var x=(u=m.columns,g=a.columns,Object.fromEntries(Object.entries(u).filter(function(r){return Object.entries(g).some(function(t){return r.name===t.name&&r.role===t.role&&r.type===t.type})}))),f=Object.entries(x).filter(function(e){var t=E(e,2);return t[0],t[1].role===lib_3.DIMENSION}).map(function(e){return E(e,1)[0]}),y=Object.entries(x).filter(function(e){var t=E(e,2);return t[0],t[1].role===lib_3.MEASURE}).map(function(e){return E(e,1)[0]});return{type:lib_3.DATASET,columns:m.columns,resolve:function(n){var t=m.resolve(n),i=a.resolve(n),d,g,p;return t.join(i,oe(f),oe(f),(d=f,g=y,p=c,function(e,t){var r={},o=O(d),n;try{for(o.s();!(n=o.n()).done;){var a=n.value;r[a]=e[a]}}catch(e){o.e(e)}finally{o.f()}var s=O(g),u;try{for(s.s();!(u=s.n()).done;){var y=u.value;r[y]=p(e[y],t[y])}}catch(e){s.e(e)}finally{s.f()}return r}))}}}return{resolve:function(e){return c(m.resolve(e),a.resolve(e))},type:s}}),d.exprVisitor=n,d}p(e,lib_4);var o=v(e);return e}(),se=function(){function e(n){var p;return a(this,e),c(f(p=o.call(this)),"visitUnaryExpr",function(e){var t=e.right,r=p.exprVisitor.visit(t);if(r.type!==lib_3.BOOLEAN)throw new Error("Operand should be a boolean constant");return{resolve:function(e){return!r.resolve(e)},type:lib_3.BOOLEAN}}),c(f(p),"visitBooleanExpr",function(e){var t=e.left,r=e.right,o=e.op,i=p.exprVisitor.visit(t),a=p.exprVisitor.visit(r),s;if(i.type!==lib_3.BOOLEAN)throw new ne(t,lib_3.BOOLEAN,i.type);if(a.type!==lib_3.BOOLEAN)throw new ne(r,lib_3.BOOLEAN,a.type);switch(o.type){case lib_3.AND:s=function(r,t){return r&&t};break;case lib_3.OR:s=function(r,t){return r||t};break;case lib_3.XOR:s=function(r,t){return r!==t};break;default:throw new Error("unknown operator ".concat(o.getText()));}return{resolve:function(e){return s(i.resolve(e),a.resolve(e))},type:lib_3.BOOLEAN}}),p.exprVisitor=n,p}p(e,lib_4);var o=v(e);return e}(),ae=function(){function e(n){var p;return a(this,e),c(f(p=o.call(this)),"visitIfExpr",function(e){var t=e.conditionalExpr,r=e.thenExpr,o=e.elseExpr,n=p.exprVisitor.visit(t);if(n.type!==lib_3.BOOLEAN)throw new ne(t,lib_3.BOOLEAN,n.type);var i=p.exprVisitor.visit(r),a=p.exprVisitor.visit(o);if(i.type!==a.type)throw new ee(e,i.type,a.type);return{resolve:function(e){return n.resolve(e)?i.resolve(e):a.resolve(e)},type:$t(i.type)}}),c(f(p),"visitNvlAtom",function(e){var t=e.left,r=e.right,o=p.exprVisitor.visit(t),n=p.exprVisitor.visit(r);if(o.type!==lib_3.NULL_CONSTANT&&o.type!==n.type)throw new ee(e,o.type,n.type);return{resolve:function(e){return o.resolve(e)?o.resolve(e):n.resolve(e)},type:$t(o.type)}}),p.exprVisitor=n,p}p(e,lib_4);var o=v(e);return e}(),ue={string:lib_3.STRING,number:lib_3.NUMBER,boolean:lib_3.BOOLEAN},ce=function(e,t){var r=pe(e,t);if([lib_3.NUMBER,lib_3.STRING,lib_3.BOOLEAN,lib_3.NULL_CONSTANT].includes(r))return t[e];if(r===lib_3.DATASET)return function(i){var t=i.dataStructure,e=i.dataPoints,r=Object.keys(t),n=Object.keys(e);if(n&&n.length){var o=Object.values(e),p=o[0].map(function(r,n){return o.map(function(e){return e[n]})});return new DataFrame({rows:p,columnNames:r})}return new DataFrame}(t[e]);throw new Error("Cannot transform variable of type ".concat(r))},pe=function(e,t){var r=t[e];if(null===r)return lib_3.NULL_CONSTANT;var n=s(r);if(["string","number","boolean"].includes(n))return ue[n];if("object"===n){if(Object.keys(r).includes("dataStructure","dataPoints"))return lib_3.DATASET;throw new Error("The dataset shape is not good.")}throw new Error("Unrecognized variable type.")},le=function(){function o(e){var i;return a(this,o),c(f(i=n.call(this)),"visitVarIdExpr",function(r){var t=r.getText();return i.bindings[t]&&i.bindings[t].type?i.bindings[t]:{resolve:function(){return ce(t,i.bindings)},type:pe(t,i.bindings)}}),i.bindings=e,i}p(o,lib_4);var n=v(o);return o}(),he=function(){function e(){var n;a(this,e);for(var p=arguments.length,r=Array(p),i=0;i<p;i++)r[i]=arguments[i];return c(f(n=o.call.apply(o,[this].concat(r))),"visitConstantExpr",function(e){var t;switch(Zt(e)){case lib_3.STRING_CONSTANT:var o=e.getText();t=o.substring(1,o.length-1);break;case lib_3.INTEGER_CONSTANT:t=parseInt(e.getText());break;case lib_3.NUMBER_CONSTANT:t=parseFloat(e.getText());break;case lib_3.BOOLEAN_CONSTANT:t=JSON.parse(e.getText());break;case lib_3.DATE_FORMAT:t=e.getText();break;case lib_3.NULL_CONSTANT:t=null;break;default:throw new Error("Bad type");}return{resolve:function(){return t},type:$t(Zt(e))}}),n}p(e,lib_4);var o=v(e);return e}(),fe=function(){function e(n){var p;return a(this,e),c(f(p=o.call(this)),"visitComparisonExpr",function(e){var t=e.left,r=e.right,o=e.op,i=p.exprVisitor.visit(t),a=p.exprVisitor.visit(r),s=[lib_3.INTEGER,lib_3.NUMBER],l;if(i.type!==a.type){if(!s.includes(i.type))throw new ne(t,s,i.type);if(!s.includes(a.type))throw new ne(r,s,a.type)}switch(o.children[0].symbol.type){case lib_3.MT:l=function(r,t){return r>t};break;case lib_3.LT:l=function(r,t){return r<t};break;case lib_3.ME:l=function(r,t){return r>=t};break;case lib_3.LE:l=function(r,t){return r<=t};break;case lib_3.EQ:l=function(r,t){return r===t};break;case lib_3.NEQ:l=function(r,t){return r!==t};break;default:throw new Error("Unsupported operator "+o.getText());}return{resolve:function(e){return l(i.resolve(e),a.resolve(e))},type:lib_3.BOOLEAN}}),p.exprVisitor=n,p}p(e,lib_4);var o=v(e);return e}(),ye=function(){var e=Number.isInteger;function o(n){var d;return a(this,o),c(f(d=i.call(this)),"visitCastExprDataset",function(o){var t=o.expr(),r=o.basicScalarType()||o.valueDomainName(),n=o.STRING_CONSTANT(),i=d.exprVisitor.visit(t),a=n?n.getText().substring(1,n.getText().length-1):void 0;if(i.type===lib_3.NULL_CONSTANT)return{resolve:function(){return null},type:lib_3.NULL_CONSTANT};var s=[[lib_3.INTEGER,lib_3.INTEGER,function(e){return e}],[lib_3.INTEGER,lib_3.NUMBER,function(e){return e}],[lib_3.INTEGER,lib_3.BOOLEAN,function(e){return 0!==e}],[lib_3.INTEGER,lib_3.TIME,"ERROR"],[lib_3.INTEGER,lib_3.DATE,"ERROR"],[lib_3.INTEGER,lib_3.TIME_PERIOD,"ERROR"],[lib_3.INTEGER,lib_3.STRING,function(e){return"".concat(e)}],[lib_3.INTEGER,lib_3.DURATION,"ERROR"],[lib_3.NUMBER,lib_3.INTEGER,function(t){if(!e(t))throw new Jt(o,t,lib_3.NUMBER);return parseInt(t,10)}],[lib_3.NUMBER,lib_3.NUMBER,function(e){return e}],[lib_3.NUMBER,lib_3.BOOLEAN,function(e){return 0!==e}],[lib_3.NUMBER,lib_3.TIME,"ERROR"],[lib_3.NUMBER,lib_3.DATE,"ERROR"],[lib_3.NUMBER,lib_3.TIME_PERIOD,"ERROR"],[lib_3.NUMBER,lib_3.STRING,function(e){return"".concat(e)}],[lib_3.NUMBER,lib_3.DURATION,"ERROR"],[lib_3.BOOLEAN,lib_3.INTEGER,function(e){return e?1:0}],[lib_3.BOOLEAN,lib_3.NUMBER,function(e){return e?1:0}],[lib_3.BOOLEAN,lib_3.BOOLEAN,function(e){return e}],[lib_3.BOOLEAN,lib_3.TIME,"ERROR"],[lib_3.BOOLEAN,lib_3.DATE,"ERROR"],[lib_3.BOOLEAN,lib_3.TIME_PERIOD,"ERROR"],[lib_3.BOOLEAN,lib_3.STRING,function(e){return"".concat(e)}],[lib_3.BOOLEAN,lib_3.DURATION,"ERROR"],[lib_3.TIME,lib_3.INTEGER,function(){return"TODO"}],[lib_3.TIME,lib_3.NUMBER,function(){return"TODO"}],[lib_3.TIME,lib_3.BOOLEAN,function(){return"TODO"}],[lib_3.TIME,lib_3.TIME,function(){return"TODO"}],[lib_3.TIME,lib_3.DATE,function(){return"TODO"}],[lib_3.TIME,lib_3.TIME_PERIOD,function(){return"TODO"}],[lib_3.TIME,lib_3.STRING,function(){return"TODO"}],[lib_3.TIME,lib_3.DURATION,function(){return"TODO"}],[lib_3.DATE,lib_3.INTEGER,function(){return"TODO"}],[lib_3.DATE,lib_3.NUMBER,function(){return"TODO"}],[lib_3.DATE,lib_3.BOOLEAN,function(){return"TODO"}],[lib_3.DATE,lib_3.TIME,function(){return"TODO"}],[lib_3.DATE,lib_3.DATE,function(){return"TODO"}],[lib_3.DATE,lib_3.TIME_PERIOD,function(){return"TODO"}],[lib_3.DATE,lib_3.STRING,function(r,t){return function(r,t){return moment(r).format(t)}(r,t)}],[lib_3.DATE,lib_3.DURATION,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.INTEGER,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.NUMBER,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.BOOLEAN,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.TIME,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.DATE,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.TIME_PERIOD,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.STRING,function(){return"TODO"}],[lib_3.TIME_PERIOD,lib_3.DURATION,function(){return"TODO"}],[lib_3.STRING,lib_3.INTEGER,function(t){if(!e(+t))throw new Jt(o,t,lib_3.INTEGER);return parseInt(t,10)}],[lib_3.STRING,lib_3.NUMBER,function(t){if(!e(parseInt(t,10)))throw new Jt(o,t,lib_3.NUMBER);return parseFloat(t)}],[lib_3.STRING,lib_3.BOOLEAN,"ERROR"],[lib_3.STRING,lib_3.TIME,function(){return"TODO"}],[lib_3.STRING,lib_3.DATE,function(r,t){return function(r,t){return moment(r).format(t)}(r,t)}],[lib_3.STRING,lib_3.TIME_PERIOD,function(){return"TODO"}],[lib_3.STRING,lib_3.STRING,function(e){return e}],[lib_3.STRING,lib_3.DURATION,function(){return"TODO"}],[lib_3.DURATION,lib_3.INTEGER,"ERROR"],[lib_3.DURATION,lib_3.NUMBER,"ERROR"],[lib_3.DURATION,lib_3.BOOLEAN,"ERROR"],[lib_3.DURATION,lib_3.TIME,"ERROR"],[lib_3.DURATION,lib_3.DATE,"ERROR"],[lib_3.DURATION,lib_3.TIME_PERIOD,"ERROR"],[lib_3.DURATION,lib_3.STRING,function(e){return"".concat(e)}],[lib_3.DURATION,lib_3.DURATION,function(e){return e}]],c=r.children[0].symbol.type,p=s.filter(function(o){var t=E(o,2),e=t[0],r=t[1];return e===i.type&&r===c});if(1!==p.length)throw new re(o,"Cast",i.type,c);var l=p[0][2];if("function"!=typeof l)throw new Jt(o,i.type,c);return{resolve:function(e){return l(i.resolve(e),a)},type:c}}),d.exprVisitor=n,d}p(o,lib_4);var i=v(o);return o}(),ve=function(){function e(n){var i;return a(this,e),c(f(i=o.call(this)),"visitIsNullAtom",function(e){var r=i.exprVisitor.visit(e.expr());return{resolve:function(e){return null===r.resolve(e)},type:lib_3.BOOLEAN}}),i.exprVisitor=n,i}p(e,lib_4);var o=v(e);return e}(),Ee=function(){function e(n){var p;return a(this,e),c(f(p=o.call(this)),"visitArithmeticExprOrConcat",function(e){if(e.op.type!==lib_3.CONCAT)throw new Error("Concat visitor got arithmetic context");var t=e.left,r=e.right,o=p.exprVisitor.visit(t),n=p.exprVisitor.visit(r);if(o.type!==n.type||n.type!==lib_3.STRING)throw new Error("cannot concat ".concat(t.getText()," with ").concat(r.getText()));return{resolve:function(e){return o.resolve(e)+n.resolve(e)},type:o.type}}),p.exprVisitor=n,p}p(e,lib_4);var o=v(e);return e}(),de=function(){var e=Math.round,i=Math.pow;function s(n){var p=Math.log,l;return a(this,s),c(f(l=o.call(this)),"visitUnaryNumeric",function(e){var t=e.op,r=l.exprVisitor.visit(e.expr()),a,i;if(![lib_3.INTEGER,lib_3.NUMBER].includes(r.type))throw new Error("Operand should be a number or an integer");switch(t.type){case lib_3.ABS:a=function(e){return Math.abs(e)},i=r.type;break;case lib_3.CEIL:a=function(e){return Math.ceil(e)},i=lib_3.INTEGER;break;case lib_3.EXP:a=function(e){return Math.exp(e)},i=lib_3.NUMBER;break;case lib_3.FLOOR:a=function(e){return Math.floor(e)},i=lib_3.INTEGER;break;case lib_3.LN:a=function(e){return p(e)},i=lib_3.NUMBER;break;case lib_3.SQRT:a=function(e){return Math.sqrt(e)},i=lib_3.NUMBER;break;default:throw new Error("unknown operator ".concat(t.getText()));}return{resolve:function(e){return a(r.resolve(e))},type:i}}),c(f(l),"visitUnaryWithOptionalNumeric",function(r){var t=r.op,p=l.exprVisitor.visit(r.expr()),s=r.optionalExpr()&&r.optionalExpr().expr()?l.exprVisitor.visit(r.optionalExpr().expr()):null,a,d;if(![lib_3.INTEGER,lib_3.NUMBER].includes(p.type))throw new Error("The first operand should be a number or an integer");if(s&&s.type!==lib_3.INTEGER)throw new Error("The second operand should be an integer");switch(t.type){case lib_3.ROUND:a=function(o,t){return t&&t!=lib_3.OPTIONAL?e(o*i(10,t))/i(10,t):e(o)},d=lib_3.NUMBER;break;case lib_3.TRUNC:a=function(e,t){var r=Math.trunc;return t&&t!=lib_3.OPTIONAL?r(e*i(10,t))/i(10,t):r(e)},d=lib_3.NUMBER;break;default:throw new Error("unknown operator ".concat(t.getText()));}return{resolve:function(e){return a(p.resolve(e),s?s.resolve(e):null)},type:d}}),c(f(l),"visitBinaryNumeric",function(e){var t=e.left,r=e.right,o=e.op,s=l.exprVisitor.visit(t),a=l.exprVisitor.visit(r),d=[lib_3.INTEGER,lib_3.NUMBER],c;if(!d.includes(s.type)||!d.includes(a.type))throw new Error("Both operands should be numbers or integers");var u=lib_3.NUMBER;switch(o.type){case lib_3.LOG:c=function(r,t){return p(r)/p(t)},u=lib_3.NUMBER;break;case lib_3.MOD:c=function(r,t){return 0==t?r:r%t},u=s.type==lib_3.INTEGER&&a.type==lib_3.INTEGER?lib_3.INTEGER:lib_3.NUMBER;break;case lib_3.POWER:c=function(r,t){return i(r,t)},u=s.type==lib_3.INTEGER&&a.type==lib_3.INTEGER?lib_3.INTEGER:lib_3.NUMBER;break;default:throw new Error("unknown operator ".concat(o.getText()));}return{resolve:function(e){return c(s.resolve(e),a.resolve(e))},type:u}}),l.exprVisitor=n,l}p(s,lib_4);var o=v(s);return s}(),Te=function(){function e(n){var d;return a(this,e),c(f(d=o.call(this)),"visitUnaryStringFunction",function(e){var t=e.op,r=d.exprVisitor.visit(e.expr()),o;if(r.type!==lib_3.STRING)throw new ne(e.expr(),lib_3.STRING,t.type);var a=lib_3.STRING;switch(t.type){case lib_3.TRIM:o=function(e){return e.trim()};break;case lib_3.LTRIM:o=function(e){return e.trimLeft()};break;case lib_3.RTRIM:o=function(e){return e.trimRight()};break;case lib_3.UCASE:o=function(e){return e.toUpperCase()};break;case lib_3.LCASE:o=function(e){return e.toLowerCase()};break;case lib_3.LEN:o=function(e){return e.length},a=lib_3.INTEGER;break;default:throw new Error("unknown operator ".concat(t.getText()));}return{resolve:function(e){return o(r.resolve(e))},type:a}}),c(f(d),"checkType",function(r,t){var e=d.exprVisitor.visit(r);if(e.type!==t)throw new ne(r,t,e.type);return e}),c(f(d),"visitReplaceAtom",function(e){var t=E(e.expr(),2),r=t[0],o=t[1],n=d.checkType(r,lib_3.STRING),i=d.checkType(o,lib_3.STRING),a=e.optionalExpr()?e.optionalExpr():{resolve:function(){return""},type:lib_3.STRING},p=d.checkType(a,lib_3.STRING);return{resolve:function(r){var t=new RegExp(i.resolve(r),"g");return n.resolve(r).replace(t,p.resolve())},type:lib_3.STRING}}),c(f(d),"visitInstrAtom",function(e){var t=E(e.expr(),2),r=t[0],o=t[1],n=E(e.optionalExpr(),2),i=n[0],a=n[1],s=d.checkType(r,lib_3.STRING),c=d.checkType(o,lib_3.STRING),p=i&&i.expr()?d.checkType(i,lib_3.INTEGER):{resolve:function(){return 0},type:lib_3.INTEGER},l=a&&a.expr()?d.checkType(a,lib_3.INTEGER):{resolve:function(){return 1},type:lib_3.INTEGER};return{resolve:function(a){var t=s.resolve(a),e=c.resolve(a),r=p.resolve(a);if(0>r)throw new Error("start cannot be negative");var d=l.resolve(a);if(0>d)throw new Error("occurrence cannot be negative");for(var u=0;0<=--d;){if(-1===(u=t.indexOf(e,r)))return 0;r=u+1}return u},type:lib_3.INTEGER}}),c(f(d),"visitSubstrAtom",function(e){if(4===e.children.length)throw new Error("Invalid number of operands for function substr");var t=E(e.optionalExpr(),2),r=t[0],o=t[1],n=d.checkType(e.expr(),lib_3.STRING),i=d.checkType(r,lib_3.INTEGER),a=d.checkType(o,lib_3.INTEGER);return{resolve:function(e){return n.resolve(e).substr(i.resolve(e),a.resolve(e))},type:lib_3.STRING}}),d.exprVisitor=n,d}p(e,lib_4);var o=v(e);return e}(),Oe=function(){function e(n){var p;return a(this,e),c(f(p=o.call(this)),"visitAggrDataset",function(e){var t=e.op,r=p.exprVisitor.visit(e.expr()),a,i;if(r.type!==lib_3.DATASET)throw new ne(e.expr(),lib_3.DATASET,t.type);switch(t.type){case lib_3.COUNT:a=function(e){return e.count()},i=lib_3.NUMBER;break;default:throw new Error("unknown operator ".concat(t.getText()));}return{resolve:function(e){return a(r.resolve(e))},type:i}}),c(f(p),"visitAnSimpleFunction",function(e){var t=e.op,r=p.exprVisitor.visit(e.expr()),a,i;if(r.type!==lib_3.DATASET)throw new ne(e.expr(),lib_3.DATASET,t.type);switch(t.type){case lib_3.FIRST_VALUE:a=function(e){return function(e){return e&&e.content&&e.content.values&&e.content.values.rows&&e.content.values.rows[0]||null}(e)},i=lib_3.DATASET;break;case lib_3.LAST_VALUE:a=function(e){return function(r){var t=r&&r.content&&r.content.values&&r.content.values.rows&&r.content.values.rows;return t?t[t.length-1]:null}(e)},i=lib_3.DATASET;break;default:throw new Error("unknown operator ".concat(t.getText()));}return{resolve:function(e){return a(r.resolve(e))},type:i}}),p.exprVisitor=n,p}p(e,lib_4);var o=v(e);return e}(),ge=function(){function e(){var o;return a(this,e),c(f(o=r.call(this)),"visitCurrentDateAtom",function(){return{resolve:function(){return moment()},type:lib_3.DATE}}),o}p(e,lib_4);var r=v(e);return e}(),Ne=function(){function e(n){var i;return a(this,e),c(f(i=o.call(this)),"visitComparisonExpr",function(e){return i.comparisonVisitor.visit(e)}),c(f(i),"visitArithmeticExpr",function(e){return i.arithmeticVisitor.visit(e)}),c(f(i),"visitArithmeticExprOrConcat",function(e){return e.op.type===lib_3.CONCAT?new Ee(f(i)).visit(e):i.arithmeticVisitor.visit(e)}),c(f(i),"visitUnaryExpr",function(e){return e.op.type===lib_3.NOT?i.booleanAlgebraVisitor.visit(e):i.arithmeticVisitor.visit(e)}),c(f(i),"visitBooleanExpr",function(e){return i.booleanAlgebraVisitor.visit(e)}),c(f(i),"visitParenthesisExpr",function(e){return i.visit(e.expr())}),c(f(i),"visitIfExpr",function(e){return i.ifThenElseVisitor.visit(e)}),c(f(i),"visitConditionalFunctions",function(e){return i.visit(e.conditionalOperators())}),c(f(i),"visitNvlAtom",function(e){return i.ifThenElseVisitor.visit(e)}),c(f(i),"visitOptionalExpr",function(e){return null===e.expr()?null:i.visit(e.expr())}),c(f(i),"visitFunctionsExpression",function(e){return i.visit(e.functions())}),c(f(i),"visitGenericFunctions",function(e){return i.visit(e.genericOperators())}),c(f(i),"visitTimeFunctions",function(e){return i.visit(e.timeOperators())}),c(f(i),"visitVarIdExpr",function(e){return i.variableVisitor.visit(e)}),c(f(i),"visitConstantExpr",function(e){return i.literalVisitor.visit(e)}),c(f(i),"visitCastExprDataset",function(e){return i.castFunctionVisitor.visit(e)}),c(f(i),"visitCurrentDateAtom",function(e){return i.dateFunctionVisitor.visit(e)}),c(f(i),"visitConcatExpr",function(e){return i.concatenationVisitor.visit(e)}),c(f(i),"visitStringFunctions",function(e){return i.stringFunctionVisitor.visit(e.stringOperators())}),c(f(i),"visitComparisonFunctions",function(e){return i.comparisonFunctionVisitor.visit(e.comparisonOperators())}),c(f(i),"visitNumericFunctions",function(e){return i.numericFunctionVisitor.visit(e.numericOperators())}),c(f(i),"visitAggregateFunctions",function(e){return i.datasetFunctionsVisitor.visit(e.aggrOperatorsGrouping())}),c(f(i),"visitAnalyticFunctions",function(e){return i.datasetFunctionsVisitor.visit(e.anFunction())}),i.bindings=n,i.arithmeticVisitor=new ie(f(i)),i.booleanAlgebraVisitor=new se(f(i)),i.castFunctionVisitor=new ye(f(i)),i.comparisonVisitor=new fe(f(i)),i.concatenationVisitor=new Ee(f(i)),i.dateFunctionVisitor=new ge(f(i)),i.ifThenElseVisitor=new ae(f(i)),i.literalVisitor=new he,i.comparisonFunctionVisitor=new ve(f(i)),i.numericFunctionVisitor=new de(f(i)),i.stringFunctionVisitor=new Te(f(i)),i.variableVisitor=new le(i.bindings),i.datasetFunctionsVisitor=new Oe(f(i)),i}p(e,lib_4);var o=v(e);return e}(),Re=function(){function n(){var e;return a(this,n),(e=i.call(this)).errors=[],e}p(n,Xt);var i=v(n),t,o;return t=n,(o=[{key:"syntaxError",value:function(a,t,e,r,n,o){null===o?this.errors.push(new Error(n)):this.errors.push(o)}},{key:"reportAmbiguity",value:function(o,t,e,r){console.warn("ambiguity ".concat(e,":").concat(r))}},{key:"reportAttemptingFullContext",value:function(o,t,e,r){console.warn("full context ".concat(e,":").concat(r))}},{key:"reportContextSensitivity",value:function(o,t,e,r){console.debug("context sensitivity ".concat(e,":").concat(r))}}])&&u(t.prototype,o),n}(),Se=function(e,t){var r=new lib_1(e);r.removeErrorListeners(),r.addErrorListener(t);var o=new antlr4.CommonTokenStream(r),n=new lib_3(o);return n.removeErrorListeners(),n.addErrorListener(t),n.buildParseTrees=!0,n},Ie=function(t,e){return function(t,e){var r=new antlr4.InputStream(t),n=new Re;if(Se(r,n),0<n.errors.length)throw new Error("Syntax errors: ".concat(n.errors));r.reset();var o=new Re,i=Se(r,o),p=new Ne(e).visit(i.expr());if(0<o.errors.length)throw new Error("Type errors:\n\t ".concat(o.errors));return{type:p.type,resolve:function(){return p.resolve(e)}}}(t,e).resolve()},interpretVTL=function(e,t){return function(r){try{var o=Ie(r,t?e:replaceNullBindings(e));return o?o:r}catch(t){return r}}},interpretVTLWithEmptyDefault=function(e,t){return function(r){try{var o=Ie(r,t?e:replaceNullBindings(e,""));return o?o:""}catch(t){return""}}},replaceNullBindings=function(e,t){return e?Object.entries(e).reduce(function(e,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,null===a?t||n:a))},{}):{}},Link=function(e){var t=e.href,r=e.children,o=e.title;return t.trim().startsWith("http")?/*#__PURE__*/React__default["default"].createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener"},r):/*#__PURE__*/React__default["default"].createElement("span",{className:"link-md"},/*#__PURE__*/React__default["default"].createElement("span",{"data-for":"".concat(r,"-tooltip"),"data-tip":o,"data-event":"click focus","data-multiline":!0,className:"field-md"},r),/*#__PURE__*/React__default["default"].createElement(ReactTooltip__default["default"],{id:"".concat(r,"-tooltip"),className:"tooltip-content",place:"bottom",effect:"solid",globalEventOff:"click"}))},renderers={paragraph:function(e){return/*#__PURE__*/React__default["default"].createElement("p",{style:{margin:"0"}},e.children)},link:Link},interpretMD=function(e){return/*#__PURE__*/React__default["default"].createElement(ReactMarkdown__default["default"],{source:e,renderers:renderers})},interpret=function(e){return function(t,r){return function(o){if(!o)return"";if(!Array.isArray(e))return o;if(e.includes("VTL")){var n=interpretVTL(t,r)(o);return e.includes("MD")?interpretMD(n):n}return o}}},interpretWithEmptyDefault=function(e){return function(t,r){return function(o){if(!o)return"";if(!Array.isArray(e))return"";if(e.includes("VTL")){var n=interpretVTLWithEmptyDefault(t,r)(o);return e.includes("MD")?interpretMD(n):n}return""}}},getPage=function(e){var t=e.components,r=e.bindings,o=e.currentPage,n=e.features,a=e.depth,i=e.flow,p=e.management;if(o.includes("#")){var s=splitPage(o,a),l=s.currentRootPage,d=s.currentComponentIndex,c=s.currentIteration;if(i===FLOW_NEXT)return"".concat(l,".").concat(d+1,"#").concat(c);if(i===FLOW_PREVIOUS)return"".concat(l,".").concat(d-1,"#").concat(c);throw new Error("Unknown flow type: ".concat(i))}else{var u=getSimpleNewPage({components:t,bindings:r,currentPage:o,features:n,flow:i,management:p});return"".concat(parseInt(u,10))}},getSimpleNewPage=function(e){var t=e.components,r=e.bindings,o=e.currentPage,n=e.features,a=e.flow,i=e.management;return(a===FLOW_PREVIOUS?t.slice().reverse():t).filter(function(e){var t=e.page;switch(a){case FLOW_NEXT:return parseInt(t,10)>parseInt(o,10);case FLOW_PREVIOUS:return parseInt(t,10)<parseInt(o,10);default:throw new Error("Unknown type");}}).reduce(function(e,t){var o=t.conditionFilter,a=t.page;return e?e:i?a:o&&"normal"!==interpret(n)(r,!0)(o)?null:a},null)},splitPage=function(e,t){var r=t?e.split(".").slice(0,t+1)// scoped
1736
- .join("."):e,o=r.split("#").slice(0,-1).join("#"),n=r.split(".").map(function(t){return t.split("#")[0]}).join("."),a=o.split(".").slice(0,-1).join("."),i=r.split(".").pop().split("#").map(function(e){return parseInt(e,10)}),p=_slicedToArray(i,2),s=p[0],l=p[1];return{currentRootPage:a,currentComponentIndex:s,currentIteration:l,currentPageWithoutAnyIteration:n}},declarations=PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({id:PropTypes__default["default"].string.isRequired,declarationType:PropTypes__default["default"].oneOf([INSTRUCTION,COMMENT,HELP,WARNING,MESSAGE_FILTER,STATEMENT]),position:PropTypes__default["default"].oneOf([BEFORE_QUESTION_TEXT,AFTER_QUESTION_TEXT,DETACHABLE]),label:PropTypes__default["default"].string.isRequired})).isRequired,options=PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({label:PropTypes__default["default"].string.isRequired,value:PropTypes__default["default"].string.isRequired})),response=PropTypes__default["default"].shape({name:PropTypes__default["default"].string,values:PropTypes__default["default"].shape({})}),valueType=PropTypes__default["default"].oneOf(["COLLECTED","PREVIOUS","FORCED","EDITED","INPUTED"]),lines=PropTypes__default["default"].shape({min:PropTypes__default["default"].number,max:PropTypes__default["default"].number}),getResponseName=function(e){return e&&e.name||""},getResponseByPreference=function(e){return function(t){return t&&t.values?e.reduce(function(e,r){var o=t.values[r];return null===o?e:o},null):null}},buildStyleObject=function e(t){return t?Object.entries(t).reduce(function(t,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return n.startsWith(":")?t[n]=e(a):t[camelCase__default["default"](n)]=a,t},{}):{}},isResponseEmpty=function(e){return 0===Object.values(e.values).filter(function(e){return null!==e}).length},getRosterInitLines=function(e){return Array.isArray(e)?e.filter(function(e){return e.filter(function(e){var t=e.response;return!t}).length!==e.length}).reduce(function(e,t){return[].concat(_toConsumableArray(e),[t.reduce(function(e,t){var r=t.response,o=t.label;return!!o||(e||!r?e:!isResponseEmpty(r))},!1)])},[]).filter(function(e){return e}).length:0},buildTooltip=function(e){if(!e||!e.values||0===Object.keys(e.values).length)return{};var t=e.values,r=t[EDITED],o=t[FORCED],n=t[COLLECTED];return""!==r||has(o)||has(n)?has(r)?has(o)?{content:[{key:"Brute",value:n||" - "},{key:"Correction automatique",value:o}],imgName:"editedImg"}:{content:[{key:"Brute",value:n||" - "}],imgName:"editedImg"}:has(o)?{content:[{key:"Brute",value:n||" - "}],imgName:"forcedImg"}:{}:{}},has=function(e){return![null,void 0].includes(e)},INITIAL_DEPTH=1,mergeQuestionnaireAndData=function(e){return function(t){if(!e||!e.components)return{};if(0===e.components.length)return e;var r=e.components,o=e.variables,n=_objectWithoutProperties(e,["components","variables"]),a=buildVars(t||{})(o),i=buildFilledComponents(a[COLLECTED])(r)(INITIAL_DEPTH);return _objectSpread2(_objectSpread2({},n),{},{components:i,variables:a})}},buildVars=function(e){return function(t){if(!Array.isArray(t))return{};var r=e.COLLECTED,o=t.filter(function(e){var t=e.variableType;return t===COLLECTED}).reduce(function(e,t){var o=t.values,n=t.name,a=t.componentRef,i=r&&r[n]||{};return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},n,{componentRef:a,values:_objectSpread2(_objectSpread2({},o),i)}))},{}),n=t.filter(function(e){var t=e.variableType;return t===EXTERNAL}).reduce(function(t,r){return _objectSpread2(_objectSpread2({},t),initExternalVariable(r)(e))},{});return{EXTERNAL:n,COLLECTED:o,CALCULATED:t.filter(function(e){var t=e.variableType;return t===CALCULATED}).reduce(function(e,t){return _objectSpread2(_objectSpread2({},e),initCalculatedVariable(t)(_objectSpread2(_objectSpread2({},n),o)))},{})}}},buildFilledComponents=function(e){return function(t){return function(r){return t.map(function(t){var o=_objectSpread2({depth:r},t);return buildFilledComponent(e)(o)})}}},buildFilledComponent=function(e){return function(t){if(t.response)return buildResponseComponent(e)(t);return t.responses?buildResponsesComponent(e)(t):t.cells?buildCellsComponent(e)(t):t.components?buildComponentsComponent(e)(t):t}},buildResponseComponent=function(e){return function(t){return _objectSpread2(_objectSpread2({},t),{},{response:{name:t.response.name,values:e[t.response.name].values}})}},buildResponsesComponent=function(e){return function(t){var r=t.responses,o=_objectWithoutProperties(t,["responses"]),n=r.map(function(t){return buildResponseComponent(e)(t)});return _objectSpread2(_objectSpread2({},o),{},{responses:n})}},buildCellsComponent=function(e){return function(t){var r=t.cells,o=t.depth,n=_objectWithoutProperties(t,["cells","depth"]),a=r.map(function(t){return buildFilledComponents(e)(t)(o)});return _objectSpread2(_objectSpread2({},n),{},{depth:o,cells:a})}},buildComponentsComponent=function(e){return function(t){var r=t.components,o=t.depth,n=_objectWithoutProperties(t,["components","depth"]),a=buildFilledComponents(e)(r)(o+1);return _objectSpread2(_objectSpread2({},n),{},{depth:o,components:a})}},initExternalVariable=function(e){var t=e.name;return function(e){return _defineProperty({},t,e&&e.EXTERNAL&&e.EXTERNAL[t]||null)}},initCalculatedVariable=function(e){var t=e.name,r=e.expression;return function(e){var o=Object.entries(e).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1];return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,"string"==typeof n||null===n?n:n.values[COLLECTED]))},{});return _defineProperty({},t,{expression:r,value:interpret(["VTL"])(o)(r)})}},supportedPreferences=[PREVIOUS,COLLECTED,FORCED,EDITED,INPUTED],updateQuestionnaire=function(e){return function(t){return function(o){return function(n){if(!supportedPreferences.includes(e)||0===o.length||!n)return t;var a=t.variables,i=t.components,p=_objectWithoutProperties(t,["variables","components"]);if(!i||0===i.length)return t;var s=Object.entries(n).reduce(function(t,r){var n=_slicedToArray(r,2),a=n[0],i=n[1],p=t.newVariables,s=p.COLLECTED,l=_objectWithoutProperties(p,["COLLECTED"]),d=t.refs,c=s[a],u=c.componentRef,y=c.values,m={componentRef:u,values:_objectSpread2(_objectSpread2({},y),{},_defineProperty({},e,buildNewValue(o)(e)(y)(i)))},g=_objectSpread2(_objectSpread2({},s),{},_defineProperty({},a,m));return{newVariables:_objectSpread2(_objectSpread2({},l),{},{COLLECTED:g}),refs:[].concat(_toConsumableArray(d),[u])}},{newVariables:a,refs:[]}),l=s.newVariables,d=s.refs,r=e===COLLECTED?addCalculatedVars(l):l,u=l[COLLECTED],y=i.map(function(e){return d.includes(e.id)?buildFilledComponent(u)(e):e});return _objectSpread2(_objectSpread2({},p),{},{variables:r,components:y})}}}},buildNewValue=function(e){return function(t){return function(r){return function(o){if(1===e.length)return o;var n=e.indexOf(t);if(1>n)return o;var a=e.slice(0,n).map(function(e){return r[e]}).filter(function(e){return null!==e}),i=a[a.length-1];return i===o?null:o}}}},addCalculatedVars=function(e){if(!e[CALCULATED]||0===Object.keys(e[CALCULATED]).length)return e;var t=e.COLLECTED,r=e.EXTERNAL,o=e.CALCULATED,n=Object.entries(t).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1].values;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n[COLLECTED]))},{}),a=buildVectorialBindings(_objectSpread2(_objectSpread2({},n),r)),i=Object.entries(o).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1].expression,i=interpret(["VTL"])(a)(n),p=Array.isArray(i)?i.join(","):i;// Assume that a calculated variable has a first level scope
1737
- // If we need to handle deep calculated variables, we have to
1738
- // update the shape of bindings, grouping vars by type
1739
- return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,{expression:n,value:p}))},{});return{EXTERNAL:r,COLLECTED:t,CALCULATED:i}},buildMultiTooltipResponse=function(e){return function(t){if(!t||0===Object.keys(t).length||!e)return{};var r=t.name,o=t.values,n=Object.entries(o).reduce(function(t,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return null===a?_objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,a)):_objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,e.find(function(e){return e.value===a}).label))},{});return{name:r,values:n}}},buildBooleanTooltipResponse=function(e){if(!e||0===Object.keys(e).length)return{};var t=e.name,r=e.values,o=Object.entries(r).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1];return null===n?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n)):_objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n?"Vrai":"Faux"))},{});return{name:t,values:o}},buildLocalResponse=function(e,t){if(!e||0===Object.keys(e).length)return{};var r=e.name,o=e.values,n=buildNewValue([COLLECTED,FORCED,EDITED])(EDITED)(o)(t);return{name:r,values:_objectSpread2(_objectSpread2({},o),{},{EDITED:n})}};function styleInject(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r?o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z$f=".breadcrumb-lunatic {\n width: 100%;\n height: 40px;\n box-sizing: border-box;\n border-radius: 0px;\n background-color: var(--color-primary-light);\n color: white;\n font-weight: bold;\n font-size: 130%;\n padding-left: 10px;\n display: flex;\n align-items: center;\n}\n\n.breadcrumb-element-lunatic:before {\n content: \">\";\n color: white;\n margin-left: 0.4em;\n margin-right: 0.4em;\n}";styleInject(".breadcrumb-lunatic {\n width: 100%;\n height: 40px;\n box-sizing: border-box;\n border-radius: 0px;\n background-color: var(--color-primary-light);\n color: white;\n font-weight: bold;\n font-size: 130%;\n padding-left: 10px;\n display: flex;\n align-items: center;\n}\n\n.breadcrumb-element-lunatic:before {\n content: \">\";\n color: white;\n margin-left: 0.4em;\n margin-right: 0.4em;\n}");var Breadcrumb=function(e){var t=e.elements,r=e.style;return/*#__PURE__*/React__default["default"].createElement("div",{"aria-label":"breadcrumb",className:"breadcrumb-lunatic",style:buildStyleObject(r)},t.map(function(t,e){return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,{key:"breadcrumb-".concat(t.toLowerCase())},t&&/*#__PURE__*/React__default["default"].createElement("span",{className:0===e?void 0:"breadcrumb-element-lunatic"},t))}))};Breadcrumb.propTypes={elements:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string).isRequired,style:PropTypes__default["default"].object};var css_248z$e=".button-lunatic {\n min-width: 20%;\n color: white;\n border-color: var(--color-primary-dark);\n background-color: var(--color-primary-dark);\n font-size: 1.5em;\n font-weight: bold;\n padding: 0.4em;\n}\n.button-lunatic:hover, .button-lunatic:focus:hover {\n color: var(--color-primary-dark);\n background-color: white;\n border-color: var(--color-primary-dark);\n}\n.button-lunatic:focus {\n outline: none;\n background-color: var(--color-primary-light);\n border-color: var(--color-primary-light);\n}\n.button-lunatic:disabled {\n background: var(--color-disabled);\n color: var(--color-primary-dark);\n}";styleInject(".button-lunatic {\n min-width: 20%;\n color: white;\n border-color: var(--color-primary-dark);\n background-color: var(--color-primary-dark);\n font-size: 1.5em;\n font-weight: bold;\n padding: 0.4em;\n}\n.button-lunatic:hover, .button-lunatic:focus:hover {\n color: var(--color-primary-dark);\n background-color: white;\n border-color: var(--color-primary-dark);\n}\n.button-lunatic:focus {\n outline: none;\n background-color: var(--color-primary-light);\n border-color: var(--color-primary-light);\n}\n.button-lunatic:disabled {\n background: var(--color-disabled);\n color: var(--color-primary-dark);\n}");var Button=function(e){var t=e.label,r=e.value,o=e.onClick,n=e.disabled,a=e.style;return/*#__PURE__*/React__default["default"].createElement("button",{type:"button","aria-label":t||"button",className:"button-lunatic",style:buildStyleObject(a),disabled:n,onClick:o},r)};Button.propTypes={value:PropTypes__default["default"].string.isRequired,disabled:PropTypes__default["default"].bool,onClick:PropTypes__default["default"].func.isRequired};var getState=function(e){var t=e.variables,r;return r={},_defineProperty(r,CALCULATED,getCalculatedFromVariables(t)),_defineProperty(r,COLLECTED,getCollectedState(e)),_defineProperty(r,EXTERNAL,getExternalFromVariables(t)),r},getCollectedState=function(e){var t=e.variables;return t&&t[COLLECTED]&&Object.entries(t[COLLECTED]).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1].values;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n))},{})||{}},getCalculatedFromVariables=function(e){return e&&e[CALCULATED]?Object.entries(e[CALCULATED]).reduce(function(e,t){var r=_slicedToArray(t,2),o=r[0],n=r[1].value;return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},o,n))},{}):{}},getExternalFromVariables=function(e){return e&&e[EXTERNAL]||{}},getCollectedStateByValueType=function(e){return function(t,r){return["PREVIOUS","COLLECTED","FORCED","EDITED","INPUTED"].includes(t)?Object.entries(getCollectedState(e)).reduce(function(e,o){return r||null!==o[1][t]?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},o[0],o[1][t])):e},{}):{}}},getBindings=function(e){var t=e.variables;return _objectSpread2(_objectSpread2(_objectSpread2({},getCollectedStateByValueType(e)("COLLECTED",!0)),getCalculatedFromVariables(t)),getExternalFromVariables(t))},customFilterPagination=function(e,t,r){var o=e.page;return!t||r.split(".")[0]===o},filterComponents=function(e,t,r,o,n,a){return t&&!a?e:t&&a?e.filter(function(e){return customFilterPagination(e,a,n)}):a?e.filter(function(e){return customFilterPagination(e,a,n)}).filter(function(e){var t=e.conditionFilter;return!t||"normal"===interpret(o)(r,!0)(t)}):e.filter(function(e){var t=e.conditionFilter;return!t||"normal"===interpret(o)(r,!0)(t)})},useLunatic=function(e,t,r){var o=r.savingType,n=void 0===o?COLLECTED:o,a=r.preferences,i=void 0===a?[COLLECTED]:a,p=r.features,s=void 0===p?["VTL"]:p,l=r.management,d=void 0!==l&&l,c=r.pagination,u=r.initialPage,y=void 0===u?"1":u,m=React.useState(mergeQuestionnaireAndData(e)(t||{})),g=_slicedToArray(m,2),E=g[0],f=g[1],x=React.useState({}),T=_slicedToArray(x,2),R=T[0],h=T[1],C=React.useState(y),A=_slicedToArray(C,2),_=A[0],N=A[1],O=React.useState(FLOW_NEXT),I=_slicedToArray(O,2),S=I[0],L=I[1],v=e.maxPage,b=s.filter(function(e){return"MD"!==e}),k="1"===_,P=_===v,D=React.useCallback(function(e){h(e)},[]);React.useEffect(function(){f(mergeQuestionnaireAndData(e)(t))},[e]),React.useEffect(function(){if(0!==Object.keys(R).length){var e=updateQuestionnaire(n)(E)(i)(R);f(e),h({})}},[R,i,E,n,s,d]);var M=getBindings(E),U=filterComponents(E.components,d,M,b,_,void 0!==c&&c);return{questionnaire:E,handleChange:D,components:U,bindings:M,pagination:{page:_,setPage:N,maxPage:v,goNext:function(){if(!P){S!==FLOW_NEXT&&L(FLOW_NEXT);var e=getPage({components:E.components,bindings:M,currentPage:_,features:b,flow:FLOW_NEXT,management:d});N(e)}},goPrevious:function(){if(!k){S!==FLOW_PREVIOUS&&L(FLOW_PREVIOUS);var e=getPage({components:E.components,bindings:M,currentPage:_,features:b,flow:FLOW_PREVIOUS,management:d});N(e)}},isFirstPage:k,isLastPage:P,flow:S}}},css_248z$d="@charset \"UTF-8\";\n.declarations-lunatic {\n margin-bottom: 0.4rem;\n}\n\n.declaration-instruction {\n font-style: italic;\n font-size: 80%;\n}\n\n.declaration-comment {\n font-size: 80%;\n}\n\n.declaration-statement {\n font-style: italic;\n font-size: 80%;\n color: blue;\n}\n\n.declaration-help {\n font-style: italic;\n font-size: 80%;\n color: green;\n}\n\n.declaration-warning {\n font-style: bold;\n font-size: 80%;\n color: red;\n}\n\n.declaration-message_filter {\n font-size: 100%;\n color: #494242;\n}\n.declaration-message_filter:before {\n content: \"\u2192 \";\n}";styleInject(css_248z$d);var Declarations=function(e){var t=e.id,r=e.type,o=e.declarations,n=e.features,a=e.bindings,i=o.filter(function(e){var t=e.position;return t===r});return/*#__PURE__*/React__default["default"].createElement("div",{id:"declarations-".concat(t,"-").concat(r),className:"declarations-lunatic"},i.map(function(e){var t=e.id,r=e.label,o=e.declarationType;return/*#__PURE__*/React__default["default"].createElement("div",{key:"".concat(t),className:"declaration-lunatic declaration-".concat(o.toLowerCase())},interpret(n)(a)(r))}))};Declarations.defaultProps={type:"AFTER_QUESTION_TEXT",declarations:[],features:[],bindings:{}},Declarations.propTypes={id:PropTypes__default["default"].string.isRequired,type:PropTypes__default["default"].string,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object};var RadioChecked=function(){return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"rgb(74,118,168)"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},RadioUnchecked=function(){return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"rgb(74,118,168)"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},CheckboxChecked=function(){return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"rgb(74,118,168)"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))},CheckboxUnchecked=function(){return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"rgb(74,118,168)"},/*#__PURE__*/React__default["default"].createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),/*#__PURE__*/React__default["default"].createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},css_248z$c=".list-icon-wrapper:focus-within svg {\n fill: var(--color-primary-dark);\n}\n\n.list-icon {\n position: absolute;\n margin-top: -0.1rem;\n}\n.list-icon.list-icon-disabled svg {\n background-color: var(--color-disabled);\n}";styleInject(css_248z$c);var Content=function(e){var t=e.type,r=e.checked;return"radio"===t?r?/*#__PURE__*/React__default["default"].createElement(RadioChecked,null):/*#__PURE__*/React__default["default"].createElement(RadioUnchecked,null):"checkbox"===t?r?/*#__PURE__*/React__default["default"].createElement(CheckboxChecked,null):/*#__PURE__*/React__default["default"].createElement(CheckboxUnchecked,null):null},Icon$2=function(e){var t=e.type,r=e.checked,o=e.disabled,n=e.children;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement("span",{className:"list-icon-wrapper"},/*#__PURE__*/React__default["default"].createElement("span",{className:"list-icon ".concat(o?"list-icon-disabled":"")},/*#__PURE__*/React__default["default"].createElement(Content,{type:t,checked:r})),n))},img$2=new Image;img$2.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAAGEMEXHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABjUExURf///8Xn9XrH6Va44zKp3Eiy4GW+5b7j9Kja8Bme2CSj2p7W7vH5/UGv34XM69vw+czq9iCh2ZbT7bfg82W94+33/Njt92zB5k+14XPE6On2+4vN6sLl9Mno9i+n3Cum2wAAAIfAWccAAAAhdFJOU///////////////////////////////////////////AJ/B0CEAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAEVSURBVChTVVIBcsMgDFODm2JKIFnTbvv/Ryfb0F11Z4ptWYBSYL8wFBk34A7kLwDCUIbBfkcIHppsM2tIVy61exRoQ0LFaa2NhLSiP7l/MA7no6rsdd+UI5SINQSvZKVsBXSB7N4plnFRyihxxrFdtxeep5qwYRFZx1ZK6735IMrmJSQOZR9sXKWZSKeaVdQVfftOirdG8kHjhXlFxZ0ZWezpwrclo4Q69ZUWZj28BPyobmbCQPYxR6HdE53leLyBpGIGEELHP7GGtB/DIyds+mathZ/BEBefyNSRMJxDwRggcXbMlSlGsPM9uWHpgKnRgPB/zBCd/yStLB3z1hK6wO+8zn7o+7sx47v/s9oOdgdoLAD8AWlNC8M57XWRAAAAAElFTkSuQmCC";var img$1=new Image;img$1.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAZCAMAAAFiGY6DAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABUUExURf///6zc8Uiy4PH5/d/x+b7j9Bme2DKp3CSj2la442W+5YnN61O34nrH6Z7W7tDr9yCh2bfg8+33/HPE6EGv35bT7U+14czq9nDD56XZ7+n2+wAAAJWny4EAAAAcdFJOU////////////////////////////////////wAXsuLXAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABKElEQVQoU2VSC3bDIAwzJRM0hCb0ldfd/6STDFm7TgnEX2GbGHExQ4PZoc0scT0MgC/6xkqZ+tC0x6y4E4zlU5VAs8I2Wrv0/PL/xzih4gKsCJVB1RZKsvXYrJntG7gXrM/ddgZ3JPDtBRHFSQYG1Ylgy9cUhStwdaGKO6tAdX0wCQi5tUyzK6oYYNHB+aDDBXhHcjtu09uHKgfTYGTUXMRDtCOU7HUU8ShH1CdWdj1FoS/3k+4vyB3Se6KV8tv6Bamm2Z3d+GWvuNmel4WC7A9+OUcV9AKr5PHEJHIxavjui4mOisf0/B7uiqwTrp9/gisa0wuycLTs3zlI2yl7QpTvDR8FlXy3jWq3hqBYjYpXPy/A7Lmu33GIMR1r3z6OPnFngYFXbfYDTw4LkdQNpj4AAAAASUVORK5CYII=";var img=/*#__PURE__*/Object.freeze({__proto__:null,editedImg:img$2,forcedImg:img$1}),css_248z$b="* {\n box-sizing: border-box;\n --color-primary-dark: #2a5885;\n --color-primary-light: #5181b8;\n --color-primary-main: #4a73a4;\n --color-primary-contrast-text: #ffffff;\n --color-secondary-dark: #14202d;\n --color-secondary-light: #f7f8fa;\n --color-secondary-main: #1a293b;\n --color-secondary-contrast-text: #ffffff;\n --color-very-light: #dbe4ef;\n --color-very-very-light: #e6eaee;\n --color-current-item: #0d823e;\n --color-error: #f50c0c;\n --color-disabled: rgb(235, 235, 228);\n --color-prefix: cornflowerblue;\n --color-dropdown-active: rgba(0, 0, 0, 0.04);\n --color-dropdown-selected: rgba(0, 0, 0, 0.08);\n --dropdown-transition-time: 0.5s;\n}\n\n.mandatory:after {\n content: \" *\";\n color: red;\n}\n\n.horizontal-options {\n display: inline-block;\n margin-right: 2em;\n}\n\nlabel,\nlegend,\n.subsequence-lunatic,\n.lunatic-dropdown-label,\n.lunatic-dropdown-label focused {\n color: var(--color-primary-dark);\n background-color: var(--color-primary-contrast-text);\n border: 0;\n padding: 0;\n font-size: 0.75rem;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n line-height: 0.75rem;\n font-weight: bold;\n margin-bottom: 0.375rem;\n}\n\n.label-top {\n display: flex;\n flex-direction: column;\n}\n\n.label-bottom {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.label-right {\n justify-content: flex-end;\n display: flex;\n flex-direction: row-reverse;\n align-items: baseline;\n}\n.label-right :first-child {\n margin-right: 1rem;\n}\n\n.label-left {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n}\n.label-left :first-child {\n margin-right: 1rem;\n}\n\n.field-container {\n display: flex;\n}\n\n.modality-label p {\n display: inline;\n}\n\n.tooltip {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.field-with-tooltip {\n width: calc(100% - 25px);\n position: relative;\n}\n\n.field {\n width: 100%;\n position: relative;\n}\n\n.field,\n.field-with-tooltip {\n display: flex;\n}\n.field .unit,\n.field-with-tooltip .unit {\n margin: auto 0;\n color: var(--color-primary-dark);\n font-weight: bold;\n}\n\n.link-md .field-md {\n border-bottom: dashed 0.1em var(--color-primary-dark);\n}\n.link-md .field-md:hover {\n cursor: help;\n color: var(--color-primary-contrast-text);\n background-color: var(--color-primary-dark);\n}\n\n.link-md .tooltip-content {\n min-width: 15em;\n max-width: 25em;\n background: var(--color-primary-dark);\n color: var(--color-primary-contrast-text);\n padding: 0.5em;\n border-radius: 6px;\n font-size: 1em;\n}\n.link-md .tooltip-content.place-bottom::before {\n border-bottom: 10px solid var(--color-primary-dark);\n}\n.link-md .tooltip-content.place-bottom::after {\n content: none;\n}\n\n/* Tooltip container */\n.tooltip-lunatic {\n position: relative;\n display: inline-block;\n align-items: center;\n}\n\n/* Tooltip text */\n.tooltip-lunatic .tooltip-text {\n min-width: 10em;\n max-width: 20em;\n background-color: var(--color-primary-dark);\n color: #fff;\n padding: 0.5em;\n border-radius: 6px;\n font-size: 1em;\n}\n.tooltip-lunatic .tooltip-text.place-left::before {\n border-left: 10px solid var(--color-primary-dark);\n}\n.tooltip-lunatic .tooltip-text.place-left::after {\n content: none;\n}";styleInject(css_248z$b);var TooltipResponse=function(e){var t=e.id,r=e.response,o=React.useState(function(){return buildTooltip(r)}),n=_slicedToArray(o,2),a=n[0],i=n[1];React.useEffect(function(){i(buildTooltip(r))},[r]);var p=a.content,s=a.imgName;if(!p)return null;var l=p.map(function(e){var t=e.key,r=e.value;return"".concat(t," : ").concat(r,"<br />")}).join("");return/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip-lunatic"},/*#__PURE__*/React__default["default"].createElement("span",{"data-for":"".concat(t,"-management-tooltip"),"data-tip":l,"data-multiline":!0},/*#__PURE__*/React__default["default"].createElement("img",{id:t,alt:"img-tooltip",src:img[s].src||img[s]})),/*#__PURE__*/React__default["default"].createElement(ReactTooltip__default["default"],{id:"".concat(t,"-management-tooltip"),className:"tooltip-text",place:"left"}))};TooltipResponse.defaultProps={response:{}},TooltipResponse.propTypes={id:PropTypes__default["default"].string,response:response};var css_248z$a=".checkbox-group,\n.checkbox-group-list {\n border: 0;\n outline: 0;\n padding: 0;\n}\n\n.checkbox-lunatic,\n.checkbox-boolean-lunatic {\n position: absolute;\n opacity: 0;\n margin-bottom: 0;\n margin-top: 0.15rem;\n margin-left: 0.2rem;\n height: 18px;\n width: 18px;\n}\n.checkbox-lunatic + label,\n.checkbox-boolean-lunatic + label {\n margin-left: 2rem;\n}\n.checkbox-lunatic:focus + label,\n.checkbox-boolean-lunatic:focus + label {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.checkbox-boolean-lunatic + label::before {\n margin-right: -0.3rem;\n}\n\n.checkbox-modality,\n.checkbox-boolean-modality {\n margin-bottom: 0.6rem;\n}\n\n.field .checkbox-group-list .checkbox-modality,\n.field-with-tooltip .checkbox-group-list .checkbox-modality {\n height: 1.375em;\n}\n\n.checkbox-group .modality_NR,\n.checkbox-group-list .modality_NR {\n margin-top: 1.5em;\n}\n.checkbox-group .horizontal-options.modality_NR,\n.checkbox-group-list .horizontal-options.modality_NR {\n margin-top: 0;\n}\n.checkbox-group .checkbox-modality label,\n.checkbox-group-list .checkbox-modality label {\n display: flex;\n}\n.checkbox-group .checkbox-modality.checkbox-modality-block label,\n.checkbox-group-list .checkbox-modality.checkbox-modality-block label {\n padding-top: 0.325em;\n}\n.checkbox-group .checkbox-modality.checkbox-modality-block.horizontal-options label,\n.checkbox-group-list .checkbox-modality.checkbox-modality-block.horizontal-options label {\n padding-top: 0;\n}\n\n.checkbox-lunatic + label {\n margin-top: 0.325em;\n}\n\n.checkbox-alone {\n margin-left: 0;\n margin-top: 0.5em;\n}";styleInject(".checkbox-group,\n.checkbox-group-list {\n border: 0;\n outline: 0;\n padding: 0;\n}\n\n.checkbox-lunatic,\n.checkbox-boolean-lunatic {\n position: absolute;\n opacity: 0;\n margin-bottom: 0;\n margin-top: 0.15rem;\n margin-left: 0.2rem;\n height: 18px;\n width: 18px;\n}\n.checkbox-lunatic + label,\n.checkbox-boolean-lunatic + label {\n margin-left: 2rem;\n}\n.checkbox-lunatic:focus + label,\n.checkbox-boolean-lunatic:focus + label {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.checkbox-boolean-lunatic + label::before {\n margin-right: -0.3rem;\n}\n\n.checkbox-modality,\n.checkbox-boolean-modality {\n margin-bottom: 0.6rem;\n}\n\n.field .checkbox-group-list .checkbox-modality,\n.field-with-tooltip .checkbox-group-list .checkbox-modality {\n height: 1.375em;\n}\n\n.checkbox-group .modality_NR,\n.checkbox-group-list .modality_NR {\n margin-top: 1.5em;\n}\n.checkbox-group .horizontal-options.modality_NR,\n.checkbox-group-list .horizontal-options.modality_NR {\n margin-top: 0;\n}\n.checkbox-group .checkbox-modality label,\n.checkbox-group-list .checkbox-modality label {\n display: flex;\n}\n.checkbox-group .checkbox-modality.checkbox-modality-block label,\n.checkbox-group-list .checkbox-modality.checkbox-modality-block label {\n padding-top: 0.325em;\n}\n.checkbox-group .checkbox-modality.checkbox-modality-block.horizontal-options label,\n.checkbox-group-list .checkbox-modality.checkbox-modality-block.horizontal-options label {\n padding-top: 0;\n}\n\n.checkbox-lunatic + label {\n margin-top: 0.325em;\n}\n\n.checkbox-alone {\n margin-left: 0;\n margin-top: 0.5em;\n}");var CheckboxGroup=function(e){var t=e.id,r=e.label,o=e.preferences,n=e.responses,a=e.handleChange,p=e.disabled,s=e.focused,l=e.keyboardSelection,d=e.positioning,c=e.declarations,u=e.features,y=e.bindings,m=e.management,g=e.style,E=g.fieldsetStyle,f=g.modalityStyle,x=React.useRef(),T=React.useState(function(){return n.map(function(e){var t=e.response;return getResponseByPreference(o)(t)})}),R=_slicedToArray(T,2),h=R[0],C=R[1],A=debounce__default["default"](function(e){return a(e)},50),_=function(t){var e=_slicedToArray(Object.entries(t)[0],2),r=e[0],a=e[1];!1===a&&responsesToClean(n)(o)(r)?A(_defineProperty({},r,null)):A(t)};React.useEffect(function(){s&&x.current.focus()},[s]);var N=[];return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:c,features:u,bindings:y}),/*#__PURE__*/React__default["default"].createElement("fieldset",{key:"checkbox-".concat(t),className:"checkbox-group-list",style:buildStyleObject(E)},/*#__PURE__*/React__default["default"].createElement("legend",null,interpret(u)(y)(r)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:c,features:u,bindings:y}),n.map(function(e,r){var o=e.id,a=e.label,i=e.response,s=h[r];s&&N.push(o);var c=0===r||N[0]&&N[0]===o,g=interpret(u)(y)(a);return/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(getItemsPositioningClass(d)),key:"checkbox-".concat(t,"-").concat(o)},/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(m?"field-with-tooltip":"field")},/*#__PURE__*/React__default["default"].createElement("div",{className:"checkbox-modality ".concat(s?"content-checked":"")},/*#__PURE__*/React__default["default"].createElement(Icon$2,{type:"checkbox",checked:s,disabled:p},/*#__PURE__*/React__default["default"].createElement("input",{type:"checkbox",id:"checkbox-".concat(t,"-").concat(o),ref:c?x:null,key:"checkbox-".concat(t,"-").concat(o),"aria-labelledby":"input-label-".concat(t,"-").concat(o),className:"checkbox-lunatic",checked:s||!1,disabled:p,onChange:function(e){var t=e.target.checked;C(h.map(function(e,o){return r===o?t:e})),_(_defineProperty({},getResponseName(i),t))}}),/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"checkbox-".concat(t,"-").concat(o),id:"input-label-".concat(t,"-").concat(o),style:s?buildStyleObject(f):{},className:"modality-label"},l&&/*#__PURE__*/React__default["default"].createElement("span",{className:"code-modality"},10>n.length?r+1:getAlphabet()[r].toUpperCase()),g)))),m&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:t,response:buildBooleanTooltipResponse(i)}))))})),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:c,features:u,bindings:y}))};CheckboxGroup.defaultProps={label:"",preferences:["COLLECTED"],responses:[],disabled:!1,focused:!1,keyboardSelection:!1,positioning:"DEFAULT",declarations:[],features:[],bindings:{},management:!1,style:{fieldsetStyle:{},modalityStyle:{}}},CheckboxGroup.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,handleChange:PropTypes__default["default"].func.isRequired,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,keyboardSelection:PropTypes__default["default"].bool,positioning:PropTypes__default["default"].oneOf(["DEFAULT","HORIZONTAL","VERTICAL"]),declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object};var group=/*#__PURE__*/React__default["default"].memo(CheckboxGroup,areEqual),CheckboxBoolean=function(e){var t=e.id,r=e.label,o=e.preferences,n=e.response,a=e.handleChange,i=e.disabled,p=e.positioning,s=e.focused,l=e.declarations,d=e.features,c=e.bindings,u=e.management,y=e.style,m=React.useRef(),g=React.useState(function(){return getResponseByPreference(o)(n)}),E=_slicedToArray(g,2),f=E[0],x=E[1],T=debounce__default["default"](function(e){return a(e)},50),R=function(t){var e=_slicedToArray(Object.entries(t)[0],2),r=e[0],a=e[1];!1===a&&responseToClean(n)(o)?T(_defineProperty({},r,null)):T(t)};React.useEffect(function(){s&&m.current.focus()},[s]);var h=interpret(d)(c)(r),C="HORIZONTAL"===p,A=/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Icon$2,{type:"checkbox",checked:f,disabled:i},/*#__PURE__*/React__default["default"].createElement("input",{type:"checkbox",id:"checkbox-boolean-".concat(t),ref:m,title:h?h:"empty-label",className:"checkbox-boolean-lunatic",style:buildStyleObject(y),checked:f||!1,disabled:i,onChange:function(e){var t=e.target.checked;x(t),R(_defineProperty({},getResponseName(n),t))}}),h&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"checkbox-boolean-".concat(t)},C?h:"")));return/*#__PURE__*/React__default["default"].createElement("div",{key:"checkbox-boolean-".concat(t),className:"checkbox-boolean-modality"},/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:l,features:d,bindings:c}),r&&!C&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"checkbox-boolean-".concat(t)},interpret(d)(c)(r)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:l,features:d,bindings:c}),/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(u?"field-with-tooltip":"field")},"VERTICAL"===p?/*#__PURE__*/React__default["default"].createElement("div",null,A):A),u&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:t,response:buildBooleanTooltipResponse(n)}))),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:l,features:d,bindings:c}))};CheckboxBoolean.defaultProps={label:"",preferences:["COLLECTED"],response:{},disabled:!1,positioning:"DEFAULT",focused:!1,declarations:[],features:[],bindings:{},management:!1,style:{}},CheckboxBoolean.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,handleChange:PropTypes__default["default"].func.isRequired,disabled:PropTypes__default["default"].bool,positioning:PropTypes__default["default"].oneOf(["DEFAULT","HORIZONTAL","VERTICAL"]),focused:PropTypes__default["default"].bool,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object};var boolean=/*#__PURE__*/React__default["default"].memo(CheckboxBoolean,areEqual),InputDeclarationsWrapper=function(e){var t=e.id,r=e.label,o=e.preferences,n=e.response,a=e.placeholder,i=e.handleChange,p=e.maxLength,s=e.readOnly,l=e.disabled,d=e.autoComplete,c=e.labelPosition,u=e.mandatory,y=e.declarations,m=e.features,g=e.bindings,E=e.focused,f=e.management,x=e.style,T=e.type,R=e.roleType,h=e.min,C=e.max,A=e.decimals,_=e.unit,N=e.unitPosition,O=e.validators,I=e.isInputNumber,S=React.useRef(),L=React.useState(function(){return getResponseByPreference(o)(n)}),v=_slicedToArray(L,2),b=v[0],k=v[1],P=React.useState(O.map(function(e){return e(b)}).filter(function(e){return e!==void 0})),D=_slicedToArray(P,2),M=D[0],U=D[1];React.useEffect(function(){E&&S.current.focus()},[E]),React.useEffect(function(){getResponseByPreference(o)(n)!==b&&k(getResponseByPreference(o)(n))},[n,o]);var F=function(e){U(O.map(function(t){return t(e)}).filter(function(e){return e!==void 0}))};React.useEffect(function(){I&&U(O.map(function(e){return e(b)}).filter(function(e){return e!==void 0}))},[b,h,C,O,I]);var w="textarea"===R?"textarea":"input";return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:y,features:m,bindings:g}),/*#__PURE__*/React__default["default"].createElement("div",{className:getLabelPositionClass(c)},r&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"".concat(R,"-").concat(t),id:"".concat(R,"-label-").concat(t),className:"".concat(u?"mandatory":"")},interpret(m)(g)(r),I&&_&&["DEFAULT","BEFORE"].includes(N)&&/*#__PURE__*/React__default["default"].createElement("span",{className:"unit"}," (".concat(_,")"))),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:y,features:m,bindings:g}),/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(f?"field-with-tooltip":"field")},/*#__PURE__*/React__default["default"].createElement(w,{type:T,id:"".concat(R,"-").concat(t),ref:S,value:b||"",min:h,max:C,step:A?"".concat(Math.pow(10,-A)):"0",placeholder:a,autoComplete:d?"on":"off",className:"".concat(R,"-lunatic ").concat(I&&0<M.length?"warning":""),style:buildStyleObject(x),readOnly:s,disabled:l,maxLength:p||524288,required:u,"aria-required":u,onChange:function(e){var t=e.target.value;I&&F(t),f?k(t):k(""===t?null:t)},onBlur:function(){i(_defineProperty({},getResponseName(n),b))}}),I&&_&&"AFTER"===N&&/*#__PURE__*/React__default["default"].createElement("span",{className:"unit"},_)),f&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:t,response:buildLocalResponse(n,b)}))),I&&/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-input-number-errors"},M.map(function(e,t){return/*#__PURE__*/React__default["default"].createElement("div",{key:t,className:"error"},e)}))),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:y,features:m,bindings:g}))};InputDeclarationsWrapper.defaultProps={label:"",preferences:["COLLECTED"],response:{},placeholder:"",readOnly:!1,disabled:!1,autoComplete:!1,labelPosition:"DEFAULT",mandatory:!1,focused:!1,declarations:[],features:[],bindings:{},management:!1,style:{},validators:[],isInputNumber:!1},InputDeclarationsWrapper.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,min:PropTypes__default["default"].oneOfType([PropTypes__default["default"].number,PropTypes__default["default"].string]),max:PropTypes__default["default"].oneOfType([PropTypes__default["default"].number,PropTypes__default["default"].string]),decimals:PropTypes__default["default"].oneOfType([PropTypes__default["default"].number,PropTypes__default["default"].string]),placeholder:PropTypes__default["default"].string,handleChange:PropTypes__default["default"].func.isRequired,readOnly:PropTypes__default["default"].bool,disabled:PropTypes__default["default"].bool,maxLength:PropTypes__default["default"].oneOfType([PropTypes__default["default"].number,PropTypes__default["default"].string]),autoComplete:PropTypes__default["default"].bool,labelPosition:PropTypes__default["default"].oneOf(["DEFAULT","TOP","BOTTOM","LEFT","RIGHT"]),unitPosition:PropTypes__default["default"].oneOf(["DEFAULT","BEFORE","AFTER"]),mandatory:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object,type:PropTypes__default["default"].oneOf(["text","date","number",null]),roleType:PropTypes__default["default"].oneOf(["input","datepicker","input-number","textarea"]),validators:PropTypes__default["default"].arrayOf(PropTypes__default["default"].func),isInputNumber:PropTypes__default["default"].bool};var ListDeclarationsWrapper=function(e){var t=e.id,r=e.label,o=e.preferences,n=e.response,a=e.options,i=e.handleChange,p=e.disabled,s=e.focused,l=e.keyboardSelection,d=e.declarations,c=e.features,u=e.bindings,y=e.management,m=e.style,g=e.positioning,E=e.type,f=e.hasSpecificHandler,x=React.useRef(),T=React.useState(function(){return getResponseByPreference(o)(n)}),R=_slicedToArray(T,2),h=R[0],C=R[1],A=y&&"checkbox"===E?[].concat(_toConsumableArray(a),[{label:"NR",value:"_N_R_"}]):a,_=function(t){var e=n.values,r=_slicedToArray(Object.entries(t)[0],2),a=r[0],i=r[1],p=e[o[o.length-1]]===i?null:i;N(_defineProperty({},a,p)),y?C(getResponseByPreference(o)(buildLocalResponse(n,p))):C(p)},N=debounce__default["default"](function(e){return i(e)},50),O=function(e){var t=_defineProperty({},getResponseName(n),e);f?_(t):(C(e),N(t))};React.useEffect(function(){s&&x.current.focus()},[s]);var I=m.fieldsetStyle,S=m.modalityStyle;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:d,features:c,bindings:u}),/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(y?"field-with-tooltip":"field")},/*#__PURE__*/React__default["default"].createElement("fieldset",{key:"".concat(E,"-").concat(t),className:"".concat(E,"-group-list"),style:buildStyleObject(I)},/*#__PURE__*/React__default["default"].createElement("legend",null,interpret(c)(u)(r)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:d,features:c,bindings:u}),A.map(function(e,r){var o=e.label,n=e.value,i=h===n,s=interpret(c)(u)(o);return/*#__PURE__*/React__default["default"].createElement("div",{key:"".concat(E,"-").concat(t,"-").concat(n),className:"".concat(E,"-modality ").concat(E,"-modality-block ").concat(getItemsPositioningClass(g)," ").concat(i?"content-checked":""," ").concat("_N_R_"===n?"modality_NR":"")},/*#__PURE__*/React__default["default"].createElement(Icon$2,{type:E,checked:i,disabled:p},/*#__PURE__*/React__default["default"].createElement("input",{type:E,name:"".concat(E,"-").concat(t),ref:0===r||i?x:null,id:"".concat(E,"-").concat(t,"-").concat(n),"aria-labelledby":"input-label-".concat(t,"-").concat(n),className:"".concat(E,"-lunatic"),style:buildStyleObject(m),checked:i,disabled:p,onChange:function(){return O(n)}}),/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"".concat(E,"-").concat(t,"-").concat(n),id:"input-label-".concat(t,"-").concat(n),style:i?buildStyleObject(S):{},className:"modality-label"},l&&/*#__PURE__*/React__default["default"].createElement("span",{className:"code-modality"},10>a.length?r+1:getAlphabet()[r].toUpperCase()),s)))}))),y&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:t,response:buildMultiTooltipResponse(A)(n)}))),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:d,features:c,bindings:u}))};ListDeclarationsWrapper.defaultProps={label:"",preferences:["COLLECTED"],response:{},options:[],disabled:!1,focused:!1,keyboardSelection:!1,positioning:"DEFAULT",declarations:[],features:[],bindings:{},management:!1,style:{fieldsetStyle:{},modalityStyle:{}}},ListDeclarationsWrapper.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,options:options,handleChange:PropTypes__default["default"].func.isRequired,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,keyboardSelection:PropTypes__default["default"].bool,positioning:PropTypes__default["default"].oneOf(["DEFAULT","HORIZONTAL","VERTICAL"]),declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object,type:PropTypes__default["default"].oneOf(["radio","checkbox"])};var SimpleDeclarationsWrapper=function(e){var t=e.id,r=e.declarations,o=e.features,n=e.bindings,a=e.children;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:r,features:o,bindings:n}),a,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:r,features:o,bindings:n}),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:r,features:o,bindings:n}))};SimpleDeclarationsWrapper.defaultProps={declarations:[],features:[],bindings:{}},SimpleDeclarationsWrapper.propTypes={id:PropTypes__default["default"].string.isRequired,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,children:PropTypes__default["default"].element.isRequired};var CheckboxOne=function(e){return/*#__PURE__*/React__default["default"].createElement(ListDeclarationsWrapper,_extends({type:"checkbox"},e,{hasSpecificHandler:!0}))},one=/*#__PURE__*/React__default["default"].memo(CheckboxOne,areEqual),css_248z$9="";styleInject(css_248z$9);var Datepicker=function(e){return/*#__PURE__*/React__default["default"].createElement(InputDeclarationsWrapper,_extends({type:"date",roleType:"datepicker"},e))},component$7=/*#__PURE__*/React__default["default"].memo(Datepicker,areEqual),classnames=createCommonjsModule$1(function(e){/*!
1740
- Copyright (c) 2017 Jed Watson.
1741
- Licensed under the MIT License (MIT), see
1742
- http://jedwatson.github.io/classnames
1743
- */ /* global define */(function(){function t(){for(var e=[],o=0,n;o<arguments.length;o++)if(n=arguments[o],n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var p=t.apply(null,n);p&&e.push(p)}else if("object"===a)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}return e.join(" ")}var r={}.hasOwnProperty;e.exports?(t.default=t,e.exports=t):window.classNames=t})()}),SHOW_PANEL="dropdown/show-panel",showPanel=function(){return{type:SHOW_PANEL}},HIDE_PANEL="dropdown/hide-panel",hidePanel=function(){return{type:HIDE_PANEL}},SET_ACTIVE_OPTION="dropdown/set-active-option",setActiveOption=function(e){return{type:SET_ACTIVE_OPTION,payload:{index:e}}},SET_OPTIONS="dropdown/set-options",setOptions=function(e){return{type:SET_OPTIONS,payload:{options:e}}},SET_VALUE="dropdown/set-value",setValue=function(e){return{type:SET_VALUE,payload:{value:e}}},SET_FOCUSED="dropdown/set-focused",setFocused=function(e){return{type:SET_FOCUSED,payload:{focused:e}}},SET_SELECTED_OPTION="dropdown/set-selectted-option",setSelectedOption=function(e){return{type:SET_SELECTED_OPTION,payload:{option:e}}},RESET_SELECTION="dropdown/reset-selection",resetSelection=function(){return{type:RESET_SELECTION}},ARROW_UP_PRESSED="dropdown/arrow-up-ressed",arrowUpPressed=function(){return{type:ARROW_UP_PRESSED}},ARROW_DOWN_PRESSED="dropdown/arrow-down-pressed",arrowDownPressed=function(){return{type:ARROW_DOWN_PRESSED}},ENTER_PRESSED="dropdown/enter-pressed",enterPressed=function(e){return{type:ENTER_PRESSED,payload:{callback:e}}},SET_PREFIX="dropdown/set-prefix",setPrefix=function(e){return{type:SET_PREFIX,payload:{prefix:e}}};/**
1744
- *
1745
- */function Panel(e){var t=e.options,r=void 0===t?[]:t,o=e.display,n=e.handleActive,a=e.prefix,i=e.activeIndex,p=e.selectedOption,s=e.onSelect,l=e.idDropdown,d=e.optionComponent,c=React.useRef();return o?/*#__PURE__*/React__default["default"].createElement("div",{className:"lunatic-dropdown-panel-container"},/*#__PURE__*/React__default["default"].createElement("ul",{className:"lunatic-dropdown-panel",ref:c,tabIndex:"-1"},r.map(function(e,t){var r=e.label,o=e.value;return/*#__PURE__*/React__default["default"].createElement("li",{key:o,id:"".concat(l,"-option-").concat(o),onMouseEnter:function(){return n(t)},onMouseDown:function(t){t.stopPropagation(),t.preventDefault(),0===t.button&&s({label:r,value:o})}},/*#__PURE__*/React__default["default"].createElement(d,{label:r,value:o,prefix:a,active:i===t,selected:p&&p.value===o}))}))):null}var propTypesOption=PropTypes__default["default"].shape({label:PropTypes__default["default"].string,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].object,PropTypes__default["default"].number,PropTypes__default["default"].symbol,PropTypes__default["default"].bool])});Panel.propTypes={idDropdown:PropTypes__default["default"].string.isRequired,prefix:PropTypes__default["default"].string,onSelect:PropTypes__default["default"].func,handleActive:PropTypes__default["default"].func.isRequired,activeIndex:PropTypes__default["default"].number,selectedOption:propTypesOption,display:PropTypes__default["default"].bool.isRequired,options:PropTypes__default["default"].arrayOf(propTypesOption)},Panel.defaultProps={options:[],onSelect:function(){return null},selectedOption:void 0};function Icon$1(e){var t=e.height,r=void 0===t?20:t,o=e.width,n=void 0===o?20:o,a=e.color,i=void 0===a?"#aaa":a;return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,x:"0",y:"0",enableBackground:"new 0 0 292.362 292.362",version:"1.1",viewBox:"0 0 292.362 292.362",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{fill:i,d:"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z"}))}function Icon(e){var t=e.height,r=void 0===t?20:t,o=e.width,n=void 0===o?20:o,a=e.color,i=void 0===a?"#aaa":a;return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,x:"0",y:"0",enableBackground:"new 0 0 292.362 292.362",version:"1.1",viewBox:"0 0 292.362 292.362",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{fill:i,d:"M286.935 197.286L159.028 69.379c-3.613-3.617-7.895-5.424-12.847-5.424s-9.233 1.807-12.85 5.424L5.424 197.286C1.807 200.9 0 205.184 0 210.132s1.807 9.233 5.424 12.847c3.621 3.617 7.902 5.428 12.85 5.428h255.813c4.949 0 9.233-1.811 12.848-5.428 3.613-3.613 5.427-7.898 5.427-12.847s-1.814-9.232-5.427-12.846z"}))}function Label(e){var t=e.content,r=e.focused,o=e.mandatory;return t?/*#__PURE__*/React__default["default"].createElement("div",{className:classnames("lunatic-dropdown-label",{focused:r,mandatory:o})},t):null}Label.defaultProps={mandatory:!1},Label.propTypes={content:PropTypes__default["default"].string,focused:PropTypes__default["default"].bool.isRequired,mandatory:PropTypes__default["default"].bool};var CLEANER_CALLBACKS={},applyAll=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];Object.entries(CLEANER_CALLBACKS).forEach(function(e){var r=_slicedToArray(e,2),o=r[0];r[1],-1===t.indexOf(o)&&apply(o)})},apply=function(e){e in CLEANER_CALLBACKS&&"function"==typeof CLEANER_CALLBACKS[e]&&CLEANER_CALLBACKS[e]()},add=function(e,t){"function"==typeof t&&(CLEANER_CALLBACKS[e]=t)},clear=function(e){delete CLEANER_CALLBACKS[e]};/**
1746
- *
1747
- * @param {...any} execpt identifiants de dropdownn a ne pas appliquer
1748
- */function DropdownFieldContainer(e){var t=e.children,r=e.id,o=e.response,n=e.options,a=e.management,i=e.focused,p=e.visible,s=e.disabled;return/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(a?"field-with-tooltip":"field")},/*#__PURE__*/React__default["default"].createElement("div",{tabIndex:"-1",className:classnames("lunatic-dropdown-container",{focused:i})},/*#__PURE__*/React__default["default"].createElement("span",{className:classnames("lunatic-dropdown-content",{focused:i,visible:p,disabled:s})},t))),a&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:r,response:buildMultiTooltipResponse(n)(o)})))}var DropdownContainer$1=/*#__PURE__*/React__default["default"].forwardRef(function(e,t){var r=e.children,o=e.className,n=e.id,a=e.onMouseDown,i=e.onKeyDown,p=e.onFocus,s=e.onBlur;return/*#__PURE__*/React__default["default"].createElement("div",{className:o,tabIndex:"-1",id:n,onMouseDown:a,onKeyDown:i,onFocus:p,onBlur:s,ref:t},r)}),BINDED_KEYS={arrowUp:"ArrowUp",arrowDown:"ArrowDown",enter:"Enter",tab:"Tab"},createOnKeyDownCallback=function(e,t,r){return function(e){e===BINDED_KEYS.arrowUp?t(arrowUpPressed()):e===BINDED_KEYS.arrowDown?(t(arrowDownPressed()),t(showPanel())):e===BINDED_KEYS.enter?t(enterPressed(r)):e===BINDED_KEYS.tab?(t(setFocused(!1)),t(hidePanel())):void 0}},createOnMouseDownCallback=function(e,t){var r=e.visible,o=e.id,n=e.disabled;return function(a){a.stopPropagation(),r||n||(applyAll(o),t(showPanel()))}};/** */function stopAndPrevent(t){t.preventDefault(),t.stopPropagation()}/** */function prepareOptions(e,t){return e.reduce(function(e,r,o){return r.value===t&&-1===e.index?{index:o,option:r}:e},{index:-1,option:{}})}/** */function onKeyDownCallbackProxy(e,t,r){var o=createOnKeyDownCallback(e,t,r);return function(t){switch(t.key){case BINDED_KEYS.enter:case BINDED_KEYS.arrowUp:case BINDED_KEYS.arrowDown:stopAndPrevent(t),o(t.key);break;case BINDED_KEYS.tab:o(t.key);break;default:return;}return!1}}function Dropdown$3(e){var t=e.options,r=e.children,o=e.onSelect,n=e.response,a=e.className,i=e.label,p=e.labelPosition,s=e.mandatory,l=e.value,d=e.management,c=e.state,u=e.dispatch,y=e.refs,m=c.visible,g=c.focused,E=c.id,f=c.disabled;add(E,function(){u(hidePanel()),u(setFocused(!1))}),React.useEffect(function(){var e=function(){u(hidePanel()),u(setFocused(!1))};return window.addEventListener("mousedown",e),function(){window.removeEventListener("mousedown",e),clear(E)}},[E,u]),React.useEffect(function(){u(setOptions(t))},[t,u]),React.useEffect(function(){if(l){var e=prepareOptions(t,l),r=e.option,o=e.index;u(setSelectedOption(r)),u(setActiveOption(o))}},[l,t,u]);var x=React.useCallback(function(){u(setFocused(!f))},[u,f]),T=React.useCallback(function(){u(setFocused(!1))},[u]),R=React.useCallback(createOnMouseDownCallback(c,u),[c,u]),h=React.useCallback(onKeyDownCallbackProxy(c,u,o),[c,u,o]);return/*#__PURE__*/React__default["default"].createElement(DropdownContainer$1,{className:classnames(a,getLabelPositionClass(p),{focused:g,disabled:f}),id:E,onMouseDown:R,onKeyDown:h,onFocus:x,onBlur:T,ref:y},/*#__PURE__*/React__default["default"].createElement(Label,{content:i,focused:g,mandatory:s}),/*#__PURE__*/React__default["default"].createElement(DropdownFieldContainer,{id:E,response:n,options:t,management:d,focused:g,visible:m,disabled:f},r))}Dropdown$3.propTypes={zIndex:PropTypes__default["default"].number,className:PropTypes__default["default"].string,id:PropTypes__default["default"].string,options:PropTypes__default["default"].array.isRequired,onSelect:PropTypes__default["default"].func,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number,PropTypes__default["default"].object,PropTypes__default["default"].bool])},Dropdown$3.defaultProps={options:[],onSelect:function(){return null}};var DropdownContainer=/*#__PURE__*/React__default["default"].forwardRef(function(e,t){return/*#__PURE__*/React__default["default"].createElement(Dropdown$3,_extends({},e,{refs:t}))}),scrollTo=function(e){var t=document.getElementById(e);if(t){var r=t.parentNode,o=r.getBoundingClientRect(),n=t.getBoundingClientRect(),a=n.top-o.top+r.scrollTop,i=n.bottom-o.top+r.scrollTop;i>r.scrollTop+o.height?r.scrollTo(0,i-o.height):a<r.scrollTop&&r.scrollTo(0,a)}},preparePrefix=function(e){return"string"==typeof e?removeAccents__default["default"](e.toLowerCase()).replace(/[- ']/g,""):e},lettersMatching=function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"",r=t.split(""),o=-1,n=preparePrefix(e);return n.split("").reduce(function(e,t){return o<r.length&&r[o+1]===t?(o++,[].concat(_toConsumableArray(e),[t])):e},[])},match=function(e,t){var r=t.split(""),o=-1,n=preparePrefix(e);return n.split("").reduce(function(e,t,n){return o<r.length&&r[o+1]===t?(o++,e+1):e/(1e-4*n+1)},0)/t.length},filterOption=function(e,t){return t&&0!==t.length?e.reduce(function(e,r){var o=r.label,n=r.search,a=match(n||o,t);return .6<=a?[{o:r,how:a}].concat(_toConsumableArray(e)).sort(function(e,t){return e.how<=t.how}):e},[]).map(function(e){var t=e.o;return t}):e},initial={prefix:void 0,options:[],visibleOptions:[],visible:!1,activeIndex:void 0,selectedOption:void 0,focused:!1,value:""},isPrefix=function(e){return e!==void 0&&0<e.length},reduceArrowDownPressed=function(e){var t=Math.min,r=e.visibleOptions,o=e.activeIndex,n=r.length?t(r.length-1,void 0===o?0:o+1):void 0;return void 0!==n&&scrollTo("".concat(e.id,"-option-").concat(r[n].value)),_objectSpread2(_objectSpread2({},e),{},{activeIndex:n})},reduceArrowUpPressed=function(e){var t=Math.max,r=e.visibleOptions,o=e.activeIndex,n=r.length?t(0,void 0===o?0:o-1):void 0;return void 0!==n&&scrollTo("".concat(e.id,"-option-").concat(r[n].value)),_objectSpread2(_objectSpread2({},e),{},{activeIndex:n})},reduceEnterPressed=function(e,t){var r=e.activeIndex,o=e.visibleOptions,n=e.visible;if(!n)return _objectSpread2(_objectSpread2({},e),{},{visible:!0});if(void 0!==r){var a=o[r];return t(a),_objectSpread2(_objectSpread2({},e),{},{selectedOption:a,value:a.label,prefix:preparePrefix(a.label),visible:!1})}return e},reducer=function(e,t){var r=t.type,o=t.payload;switch(r){case SHOW_PANEL:return _objectSpread2(_objectSpread2({},e),{},{visible:!0});case HIDE_PANEL:return _objectSpread2(_objectSpread2({},e),{},{visible:!1});case SET_ACTIVE_OPTION:{var n=o.index;return _objectSpread2(_objectSpread2({},e),{},{activeIndex:n})}case SET_OPTIONS:{var a=o.options,i=e.prefix;return _objectSpread2(_objectSpread2({},e),{},{options:a,visibleOptions:isPrefix(i)?filterOption(a):a})}case SET_PREFIX:{var p=o.prefix,s=e.options;return _objectSpread2(_objectSpread2({},e),{},{prefix:p,activeIndex:void 0,visibleOptions:isPrefix(p)?filterOption(s,p):s})}case SET_VALUE:{var l=o.value;return _objectSpread2(_objectSpread2({},e),{},{value:l})}case SET_SELECTED_OPTION:{var d=o.option;return _objectSpread2(_objectSpread2({},e),{},{value:d.label,selectedOption:d,prefix:preparePrefix(d.label)})}case SET_FOCUSED:{var c=o.focused;return _objectSpread2(_objectSpread2({},e),{},{focused:c})}case RESET_SELECTION:return _objectSpread2(_objectSpread2({},e),{},{prefix:void 0,value:"",selectedOption:void 0,activeIndex:void 0,activeOption:void 0,visibleOptions:e.options});case ARROW_UP_PRESSED:return reduceArrowUpPressed(e);case ARROW_DOWN_PRESSED:return reduceArrowDownPressed(e);case ENTER_PRESSED:{var u=o.callback;return reduceEnterPressed(e,u)}default:return e;}},Option$1=function(e){var t=e.label,r=e.active,o=e.selected;return/*#__PURE__*/React__default["default"].createElement("span",{className:classnames("lunatic-dropdown-option",{"lunatic-dropdown-option-active":r,"lunatic-dropdown-option-selected":o})},t)},Dropdown$2=function(e){var t=e.widthAuto,r=e.id,o=e.label,n=e.value,a=e.options,i=e.response,p=e.onSelect,s=e.placeholder,l=e.disabled,d=e.focused,c=e.mandatory,u=e.labelPosition,y=e.management,m=e.className,g=e.zIndex,E=React.useRef(),f=React.useReducer(reducer,_objectSpread2(_objectSpread2({},initial),{},{id:"dropdown-".concat(r,"-").concat(new Date().getMilliseconds()),disabled:l,focused:d})),x=_slicedToArray(f,2),T=x[0],R=x[1],h=T.focused,C=T.visible,A=T.activeIndex,_=T.id,N=createOnSelect$1(T,R,p),O=a.find(function(e){return e.value===n});return/*#__PURE__*/React__default["default"].createElement(DropdownContainer,{className:m||"lunatic-dropdown",ref:E,state:T,dispatch:R,options:a,response:i,management:y,label:o,labelPosition:u,mandatory:c,onSelect:N,value:n,zIndex:g},/*#__PURE__*/React__default["default"].createElement("span",{className:classnames("lunatic-dropdown-input",{focused:h})},/*#__PURE__*/React__default["default"].createElement("input",{type:"button",disabled:l,value:O?O.label:s||""})),getIcon$1(T,R)(C,E),/*#__PURE__*/React__default["default"].createElement("div",{tabIndex:"0",className:classnames("lunatic-transition",{visible:isDisplay$1(T),"width-auto":t})},/*#__PURE__*/React__default["default"].createElement(Panel,{idDropdown:_,options:a,display:isDisplay$1(T),activeIndex:A,optionComponent:Option$1,selectedOption:O,onSelect:N,handleActive:function(e){return R(setActiveOption(e))}})))};/** */Dropdown$2.propTypes={widthAuto:PropTypes__default["default"].bool,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,zIndex:PropTypes__default["default"].number,className:PropTypes__default["default"].string,id:PropTypes__default["default"].string,options:PropTypes__default["default"].array.isRequired,onSelect:PropTypes__default["default"].func,placeholder:PropTypes__default["default"].string,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number,PropTypes__default["default"].bool])},Dropdown$2.defaultProps={disabled:!1,focused:!1,options:[],zIndex:0,onSelect:function(){return null},placeholder:"Search...",widthAuto:!1};/* **/var isDisplay$1=function(e){var t=e.visible,r=e.options;return t&&0<r.length},getIcon$1=function(e,t){var r=e.disabled;return function(o,n){return r?/*#__PURE__*/React__default["default"].createElement("span",{className:"lunatic-icon"},/*#__PURE__*/React__default["default"].createElement(Icon$1,{width:10,height:10})):/*#__PURE__*/React__default["default"].createElement("span",{className:"lunatic-icon",tabIndex:"-1",onMouseDown:function(r){r.stopPropagation(),r.preventDefault(),o?t(hidePanel()):(t(showPanel()),n.current.focus())}},o?/*#__PURE__*/React__default["default"].createElement(Icon,{width:10,height:10}):/*#__PURE__*/React__default["default"].createElement(Icon$1,{width:10,height:10}))}},createOnSelect$1=function(e,t,r){return function(e){t(setSelectedOption(e)),t(hidePanel()),r(e)}},childrenToOption$1=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return(Array.isArray(e)?e:[e]).map(function(e){var t=e.props.value,r=e.props.children;if(r===void 0||t===void 0)throw new Error("Ooops");return{label:r,value:t}})},createDropdown=function(e){return function(t){var r=t.children,n=t.options,a=_objectWithoutProperties(t,["children","options"]),i=n||childrenToOption$1(r);return/*#__PURE__*/React__default["default"].createElement(e,_extends({options:i},a))}},DropdownSimple=createDropdown(Dropdown$2),Option=function(e){var t=e.label,r=e.active,o=e.prefix,n=e.selected,a=lettersMatching(t,o),i=t.split("").reduce(function(e,t){var r=e.letters,o=e.stack,n=preparePrefix(t),a=_toArray(r),i=a[0],p=a.slice(1);return n===i?{letters:p,stack:[].concat(_toConsumableArray(o),[{char:t,className:"lunatic-prefix"}])}:{letters:r,stack:[].concat(_toConsumableArray(o),[{char:t,className:"lunatic-normal"}])}},{letters:a,stack:[]}).stack.reduce(function(e,t){var r=e.last,o=e.stack,n=t.char,a=t.className;if(!r)return{last:a,stack:[{part:n,className:a}]};if(r!==a)return{last:a,stack:[{part:n,className:a}].concat(_toConsumableArray(o))};var i=_toArray(o),p=i[0],s=i.slice(1);return{last:a,stack:[_objectSpread2(_objectSpread2({},p),{},{part:"".concat(p.part).concat(n)})].concat(_toConsumableArray(s))}},{last:void 0,stack:[]}).stack.reverse().map(function(e,t){var r=e.part,o=e.className;return/*#__PURE__*/React__default["default"].createElement("span",{className:o,key:t},r)});return/*#__PURE__*/React__default["default"].createElement("span",{className:classnames("lunatic-dropdown-option",{"lunatic-dropdown-option-active":r,"lunatic-dropdown-option-selected":n})},i)},CrossIcon=function(e){var t=e.width,r=void 0===t?20:t,o=e.height,n=void 0===o?20:o,a=e.color,i=void 0===a?"#aaa":a;return/*#__PURE__*/React__default["default"].createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,x:"0",y:"0",enableBackground:"new 0 0 612 612",version:"1.1",viewBox:"0 0 612 612",xmlSpace:"preserve"},/*#__PURE__*/React__default["default"].createElement("path",{fill:i,d:"M444.644 306l138.644-138.644c38.284-38.284 38.284-100.36 0-138.644-38.283-38.284-100.359-38.284-138.644 0L306 167.356 167.356 28.713c-38.284-38.284-100.36-38.284-138.644 0s-38.284 100.36 0 138.644L167.356 306 28.713 444.644c-38.284 38.283-38.284 100.36 0 138.644 38.284 38.284 100.36 38.284 138.644 0L306 444.644l138.644 138.644c38.283 38.284 100.36 38.284 138.644 0 38.284-38.283 38.284-100.36 0-138.644L444.644 306z"}))},getIcon=function(e){return e?/*#__PURE__*/React__default["default"].createElement(Icon,{width:10,height:10}):/*#__PURE__*/React__default["default"].createElement(Icon$1,{width:10,height:10})},Icone=function(e){var t=e.prefix,r=e.visible,o=e.disabled,n=e.onDelete,a=e.onSwitch;return o?/*#__PURE__*/React__default["default"].createElement("span",{className:"lunatic-icon",tabIndex:"-1",onMouseDown:a},/*#__PURE__*/React__default["default"].createElement(Icon$1,{width:10,height:10})):t&&0<t.length?/*#__PURE__*/React__default["default"].createElement("span",{className:"lunatic-icon",tabIndex:"-1",onMouseDown:n},/*#__PURE__*/React__default["default"].createElement(CrossIcon,{width:10,height:10})):/*#__PURE__*/React__default["default"].createElement("span",{className:"lunatic-icon",tabIndex:"-1",onMouseDown:a},getIcon(r))},isDisplay=function(e){var t=e.visible,r=e.visibleOptions;return t&&0<r.length},onChangeCallback=function(e,t){return function(r){r.stopPropagation(),r.preventDefault();var e=r.target.value;t(setValue(e)),t(setPrefix(preparePrefix(e))),e&&1<e.length&&t(showPanel())}},createOnSelect=function(e,t,r){return function(e){t(setSelectedOption(e)),t(hidePanel()),r(e)}};/** */ /**
1749
- *
1750
- * @param {props}
1751
- */function Dropdown$1(e){var t=e.widthAuto,r=e.options,o=void 0===r?[]:r,n=e.onSelect,a=e.response,i=e.className,p=e.placeholder,s=e.label,l=e.labelPosition,d=e.mandatory,c=e.value,u=e.zIndex,y=e.management,m=e.disabled,g=e.focused,E=React.useReducer(reducer,_objectSpread2(_objectSpread2({},initial),{},{id:"dropdown-".concat(new Date().getMilliseconds()),disabled:m,focused:g})),f=_slicedToArray(E,2),x=f[0],T=f[1],R=x.prefix,h=x.visible,C=x.activeIndex,A=x.visibleOptions,_=x.value,N=x.focused,O=x.id,I=React.useRef(),S=React.useRef(),L=createOnSelect(x,T,n),v=o.find(function(e){return e.label===_});return React.useEffect(function(){var e=I.current;e&&N&&e.focus()},[I,N]),/*#__PURE__*/React__default["default"].createElement(DropdownContainer,{className:i||"lunatic-dropdown",state:x,ref:S,dispatch:T,options:o,label:s,labelPosition:l,mandatory:d,response:a,onSelect:L,value:c,zIndex:u,management:y},/*#__PURE__*/React__default["default"].createElement("span",{className:classnames("lunatic-dropdown-input",{focused:N,disabled:m})},/*#__PURE__*/React__default["default"].createElement("input",{type:"text",ref:I,value:_||"",disabled:m,placeholder:p,autoComplete:"list",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",tabIndex:"0",onChange:onChangeCallback(x,T)})),/*#__PURE__*/React__default["default"].createElement(Icone,{prefix:R,visible:h,disabled:m,onDelete:function(t){t.stopPropagation(),I.current.value="",T(resetSelection()),L({value:null})},onSwitch:function(t){t.stopPropagation(),t.preventDefault(),h?T(hidePanel()):(T(showPanel()),S.current.focus())}}),/*#__PURE__*/React__default["default"].createElement("div",{tabIndex:"-1",className:classnames("lunatic-transition",{visible:isDisplay(x),"width-auto":t})},/*#__PURE__*/React__default["default"].createElement(Panel,{idDropdown:O,options:A,display:isDisplay(x)&&!m,prefix:R,activeIndex:C,optionComponent:Option,selectedOption:v,onSelect:L,handleActive:function(e){return T(setActiveOption(e))}})))}Dropdown$1.propTypes={widthAuto:PropTypes__default["default"].bool,zIndex:PropTypes__default["default"].number,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,className:PropTypes__default["default"].string,id:PropTypes__default["default"].string,options:PropTypes__default["default"].array.isRequired,onSelect:PropTypes__default["default"].func,placeholder:PropTypes__default["default"].string,value:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].number,PropTypes__default["default"].bool])},Dropdown$1.defaultProps={options:[],zIndex:0,onSelect:function(){return null},placeholder:"Search...",disabled:!1,focused:!1,widthAuto:!1};var childrenToOption=function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return(Array.isArray(e)?e:[e]).map(function(e){var t=e.props.value,r=e.props.children;if(r===void 0||t===void 0)throw new Error("Ooops");return{label:r,value:t}})},createDropDown=function(e){return function(t){var r=t.children,n=t.options,a=_objectWithoutProperties(t,["children","options"]),i=n||childrenToOption(r);return/*#__PURE__*/React__default["default"].createElement(e,_extends({options:i},a))}},DropdownEdit=createDropDown(Dropdown$1),css_248z$8=".lunatic-dropdown {\n display: block;\n width: 100%;\n margin-bottom: 1.5rem;\n}\n.lunatic-dropdown:focus {\n outline: none;\n}\n.lunatic-dropdown.label-left {\n display: flex;\n flex-direction: row;\n}\n.lunatic-dropdown.label-right {\n display: flex;\n flex-direction: row-reverse;\n}\n.lunatic-dropdown.label-top {\n display: flex;\n flex-direction: column;\n}\n.lunatic-dropdown.label-bottom {\n display: flex;\n flex-direction: column-reverse;\n}\n.lunatic-dropdown .lunatic-dropdown-label {\n opacity: 1;\n}\n.lunatic-dropdown .lunatic-dropdown-container {\n position: relative;\n height: 2em;\n width: 100%;\n z-index: 1;\n}\n.lunatic-dropdown .lunatic-dropdown-container ul {\n padding-inline-start: 0px;\n font-size: 1rem;\n}\n.lunatic-dropdown .lunatic-dropdown-container.focused {\n z-index: 2;\n}\n.lunatic-dropdown .lunatic-dropdown-container:focus {\n outline: none;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content {\n border-color: white;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n height: auto;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content.visible {\n height: auto;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content.disabled {\n background-color: var(--color-disabled);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-dropdown-input {\n border-bottom: 1px solid var(--color-primary-dark);\n padding: 6px 0 7px;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-dropdown-input input {\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n -moz-user-select: none;\n /* Firefox */\n -ms-user-select: none;\n /* Internet Explorer */\n -khtml-user-select: none;\n /* KHTML browsers (e.g. Konqueror) */\n -webkit-user-select: none;\n /* Chrome, Safari, and Opera */\n -webkit-touch-callout: none;\n /* Disable Android and iOS callouts*/\n margin: 0px 25px 0px 0px;\n width: calc(100% - 37px);\n background-color: transparent;\n border-color: transparent;\n height: 2em;\n border: none;\n outline: none;\n text-align: left;\n cursor: inherit;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-dropdown-input:hover {\n cursor: pointer;\n border-bottom: 2px solid var(--color-primary-main);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-dropdown-input.focused {\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 12px 0 rgba(0, 0, 0, 0.05);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-icon {\n cursor: pointer;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-icon:focus {\n outline: none;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition {\n opacity: 0;\n /** options style */\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition:focus {\n outline: none;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition.visible {\n visibility: visible;\n opacity: 1;\n transition: opacity var(--dropdown-transition-time) ease-out;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-panel-container {\n box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.9), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-panel-container .lunatic-dropdown-panel {\n background-color: white;\n margin: 0 0 12px 0;\n border-radius: 4px;\n z-index: 3;\n padding-top: 3px;\n list-style: none;\n max-height: 100px;\n overflow-y: auto;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-panel-container .lunatic-dropdown-panel:focus {\n outline: none;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-option {\n padding-left: 10px;\n cursor: pointer;\n font-family: \"Roboto\", \"Helvetica\", \"Arial\", sans-serif;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: black;\n line-height: 2rem;\n display: block;\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-option.lunatic-dropdown-option-active {\n color: var(--color-primary-dark);\n background-color: var(--color-dropdown-active);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-option.lunatic-dropdown-option-selected {\n background-color: var(--color-dropdown-selected);\n}\n.lunatic-dropdown .lunatic-dropdown-container .lunatic-dropdown-content .lunatic-transition .lunatic-dropdown-option .lunatic-prefix {\n color: var(--color-prefix);\n font-weight: bold;\n}";styleInject(css_248z$8);var Dropdown=function(e){var t=e.id,r=e.label,o=e.preferences,n=e.response,a=e.handleChange,i=e.options,p=e.writable,s=e.declarations,l=e.features,d=e.bindings,c=e.management,u=e.freezeOptions,y=_objectWithoutProperties(e,["id","label","preferences","response","handleChange","options","writable","declarations","features","bindings","management","freezeOptions"]),m=React.useState(i),g=_slicedToArray(m,2),E=g[0],f=g[1],x=l.reduce(function(e,t){return"MD"===t?e:[].concat(_toConsumableArray(e),[t])},[]);React.useEffect(function(){if(!u){var e=i.map(function(e){var t=e.label,r=_objectWithoutProperties(e,["label"]);return _objectSpread2({label:interpret(x)(d)(t)},r)});f(e)}},[u,l,d,i]);var T=interpret(l)(d)(r),R=getResponseByPreference(o)(n),h=function(t){return a(_defineProperty({},getResponseName(n),t.value))};return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:s,features:l,bindings:d}),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:s,features:l,bindings:d}),p?/*#__PURE__*/React__default["default"].createElement(DropdownEdit,_extends({},y,{id:t,value:R,response:n,label:T,options:E,onSelect:h,management:c})):/*#__PURE__*/React__default["default"].createElement(DropdownSimple,_extends({},y,{id:t,value:R,response:n,label:T,options:E,onSelect:h,management:c})),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:s,features:l,bindings:d}))};Dropdown.propTypes={disabled:PropTypes__default["default"].bool,writable:PropTypes__default["default"].bool,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),handleChange:PropTypes__default["default"].func,label:PropTypes__default["default"].oneOfType([PropTypes__default["default"].string,PropTypes__default["default"].element]),className:PropTypes__default["default"].string,zIndex:PropTypes__default["default"].number,freezeOptions:PropTypes__default["default"].bool},Dropdown.defaultProps={writable:!1,handleChange:function(){return null},features:[],label:void 0,className:void 0,zIndex:0,disabled:!1,freezeOptions:!1};var component$6=/*#__PURE__*/React__default["default"].memo(Dropdown,areEqual),css_248z$7=".input-lunatic,\n.datepicker-lunatic,\n.textarea-lunatic {\n font: inherit;\n border: 0;\n border-bottom: 0.125rem double rgba(0, 0, 0, 0.42);\n margin: 0;\n padding: 0.375rem 0 0.375rem 0.4375rem;\n display: block;\n min-width: 0;\n box-sizing: content-box;\n background: none;\n}\n.input-lunatic:focus,\n.datepicker-lunatic:focus,\n.textarea-lunatic:focus {\n outline: none;\n border-bottom: 0.125rem solid var(--color-primary-main);\n}\n.input-lunatic:hover,\n.datepicker-lunatic:hover,\n.textarea-lunatic:hover {\n border-bottom: 0.125rem solid black;\n}\n.input-lunatic:read-only,\n.datepicker-lunatic:read-only,\n.textarea-lunatic:read-only {\n background-color: var(--color-disabled);\n}\n\n.warning {\n box-sizing: border-box;\n border: solid 2px var(--color-error);\n background-color: var(--color-error);\n}\n\n.lunatic-input-number-errors .error {\n color: var(--color-error);\n font-size: 80%;\n margin-top: 0.3125rem;\n}";styleInject(css_248z$7);var Input=function(e){return/*#__PURE__*/React__default["default"].createElement(InputDeclarationsWrapper,_extends({type:"text",roleType:"input"},e))},input=/*#__PURE__*/React__default["default"].memo(Input,areEqual),InputNumber=function(e){var t=e.numberAsTextfield,r=_objectWithoutProperties(e,["numberAsTextfield"]),o=r.min,n=r.max,a=r.validators;return/*#__PURE__*/React__default["default"].createElement(InputDeclarationsWrapper,_extends({type:t?"text":"number",roleType:"input"},r,{validators:[minMaxValidator({min:o,max:n})].concat(_toConsumableArray(a)),isInputNumber:!0}))},minMaxValidator=function(e){var t=e.min,r=e.max;return function(e){if(e){var o=+e;return!t&&isDef(r)&&o>r?/*#__PURE__*/React__default["default"].createElement("span",null,"La valeur doit \xEAtre inf\xE9rieure \xE0 ".concat(r)):isDef(t)&&!r&&o<t?/*#__PURE__*/React__default["default"].createElement("span",null,"La valeur doit \xEAtre sup\xE9rieure \xE0 ".concat(t)):isDef(t)&&isDef(r)&&(o<t||o>r)?/*#__PURE__*/React__default["default"].createElement("span",null,"La valeur doit \xEAtre comprise entre ".concat(t," et ").concat(r)):void 0}}},isDef=function(e){return e||0===e};InputNumber.defaultProps={validators:[]},InputNumber.propTypes={validators:PropTypes__default["default"].arrayOf(PropTypes__default["default"].func)};var inputNumber=/*#__PURE__*/React__default["default"].memo(InputNumber,areEqual),FilterDescription=function(e){var t=e.id,r=e.label,o=e.filterDescription,n=e.features,a=e.bindings,i=e.style;return o?/*#__PURE__*/React__default["default"].createElement("div",{id:"filter-description-".concat(t),"aria-label":"filter-description",className:"filter-description-lunatic",style:buildStyleObject(i)},interpret(n)(a)(r)):null};FilterDescription.defaultProps={filterDescription:!1,features:[],bindings:{},style:{}},FilterDescription.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string.isRequired,filterDescription:PropTypes__default["default"].bool,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,style:PropTypes__default["default"].object};var css_248z$6=".progress-lunatic {\n height: 30px;\n position: relative;\n background: var(--color-disabled);\n -moz-border-radius: 20px;\n -webkit-border-radius: 20px;\n border-radius: 20px;\n padding: 5px;\n box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);\n text-align: center;\n font-weight: bold;\n}\n\n.progress-lunatic > span {\n display: block;\n height: 100%;\n border-radius: 20px;\n background-color: var(--color-primary-light);\n opacity: 0.6;\n box-shadow: inset 0 2px 9px rgba(255, 255, 255, 0.3), inset 0 -2px 6px rgba(0, 0, 0, 0.4);\n position: relative;\n top: -18px;\n overflow: hidden;\n}\n\n.progress-lunatic > span:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);\n z-index: 1;\n background-size: 50px 50px;\n animation: move 2s linear infinite;\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n overflow: hidden;\n}";styleInject(".progress-lunatic {\n height: 30px;\n position: relative;\n background: var(--color-disabled);\n -moz-border-radius: 20px;\n -webkit-border-radius: 20px;\n border-radius: 20px;\n padding: 5px;\n box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);\n text-align: center;\n font-weight: bold;\n}\n\n.progress-lunatic > span {\n display: block;\n height: 100%;\n border-radius: 20px;\n background-color: var(--color-primary-light);\n opacity: 0.6;\n box-shadow: inset 0 2px 9px rgba(255, 255, 255, 0.3), inset 0 -2px 6px rgba(0, 0, 0, 0.4);\n position: relative;\n top: -18px;\n overflow: hidden;\n}\n\n.progress-lunatic > span:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);\n z-index: 1;\n background-size: 50px 50px;\n animation: move 2s linear infinite;\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n overflow: hidden;\n}");var ProgressBar=function(e){var t=e.id,r=e.value,o=e.style,n=r;return 0>r&&(n=0),100<r&&(n=100),/*#__PURE__*/React__default["default"].createElement("div",{id:"progress-".concat(t),className:"progress-lunatic",style:buildStyleObject(o)},"".concat(n.toFixed(0)," %"),/*#__PURE__*/React__default["default"].createElement("span",{style:{width:"".concat(n,"%")}}))};ProgressBar.propTypes={id:PropTypes__default["default"].string.isRequired,value:PropTypes__default["default"].number.isRequired,style:PropTypes__default["default"].object};var css_248z$5=".radio-group-list {\n border: 0;\n outline: 0;\n padding: 0;\n margin-top: 0.9375rem;\n}\n\n.radio-lunatic {\n position: absolute;\n opacity: 0;\n margin-bottom: 0;\n margin-top: 0.05rem;\n margin-left: 0.2rem;\n height: 20px;\n width: 20px;\n}\n.radio-lunatic + label {\n margin-left: 2rem;\n}\n.radio-lunatic:focus + label {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.radio-lunatic + label::before {\n float: left;\n line-height: 2rem;\n}\n\n.field .radio-group-list .radio-modality,\n.field-with-tooltip .radio-group-list .radio-modality {\n height: 1.375em;\n}\n\n.radio-group-list .radio-modality label {\n display: flex;\n}\n.radio-group-list .radio-modality.radio-modality-block label {\n padding-top: 0.325em;\n}\n.radio-group-list .radio-modality.radio-modality-block.horizontal-options label {\n padding-top: 0;\n}\n\n.radio-modality {\n margin-bottom: 0.8em;\n}\n\n.radio-lunatic + label {\n margin-top: 0.325em;\n}";styleInject(".radio-group-list {\n border: 0;\n outline: 0;\n padding: 0;\n margin-top: 0.9375rem;\n}\n\n.radio-lunatic {\n position: absolute;\n opacity: 0;\n margin-bottom: 0;\n margin-top: 0.05rem;\n margin-left: 0.2rem;\n height: 20px;\n width: 20px;\n}\n.radio-lunatic + label {\n margin-left: 2rem;\n}\n.radio-lunatic:focus + label {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.radio-lunatic + label::before {\n float: left;\n line-height: 2rem;\n}\n\n.field .radio-group-list .radio-modality,\n.field-with-tooltip .radio-group-list .radio-modality {\n height: 1.375em;\n}\n\n.radio-group-list .radio-modality label {\n display: flex;\n}\n.radio-group-list .radio-modality.radio-modality-block label {\n padding-top: 0.325em;\n}\n.radio-group-list .radio-modality.radio-modality-block.horizontal-options label {\n padding-top: 0;\n}\n\n.radio-modality {\n margin-bottom: 0.8em;\n}\n\n.radio-lunatic + label {\n margin-top: 0.325em;\n}");var Radio=function(e){return/*#__PURE__*/React__default["default"].createElement(ListDeclarationsWrapper,_extends({type:"radio"},e))},component$5=/*#__PURE__*/React__default["default"].memo(Radio,areEqual),css_248z$4=".lunatic-loop .loop-label {\n text-align: center;\n font-weight: bold;\n font-size: 2em;\n}\n.lunatic-loop .loop-component {\n margin-top: 0.4em;\n margin-bottom: 0.4em;\n}";styleInject(css_248z$4);var Loop=function(e){var t=e.id;e.label;var r=e.iterations,o=e.components,n=e.bindings,a=e.handleChange,i=e.loopDependencies;e.maxPage,e.pagination,e.paginatedLoop,e.currentPage,e.setPage;var p=e.depth,s=_objectWithoutProperties(e,["id","label","iterations","components","bindings","handleChange","loopDependencies","maxPage","pagination","paginatedLoop","currentPage","setPage","depth"]),l=React.useState({}),d=_slicedToArray(l,2),c=d[0],u=d[1],y=buildVectorialBindings(n),m=s.features,g=m.filter(function(e){return"MD"!==e}),E=parseInt(interpret(g)(y)(r),10)||0,f=getInvolvedVariables(o);React.useEffect(function(){var e=f.reduce(function(e,t){var r=t.name,o=t.depth;return n[r]&&E>n[r].length?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},r,[].concat(_toConsumableArray(n[r]),_toConsumableArray(Array(E-n[r].length).fill(buildEmptyValue(o-p+1)))))):e},{});0!==Object.keys(e).length&&a(e)},[E]),React.useEffect(function(){if(0!==Object.keys(c).length){var e=c.up,t=c.rowNumber,r=Object.entries(e).reduce(function(e,r){var o=_slicedToArray(r,2),a=o[0],p=o[1],s=n[a],l=s.map(function(e,r){return r===t?p:e});return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,l))},{});a(r),u({})}},[n,c,a]);var x=buildLoopComponents(E)(o),T=x.map(function(e){var t=e.componentType,r=e.id,o=e.rowNumber,a=e.conditionFilter;e.page;var p=_objectWithoutProperties(e,["componentType","id","rowNumber","conditionFilter","page"]),l=buildBindingsForDeeperComponents(o)(n);if(!displayLoopQuestion(i)(l))return null;var d=lunatic[t];return"normal"===interpret(g)(l,!0)(a)?/*#__PURE__*/React__default["default"].createElement("div",{key:"".concat(r,"-loop-").concat(o),className:"loop-component"},/*#__PURE__*/React__default["default"].createElement(d,_extends({},s,p,{id:"".concat(r,"-loop-").concat(o),handleChange:function(e){return u({up:e,rowNumber:o})},bindings:l,componentType:t}))):null});return/*#__PURE__*/React__default["default"].createElement("div",{id:"loop-".concat(t),className:"lunatic-loop"},T)},Loop$1=/*#__PURE__*/React__default["default"].memo(Loop,areEqual),PaginatedLoop=function(e){var t=e.id;e.label;var r=e.iterations,o=e.components,n=e.bindings,a=e.handleChange,i=e.loopDependencies,p=e.maxPage,s=e.pagination,l=e.paginatedLoop,d=e.currentPage,c=e.setPage,u=e.flow,y=e.depth,m=_objectWithoutProperties(e,["id","label","iterations","components","bindings","handleChange","loopDependencies","maxPage","pagination","paginatedLoop","currentPage","setPage","flow","depth"]),g=React.useState({}),E=_slicedToArray(g,2),f=E[0],x=E[1],T=buildVectorialBindings(n),R=m.features,h=R.filter(function(e){return"MD"!==e}),C=parseInt(interpret(h)(T)(r),10)||0,A=getInvolvedVariables(o);/**
1752
- * Handle init page
1753
- */if(React.useEffect(function(){var e=A.reduce(function(e,t){var r=t.name,o=t.depth;return n[r]&&C>n[r].length?_objectSpread2(_objectSpread2({},e),{},_defineProperty({},r,[].concat(_toConsumableArray(n[r]),_toConsumableArray(Array(C-n[r].length).fill(buildEmptyValue(o)))))):e},{});0!==Object.keys(e).length&&a(e)},[C]),React.useEffect(function(){if(0!==Object.keys(f).length){var e=f.up,t=f.rowNumber,r=Object.entries(e).reduce(function(e,r){var o=_slicedToArray(r,2),a=o[0],p=o[1],s=n[a],l=s.map(function(e,r){return r===t?p:e});return _objectSpread2(_objectSpread2({},e),{},_defineProperty({},a,l))},{});a(r),x({})}},[n,f,a]),l&&y>d.split(".").length-1)return u===FLOW_NEXT?c("".concat(d,".1#1")):u===FLOW_PREVIOUS&&c("".concat(d,".").concat(p,"#").concat(C)),null;var _=buildLoopComponents(C)(o),N=splitPage(d,y),O=N.currentRootPage,I=N.currentComponentIndex,S=N.currentIteration,L=N.currentPageWithoutAnyIteration;// if (!U.displayLoop(loopDependencies)(bindings)) {
1754
- // return <div>Pas de questionnaire individuel, passez à la suite</div>;
1755
- // }
1756
- if(l&&y===d.split(".").length-1){// Previous at first component
1757
- if(1>I)return c("".concat(O,".").concat(p,"#").concat(S-1)),null;// Next at last component
1758
- if(I>p)return c("".concat(O,".1#").concat(S+1)),null;// Previous at first iteration
1759
- if(1>S){var v=O.split(".");if(1===v.length)c("".concat(parseInt(v[0],10)-1));else{var b=v.slice().pop().split("#"),k="".concat(parseInt(b[0],10)-1,"#").concat(b[1]),P=[].concat(_toConsumableArray(v.slice(0,v.length-1)),[k]).join(".");c("".concat(P))}return null}// Next at last iteration
1760
- if(S>C){var D=O.split("#"),M=1===D.length?parseInt(D[0],10)+1:D.slice(0,-1).join("#");if(1===D.length)c("".concat(M));else{var U=splitPage(O,y),F=U.currentRootPage,w=U.currentIteration;c("".concat(F,".1#").concat(w+1))}return null}}var H=_.reduce(function(e,t){var r=t.componentType,o=t.id,a=t.rowNumber,p=t.conditionFilter,y=t.page,g=_objectWithoutProperties(t,["componentType","id","rowNumber","conditionFilter","page"]),E=buildBindingsForDeeperComponents(a)(n);if(!displayLoopQuestion(i)(E))return e;var f=lunatic[r];return"normal"!==interpret(h)(E,!0)(p)||s&&!L.startsWith(y)||l&&a+1!==S?e:[].concat(_toConsumableArray(e),[/*#__PURE__*/React__default["default"].createElement("div",{key:"".concat(o,"-loop-").concat(a),className:"loop-component"},/*#__PURE__*/React__default["default"].createElement(f,_extends({},m,g,{id:"".concat(o,"-loop-").concat(a),handleChange:function(e){return x({up:e,rowNumber:a})},bindings:E,componentType:r,pagination:s,currentPage:d,setPage:c,flow:u})))])},[]);return l&&0===H.length?(u===FLOW_NEXT?c("".concat(O,".").concat(I+1,"#").concat(S)):u===FLOW_PREVIOUS&&c("".concat(O,".").concat(I-1,"#").concat(S)),null):/*#__PURE__*/React__default["default"].createElement("div",{id:"loop-".concat(t),className:"lunatic-loop"},H)},PaginatedLoop$1=/*#__PURE__*/React__default["default"].memo(PaginatedLoop,areEqual),buildContentForLoopConstructor=function(e){var t=e.components,r=e.headers,o=t.find(function(e){return e.response}).response.values[COLLECTED].length||1,n=_toConsumableArray(Array(o).keys()),a=t.map(function(e){var t=e.response,r=_objectWithoutProperties(e,["response"]);if(!t)return n.map(function(){return e});// Handle reponses & cells components ?
1761
- var o=t.name,a=t.values;return n.map(function(e){var t=Object.entries(a).reduce(function(t,r){var o=_slicedToArray(r,2),n=o[0],a=o[1];return _objectSpread2(_objectSpread2({},t),{},_defineProperty({},n,a?a[e]:null))},{});return _objectSpread2(_objectSpread2({},r),{},{response:{name:o,values:t},rowNumber:e})})},[]),i=function(e){return e[0].map(function(t,r){return e.map(function(e){return e[r]})})}(a);// Start hack to find interation number
1762
- // Refactor if we have to handle complex components (vector, matrix)
1763
- return r?[r].concat(_toConsumableArray(i)):i},BodyComponent=function(e){var t=e.componentType,r=e.mainId,o=e.headers,n=e.components,a=e.bindings,p=e.width,s=e.preferences,l=e.positioning,d=e.management,c=e.features,u=e.setTodo,y=buildContentForLoopConstructor({components:n,headers:o});return"RosterForLoop"===t?/*#__PURE__*/React__default["default"].createElement("table",{id:"table-".concat(r),className:"table-lunatic"},/*#__PURE__*/React__default["default"].createElement("tbody",null,y.map(function(e,t){return/*#__PURE__*/React__default["default"].createElement("tr",{key:"table-".concat(r,"-row").concat(t)},e.map(function(e,o){var n=e.label,i=e.headerCell,m=e.colspan,g=e.rowspan,E=e.componentType,f=e.id,x=e.rowNumber,T=_objectWithoutProperties(e,["label","headerCell","colspan","rowspan","componentType","id","rowNumber"]),R=buildBindingsForDeeperComponents(x)(a);if(E){var h=lunatic[E];return/*#__PURE__*/React__default["default"].createElement("td",{key:"table-".concat(r,"-row-").concat(t,"-cell-").concat(o),style:{width:p}},/*#__PURE__*/React__default["default"].createElement(h,_extends({},T,{id:"".concat(f,"-row-").concat(t),label:n,handleChange:function(e){u({up:e,rowNumber:x})},preferences:s,positioning:l,management:d,features:c,bindings:R,zIndex:y.length-t||0})))}var C={key:"table-".concat(r,"-row-").concat(t,"-cell-").concat(o),style:{width:p},colSpan:m||1,rowSpan:g||1},A=interpret(c)(a)(n);return i?/*#__PURE__*/React__default["default"].createElement("th",C,A):/*#__PURE__*/React__default["default"].createElement("td",C,A)}))}))):/*#__PURE__*/React__default["default"].createElement("div",{className:"block-for-loop"},y.map(function(e,t){return e.map(function(e){var r=e.componentType,o=e.id,n=e.label,i=_objectWithoutProperties(e,["componentType","id","label"]),p=lunatic[r],y=buildBindingsForDeeperComponents(t)(a);return/*#__PURE__*/React__default["default"].createElement("div",{className:"block-component",key:"".concat(o,"-row-").concat(t)},/*#__PURE__*/React__default["default"].createElement(p,_extends({},i,{id:"".concat(o,"-row-").concat(t),label:n,handleChange:function(e){u({up:e,rowNumber:t})},preferences:s,positioning:l,management:d,features:c,bindings:y})))})}))},LoopConstructorWrapper=function(e){var t=Math.max,r=e.id,o=e.label,n=e.components,a=e.handleChange,i=e.lines,p=e.declarations,s=e.features,l=e.bindings,d=e.addBtnLabel,c=e.hideBtn,u=e.componentType,y=_objectWithoutProperties(e,["id","label","components","handleChange","lines","declarations","features","bindings","addBtnLabel","hideBtn","componentType"]),m=React.useState({}),g=_slicedToArray(m,2),E=g[0],f=g[1],x=t(i.min||0,getLoopConstructorInitLines(n)),T=i?i.max:void 0,R="".concat(100/t.apply(Math,_toConsumableArray(n.map(function(e){return e.length}))),"%"),h=getInvolvedVariables(n);React.useEffect(function(){if(0!==Object.keys(E).length){var e=E.up,t=E.rowNumber,r=_slicedToArray(Object.entries(e)[0],2),o=r[0],n=r[1],i=l[o],p=i.map(function(e,r){return r===t?n:e});a(_defineProperty({},o,p)),f({})}},[l,E,a]);var C="Loop"===u&&interpret(s)(l)(o)||d;return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:BEFORE_QUESTION_TEXT,declarations:p,features:s,bindings:l}),"RosterForLoop"===u&&o&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"loops-constructor-".concat(r),id:"loops-constructor-label-".concat(r)},interpret(s)(l)(o)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:AFTER_QUESTION_TEXT,declarations:p,features:s,bindings:l}),/*#__PURE__*/React__default["default"].createElement(BodyComponent,_extends({mainId:r,componentType:u,components:n,bindings:l,width:R,features:s,setTodo:f},y)),!c&&/*#__PURE__*/React__default["default"].createElement(Button,{label:"addLine",value:C,disabled:Number.isInteger(x)&&x===T//||
1764
- // Want to enable addition depsite of empty lines?
1765
- // U.lastLoopChildLineIsEmpty(bindings)(involvedVariables)
1766
- ,onClick:function(){var e=h.reduce(function(e,t){var r=t.name;return t.depth,_objectSpread2(_objectSpread2({},e),{},_defineProperty({},r,[].concat(_toConsumableArray(l[r]),[null])))},{});a(e)}}),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:DETACHABLE,declarations:p,features:s,bindings:l}))};LoopConstructorWrapper.defaultProps={label:"",preferences:["COLLECTED"],components:[],lines:{},positioning:"DEFAULT",declarations:[],features:[],bindings:{},addBtnLabel:"Add a line",management:!1,hideBtn:!1,style:{}},LoopConstructorWrapper.propTypes={componentType:PropTypes__default["default"].string.isRequired,id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),components:PropTypes__default["default"].array,handleChange:PropTypes__default["default"].func.isRequired,lines:lines,positioning:PropTypes__default["default"].oneOf(["DEFAULT","HORIZONTAL","VERTICAL"]),declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,addBtnLabel:PropTypes__default["default"].string,hideBtn:PropTypes__default["default"].bool,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object};var LoopConstructorWrapper$1=/*#__PURE__*/React__default["default"].memo(LoopConstructorWrapper,areEqual),css_248z$3=".block-for-loop {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n.block-for-loop .block-component {\n margin-top: 0.4em;\n margin-bottom: 0.4em;\n}";styleInject(css_248z$3);var BlockForLoop=function(e){return/*#__PURE__*/React__default["default"].createElement(LoopConstructorWrapper$1,e)},BlockForLoop$1=/*#__PURE__*/React__default["default"].memo(BlockForLoop,areEqual),LoopWrapper=function(e){var t=e.iterations,r=e.pagination;return t?r?/*#__PURE__*/React__default["default"].createElement(PaginatedLoop$1,e):/*#__PURE__*/React__default["default"].createElement(Loop$1,e):/*#__PURE__*/React__default["default"].createElement(BlockForLoop$1,e)},RosterForLoop=function(e){return/*#__PURE__*/React__default["default"].createElement(LoopConstructorWrapper$1,e)},component$4=/*#__PURE__*/React__default["default"].memo(RosterForLoop,areEqual),css_248z$2=".sequence-lunatic {\n padding: 0;\n font-size: 0.875rem;\n color: var(--color-primary-light);\n background-color: var(--color-secondary-contrast-text);\n border: 0;\n height: 1.875rem;\n}";styleInject(css_248z$2);var Sequence=function(e){var t=e.id,r=e.label,o=e.declarations,n=e.features,a=e.bindings,i=e.style;return/*#__PURE__*/React__default["default"].createElement(SimpleDeclarationsWrapper,{id:t,declarations:o,features:n,bindings:a},/*#__PURE__*/React__default["default"].createElement("div",{"aria-label":"sequence-".concat(t),className:"sequence-lunatic",style:buildStyleObject(i)},interpret(n)(a)(r)))};Sequence.defaultProps={declarations:[],features:[],bindings:{},style:{}},Sequence.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string.isRequired,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,style:PropTypes__default["default"].object};var component$3=/*#__PURE__*/React__default["default"].memo(Sequence,areEqual),Subsequence=function(e){var t=e.id,r=e.label,o=e.declarations,n=e.features,a=e.bindings,i=e.style;return/*#__PURE__*/React__default["default"].createElement(SimpleDeclarationsWrapper,{id:t,declarations:o,features:n,bindings:a},/*#__PURE__*/React__default["default"].createElement("div",{"aria-label":"subsequence-".concat(t),className:"subsequence-lunatic",style:buildStyleObject(i)},interpret(n)(a)(r)))};Subsequence.defaultProps={declarations:[],features:[],bindings:{},style:{}},Subsequence.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string.isRequired,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,style:PropTypes__default["default"].object};var component$2=/*#__PURE__*/React__default["default"].memo(Subsequence,areEqual),Suggester=function(e){var t=e.id,r=e.label;e.preferences;var o=e.response;e.handleChange,e.disabled,e.positioning,e.focused;var n=e.declarations,a=e.features,i=e.bindings,p=e.management,s=e.labelPosition;return e.style,/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:BEFORE_QUESTION_TEXT,declarations:n,features:a,bindings:i}),/*#__PURE__*/React__default["default"].createElement("div",{className:getLabelPositionClass(s)},r&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"suggester-".concat(t)},interpret(a)(i)(r)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:AFTER_QUESTION_TEXT,declarations:n,features:a,bindings:i}),/*#__PURE__*/React__default["default"].createElement("div",{className:"field-container"},/*#__PURE__*/React__default["default"].createElement("div",{className:"".concat(p?"field-with-tooltip":"field")},"TODO: Add suggester component"),p&&/*#__PURE__*/React__default["default"].createElement("div",{className:"tooltip"},/*#__PURE__*/React__default["default"].createElement(TooltipResponse,{id:t,response:buildBooleanTooltipResponse(o)})))),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:t,type:DETACHABLE,declarations:n,features:a,bindings:i}))};Suggester.defaultProps={label:"",preferences:["COLLECTED"],response:{},disabled:!1,focused:!1,declarations:[],features:[],bindings:{},management:!1,labelPosition:"DEFAULT",style:{}},Suggester.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),response:response,handleChange:PropTypes__default["default"].func.isRequired,disabled:PropTypes__default["default"].bool,focused:PropTypes__default["default"].bool,declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,management:PropTypes__default["default"].bool,path:PropTypes__default["default"].string.isRequired,labelPosition:PropTypes__default["default"].oneOf(["DEFAULT","TOP","BOTTOM","LEFT","RIGHT"]),style:PropTypes__default["default"].object};var component$1=/*#__PURE__*/React__default["default"].memo(Suggester,areEqual),css_248z$1=".textarea-lunatic {\n height: 3em;\n width: 100%;\n}";styleInject(css_248z$1);var Textarea=function(e){return/*#__PURE__*/React__default["default"].createElement(InputDeclarationsWrapper,_extends({type:null,roleType:"textarea"},e))},component=/*#__PURE__*/React__default["default"].memo(Textarea,areEqual),css_248z=".table-lunatic {\n table-layout: fixed;\n border-collapse: collapse;\n margin-top: 0.3em;\n margin-bottom: 0.3em;\n}\n.table-lunatic td,\n.table-lunatic th {\n border: 0.15em solid var(--color-primary-dark);\n padding: 0.2em;\n}\n.table-lunatic td .field,\n.table-lunatic td .field-with-tooltip {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.table-lunatic .tooltip-lunatic img {\n height: 20px;\n width: 20px;\n}";styleInject(css_248z);var Table=function(e){var t=Math.max,r=e.id,o=e.label,n=e.preferences,a=e.cells,p=e.handleChange,s=e.lines,l=e.positioning,d=e.declarations,c=e.features,u=e.bindings,y=e.addBtnLabel,m=e.hideBtn,g=e.management;e.numberAsTextfield;var E=s?t(s.min,getRosterInitLines(a)):void 0,f=s?s.max:void 0,x=React.useState(E),T=_slicedToArray(x,2),R=T[0],h=T[1],C="".concat(100/t.apply(Math,_toConsumableArray(a.map(function(e){return e.length}))),"%");return/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment,null,/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:BEFORE_QUESTION_TEXT,declarations:d,features:c,bindings:u}),o&&/*#__PURE__*/React__default["default"].createElement("label",{htmlFor:"table-one-axis-".concat(r),id:"table-one-axis-label-".concat(r)},interpret(c)(u)(o)),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:AFTER_QUESTION_TEXT,declarations:d,features:c,bindings:u}),/*#__PURE__*/React__default["default"].createElement("table",{id:"table-".concat(r),className:"table-lunatic"},/*#__PURE__*/React__default["default"].createElement("tbody",null,(E||0===E?a.slice(0,R+1):a).map(function(e,t){return/*#__PURE__*/React__default["default"].createElement("tr",{key:"table-".concat(r,"-line").concat(t)},e.map(function(e,o){var i=e.label,s=e.headerCell,d=e.colspan,y=e.rowspan,m=e.componentType,E=_objectWithoutProperties(e,["label","headerCell","colspan","rowspan","componentType"]);if(m){var f=lunatic[m];return/*#__PURE__*/React__default["default"].createElement("td",{key:"table-".concat(r,"-line").concat(t,"-cell-").concat(o),style:{width:C}},/*#__PURE__*/React__default["default"].createElement(f,_extends({label:i||" ",handleChange:p,preferences:n,positioning:l,management:g,features:c,bindings:u},E,{zIndex:a.length-t||0,numberAsTextfield:!0})))}var x={key:"table-".concat(r,"-line").concat(t,"-cell-").concat(o),style:{width:C},colSpan:d||1,rowSpan:y||1},T=interpret(c)(u)(i);return s?/*#__PURE__*/React__default["default"].createElement("th",x,T):/*#__PURE__*/React__default["default"].createElement("td",x,T)}))}))),Number.isInteger(E)&&R<f&&!m&&/*#__PURE__*/React__default["default"].createElement(Button,{label:"addLine",value:y,onClick:function(){return h(R+1)}}),/*#__PURE__*/React__default["default"].createElement(Declarations,{id:r,type:DETACHABLE,declarations:d,features:c,bindings:u}))};Table.defaultProps={label:"",preferences:["COLLECTED"],cells:[],lines:{},positioning:"DEFAULT",declarations:[],features:[],bindings:{},addBtnLabel:"Add a line",management:!1,hideBtn:!1,style:{}},Table.propTypes={id:PropTypes__default["default"].string.isRequired,label:PropTypes__default["default"].string,preferences:PropTypes__default["default"].arrayOf(valueType),cells:PropTypes__default["default"].array,handleChange:PropTypes__default["default"].func.isRequired,lines:lines,positioning:PropTypes__default["default"].oneOf(["DEFAULT","HORIZONTAL","VERTICAL"]),declarations:declarations,features:PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),bindings:PropTypes__default["default"].object,addBtnLabel:PropTypes__default["default"].string,hideBtn:PropTypes__default["default"].bool,management:PropTypes__default["default"].bool,style:PropTypes__default["default"].object};var table=/*#__PURE__*/React__default["default"].memo(Table,areEqual);exports.Breadcrumb=Breadcrumb,exports.Button=Button,exports.CheckboxBoolean=boolean,exports.CheckboxGroup=group,exports.CheckboxOne=one,exports.Datepicker=component$7,exports.Declarations=Declarations,exports.Dropdown=component$6,exports.FilterDescription=FilterDescription,exports.Input=input,exports.InputNumber=inputNumber,exports.Loop=LoopWrapper,exports.ProgressBar=ProgressBar,exports.Radio=component$5,exports.RosterForLoop=component$4,exports.Sequence=component$3,exports.Subsequence=component$2,exports.Suggester=component$1,exports.Table=table,exports.Textarea=component,exports.TooltipResponse=TooltipResponse,exports.getBindings=getBindings,exports.getCollectedState=getCollectedState,exports.getCollectedStateByValueType=getCollectedStateByValueType,exports.getState=getState,exports.interpret=interpret,exports.interpretWithEmptyDefault=interpretWithEmptyDefault,exports.mergeQuestionnaireAndData=mergeQuestionnaireAndData,exports.useLunatic=useLunatic;
1767
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ useLunatic: true
8
+ };
9
+ Object.defineProperty(exports, "useLunatic", {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _useLunatic["default"];
13
+ }
14
+ });
15
+ var _components = require("./components");
16
+ Object.keys(_components).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _components[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _components[key];
24
+ }
25
+ });
26
+ });
27
+ var _useLunatic = _interopRequireDefault(require("./use-lunatic"));
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }