@perspective-dev/viewer 4.0.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 (394) hide show
  1. package/LICENSE.md +193 -0
  2. package/README.md +4 -0
  3. package/dist/cdn/perspective-viewer.js +3 -0
  4. package/dist/cdn/perspective-viewer.js.map +7 -0
  5. package/dist/css/dracula.css +1 -0
  6. package/dist/css/gruvbox-dark.css +1 -0
  7. package/dist/css/gruvbox.css +1 -0
  8. package/dist/css/icons.css +1 -0
  9. package/dist/css/intl/de.css +1 -0
  10. package/dist/css/intl/es.css +1 -0
  11. package/dist/css/intl/fr.css +1 -0
  12. package/dist/css/intl/ja.css +1 -0
  13. package/dist/css/intl/pt.css +1 -0
  14. package/dist/css/intl/zh.css +1 -0
  15. package/dist/css/intl.css +1 -0
  16. package/dist/css/monokai.css +1 -0
  17. package/dist/css/pro-dark.css +1 -0
  18. package/dist/css/pro.css +1 -0
  19. package/dist/css/solarized-dark.css +1 -0
  20. package/dist/css/solarized.css +1 -0
  21. package/dist/css/themes.css +1 -0
  22. package/dist/css/vaporwave.css +1 -0
  23. package/dist/css/variables.css +0 -0
  24. package/dist/esm/bootstrap.d.ts +1 -0
  25. package/dist/esm/extensions.d.ts +70 -0
  26. package/dist/esm/perspective-viewer.d.ts +39 -0
  27. package/dist/esm/perspective-viewer.inline.js +3 -0
  28. package/dist/esm/perspective-viewer.inline.js.map +7 -0
  29. package/dist/esm/perspective-viewer.js +3 -0
  30. package/dist/esm/perspective-viewer.js.map +7 -0
  31. package/dist/esm/plugin.d.ts +195 -0
  32. package/dist/esm/ts-rs/Aggregate.d.ts +1 -0
  33. package/dist/esm/ts-rs/ColumnConfigValues.d.ts +31 -0
  34. package/dist/esm/ts-rs/CustomDatetimeFormat.d.ts +1 -0
  35. package/dist/esm/ts-rs/CustomDatetimeStyleConfig.d.ts +15 -0
  36. package/dist/esm/ts-rs/CustomNumberFormatConfig.d.ts +18 -0
  37. package/dist/esm/ts-rs/DatetimeColorMode.d.ts +1 -0
  38. package/dist/esm/ts-rs/DatetimeFormatType.d.ts +6 -0
  39. package/dist/esm/ts-rs/Expressions.d.ts +3 -0
  40. package/dist/esm/ts-rs/Filter.d.ts +2 -0
  41. package/dist/esm/ts-rs/FilterReducer.d.ts +1 -0
  42. package/dist/esm/ts-rs/FilterTerm.d.ts +2 -0
  43. package/dist/esm/ts-rs/FormatMode.d.ts +1 -0
  44. package/dist/esm/ts-rs/FormatUnit.d.ts +1 -0
  45. package/dist/esm/ts-rs/NumberBackgroundMode.d.ts +1 -0
  46. package/dist/esm/ts-rs/NumberForegroundMode.d.ts +1 -0
  47. package/dist/esm/ts-rs/OptionalUpdate.d.ts +1 -0
  48. package/dist/esm/ts-rs/PluginConfig.d.ts +2 -0
  49. package/dist/esm/ts-rs/RoundingMode.d.ts +1 -0
  50. package/dist/esm/ts-rs/RoundingPriority.d.ts +1 -0
  51. package/dist/esm/ts-rs/Scalar.d.ts +5 -0
  52. package/dist/esm/ts-rs/SignDisplay.d.ts +1 -0
  53. package/dist/esm/ts-rs/SimpleDatetimeFormat.d.ts +1 -0
  54. package/dist/esm/ts-rs/SimpleDatetimeStyleConfig.d.ts +6 -0
  55. package/dist/esm/ts-rs/Sort.d.ts +2 -0
  56. package/dist/esm/ts-rs/SortDir.d.ts +1 -0
  57. package/dist/esm/ts-rs/StringColorMode.d.ts +1 -0
  58. package/dist/esm/ts-rs/TrailingZeroDisplay.d.ts +1 -0
  59. package/dist/esm/ts-rs/UseGrouping.d.ts +1 -0
  60. package/dist/esm/ts-rs/ViewerConfigUpdate.d.ts +102 -0
  61. package/dist/esm/ts-rs/serde_json/JsonValue.d.ts +3 -0
  62. package/dist/wasm/perspective-viewer.d.ts +1291 -0
  63. package/dist/wasm/perspective-viewer.js +3883 -0
  64. package/dist/wasm/perspective-viewer.wasm +0 -0
  65. package/dist/wasm/perspective-viewer.wasm.d.ts +142 -0
  66. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline0.js +1 -0
  67. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline1.js +1 -0
  68. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline2.js +1 -0
  69. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline3.js +44 -0
  70. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline4.js +1 -0
  71. package/package.json +55 -0
  72. package/src/less/aggregate-selector.less +72 -0
  73. package/src/less/column-dropdown.less +95 -0
  74. package/src/less/column-selector.less +551 -0
  75. package/src/less/column-settings-panel.less +255 -0
  76. package/src/less/column-style.less +319 -0
  77. package/src/less/column-symbol-attributes.less +73 -0
  78. package/src/less/config-selector.less +363 -0
  79. package/src/less/containers/dropdown-menu.less +94 -0
  80. package/src/less/containers/pairs-list.less +46 -0
  81. package/src/less/containers/radio-list.less +29 -0
  82. package/src/less/containers/scroll-panel.less +27 -0
  83. package/src/less/containers/split-panel.less +80 -0
  84. package/src/less/containers/tabs.less +90 -0
  85. package/src/less/dom/checkbox.less +100 -0
  86. package/src/less/dom/scrollbar.less +35 -0
  87. package/src/less/dom/select.less +63 -0
  88. package/src/less/empty-column.less +72 -0
  89. package/src/less/expression-editor.less +152 -0
  90. package/src/less/filter-dropdown.less +53 -0
  91. package/src/less/filter-item.less +126 -0
  92. package/src/less/form/code-editor.less +137 -0
  93. package/src/less/form/debug.less +88 -0
  94. package/src/less/function-dropdown.less +45 -0
  95. package/src/less/plugin-selector.less +173 -0
  96. package/src/less/render-warning.less +81 -0
  97. package/src/less/status-bar.less +551 -0
  98. package/src/less/type-icon.less +68 -0
  99. package/src/less/viewer.less +368 -0
  100. package/src/rust/components/column_dropdown.rs +162 -0
  101. package/src/rust/components/column_selector/active_column.rs +462 -0
  102. package/src/rust/components/column_selector/add_expression_button.rs +59 -0
  103. package/src/rust/components/column_selector/aggregate_selector.rs +186 -0
  104. package/src/rust/components/column_selector/config_selector.rs +674 -0
  105. package/src/rust/components/column_selector/empty_column.rs +134 -0
  106. package/src/rust/components/column_selector/expression_toolbar.rs +45 -0
  107. package/src/rust/components/column_selector/filter_column.rs +530 -0
  108. package/src/rust/components/column_selector/inactive_column.rs +221 -0
  109. package/src/rust/components/column_selector/invalid_column.rs +37 -0
  110. package/src/rust/components/column_selector/pivot_column.rs +93 -0
  111. package/src/rust/components/column_selector/sort_column.rs +135 -0
  112. package/src/rust/components/column_selector.rs +426 -0
  113. package/src/rust/components/column_settings_sidebar/attributes_tab.rs +34 -0
  114. package/src/rust/components/column_settings_sidebar/mod.rs +17 -0
  115. package/src/rust/components/column_settings_sidebar/save_settings.rs +68 -0
  116. package/src/rust/components/column_settings_sidebar/sidebar.rs +396 -0
  117. package/src/rust/components/column_settings_sidebar/style_tab/column_style.rs +177 -0
  118. package/src/rust/components/column_settings_sidebar/style_tab/stub.rs +34 -0
  119. package/src/rust/components/column_settings_sidebar/style_tab/symbol/row_selector.rs +101 -0
  120. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_config.rs +24 -0
  121. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs.rs +185 -0
  122. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_selector.rs +55 -0
  123. package/src/rust/components/column_settings_sidebar/style_tab/symbol.rs +131 -0
  124. package/src/rust/components/column_settings_sidebar/style_tab.rs +231 -0
  125. package/src/rust/components/containers/dragdrop_list.rs +325 -0
  126. package/src/rust/components/containers/dropdown_menu.rs +104 -0
  127. package/src/rust/components/containers/kvpair.rs +47 -0
  128. package/src/rust/components/containers/mod.rs +28 -0
  129. package/src/rust/components/containers/scroll_panel.rs +311 -0
  130. package/src/rust/components/containers/scroll_panel_item.rs +111 -0
  131. package/src/rust/components/containers/select.rs +269 -0
  132. package/src/rust/components/containers/sidebar.rs +89 -0
  133. package/src/rust/components/containers/split_panel.rs +483 -0
  134. package/src/rust/components/containers/tab_list.rs +104 -0
  135. package/src/rust/components/containers/tests/mod.rs +11 -0
  136. package/src/rust/components/containers/tests/split_panel.rs +91 -0
  137. package/src/rust/components/containers/trap_door_panel.rs +50 -0
  138. package/src/rust/components/copy_dropdown.rs +136 -0
  139. package/src/rust/components/datetime_column_style/custom.rs +222 -0
  140. package/src/rust/components/datetime_column_style/simple.rs +122 -0
  141. package/src/rust/components/datetime_column_style.rs +284 -0
  142. package/src/rust/components/editable_header.rs +183 -0
  143. package/src/rust/components/empty_row.rs +169 -0
  144. package/src/rust/components/error_message.rs +56 -0
  145. package/src/rust/components/export_dropdown.rs +153 -0
  146. package/src/rust/components/expression_editor.rs +153 -0
  147. package/src/rust/components/filter_dropdown.rs +144 -0
  148. package/src/rust/components/font_loader.rs +254 -0
  149. package/src/rust/components/form/code_editor.rs +286 -0
  150. package/src/rust/components/form/color_range_selector.rs +115 -0
  151. package/src/rust/components/form/color_selector.rs +54 -0
  152. package/src/rust/components/form/debug.rs +253 -0
  153. package/src/rust/components/form/highlight.rs +50 -0
  154. package/src/rust/components/form/mod.rs +29 -0
  155. package/src/rust/components/form/number_field.rs +72 -0
  156. package/src/rust/components/form/number_input.rs +45 -0
  157. package/src/rust/components/form/number_range_field.rs +77 -0
  158. package/src/rust/components/form/optional_field.rs +53 -0
  159. package/src/rust/components/form/select_field.rs +104 -0
  160. package/src/rust/components/function_dropdown.rs +151 -0
  161. package/src/rust/components/mod.rs +45 -0
  162. package/src/rust/components/modal.rs +171 -0
  163. package/src/rust/components/number_column_style.rs +522 -0
  164. package/src/rust/components/plugin_selector.rs +196 -0
  165. package/src/rust/components/render_warning.rs +178 -0
  166. package/src/rust/components/status_bar.rs +315 -0
  167. package/src/rust/components/status_bar_counter.rs +229 -0
  168. package/src/rust/components/status_indicator.rs +164 -0
  169. package/src/rust/components/string_column_style.rs +186 -0
  170. package/src/rust/components/style/local_style.rs +35 -0
  171. package/src/rust/components/style/mod.rs +52 -0
  172. package/src/rust/components/style/style_cache.rs +132 -0
  173. package/src/rust/components/style/style_provider.rs +65 -0
  174. package/src/rust/components/style_controls/number_string_format/digits_section.rs +140 -0
  175. package/src/rust/components/style_controls/number_string_format/misc_section.rs +56 -0
  176. package/src/rust/components/style_controls/number_string_format/style_section.rs +69 -0
  177. package/src/rust/components/style_controls/number_string_format/types.rs +31 -0
  178. package/src/rust/components/style_controls/number_string_format.rs +259 -0
  179. package/src/rust/components/style_controls.rs +15 -0
  180. package/src/rust/components/type_icon.rs +53 -0
  181. package/src/rust/components/viewer.rs +668 -0
  182. package/src/rust/config/columns_config.rs +132 -0
  183. package/src/rust/config/datetime_column_style/color_mode.rs +62 -0
  184. package/src/rust/config/datetime_column_style/custom.rs +121 -0
  185. package/src/rust/config/datetime_column_style/custom_format.rs +90 -0
  186. package/src/rust/config/datetime_column_style/simple.rs +55 -0
  187. package/src/rust/config/datetime_column_style/simple_format.rs +86 -0
  188. package/src/rust/config/datetime_column_style.rs +104 -0
  189. package/src/rust/config/mod.rs +30 -0
  190. package/src/rust/config/number_column_style.rs +138 -0
  191. package/src/rust/config/number_string_format/enums.rs +298 -0
  192. package/src/rust/config/number_string_format.rs +269 -0
  193. package/src/rust/config/string_column_style.rs +140 -0
  194. package/src/rust/config/view_config.rs +24 -0
  195. package/src/rust/config/viewer_config.rs +337 -0
  196. package/src/rust/custom_elements/column_dropdown.rs +123 -0
  197. package/src/rust/custom_elements/copy_dropdown.rs +112 -0
  198. package/src/rust/custom_elements/debug_plugin.rs +114 -0
  199. package/src/rust/custom_elements/export_dropdown.rs +112 -0
  200. package/src/rust/custom_elements/filter_dropdown.rs +179 -0
  201. package/src/rust/custom_elements/function_dropdown.rs +115 -0
  202. package/src/rust/custom_elements/mod.rs +24 -0
  203. package/src/rust/custom_elements/modal.rs +395 -0
  204. package/src/rust/custom_elements/viewer.rs +880 -0
  205. package/src/rust/custom_events.rs +214 -0
  206. package/src/rust/dragdrop.rs +362 -0
  207. package/src/rust/exprtk/cursor.rs +81 -0
  208. package/src/rust/exprtk/mod.rs +17 -0
  209. package/src/rust/exprtk/tokenize/comment.rs +21 -0
  210. package/src/rust/exprtk/tokenize/number.rs +44 -0
  211. package/src/rust/exprtk/tokenize/string.rs +98 -0
  212. package/src/rust/exprtk/tokenize/symbol.rs +26 -0
  213. package/src/rust/exprtk/tokenize.rs +190 -0
  214. package/src/rust/js/clipboard.rs +77 -0
  215. package/src/rust/js/clipboard_item.rs +21 -0
  216. package/src/rust/js/intersection_observer.rs +32 -0
  217. package/src/rust/js/mimetype.rs +42 -0
  218. package/src/rust/js/mod.rs +29 -0
  219. package/src/rust/js/plugin.rs +167 -0
  220. package/src/rust/js/resize_observer.rs +37 -0
  221. package/src/rust/js/testing.rs +149 -0
  222. package/src/rust/lib.rs +116 -0
  223. package/src/rust/model/columns_iter_set.rs +340 -0
  224. package/src/rust/model/copy_export.rs +157 -0
  225. package/src/rust/model/create_col.rs +59 -0
  226. package/src/rust/model/edit_expression.rs +95 -0
  227. package/src/rust/model/export_app.rs +58 -0
  228. package/src/rust/model/export_method.rs +151 -0
  229. package/src/rust/model/get_viewer_config.rs +85 -0
  230. package/src/rust/model/intersection_observer.rs +81 -0
  231. package/src/rust/model/is_invalid_drop.rs +36 -0
  232. package/src/rust/model/mod.rs +93 -0
  233. package/src/rust/model/plugin_column_styles.rs +106 -0
  234. package/src/rust/model/resize_observer.rs +98 -0
  235. package/src/rust/model/restore_and_render.rs +113 -0
  236. package/src/rust/model/structural.rs +73 -0
  237. package/src/rust/model/update_and_render.rs +74 -0
  238. package/src/rust/presentation.rs +370 -0
  239. package/src/rust/renderer/activate.rs +49 -0
  240. package/src/rust/renderer/limits.rs +200 -0
  241. package/src/rust/renderer/plugin_store.rs +45 -0
  242. package/src/rust/renderer/registry.rs +135 -0
  243. package/src/rust/renderer/render_timer.rs +185 -0
  244. package/src/rust/renderer.rs +463 -0
  245. package/src/rust/session/column_defaults_update.rs +141 -0
  246. package/src/rust/session/drag_drop_update.rs +179 -0
  247. package/src/rust/session/metadata.rs +308 -0
  248. package/src/rust/session/replace_expression_update.rs +131 -0
  249. package/src/rust/session/view_subscription.rs +189 -0
  250. package/src/rust/session.rs +794 -0
  251. package/src/rust/utils/browser/blob.rs +49 -0
  252. package/src/rust/utils/browser/download.rs +26 -0
  253. package/src/rust/utils/browser/mod.rs +24 -0
  254. package/src/rust/utils/browser/request_animation_frame.rs +76 -0
  255. package/src/rust/utils/browser/selection.rs +79 -0
  256. package/src/rust/utils/browser/tests/debounce.rs +114 -0
  257. package/src/rust/utils/browser/tests/mod.rs +13 -0
  258. package/src/rust/utils/custom_element.rs +85 -0
  259. package/src/rust/utils/datetime.rs +49 -0
  260. package/src/rust/utils/debounce.rs +54 -0
  261. package/src/rust/utils/hooks/mod.rs +15 -0
  262. package/src/rust/utils/hooks/use_async_callback.rs +53 -0
  263. package/src/rust/utils/mod.rs +114 -0
  264. package/src/rust/utils/number_format.rs +48 -0
  265. package/src/rust/utils/pubsub.rs +222 -0
  266. package/src/rust/utils/scope.rs +54 -0
  267. package/src/rust/utils/tee.rs +88 -0
  268. package/src/rust/utils/tests/mod.rs +14 -0
  269. package/src/rust/utils/tests/pubsub.rs +95 -0
  270. package/src/rust/utils/tests/request_animation_frame.rs +42 -0
  271. package/src/rust/utils/wasm_abi.rs +61 -0
  272. package/src/rust/utils/weak_scope.rs +39 -0
  273. package/src/svg/align-scroll-icon.svg +7 -0
  274. package/src/svg/bg-pattern.png +0 -0
  275. package/src/svg/boolean-type.svg +3 -0
  276. package/src/svg/checkbox-checked-icon.svg +7 -0
  277. package/src/svg/checkbox-hover.svg +4 -0
  278. package/src/svg/checkbox-off.svg +4 -0
  279. package/src/svg/checkbox-on.svg +4 -0
  280. package/src/svg/checkbox-unchecked-icon.svg +3 -0
  281. package/src/svg/close-icon.svg +6 -0
  282. package/src/svg/column-settings-icon.svg +6 -0
  283. package/src/svg/datagrid-select-column.svg +15 -0
  284. package/src/svg/datagrid-select-region.svg +15 -0
  285. package/src/svg/datagrid-select-row.svg +13 -0
  286. package/src/svg/datagrid.svg +13 -0
  287. package/src/svg/date-type.svg +23 -0
  288. package/src/svg/downloading.gif +0 -0
  289. package/src/svg/drag-handle.svg +10 -0
  290. package/src/svg/drawer-bg-pattern-hidpi.png +0 -0
  291. package/src/svg/drawer-tab-hover.svg +8 -0
  292. package/src/svg/drawer-tab-invert-hover.svg +9 -0
  293. package/src/svg/drawer-tab-invert.svg +8 -0
  294. package/src/svg/drawer-tab.svg +7 -0
  295. package/src/svg/dropdown-selector-light.svg +3 -0
  296. package/src/svg/dropdown-selector.svg +3 -0
  297. package/src/svg/duplicate-icon.svg +4 -0
  298. package/src/svg/editable-icon.svg +5 -0
  299. package/src/svg/export-icon.svg +4 -0
  300. package/src/svg/expression.svg +10 -0
  301. package/src/svg/free-scroll-icon.svg +5 -0
  302. package/src/svg/inactive-mouseover.svg +4 -0
  303. package/src/svg/mega-menu-icons-candlestick.svg +38 -0
  304. package/src/svg/mega-menu-icons-datagrid.svg +38 -0
  305. package/src/svg/mega-menu-icons-heatmap.svg +60 -0
  306. package/src/svg/mega-menu-icons-map-scatter.svg +43 -0
  307. package/src/svg/mega-menu-icons-ohlc.svg +40 -0
  308. package/src/svg/mega-menu-icons-sunburst.svg +39 -0
  309. package/src/svg/mega-menu-icons-treemap.svg +44 -0
  310. package/src/svg/mega-menu-icons-x-bar.svg +36 -0
  311. package/src/svg/mega-menu-icons-x-y-line.svg +38 -0
  312. package/src/svg/mega-menu-icons-x-y-scatter.svg +72 -0
  313. package/src/svg/mega-menu-icons-y-area.svg +73 -0
  314. package/src/svg/mega-menu-icons-y-bar.svg +36 -0
  315. package/src/svg/mega-menu-icons-y-line.svg +36 -0
  316. package/src/svg/mega-menu-icons-y-scatter.svg +72 -0
  317. package/src/svg/number-type.svg +4 -0
  318. package/src/svg/radio-hover.svg +4 -0
  319. package/src/svg/radio-off.svg +3 -0
  320. package/src/svg/radio-on.svg +4 -0
  321. package/src/svg/read-only-icon.svg +6 -0
  322. package/src/svg/revert-icon.svg +4 -0
  323. package/src/svg/sort-abs-asc-icon.svg +3 -0
  324. package/src/svg/sort-abs-col-asc-icon.svg +3 -0
  325. package/src/svg/sort-abs-col-desc-icon.svg +3 -0
  326. package/src/svg/sort-abs-desc-icon.svg +3 -0
  327. package/src/svg/sort-asc-icon.svg +4 -0
  328. package/src/svg/sort-col-asc-icon.svg +4 -0
  329. package/src/svg/sort-col-desc-icon.svg +4 -0
  330. package/src/svg/sort-desc-icon.svg +4 -0
  331. package/src/svg/sort-none-icon.svg +3 -0
  332. package/src/svg/status_error.svg +70 -0
  333. package/src/svg/status_ok.svg +26 -0
  334. package/src/svg/string-type.svg +8 -0
  335. package/src/svg/theme-icon.svg +5 -0
  336. package/src/svg/updating.gif +0 -0
  337. package/src/themes/dracula.less +101 -0
  338. package/src/themes/gruvbox-dark.less +116 -0
  339. package/src/themes/gruvbox.less +152 -0
  340. package/src/themes/icons.less +130 -0
  341. package/src/themes/intl/de.less +102 -0
  342. package/src/themes/intl/es.less +102 -0
  343. package/src/themes/intl/fr.less +102 -0
  344. package/src/themes/intl/ja.less +102 -0
  345. package/src/themes/intl/pt.less +102 -0
  346. package/src/themes/intl/zh.less +102 -0
  347. package/src/themes/intl.less +102 -0
  348. package/src/themes/monokai.less +107 -0
  349. package/src/themes/pro-dark.less +147 -0
  350. package/src/themes/pro.less +186 -0
  351. package/src/themes/solarized-dark.less +78 -0
  352. package/src/themes/solarized.less +102 -0
  353. package/src/themes/themes.less +21 -0
  354. package/src/themes/vaporwave.less +145 -0
  355. package/src/themes/variables.less +24 -0
  356. package/src/ts/bootstrap.ts +26 -0
  357. package/src/ts/extensions.ts +124 -0
  358. package/src/ts/perspective-viewer.cdn.ts +19 -0
  359. package/src/ts/perspective-viewer.inline.ts +23 -0
  360. package/src/ts/perspective-viewer.ts +59 -0
  361. package/src/ts/plugin.ts +279 -0
  362. package/src/ts/ts-rs/Aggregate.ts +3 -0
  363. package/src/ts/ts-rs/ColumnConfigValues.ts +14 -0
  364. package/src/ts/ts-rs/CustomDatetimeFormat.ts +3 -0
  365. package/src/ts/ts-rs/CustomDatetimeStyleConfig.ts +5 -0
  366. package/src/ts/ts-rs/CustomNumberFormatConfig.ts +8 -0
  367. package/src/ts/ts-rs/DatetimeColorMode.ts +3 -0
  368. package/src/ts/ts-rs/DatetimeFormatType.ts +8 -0
  369. package/src/ts/ts-rs/Expressions.ts +3 -0
  370. package/src/ts/ts-rs/Filter.ts +4 -0
  371. package/src/ts/ts-rs/FilterReducer.ts +3 -0
  372. package/src/ts/ts-rs/FilterTerm.ts +4 -0
  373. package/src/ts/ts-rs/FormatMode.ts +3 -0
  374. package/src/ts/ts-rs/FormatUnit.ts +3 -0
  375. package/src/ts/ts-rs/NumberBackgroundMode.ts +3 -0
  376. package/src/ts/ts-rs/NumberForegroundMode.ts +3 -0
  377. package/src/ts/ts-rs/OnUpdateData.ts +8 -0
  378. package/src/ts/ts-rs/OptionalUpdate.ts +3 -0
  379. package/src/ts/ts-rs/PluginConfig.ts +4 -0
  380. package/src/ts/ts-rs/RoundingMode.ts +3 -0
  381. package/src/ts/ts-rs/RoundingPriority.ts +3 -0
  382. package/src/ts/ts-rs/Scalar.ts +7 -0
  383. package/src/ts/ts-rs/SignDisplay.ts +3 -0
  384. package/src/ts/ts-rs/SimpleDatetimeFormat.ts +3 -0
  385. package/src/ts/ts-rs/SimpleDatetimeStyleConfig.ts +4 -0
  386. package/src/ts/ts-rs/Sort.ts +4 -0
  387. package/src/ts/ts-rs/SortDir.ts +3 -0
  388. package/src/ts/ts-rs/StringColorMode.ts +3 -0
  389. package/src/ts/ts-rs/TrailingZeroDisplay.ts +3 -0
  390. package/src/ts/ts-rs/UseGrouping.ts +3 -0
  391. package/src/ts/ts-rs/ViewOnUpdateResp.ts +3 -0
  392. package/src/ts/ts-rs/ViewerConfigUpdate.ts +90 -0
  393. package/src/ts/ts-rs/serde_json/JsonValue.ts +3 -0
  394. package/tsconfig.json +15 -0
@@ -0,0 +1,3883 @@
1
+ import { ClipboardItem } from './snippets/perspective-viewer-c69283f6f62a5f14/inline0.js';
2
+ import { IntersectionObserver } from './snippets/perspective-viewer-c69283f6f62a5f14/inline1.js';
3
+ import { ResizeObserver } from './snippets/perspective-viewer-c69283f6f62a5f14/inline2.js';
4
+ import { bootstrap } from './snippets/perspective-viewer-c69283f6f62a5f14/inline3.js';
5
+ import { psp } from './snippets/perspective-viewer-c69283f6f62a5f14/inline4.js';
6
+
7
+ let wasm;
8
+
9
+ const heap = new Array(128).fill(undefined);
10
+
11
+ heap.push(undefined, null, true, false);
12
+
13
+ function getObject(idx) { return heap[idx]; }
14
+
15
+ let WASM_VECTOR_LEN = 0;
16
+
17
+ let cachedUint8ArrayMemory0 = null;
18
+
19
+ function getUint8ArrayMemory0() {
20
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
21
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
22
+ }
23
+ return cachedUint8ArrayMemory0;
24
+ }
25
+
26
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
27
+
28
+ const encodeString = function (arg, view) {
29
+ return cachedTextEncoder.encodeInto(arg, view);
30
+ };
31
+
32
+ function passStringToWasm0(arg, malloc, realloc) {
33
+
34
+ if (realloc === undefined) {
35
+ const buf = cachedTextEncoder.encode(arg);
36
+ const ptr = malloc(buf.length, 1) >>> 0;
37
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
38
+ WASM_VECTOR_LEN = buf.length;
39
+ return ptr;
40
+ }
41
+
42
+ let len = arg.length;
43
+ let ptr = malloc(len, 1) >>> 0;
44
+
45
+ const mem = getUint8ArrayMemory0();
46
+
47
+ let offset = 0;
48
+
49
+ for (; offset < len; offset++) {
50
+ const code = arg.charCodeAt(offset);
51
+ if (code > 0x7F) break;
52
+ mem[ptr + offset] = code;
53
+ }
54
+
55
+ if (offset !== len) {
56
+ if (offset !== 0) {
57
+ arg = arg.slice(offset);
58
+ }
59
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
60
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
61
+ const ret = encodeString(arg, view);
62
+
63
+ offset += ret.written;
64
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
65
+ }
66
+
67
+ WASM_VECTOR_LEN = offset;
68
+ return ptr;
69
+ }
70
+
71
+ let cachedDataViewMemory0 = null;
72
+
73
+ function getDataViewMemory0() {
74
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
75
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
76
+ }
77
+ return cachedDataViewMemory0;
78
+ }
79
+
80
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
81
+
82
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
83
+
84
+ function getStringFromWasm0(ptr, len) {
85
+ ptr = ptr >>> 0;
86
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
87
+ }
88
+
89
+ let heap_next = heap.length;
90
+
91
+ function addHeapObject(obj) {
92
+ if (heap_next === heap.length) heap.push(heap.length + 1);
93
+ const idx = heap_next;
94
+ heap_next = heap[idx];
95
+
96
+ heap[idx] = obj;
97
+ return idx;
98
+ }
99
+
100
+ function handleError(f, args) {
101
+ try {
102
+ return f.apply(this, args);
103
+ } catch (e) {
104
+ wasm.__wbindgen_export_2(addHeapObject(e));
105
+ }
106
+ }
107
+
108
+ function isLikeNone(x) {
109
+ return x === undefined || x === null;
110
+ }
111
+
112
+ function dropObject(idx) {
113
+ if (idx < 132) return;
114
+ heap[idx] = heap_next;
115
+ heap_next = idx;
116
+ }
117
+
118
+ function takeObject(idx) {
119
+ const ret = getObject(idx);
120
+ dropObject(idx);
121
+ return ret;
122
+ }
123
+
124
+ function getArrayJsValueFromWasm0(ptr, len) {
125
+ ptr = ptr >>> 0;
126
+ const mem = getDataViewMemory0();
127
+ const result = [];
128
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
129
+ result.push(takeObject(mem.getUint32(i, true)));
130
+ }
131
+ return result;
132
+ }
133
+
134
+ function getArrayU8FromWasm0(ptr, len) {
135
+ ptr = ptr >>> 0;
136
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
137
+ }
138
+
139
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
140
+ ? { register: () => {}, unregister: () => {} }
141
+ : new FinalizationRegistry(state => {
142
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b)
143
+ });
144
+
145
+ function makeClosure(arg0, arg1, dtor, f) {
146
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
147
+ const real = (...args) => {
148
+ // First up with a closure we increment the internal reference
149
+ // count. This ensures that the Rust closure environment won't
150
+ // be deallocated while we're invoking it.
151
+ state.cnt++;
152
+ try {
153
+ return f(state.a, state.b, ...args);
154
+ } finally {
155
+ if (--state.cnt === 0) {
156
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
157
+ state.a = 0;
158
+ CLOSURE_DTORS.unregister(state);
159
+ }
160
+ }
161
+ };
162
+ real.original = state;
163
+ CLOSURE_DTORS.register(real, state, state);
164
+ return real;
165
+ }
166
+
167
+ function makeMutClosure(arg0, arg1, dtor, f) {
168
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
169
+ const real = (...args) => {
170
+ // First up with a closure we increment the internal reference
171
+ // count. This ensures that the Rust closure environment won't
172
+ // be deallocated while we're invoking it.
173
+ state.cnt++;
174
+ const a = state.a;
175
+ state.a = 0;
176
+ try {
177
+ return f(a, state.b, ...args);
178
+ } finally {
179
+ if (--state.cnt === 0) {
180
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
181
+ CLOSURE_DTORS.unregister(state);
182
+ } else {
183
+ state.a = a;
184
+ }
185
+ }
186
+ };
187
+ real.original = state;
188
+ CLOSURE_DTORS.register(real, state, state);
189
+ return real;
190
+ }
191
+
192
+ function debugString(val) {
193
+ // primitive types
194
+ const type = typeof val;
195
+ if (type == 'number' || type == 'boolean' || val == null) {
196
+ return `${val}`;
197
+ }
198
+ if (type == 'string') {
199
+ return `"${val}"`;
200
+ }
201
+ if (type == 'symbol') {
202
+ const description = val.description;
203
+ if (description == null) {
204
+ return 'Symbol';
205
+ } else {
206
+ return `Symbol(${description})`;
207
+ }
208
+ }
209
+ if (type == 'function') {
210
+ const name = val.name;
211
+ if (typeof name == 'string' && name.length > 0) {
212
+ return `Function(${name})`;
213
+ } else {
214
+ return 'Function';
215
+ }
216
+ }
217
+ // objects
218
+ if (Array.isArray(val)) {
219
+ const length = val.length;
220
+ let debug = '[';
221
+ if (length > 0) {
222
+ debug += debugString(val[0]);
223
+ }
224
+ for(let i = 1; i < length; i++) {
225
+ debug += ', ' + debugString(val[i]);
226
+ }
227
+ debug += ']';
228
+ return debug;
229
+ }
230
+ // Test for built-in
231
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
232
+ let className;
233
+ if (builtInMatches && builtInMatches.length > 1) {
234
+ className = builtInMatches[1];
235
+ } else {
236
+ // Failed to match the standard '[object ClassName]'
237
+ return toString.call(val);
238
+ }
239
+ if (className == 'Object') {
240
+ // we're a user defined class or Object
241
+ // JSON.stringify avoids problems with cycles, and is generally much
242
+ // easier than looping through ownProperties of `val`.
243
+ try {
244
+ return 'Object(' + JSON.stringify(val) + ')';
245
+ } catch (_) {
246
+ return 'Object';
247
+ }
248
+ }
249
+ // errors
250
+ if (val instanceof Error) {
251
+ return `${val.name}: ${val.message}\n${val.stack}`;
252
+ }
253
+ // TODO we could test for more things here, like `Set`s and `Map`s.
254
+ return className;
255
+ }
256
+
257
+ function _assertClass(instance, klass) {
258
+ if (!(instance instanceof klass)) {
259
+ throw new Error(`expected instance of ${klass.name}`);
260
+ }
261
+ }
262
+
263
+ function passArrayJsValueToWasm0(array, malloc) {
264
+ const ptr = malloc(array.length * 4, 4) >>> 0;
265
+ const mem = getDataViewMemory0();
266
+ for (let i = 0; i < array.length; i++) {
267
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
268
+ }
269
+ WASM_VECTOR_LEN = array.length;
270
+ return ptr;
271
+ }
272
+ /**
273
+ * Register a plugin globally.
274
+ * @param {string} name
275
+ */
276
+ export function registerPlugin(name) {
277
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
278
+ const len0 = WASM_VECTOR_LEN;
279
+ wasm.registerPlugin(ptr0, len0);
280
+ }
281
+
282
+ /**
283
+ * Register this crate's Custom Elements in the browser's current session.
284
+ *
285
+ * This must occur before calling any public API methods on these Custom
286
+ * Elements from JavaScript, as the methods themselves won't be defined yet.
287
+ * By default, this crate does not register `PerspectiveViewerElement` (as to
288
+ * preserve backwards-compatible synchronous API).
289
+ */
290
+ export function init() {
291
+ wasm.init();
292
+ }
293
+
294
+ let stack_pointer = 128;
295
+
296
+ function addBorrowedObject(obj) {
297
+ if (stack_pointer == 1) throw new Error('out of js stack');
298
+ heap[--stack_pointer] = obj;
299
+ return stack_pointer;
300
+ }
301
+ function __wbg_adapter_52(arg0, arg1, arg2) {
302
+ wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
303
+ }
304
+
305
+ function __wbg_adapter_57(arg0, arg1, arg2) {
306
+ wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
307
+ }
308
+
309
+ function __wbg_adapter_62(arg0, arg1) {
310
+ try {
311
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
312
+ wasm.__wbindgen_export_7(retptr, arg0, arg1);
313
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
314
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
315
+ if (r1) {
316
+ throw takeObject(r0);
317
+ }
318
+ } finally {
319
+ wasm.__wbindgen_add_to_stack_pointer(16);
320
+ }
321
+ }
322
+
323
+ function __wbg_adapter_65(arg0, arg1) {
324
+ const ret = wasm.__wbindgen_export_8(arg0, arg1);
325
+ return takeObject(ret);
326
+ }
327
+
328
+ function __wbg_adapter_68(arg0, arg1, arg2) {
329
+ try {
330
+ wasm.__wbindgen_export_9(arg0, arg1, addBorrowedObject(arg2));
331
+ } finally {
332
+ heap[stack_pointer++] = undefined;
333
+ }
334
+ }
335
+
336
+ function __wbg_adapter_71(arg0, arg1) {
337
+ wasm.__wbindgen_export_10(arg0, arg1);
338
+ }
339
+
340
+ function __wbg_adapter_74(arg0, arg1, arg2) {
341
+ wasm.__wbindgen_export_11(arg0, arg1, addHeapObject(arg2));
342
+ }
343
+
344
+ function __wbg_adapter_735(arg0, arg1, arg2, arg3) {
345
+ wasm.__wbindgen_export_12(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
346
+ }
347
+
348
+ const __wbindgen_enum_ShadowRootMode = ["open", "closed"];
349
+
350
+ const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
351
+ ? { register: () => {}, unregister: () => {} }
352
+ : new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
353
+ /**
354
+ * An instance of a [`Client`] is a connection to a single
355
+ * `perspective_server::Server`, whether locally in-memory or remote over some
356
+ * transport like a WebSocket.
357
+ *
358
+ * The browser and node.js libraries both support the `websocket(url)`
359
+ * constructor, which connects to a remote `perspective_server::Server`
360
+ * instance over a WebSocket transport.
361
+ *
362
+ * In the browser, the `worker()` constructor creates a new Web Worker
363
+ * `perspective_server::Server` and returns a [`Client`] connected to it.
364
+ *
365
+ * In node.js, a pre-instantied [`Client`] connected synhronously to a global
366
+ * singleton `perspective_server::Server` is the default module export.
367
+ *
368
+ * # JavaScript Examples
369
+ *
370
+ * Create a Web Worker `perspective_server::Server` in the browser and return a
371
+ * [`Client`] instance connected for it:
372
+ *
373
+ * ```javascript
374
+ * import perspective from "@perspective-dev/client";
375
+ * const client = await perspective.worker();
376
+ * ```
377
+ *
378
+ * Create a WebSocket connection to a remote `perspective_server::Server`:
379
+ *
380
+ * ```javascript
381
+ * import perspective from "@perspective-dev/client";
382
+ * const client = await perspective.websocket("ws://locahost:8080/ws");
383
+ * ```
384
+ *
385
+ * Access the synchronous client in node.js:
386
+ *
387
+ * ```javascript
388
+ * import { default as client } from "@perspective-dev/client";
389
+ * ```
390
+ */
391
+ export class Client {
392
+
393
+ static __wrap(ptr) {
394
+ ptr = ptr >>> 0;
395
+ const obj = Object.create(Client.prototype);
396
+ obj.__wbg_ptr = ptr;
397
+ ClientFinalization.register(obj, obj.__wbg_ptr, obj);
398
+ return obj;
399
+ }
400
+
401
+ __destroy_into_raw() {
402
+ const ptr = this.__wbg_ptr;
403
+ this.__wbg_ptr = 0;
404
+ ClientFinalization.unregister(this);
405
+ return ptr;
406
+ }
407
+
408
+ free() {
409
+ const ptr = this.__destroy_into_raw();
410
+ wasm.__wbg_client_free(ptr, 0);
411
+ }
412
+ /**
413
+ * @returns {string}
414
+ */
415
+ __getClassname() {
416
+ let deferred1_0;
417
+ let deferred1_1;
418
+ try {
419
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
420
+ wasm.client___getClassname(retptr, this.__wbg_ptr);
421
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
422
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
423
+ deferred1_0 = r0;
424
+ deferred1_1 = r1;
425
+ return getStringFromWasm0(r0, r1);
426
+ } finally {
427
+ wasm.__wbindgen_add_to_stack_pointer(16);
428
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
429
+ }
430
+ }
431
+ /**
432
+ * @param {Function} send_request
433
+ * @param {Function | null} [close]
434
+ */
435
+ constructor(send_request, close) {
436
+ try {
437
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
438
+ wasm.client_new(retptr, addHeapObject(send_request), isLikeNone(close) ? 0 : addHeapObject(close));
439
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
440
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
441
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
442
+ if (r2) {
443
+ throw takeObject(r1);
444
+ }
445
+ this.__wbg_ptr = r0 >>> 0;
446
+ ClientFinalization.register(this, this.__wbg_ptr, this);
447
+ return this;
448
+ } finally {
449
+ wasm.__wbindgen_add_to_stack_pointer(16);
450
+ }
451
+ }
452
+ /**
453
+ * @param {Function} on_response
454
+ * @returns {ProxySession}
455
+ */
456
+ new_proxy_session(on_response) {
457
+ try {
458
+ const ret = wasm.client_new_proxy_session(this.__wbg_ptr, addBorrowedObject(on_response));
459
+ return ProxySession.__wrap(ret);
460
+ } finally {
461
+ heap[stack_pointer++] = undefined;
462
+ }
463
+ }
464
+ /**
465
+ * @param {any} value
466
+ * @returns {Promise<void>}
467
+ */
468
+ handle_response(value) {
469
+ const ret = wasm.client_handle_response(this.__wbg_ptr, addHeapObject(value));
470
+ return takeObject(ret);
471
+ }
472
+ /**
473
+ * @param {string} error
474
+ * @param {Function | null} [reconnect]
475
+ * @returns {Promise<void>}
476
+ */
477
+ handle_error(error, reconnect) {
478
+ const ptr0 = passStringToWasm0(error, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
479
+ const len0 = WASM_VECTOR_LEN;
480
+ const ret = wasm.client_handle_error(this.__wbg_ptr, ptr0, len0, isLikeNone(reconnect) ? 0 : addHeapObject(reconnect));
481
+ return takeObject(ret);
482
+ }
483
+ /**
484
+ * @param {Function} callback
485
+ * @returns {Promise<number>}
486
+ */
487
+ on_error(callback) {
488
+ const ret = wasm.client_on_error(this.__wbg_ptr, addHeapObject(callback));
489
+ return takeObject(ret);
490
+ }
491
+ /**
492
+ * Creates a new [`Table`] from either a _schema_ or _data_.
493
+ *
494
+ * The [`Client::table`] factory function can be initialized with either a
495
+ * _schema_ (see [`Table::schema`]), or data in one of these formats:
496
+ *
497
+ * - Apache Arrow
498
+ * - CSV
499
+ * - JSON row-oriented
500
+ * - JSON column-oriented
501
+ * - NDJSON
502
+ *
503
+ * When instantiated with _data_, the schema is inferred from this data.
504
+ * While this is convenient, inferrence is sometimes imperfect e.g.
505
+ * when the input is empty, null or ambiguous. For these cases,
506
+ * [`Client::table`] can first be instantiated with a explicit schema.
507
+ *
508
+ * When instantiated with a _schema_, the resulting [`Table`] is empty but
509
+ * with known column names and column types. When subsqeuently
510
+ * populated with [`Table::update`], these columns will be _coerced_ to
511
+ * the schema's type. This behavior can be useful when
512
+ * [`Client::table`]'s column type inferences doesn't work.
513
+ *
514
+ * The resulting [`Table`] is _virtual_, and invoking its methods
515
+ * dispatches events to the `perspective_server::Server` this
516
+ * [`Client`] connects to, where the data is stored and all calculation
517
+ * occurs.
518
+ *
519
+ * # Arguments
520
+ *
521
+ * - `arg` - Either _schema_ or initialization _data_.
522
+ * - `options` - Optional configuration which provides one of:
523
+ * - `limit` - The max number of rows the resulting [`Table`] can
524
+ * store.
525
+ * - `index` - The column name to use as an _index_ column. If this
526
+ * `Table` is being instantiated by _data_, this column name must be
527
+ * present in the data.
528
+ * - `name` - The name of the table. This will be generated if it is
529
+ * not provided.
530
+ * - `format` - The explicit format of the input data, can be one of
531
+ * `"json"`, `"columns"`, `"csv"` or `"arrow"`. This overrides
532
+ * language-specific type dispatch behavior, which allows stringified
533
+ * and byte array alternative inputs.
534
+ *
535
+ * # JavaScript Examples
536
+ *
537
+ * Load a CSV from a `string`:
538
+ *
539
+ * ```javascript
540
+ * const table = await client.table("x,y\n1,2\n3,4");
541
+ * ```
542
+ *
543
+ * Load an Arrow from an `ArrayBuffer`:
544
+ *
545
+ * ```javascript
546
+ * import * as fs from "node:fs/promises";
547
+ * const table2 = await client.table(await fs.readFile("superstore.arrow"));
548
+ * ```
549
+ *
550
+ * Load a CSV from a `UInt8Array` (the default for this type is Arrow)
551
+ * using a format override:
552
+ *
553
+ * ```javascript
554
+ * const enc = new TextEncoder();
555
+ * const table = await client.table(enc.encode("x,y\n1,2\n3,4"), {
556
+ * format: "csv",
557
+ * });
558
+ * ```
559
+ *
560
+ * Create a table with an `index`:
561
+ *
562
+ * ```javascript
563
+ * const table = await client.table(data, { index: "Row ID" });
564
+ * ```
565
+ * @param {string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[]} value
566
+ * @param {TableInitOptions | null} [options]
567
+ * @returns {Promise<Table>}
568
+ */
569
+ table(value, options) {
570
+ const ret = wasm.client_table(this.__wbg_ptr, addHeapObject(value), isLikeNone(options) ? 0 : addHeapObject(options));
571
+ return takeObject(ret);
572
+ }
573
+ /**
574
+ * Terminates this [`Client`], cleaning up any [`crate::View`] handles the
575
+ * [`Client`] has open as well as its callbacks.
576
+ * @returns {any}
577
+ */
578
+ terminate() {
579
+ try {
580
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
581
+ wasm.client_terminate(retptr, this.__wbg_ptr);
582
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
583
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
584
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
585
+ if (r2) {
586
+ throw takeObject(r1);
587
+ }
588
+ return takeObject(r0);
589
+ } finally {
590
+ wasm.__wbindgen_add_to_stack_pointer(16);
591
+ }
592
+ }
593
+ /**
594
+ * Opens a [`Table`] that is hosted on the `perspective_server::Server`
595
+ * that is connected to this [`Client`].
596
+ *
597
+ * The `name` property of [`TableInitOptions`] is used to identify each
598
+ * [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
599
+ * via [`Client::get_hosted_table_names`].
600
+ *
601
+ * # JavaScript Examples
602
+ *
603
+ * Get a virtual [`Table`] named "table_one" from this [`Client`]
604
+ *
605
+ * ```javascript
606
+ * const tables = await client.open_table("table_one");
607
+ * ```
608
+ * @param {string} entity_id
609
+ * @returns {Promise<Table>}
610
+ */
611
+ open_table(entity_id) {
612
+ const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
613
+ const len0 = WASM_VECTOR_LEN;
614
+ const ret = wasm.client_open_table(this.__wbg_ptr, ptr0, len0);
615
+ return takeObject(ret);
616
+ }
617
+ /**
618
+ * Retrieves the names of all tables that this client has access to.
619
+ *
620
+ * `name` is a string identifier unique to the [`Table`] (per [`Client`]),
621
+ * which can be used in conjunction with [`Client::open_table`] to get
622
+ * a [`Table`] instance without the use of [`Client::table`]
623
+ * constructor directly (e.g., one created by another [`Client`]).
624
+ *
625
+ * # JavaScript Examples
626
+ *
627
+ * ```javascript
628
+ * const tables = await client.get_hosted_table_names();
629
+ * ```
630
+ * @returns {Promise<any>}
631
+ */
632
+ get_hosted_table_names() {
633
+ const ret = wasm.client_get_hosted_table_names(this.__wbg_ptr);
634
+ return takeObject(ret);
635
+ }
636
+ /**
637
+ * Register a callback which is invoked whenever [`Client::table`] (on this
638
+ * [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
639
+ * [`Client`]) are called.
640
+ * @param {Function} on_update_js
641
+ * @returns {Promise<number>}
642
+ */
643
+ on_hosted_tables_update(on_update_js) {
644
+ const ret = wasm.client_on_hosted_tables_update(this.__wbg_ptr, addHeapObject(on_update_js));
645
+ return takeObject(ret);
646
+ }
647
+ /**
648
+ * Remove a callback previously registered via
649
+ * `Client::on_hosted_tables_update`.
650
+ * @param {number} update_id
651
+ * @returns {Promise<void>}
652
+ */
653
+ remove_hosted_tables_update(update_id) {
654
+ const ret = wasm.client_remove_hosted_tables_update(this.__wbg_ptr, update_id);
655
+ return takeObject(ret);
656
+ }
657
+ /**
658
+ * Provides the [`SystemInfo`] struct, implementation-specific metadata
659
+ * about the [`perspective_server::Server`] runtime such as Memory and
660
+ * CPU usage.
661
+ *
662
+ * For WebAssembly servers, this method includes the WebAssembly heap size.
663
+ *
664
+ * # JavaScript Examples
665
+ *
666
+ * ```javascript
667
+ * const info = await client.system_info();
668
+ * ```
669
+ * @returns {Promise<SystemInfo>}
670
+ */
671
+ system_info() {
672
+ const ret = wasm.client_system_info(this.__wbg_ptr);
673
+ return takeObject(ret);
674
+ }
675
+ }
676
+
677
+ const ColumnDropDownElementFinalization = (typeof FinalizationRegistry === 'undefined')
678
+ ? { register: () => {}, unregister: () => {} }
679
+ : new FinalizationRegistry(ptr => wasm.__wbg_columndropdownelement_free(ptr >>> 0, 1));
680
+
681
+ export class ColumnDropDownElement {
682
+
683
+ __destroy_into_raw() {
684
+ const ptr = this.__wbg_ptr;
685
+ this.__wbg_ptr = 0;
686
+ ColumnDropDownElementFinalization.unregister(this);
687
+ return ptr;
688
+ }
689
+
690
+ free() {
691
+ const ptr = this.__destroy_into_raw();
692
+ wasm.__wbg_columndropdownelement_free(ptr, 0);
693
+ }
694
+ }
695
+
696
+ const CopyDropDownMenuElementFinalization = (typeof FinalizationRegistry === 'undefined')
697
+ ? { register: () => {}, unregister: () => {} }
698
+ : new FinalizationRegistry(ptr => wasm.__wbg_copydropdownmenuelement_free(ptr >>> 0, 1));
699
+
700
+ export class CopyDropDownMenuElement {
701
+
702
+ __destroy_into_raw() {
703
+ const ptr = this.__wbg_ptr;
704
+ this.__wbg_ptr = 0;
705
+ CopyDropDownMenuElementFinalization.unregister(this);
706
+ return ptr;
707
+ }
708
+
709
+ free() {
710
+ const ptr = this.__destroy_into_raw();
711
+ wasm.__wbg_copydropdownmenuelement_free(ptr, 0);
712
+ }
713
+ /**
714
+ * @param {HTMLElement} elem
715
+ */
716
+ constructor(elem) {
717
+ const ret = wasm.copydropdownmenuelement_new(addHeapObject(elem));
718
+ this.__wbg_ptr = ret >>> 0;
719
+ CopyDropDownMenuElementFinalization.register(this, this.__wbg_ptr, this);
720
+ return this;
721
+ }
722
+ /**
723
+ * @param {HTMLElement} target
724
+ */
725
+ open(target) {
726
+ wasm.copydropdownmenuelement_open(this.__wbg_ptr, addHeapObject(target));
727
+ }
728
+ hide() {
729
+ try {
730
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
731
+ wasm.copydropdownmenuelement_hide(retptr, this.__wbg_ptr);
732
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
733
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
734
+ if (r1) {
735
+ throw takeObject(r0);
736
+ }
737
+ } finally {
738
+ wasm.__wbindgen_add_to_stack_pointer(16);
739
+ }
740
+ }
741
+ /**
742
+ * Internal Only.
743
+ *
744
+ * Set this custom element model's raw pointer.
745
+ * @param {PerspectiveViewerElement} parent
746
+ */
747
+ set_model(parent) {
748
+ _assertClass(parent, PerspectiveViewerElement);
749
+ wasm.copydropdownmenuelement_set_model(this.__wbg_ptr, parent.__wbg_ptr);
750
+ }
751
+ connected_callback() {
752
+ wasm.copydropdownmenuelement_connected_callback(this.__wbg_ptr);
753
+ }
754
+ }
755
+
756
+ const ExportDropDownMenuElementFinalization = (typeof FinalizationRegistry === 'undefined')
757
+ ? { register: () => {}, unregister: () => {} }
758
+ : new FinalizationRegistry(ptr => wasm.__wbg_exportdropdownmenuelement_free(ptr >>> 0, 1));
759
+
760
+ export class ExportDropDownMenuElement {
761
+
762
+ __destroy_into_raw() {
763
+ const ptr = this.__wbg_ptr;
764
+ this.__wbg_ptr = 0;
765
+ ExportDropDownMenuElementFinalization.unregister(this);
766
+ return ptr;
767
+ }
768
+
769
+ free() {
770
+ const ptr = this.__destroy_into_raw();
771
+ wasm.__wbg_exportdropdownmenuelement_free(ptr, 0);
772
+ }
773
+ /**
774
+ * @param {HTMLElement} elem
775
+ */
776
+ constructor(elem) {
777
+ const ret = wasm.copydropdownmenuelement_new(addHeapObject(elem));
778
+ this.__wbg_ptr = ret >>> 0;
779
+ ExportDropDownMenuElementFinalization.register(this, this.__wbg_ptr, this);
780
+ return this;
781
+ }
782
+ /**
783
+ * @param {HTMLElement} target
784
+ */
785
+ open(target) {
786
+ wasm.exportdropdownmenuelement_open(this.__wbg_ptr, addHeapObject(target));
787
+ }
788
+ hide() {
789
+ try {
790
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
791
+ wasm.exportdropdownmenuelement_hide(retptr, this.__wbg_ptr);
792
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
793
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
794
+ if (r1) {
795
+ throw takeObject(r0);
796
+ }
797
+ } finally {
798
+ wasm.__wbindgen_add_to_stack_pointer(16);
799
+ }
800
+ }
801
+ /**
802
+ * Internal Only.
803
+ *
804
+ * Set this custom element model's raw pointer.
805
+ * @param {PerspectiveViewerElement} parent
806
+ */
807
+ set_model(parent) {
808
+ _assertClass(parent, PerspectiveViewerElement);
809
+ wasm.exportdropdownmenuelement_set_model(this.__wbg_ptr, parent.__wbg_ptr);
810
+ }
811
+ connected_callback() {
812
+ wasm.copydropdownmenuelement_connected_callback(this.__wbg_ptr);
813
+ }
814
+ }
815
+
816
+ const FilterDropDownElementFinalization = (typeof FinalizationRegistry === 'undefined')
817
+ ? { register: () => {}, unregister: () => {} }
818
+ : new FinalizationRegistry(ptr => wasm.__wbg_filterdropdownelement_free(ptr >>> 0, 1));
819
+
820
+ export class FilterDropDownElement {
821
+
822
+ __destroy_into_raw() {
823
+ const ptr = this.__wbg_ptr;
824
+ this.__wbg_ptr = 0;
825
+ FilterDropDownElementFinalization.unregister(this);
826
+ return ptr;
827
+ }
828
+
829
+ free() {
830
+ const ptr = this.__destroy_into_raw();
831
+ wasm.__wbg_filterdropdownelement_free(ptr, 0);
832
+ }
833
+ }
834
+
835
+ const FunctionDropDownElementFinalization = (typeof FinalizationRegistry === 'undefined')
836
+ ? { register: () => {}, unregister: () => {} }
837
+ : new FinalizationRegistry(ptr => wasm.__wbg_functiondropdownelement_free(ptr >>> 0, 1));
838
+
839
+ export class FunctionDropDownElement {
840
+
841
+ __destroy_into_raw() {
842
+ const ptr = this.__wbg_ptr;
843
+ this.__wbg_ptr = 0;
844
+ FunctionDropDownElementFinalization.unregister(this);
845
+ return ptr;
846
+ }
847
+
848
+ free() {
849
+ const ptr = this.__destroy_into_raw();
850
+ wasm.__wbg_functiondropdownelement_free(ptr, 0);
851
+ }
852
+ }
853
+
854
+ const PerspectiveDebugPluginElementFinalization = (typeof FinalizationRegistry === 'undefined')
855
+ ? { register: () => {}, unregister: () => {} }
856
+ : new FinalizationRegistry(ptr => wasm.__wbg_perspectivedebugpluginelement_free(ptr >>> 0, 1));
857
+ /**
858
+ * The `<perspective-viewer-plugin>` element.
859
+ *
860
+ * The default perspective plugin which is registered and activated
861
+ * automcatically when a `<perspective-viewer>` is loaded without plugins.
862
+ * While you will not typically instantiate this class directly, it is simple
863
+ * enough to function as a good "default" plugin implementation which can be
864
+ * extended to create custom plugins.
865
+ *
866
+ * # Example
867
+ * ```javascript
868
+ * class MyPlugin extends customElements.get("perspective-viewer-plugin") {
869
+ * // Custom plugin overrides
870
+ * }
871
+ * ```
872
+ */
873
+ export class PerspectiveDebugPluginElement {
874
+
875
+ __destroy_into_raw() {
876
+ const ptr = this.__wbg_ptr;
877
+ this.__wbg_ptr = 0;
878
+ PerspectiveDebugPluginElementFinalization.unregister(this);
879
+ return ptr;
880
+ }
881
+
882
+ free() {
883
+ const ptr = this.__destroy_into_raw();
884
+ wasm.__wbg_perspectivedebugpluginelement_free(ptr, 0);
885
+ }
886
+ /**
887
+ * @param {HTMLElement} elem
888
+ */
889
+ constructor(elem) {
890
+ const ret = wasm.perspectivedebugpluginelement_new(addHeapObject(elem));
891
+ this.__wbg_ptr = ret >>> 0;
892
+ PerspectiveDebugPluginElementFinalization.register(this, this.__wbg_ptr, this);
893
+ return this;
894
+ }
895
+ /**
896
+ * @returns {string}
897
+ */
898
+ get name() {
899
+ let deferred1_0;
900
+ let deferred1_1;
901
+ try {
902
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
903
+ wasm.perspectivedebugpluginelement_name(retptr, this.__wbg_ptr);
904
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
905
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
906
+ deferred1_0 = r0;
907
+ deferred1_1 = r1;
908
+ return getStringFromWasm0(r0, r1);
909
+ } finally {
910
+ wasm.__wbindgen_add_to_stack_pointer(16);
911
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
912
+ }
913
+ }
914
+ /**
915
+ * @returns {string}
916
+ */
917
+ get select_mode() {
918
+ let deferred1_0;
919
+ let deferred1_1;
920
+ try {
921
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
922
+ wasm.perspectivedebugpluginelement_select_mode(retptr, this.__wbg_ptr);
923
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
924
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
925
+ deferred1_0 = r0;
926
+ deferred1_1 = r1;
927
+ return getStringFromWasm0(r0, r1);
928
+ } finally {
929
+ wasm.__wbindgen_add_to_stack_pointer(16);
930
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
931
+ }
932
+ }
933
+ /**
934
+ * @returns {any}
935
+ */
936
+ get min_config_columns() {
937
+ const ret = wasm.perspectivedebugpluginelement_config_column_names(this.__wbg_ptr);
938
+ return takeObject(ret);
939
+ }
940
+ /**
941
+ * @returns {any}
942
+ */
943
+ get config_column_names() {
944
+ const ret = wasm.perspectivedebugpluginelement_config_column_names(this.__wbg_ptr);
945
+ return takeObject(ret);
946
+ }
947
+ /**
948
+ * @param {View} view
949
+ * @returns {Promise<any>}
950
+ */
951
+ update(view) {
952
+ _assertClass(view, View);
953
+ const ret = wasm.perspectivedebugpluginelement_draw(this.__wbg_ptr, view.__wbg_ptr);
954
+ return takeObject(ret);
955
+ }
956
+ /**
957
+ * # Notes
958
+ *
959
+ * When you pass a `wasm_bindgen` wrapped type _into_ Rust, it acts like a
960
+ * move. Ergo, if you replace the `&` in the `view` argument, the JS copy
961
+ * of the `View` will be invalid
962
+ * @param {View} view
963
+ * @returns {Promise<any>}
964
+ */
965
+ draw(view) {
966
+ _assertClass(view, View);
967
+ const ret = wasm.perspectivedebugpluginelement_draw(this.__wbg_ptr, view.__wbg_ptr);
968
+ return takeObject(ret);
969
+ }
970
+ /**
971
+ * @returns {Promise<any>}
972
+ */
973
+ clear() {
974
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
975
+ return takeObject(ret);
976
+ }
977
+ /**
978
+ * @returns {Promise<any>}
979
+ */
980
+ resize() {
981
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
982
+ return takeObject(ret);
983
+ }
984
+ /**
985
+ * @returns {Promise<any>}
986
+ */
987
+ restyle() {
988
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
989
+ return takeObject(ret);
990
+ }
991
+ /**
992
+ * @returns {Promise<any>}
993
+ */
994
+ save() {
995
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
996
+ return takeObject(ret);
997
+ }
998
+ /**
999
+ * @returns {Promise<any>}
1000
+ */
1001
+ restore() {
1002
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
1003
+ return takeObject(ret);
1004
+ }
1005
+ /**
1006
+ * @returns {Promise<any>}
1007
+ */
1008
+ delete() {
1009
+ const ret = wasm.perspectivedebugpluginelement_clear(this.__wbg_ptr);
1010
+ return takeObject(ret);
1011
+ }
1012
+ connectedCallback() {
1013
+ wasm.perspectivedebugpluginelement_connectedCallback(this.__wbg_ptr);
1014
+ }
1015
+ }
1016
+
1017
+ const PerspectiveViewerElementFinalization = (typeof FinalizationRegistry === 'undefined')
1018
+ ? { register: () => {}, unregister: () => {} }
1019
+ : new FinalizationRegistry(ptr => wasm.__wbg_perspectiveviewerelement_free(ptr >>> 0, 1));
1020
+ /**
1021
+ * The `<perspective-viewer>` custom element.
1022
+ *
1023
+ * # JavaScript Examples
1024
+ *
1025
+ * Create a new `<perspective-viewer>`:
1026
+ *
1027
+ * ```javascript
1028
+ * const viewer = document.createElement("perspective-viewer");
1029
+ * window.body.appendChild(viewer);
1030
+ * ```
1031
+ */
1032
+ export class PerspectiveViewerElement {
1033
+
1034
+ static __wrap(ptr) {
1035
+ ptr = ptr >>> 0;
1036
+ const obj = Object.create(PerspectiveViewerElement.prototype);
1037
+ obj.__wbg_ptr = ptr;
1038
+ PerspectiveViewerElementFinalization.register(obj, obj.__wbg_ptr, obj);
1039
+ return obj;
1040
+ }
1041
+
1042
+ __destroy_into_raw() {
1043
+ const ptr = this.__wbg_ptr;
1044
+ this.__wbg_ptr = 0;
1045
+ PerspectiveViewerElementFinalization.unregister(this);
1046
+ return ptr;
1047
+ }
1048
+
1049
+ free() {
1050
+ const ptr = this.__destroy_into_raw();
1051
+ wasm.__wbg_perspectiveviewerelement_free(ptr, 0);
1052
+ }
1053
+ /**
1054
+ * @param {HTMLElement} elem
1055
+ */
1056
+ constructor(elem) {
1057
+ const ret = wasm.perspectiveviewerelement_new(addHeapObject(elem));
1058
+ this.__wbg_ptr = ret >>> 0;
1059
+ PerspectiveViewerElementFinalization.register(this, this.__wbg_ptr, this);
1060
+ return this;
1061
+ }
1062
+ connectedCallback() {
1063
+ wasm.perspectiveviewerelement_connectedCallback(this.__wbg_ptr);
1064
+ }
1065
+ /**
1066
+ * Loads a [`Table`] (or rather, a Javascript `Promise` which returns a
1067
+ * [`Table`]) in this viewer.
1068
+ *
1069
+ * When [`PerspectiveViewerElement::load`] resolves, the first frame of the
1070
+ * UI + visualization is guaranteed to have been drawn. Awaiting the result
1071
+ * of this method in a `try`/`catch` block will capture any errors
1072
+ * thrown during the loading process, or from the [`Table`] `Promise`
1073
+ * itself.
1074
+ *
1075
+ * A [`Table`] can be created using the
1076
+ * [`@perspective-dev/client`](https://www.npmjs.com/package/@perspective-dev/client)
1077
+ * library from NPM (see [`perspective_js`] documentation for details).
1078
+ *
1079
+ * # JavaScript Examples
1080
+ *
1081
+ * ```javascript
1082
+ * import perspective from "@perspective-dev/client";
1083
+ *
1084
+ * const worker = await perspective.worker();
1085
+ * viewer.load(worker.table("x,y\n1,2"));
1086
+ * ```
1087
+ * @param {any} table
1088
+ * @returns {Promise<any>}
1089
+ */
1090
+ load(table) {
1091
+ const ret = wasm.perspectiveviewerelement_load(this.__wbg_ptr, addHeapObject(table));
1092
+ return takeObject(ret);
1093
+ }
1094
+ /**
1095
+ * Delete the internal [`View`] and all associated state, rendering this
1096
+ * `<perspective-viewer>` unusable and freeing all associated resources.
1097
+ * Does not delete the supplied [`Table`] (as this is constructed by the
1098
+ * callee).
1099
+ *
1100
+ * Calling _any_ method on a `<perspective-viewer>` after [`Self::delete`]
1101
+ * will throw.
1102
+ *
1103
+ * <div class="warning">
1104
+ *
1105
+ * Allowing a `<perspective-viewer>` to be garbage-collected
1106
+ * without calling [`PerspectiveViewerElement::delete`] will leak WASM
1107
+ * memory!
1108
+ *
1109
+ * </div>
1110
+ *
1111
+ * # JavaScript Examples
1112
+ *
1113
+ * ```javascript
1114
+ * await viewer.delete();
1115
+ * ```
1116
+ * @returns {Promise<any>}
1117
+ */
1118
+ delete() {
1119
+ const ptr = this.__destroy_into_raw();
1120
+ const ret = wasm.perspectiveviewerelement_delete(ptr);
1121
+ return takeObject(ret);
1122
+ }
1123
+ /**
1124
+ * Restart this `<perspective-viewer>` to its initial state, before
1125
+ * `load()`.
1126
+ *
1127
+ * Use `Self::restart` if you plan to call `Self::load` on this viewer
1128
+ * again, or alternatively `Self::delete` if this viewer is no longer
1129
+ * needed.
1130
+ * @returns {Promise<any>}
1131
+ */
1132
+ eject() {
1133
+ const ret = wasm.perspectiveviewerelement_eject(this.__wbg_ptr);
1134
+ return takeObject(ret);
1135
+ }
1136
+ /**
1137
+ * Get the underlying [`View`] for this viewer.
1138
+ *
1139
+ * Use this method to get promgrammatic access to the [`View`] as currently
1140
+ * configured by the user, for e.g. serializing as an
1141
+ * [Apache Arrow](https://arrow.apache.org/) before passing to another
1142
+ * library.
1143
+ *
1144
+ * The [`View`] returned by this method is owned by the
1145
+ * [`PerspectiveViewerElement`] and may be _invalidated_ by
1146
+ * [`View::delete`] at any time. Plugins which rely on this [`View`] for
1147
+ * their [`HTMLPerspectiveViewerPluginElement::draw`] implementations
1148
+ * should treat this condition as a _cancellation_ by silently aborting on
1149
+ * "View already deleted" errors from method calls.
1150
+ *
1151
+ * # JavaScript Examples
1152
+ *
1153
+ * ```javascript
1154
+ * const view = await viewer.getView();
1155
+ * ```
1156
+ * @returns {Promise<any>}
1157
+ */
1158
+ getView() {
1159
+ const ret = wasm.perspectiveviewerelement_getView(this.__wbg_ptr);
1160
+ return takeObject(ret);
1161
+ }
1162
+ /**
1163
+ * Get the underlying [`Table`] for this viewer (as passed to
1164
+ * [`PerspectiveViewerElement::load`]).
1165
+ *
1166
+ * # Arguments
1167
+ *
1168
+ * - `wait_for_table` - whether to wait for
1169
+ * [`PerspectiveViewerElement::load`] to be called, or fail immediately
1170
+ * if [`PerspectiveViewerElement::load`] has not yet been called.
1171
+ *
1172
+ * # JavaScript Examples
1173
+ *
1174
+ * ```javascript
1175
+ * const table = await viewer.getTable();
1176
+ * ```
1177
+ * @param {boolean | null} [wait_for_table]
1178
+ * @returns {Promise<any>}
1179
+ */
1180
+ getTable(wait_for_table) {
1181
+ const ret = wasm.perspectiveviewerelement_getTable(this.__wbg_ptr, isLikeNone(wait_for_table) ? 0xFFFFFF : wait_for_table ? 1 : 0);
1182
+ return takeObject(ret);
1183
+ }
1184
+ /**
1185
+ * Get render statistics. Some fields of the returned stats object are
1186
+ * relative to the last time [`PerspectiveViewerElement::getRenderStats`]
1187
+ * was called, ergo calling this method resets these fields.
1188
+ *
1189
+ * # JavaScript Examples
1190
+ *
1191
+ * ```javascript
1192
+ * const {virtual_fps, actual_fps} = await viewer.getRenderStats();
1193
+ * ```
1194
+ * @returns {any}
1195
+ */
1196
+ getRenderStats() {
1197
+ try {
1198
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1199
+ wasm.perspectiveviewerelement_getRenderStats(retptr, this.__wbg_ptr);
1200
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1201
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1202
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1203
+ if (r2) {
1204
+ throw takeObject(r1);
1205
+ }
1206
+ return takeObject(r0);
1207
+ } finally {
1208
+ wasm.__wbindgen_add_to_stack_pointer(16);
1209
+ }
1210
+ }
1211
+ /**
1212
+ * Flush any pending modifications to this `<perspective-viewer>`. Since
1213
+ * `<perspective-viewer>`'s API is almost entirely `async`, it may take
1214
+ * some milliseconds before any user-initiated changes to the [`View`]
1215
+ * affects the rendered element. If you want to make sure all pending
1216
+ * actions have been rendered, call and await [`Self::flush`].
1217
+ *
1218
+ * [`Self::flush`] will resolve immediately if there is no [`Table`] set.
1219
+ *
1220
+ * # JavaScript Examples
1221
+ *
1222
+ * In this example, [`Self::restore`] is called without `await`, but the
1223
+ * eventual render which results from this call can still be awaited by
1224
+ * immediately awaiting [`Self::flush`] instead.
1225
+ *
1226
+ * ```javascript
1227
+ * viewer.restore(config);
1228
+ * await viewer.flush();
1229
+ * ```
1230
+ * @returns {Promise<any>}
1231
+ */
1232
+ flush() {
1233
+ const ret = wasm.perspectiveviewerelement_flush(this.__wbg_ptr);
1234
+ return takeObject(ret);
1235
+ }
1236
+ /**
1237
+ * Restores this element from a full/partial
1238
+ * [`perspective_js::JsViewConfig`].
1239
+ *
1240
+ * One of the best ways to use [`Self::restore`] is by first configuring
1241
+ * a `<perspective-viewer>` as you wish, then using either the `Debug`
1242
+ * panel or "Copy" -> "config.json" from the toolbar menu to snapshot
1243
+ * the [`Self::restore`] argument as JSON.
1244
+ *
1245
+ * # Arguments
1246
+ *
1247
+ * - `update` - The config to restore to, as returned by [`Self::save`] in
1248
+ * either "json", "string" or "arraybuffer" format.
1249
+ *
1250
+ * # JavaScript Examples
1251
+ *
1252
+ * Apply a `group_by` to the current [`View`], without modifying/resetting
1253
+ * other fields:
1254
+ *
1255
+ * ```javascript
1256
+ * await viewer.restore({group_by: ["State"]});
1257
+ * ```
1258
+ * @param {any} update
1259
+ * @returns {Promise<any>}
1260
+ */
1261
+ restore(update) {
1262
+ const ret = wasm.perspectiveviewerelement_restore(this.__wbg_ptr, addHeapObject(update));
1263
+ return takeObject(ret);
1264
+ }
1265
+ /**
1266
+ * @returns {Promise<any>}
1267
+ */
1268
+ resetError() {
1269
+ const ret = wasm.perspectiveviewerelement_resetError(this.__wbg_ptr);
1270
+ return takeObject(ret);
1271
+ }
1272
+ /**
1273
+ * Save this element to serialized state object, one which can be restored
1274
+ * via the [`Self::restore`] method.
1275
+ *
1276
+ * # Arguments
1277
+ *
1278
+ * - `format` - Supports "json" (default), "arraybuffer" or "string".
1279
+ *
1280
+ * # JavaScript Examples
1281
+ *
1282
+ * Get the current `group_by` setting:
1283
+ *
1284
+ * ```javascript
1285
+ * const {group_by} = await viewer.restore();
1286
+ * ```
1287
+ *
1288
+ * Reset workflow attached to an external button `myResetButton`:
1289
+ *
1290
+ * ```javascript
1291
+ * const token = await viewer.save();
1292
+ * myResetButton.addEventListener("clien", async () => {
1293
+ * await viewer.restore(token);
1294
+ * });
1295
+ * ```
1296
+ * @param {string | null} [format]
1297
+ * @returns {Promise<any>}
1298
+ */
1299
+ save(format) {
1300
+ var ptr0 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1301
+ var len0 = WASM_VECTOR_LEN;
1302
+ const ret = wasm.perspectiveviewerelement_save(this.__wbg_ptr, ptr0, len0);
1303
+ return takeObject(ret);
1304
+ }
1305
+ /**
1306
+ * Download this viewer's internal [`View`] data as a `.csv` file.
1307
+ *
1308
+ * # Arguments
1309
+ *
1310
+ * - `flat` - Whether to use the current [`perspective_js::JsViewConfig`]
1311
+ * to generate this data, or use the default.
1312
+ *
1313
+ * # JavaScript Examples
1314
+ *
1315
+ * ```javascript
1316
+ * myDownloadButton.addEventListener("click", async () => {
1317
+ * await viewer.download();
1318
+ * })
1319
+ * ```
1320
+ * @param {boolean | null} [flat]
1321
+ * @returns {Promise<any>}
1322
+ */
1323
+ download(flat) {
1324
+ const ret = wasm.perspectiveviewerelement_download(this.__wbg_ptr, isLikeNone(flat) ? 0xFFFFFF : flat ? 1 : 0);
1325
+ return takeObject(ret);
1326
+ }
1327
+ /**
1328
+ * Copy this viewer's `View` or `Table` data as CSV to the system
1329
+ * clipboard.
1330
+ *
1331
+ * # Arguments
1332
+ *
1333
+ * - `method` - The `ExportMethod` (serialized as a `String`) to use to
1334
+ * render the data to the Clipboard.
1335
+ *
1336
+ * # JavaScript Examples
1337
+ *
1338
+ * ```javascript
1339
+ * myDownloadButton.addEventListener("click", async () => {
1340
+ * await viewer.copy();
1341
+ * })
1342
+ * ```
1343
+ * @param {string | null} [method]
1344
+ * @returns {Promise<any>}
1345
+ */
1346
+ copy(method) {
1347
+ const ret = wasm.perspectiveviewerelement_copy(this.__wbg_ptr, isLikeNone(method) ? 0 : addHeapObject(method));
1348
+ return takeObject(ret);
1349
+ }
1350
+ /**
1351
+ * Reset the viewer's `ViewerConfig` to the default.
1352
+ *
1353
+ * # Arguments
1354
+ *
1355
+ * - `reset_all` - If set, will clear expressions and column settings as
1356
+ * well.
1357
+ *
1358
+ * # JavaScript Examples
1359
+ *
1360
+ * ```javascript
1361
+ * await viewer.reset();
1362
+ * ```
1363
+ * @param {boolean | null} [reset_all]
1364
+ * @returns {Promise<any>}
1365
+ */
1366
+ reset(reset_all) {
1367
+ const ret = wasm.perspectiveviewerelement_reset(this.__wbg_ptr, isLikeNone(reset_all) ? 0xFFFFFF : reset_all ? 1 : 0);
1368
+ return takeObject(ret);
1369
+ }
1370
+ /**
1371
+ * Recalculate the viewer's dimensions and redraw.
1372
+ *
1373
+ * Use this method to tell `<perspective-viewer>` its dimensions have
1374
+ * changed when auto-size mode has been disabled via [`Self::setAutoSize`].
1375
+ * [`Self::resize`] resolves when the resize-initiated redraw of this
1376
+ * element has completed.
1377
+ *
1378
+ * # Arguments
1379
+ *
1380
+ * - `force` - If [`Self::resize`] is called with `false` or without an
1381
+ * argument, and _auto-size_ mode is enabled via [`Self::setAutoSize`],
1382
+ * [`Self::resize`] will log a warning and auto-disable auto-size mode.
1383
+ *
1384
+ * # JavaScript Examples
1385
+ *
1386
+ * ```javascript
1387
+ * await viewer.resize(true)
1388
+ * ```
1389
+ * @param {boolean | null} [force]
1390
+ * @returns {Promise<any>}
1391
+ */
1392
+ resize(force) {
1393
+ const ret = wasm.perspectiveviewerelement_resize(this.__wbg_ptr, isLikeNone(force) ? 0xFFFFFF : force ? 1 : 0);
1394
+ return takeObject(ret);
1395
+ }
1396
+ /**
1397
+ * Sets the auto-size behavior of this component.
1398
+ *
1399
+ * When `true`, this `<perspective-viewer>` will register a
1400
+ * `ResizeObserver` on itself and call [`Self::resize`] whenever its own
1401
+ * dimensions change. However, when embedded in a larger application
1402
+ * context, you may want to call [`Self::resize`] manually to avoid
1403
+ * over-rendering; in this case auto-sizing can be disabled via this
1404
+ * method. Auto-size behavior is enabled by default.
1405
+ *
1406
+ * # Arguments
1407
+ *
1408
+ * - `autosize` - Whether to enable `auto-size` behavior or not.
1409
+ *
1410
+ * # JavaScript Examples
1411
+ *
1412
+ * Disable auto-size behavior:
1413
+ *
1414
+ * ```javascript
1415
+ * viewer.setAutoSize(false);
1416
+ * ```
1417
+ * @param {boolean} autosize
1418
+ */
1419
+ setAutoSize(autosize) {
1420
+ wasm.perspectiveviewerelement_setAutoSize(this.__wbg_ptr, autosize);
1421
+ }
1422
+ /**
1423
+ * Sets the auto-pause behavior of this component.
1424
+ *
1425
+ * When `true`, this `<perspective-viewer>` will register an
1426
+ * `IntersectionObserver` on itself and subsequently skip rendering
1427
+ * whenever its viewport visibility changes. Auto-pause is enabled by
1428
+ * default.
1429
+ *
1430
+ * # Arguments
1431
+ *
1432
+ * - `autopause` Whether to enable `auto-pause` behavior or not.
1433
+ *
1434
+ * # JavaScript Examples
1435
+ *
1436
+ * Disable auto-size behavior:
1437
+ *
1438
+ * ```javascript
1439
+ * viewer.setAutoPause(false);
1440
+ * ```
1441
+ * @param {boolean} autopause
1442
+ */
1443
+ setAutoPause(autopause) {
1444
+ wasm.perspectiveviewerelement_setAutoPause(this.__wbg_ptr, autopause);
1445
+ }
1446
+ /**
1447
+ * Return a [`perspective_js::JsViewWindow`] for the currently selected
1448
+ * region.
1449
+ * @returns {ViewWindow | undefined}
1450
+ */
1451
+ getSelection() {
1452
+ const ret = wasm.perspectiveviewerelement_getSelection(this.__wbg_ptr);
1453
+ return takeObject(ret);
1454
+ }
1455
+ /**
1456
+ * Set the selection [`perspective_js::JsViewWindow`] for this element.
1457
+ * @param {ViewWindow | null} [window]
1458
+ */
1459
+ setSelection(window) {
1460
+ try {
1461
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1462
+ wasm.perspectiveviewerelement_setSelection(retptr, this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
1463
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1464
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1465
+ if (r1) {
1466
+ throw takeObject(r0);
1467
+ }
1468
+ } finally {
1469
+ wasm.__wbindgen_add_to_stack_pointer(16);
1470
+ }
1471
+ }
1472
+ /**
1473
+ * Get this viewer's edit port for the currently loaded [`Table`] (see
1474
+ * [`Table::update`] for details on ports).
1475
+ * @returns {number}
1476
+ */
1477
+ getEditPort() {
1478
+ try {
1479
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1480
+ wasm.perspectiveviewerelement_getEditPort(retptr, this.__wbg_ptr);
1481
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
1482
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1483
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1484
+ if (r3) {
1485
+ throw takeObject(r2);
1486
+ }
1487
+ return r0;
1488
+ } finally {
1489
+ wasm.__wbindgen_add_to_stack_pointer(16);
1490
+ }
1491
+ }
1492
+ /**
1493
+ * Restyle all plugins from current document.
1494
+ *
1495
+ * <div class="warning">
1496
+ *
1497
+ * [`Self::restyleElement`] _must_ be called for many runtime changes to
1498
+ * CSS properties to be reflected in an already-rendered
1499
+ * `<perspective-viewer>`.
1500
+ *
1501
+ * </div>
1502
+ *
1503
+ * # JavaScript Examples
1504
+ *
1505
+ * ```javascript
1506
+ * viewer.style = "--icon--color: red";
1507
+ * await viewer.restyleElement();
1508
+ * ```
1509
+ * @returns {Promise<any>}
1510
+ */
1511
+ restyleElement() {
1512
+ const ret = wasm.perspectiveviewerelement_restyleElement(this.__wbg_ptr);
1513
+ return takeObject(ret);
1514
+ }
1515
+ /**
1516
+ * Set the available theme names available in the status bar UI.
1517
+ *
1518
+ * Calling [`Self::resetThemes`] may cause the current theme to switch,
1519
+ * if e.g. the new theme set does not contain the current theme.
1520
+ *
1521
+ * # JavaScript Examples
1522
+ *
1523
+ * Restrict `<perspective-viewer>` theme options to _only_ default light
1524
+ * and dark themes, regardless of what is auto-detected from the page's
1525
+ * CSS:
1526
+ *
1527
+ * ```javascript
1528
+ * viewer.resetThemes(["Pro Light", "Pro Dark"])
1529
+ * ```
1530
+ * @param {any[] | null} [themes]
1531
+ * @returns {Promise<any>}
1532
+ */
1533
+ resetThemes(themes) {
1534
+ var ptr0 = isLikeNone(themes) ? 0 : passArrayJsValueToWasm0(themes, wasm.__wbindgen_export_0);
1535
+ var len0 = WASM_VECTOR_LEN;
1536
+ const ret = wasm.perspectiveviewerelement_resetThemes(this.__wbg_ptr, ptr0, len0);
1537
+ return takeObject(ret);
1538
+ }
1539
+ /**
1540
+ * Determines the render throttling behavior. Can be an integer, for
1541
+ * millisecond window to throttle render event; or, if `None`, adaptive
1542
+ * throttling will be calculated from the measured render time of the
1543
+ * last 5 frames.
1544
+ *
1545
+ * # Arguments
1546
+ *
1547
+ * - `throttle` - The throttle rate in milliseconds (f64), or `None` for
1548
+ * adaptive throttling.
1549
+ *
1550
+ * # JavaScript Examples
1551
+ *
1552
+ * Only draws at most 1 frame/sec:
1553
+ *
1554
+ * ```rust
1555
+ * viewer.setThrottle(1000);
1556
+ * ```
1557
+ * @param {number | null} [val]
1558
+ */
1559
+ setThrottle(val) {
1560
+ wasm.perspectiveviewerelement_setThrottle(this.__wbg_ptr, !isLikeNone(val), isLikeNone(val) ? 0 : val);
1561
+ }
1562
+ /**
1563
+ * Toggle (or force) the config panel open/closed.
1564
+ *
1565
+ * # Arguments
1566
+ *
1567
+ * - `force` - Force the state of the panel open or closed, or `None` to
1568
+ * toggle.
1569
+ *
1570
+ * # JavaScript Examples
1571
+ *
1572
+ * ```javascript
1573
+ * await viewer.toggleConfig();
1574
+ * ```
1575
+ * @param {boolean | null} [force]
1576
+ * @returns {Promise<any>}
1577
+ */
1578
+ toggleConfig(force) {
1579
+ const ret = wasm.perspectiveviewerelement_toggleConfig(this.__wbg_ptr, isLikeNone(force) ? 0xFFFFFF : force ? 1 : 0);
1580
+ return takeObject(ret);
1581
+ }
1582
+ /**
1583
+ * Get an `Array` of all of the plugin custom elements registered for this
1584
+ * element. This may not include plugins which called
1585
+ * [`registerPlugin`] after the host has rendered for the first time.
1586
+ * @returns {Array<any>}
1587
+ */
1588
+ getAllPlugins() {
1589
+ const ret = wasm.perspectiveviewerelement_getAllPlugins(this.__wbg_ptr);
1590
+ return takeObject(ret);
1591
+ }
1592
+ /**
1593
+ * Gets a plugin Custom Element with the `name` field, or get the active
1594
+ * plugin if no `name` is provided.
1595
+ *
1596
+ * # Arguments
1597
+ *
1598
+ * - `name` - The `name` property of a perspective plugin Custom Element,
1599
+ * or `None` for the active plugin's Custom Element.
1600
+ * @param {string | null} [name]
1601
+ * @returns {any}
1602
+ */
1603
+ getPlugin(name) {
1604
+ try {
1605
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1606
+ var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1607
+ var len0 = WASM_VECTOR_LEN;
1608
+ wasm.perspectiveviewerelement_getPlugin(retptr, this.__wbg_ptr, ptr0, len0);
1609
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1610
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1611
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1612
+ if (r2) {
1613
+ throw takeObject(r1);
1614
+ }
1615
+ return takeObject(r0);
1616
+ } finally {
1617
+ wasm.__wbindgen_add_to_stack_pointer(16);
1618
+ }
1619
+ }
1620
+ /**
1621
+ * Create a new JavaScript Heap reference for this model instance.
1622
+ * @returns {PerspectiveViewerElement}
1623
+ */
1624
+ get_model() {
1625
+ const ret = wasm.perspectiveviewerelement_get_model(this.__wbg_ptr);
1626
+ return PerspectiveViewerElement.__wrap(ret);
1627
+ }
1628
+ /**
1629
+ * Asynchronously opens the column settings for a specific column.
1630
+ * When finished, the `<perspective-viewer>` element will emit a
1631
+ * "perspective-toggle-column-settings" CustomEvent.
1632
+ * The event's details property has two fields: `{open: bool, column_name?:
1633
+ * string}`. The CustomEvent is also fired whenever the user toggles the
1634
+ * sidebar manually.
1635
+ * @param {string} column_name
1636
+ * @returns {Promise<any>}
1637
+ */
1638
+ toggleColumnSettings(column_name) {
1639
+ const ptr0 = passStringToWasm0(column_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1640
+ const len0 = WASM_VECTOR_LEN;
1641
+ const ret = wasm.perspectiveviewerelement_toggleColumnSettings(this.__wbg_ptr, ptr0, len0);
1642
+ return takeObject(ret);
1643
+ }
1644
+ /**
1645
+ * Force open the settings for a particular column. Pass `null` to close
1646
+ * the column settings panel. See [`Self::toggleColumnSettings`] for more.
1647
+ * @param {string | null} [column_name]
1648
+ * @param {boolean | null} [toggle]
1649
+ * @returns {Promise<any>}
1650
+ */
1651
+ openColumnSettings(column_name, toggle) {
1652
+ var ptr0 = isLikeNone(column_name) ? 0 : passStringToWasm0(column_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1653
+ var len0 = WASM_VECTOR_LEN;
1654
+ const ret = wasm.perspectiveviewerelement_openColumnSettings(this.__wbg_ptr, ptr0, len0, isLikeNone(toggle) ? 0xFFFFFF : toggle ? 1 : 0);
1655
+ return takeObject(ret);
1656
+ }
1657
+ }
1658
+
1659
+ const ProxySessionFinalization = (typeof FinalizationRegistry === 'undefined')
1660
+ ? { register: () => {}, unregister: () => {} }
1661
+ : new FinalizationRegistry(ptr => wasm.__wbg_proxysession_free(ptr >>> 0, 1));
1662
+
1663
+ export class ProxySession {
1664
+
1665
+ static __wrap(ptr) {
1666
+ ptr = ptr >>> 0;
1667
+ const obj = Object.create(ProxySession.prototype);
1668
+ obj.__wbg_ptr = ptr;
1669
+ ProxySessionFinalization.register(obj, obj.__wbg_ptr, obj);
1670
+ return obj;
1671
+ }
1672
+
1673
+ __destroy_into_raw() {
1674
+ const ptr = this.__wbg_ptr;
1675
+ this.__wbg_ptr = 0;
1676
+ ProxySessionFinalization.unregister(this);
1677
+ return ptr;
1678
+ }
1679
+
1680
+ free() {
1681
+ const ptr = this.__destroy_into_raw();
1682
+ wasm.__wbg_proxysession_free(ptr, 0);
1683
+ }
1684
+ /**
1685
+ * @param {Client} client
1686
+ * @param {Function} on_response
1687
+ */
1688
+ constructor(client, on_response) {
1689
+ try {
1690
+ _assertClass(client, Client);
1691
+ const ret = wasm.client_new_proxy_session(client.__wbg_ptr, addBorrowedObject(on_response));
1692
+ this.__wbg_ptr = ret >>> 0;
1693
+ ProxySessionFinalization.register(this, this.__wbg_ptr, this);
1694
+ return this;
1695
+ } finally {
1696
+ heap[stack_pointer++] = undefined;
1697
+ }
1698
+ }
1699
+ /**
1700
+ * @param {any} value
1701
+ * @returns {Promise<void>}
1702
+ */
1703
+ handle_request(value) {
1704
+ const ret = wasm.proxysession_handle_request(this.__wbg_ptr, addHeapObject(value));
1705
+ return takeObject(ret);
1706
+ }
1707
+ /**
1708
+ * @returns {Promise<void>}
1709
+ */
1710
+ close() {
1711
+ const ptr = this.__destroy_into_raw();
1712
+ const ret = wasm.proxysession_close(ptr);
1713
+ return takeObject(ret);
1714
+ }
1715
+ }
1716
+
1717
+ const TableFinalization = (typeof FinalizationRegistry === 'undefined')
1718
+ ? { register: () => {}, unregister: () => {} }
1719
+ : new FinalizationRegistry(ptr => wasm.__wbg_table_free(ptr >>> 0, 1));
1720
+
1721
+ export class Table {
1722
+
1723
+ static __wrap(ptr) {
1724
+ ptr = ptr >>> 0;
1725
+ const obj = Object.create(Table.prototype);
1726
+ obj.__wbg_ptr = ptr;
1727
+ TableFinalization.register(obj, obj.__wbg_ptr, obj);
1728
+ return obj;
1729
+ }
1730
+
1731
+ __destroy_into_raw() {
1732
+ const ptr = this.__wbg_ptr;
1733
+ this.__wbg_ptr = 0;
1734
+ TableFinalization.unregister(this);
1735
+ return ptr;
1736
+ }
1737
+
1738
+ free() {
1739
+ const ptr = this.__destroy_into_raw();
1740
+ wasm.__wbg_table_free(ptr, 0);
1741
+ }
1742
+ /**
1743
+ * @returns {string}
1744
+ */
1745
+ __getClassname() {
1746
+ let deferred1_0;
1747
+ let deferred1_1;
1748
+ try {
1749
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1750
+ wasm.table___getClassname(retptr, this.__wbg_ptr);
1751
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1752
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1753
+ deferred1_0 = r0;
1754
+ deferred1_1 = r1;
1755
+ return getStringFromWasm0(r0, r1);
1756
+ } finally {
1757
+ wasm.__wbindgen_add_to_stack_pointer(16);
1758
+ wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
1759
+ }
1760
+ }
1761
+ /**
1762
+ * Returns the name of the index column for the table.
1763
+ *
1764
+ * # JavaScript Examples
1765
+ *
1766
+ * ```javascript
1767
+ * const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
1768
+ * const index = table.get_index(); // "x"
1769
+ * ```
1770
+ * @returns {Promise<string | undefined>}
1771
+ */
1772
+ get_index() {
1773
+ const ret = wasm.table_get_index(this.__wbg_ptr);
1774
+ return takeObject(ret);
1775
+ }
1776
+ /**
1777
+ * Get a copy of the [`Client`] this [`Table`] came from.
1778
+ * @returns {Promise<Client>}
1779
+ */
1780
+ get_client() {
1781
+ const ret = wasm.table_get_client(this.__wbg_ptr);
1782
+ return takeObject(ret);
1783
+ }
1784
+ /**
1785
+ * Returns the user-specified name for this table, or the auto-generated
1786
+ * name if a name was not specified when the table was created.
1787
+ * @returns {Promise<string>}
1788
+ */
1789
+ get_name() {
1790
+ const ret = wasm.table_get_name(this.__wbg_ptr);
1791
+ return takeObject(ret);
1792
+ }
1793
+ /**
1794
+ * Returns the user-specified row limit for this table.
1795
+ * @returns {Promise<number | undefined>}
1796
+ */
1797
+ get_limit() {
1798
+ const ret = wasm.table_get_limit(this.__wbg_ptr);
1799
+ return takeObject(ret);
1800
+ }
1801
+ /**
1802
+ * Removes all the rows in the [`Table`], but preserves everything else
1803
+ * including the schema, index, and any callbacks or registered
1804
+ * [`View`] instances.
1805
+ *
1806
+ * Calling [`Table::clear`], like [`Table::update`] and [`Table::remove`],
1807
+ * will trigger an update event to any registered listeners via
1808
+ * [`View::on_update`].
1809
+ * @returns {Promise<void>}
1810
+ */
1811
+ clear() {
1812
+ const ret = wasm.table_clear(this.__wbg_ptr);
1813
+ return takeObject(ret);
1814
+ }
1815
+ /**
1816
+ * Delete this [`Table`] and cleans up associated resources.
1817
+ *
1818
+ * [`Table`]s do not stop consuming resources or processing updates when
1819
+ * they are garbage collected in their host language - you must call
1820
+ * this method to reclaim these.
1821
+ *
1822
+ * # Arguments
1823
+ *
1824
+ * - `options` An options dictionary.
1825
+ * - `lazy` Whether to delete this [`Table`] _lazily_. When false (the
1826
+ * default), the delete will occur immediately, assuming it has no
1827
+ * [`View`] instances registered to it (which must be deleted first,
1828
+ * otherwise this method will throw an error). When true, the
1829
+ * [`Table`] will only be marked for deltion once its [`View`]
1830
+ * dependency count reaches 0.
1831
+ *
1832
+ * # JavaScript Examples
1833
+ *
1834
+ * ```javascript
1835
+ * const table = await client.table("x,y\n1,2\n3,4");
1836
+ *
1837
+ * // ...
1838
+ *
1839
+ * await table.delete({ lazy: true });
1840
+ * ```
1841
+ * @param {DeleteOptions | null} [options]
1842
+ * @returns {Promise<void>}
1843
+ */
1844
+ delete(options) {
1845
+ const ptr = this.__destroy_into_raw();
1846
+ const ret = wasm.table_delete(ptr, isLikeNone(options) ? 0 : addHeapObject(options));
1847
+ return takeObject(ret);
1848
+ }
1849
+ /**
1850
+ * Returns the number of rows in a [`Table`].
1851
+ * @returns {Promise<number>}
1852
+ */
1853
+ size() {
1854
+ const ret = wasm.table_size(this.__wbg_ptr);
1855
+ return takeObject(ret);
1856
+ }
1857
+ /**
1858
+ * Returns a table's [`Schema`], a mapping of column names to column types.
1859
+ *
1860
+ * The mapping of a [`Table`]'s column names to data types is referred to
1861
+ * as a [`Schema`]. Each column has a unique name and a data type, one
1862
+ * of:
1863
+ *
1864
+ * - `"boolean"` - A boolean type
1865
+ * - `"date"` - A timesonze-agnostic date type (month/day/year)
1866
+ * - `"datetime"` - A millisecond-precision datetime type in the UTC
1867
+ * timezone
1868
+ * - `"float"` - A 64 bit float
1869
+ * - `"integer"` - A signed 32 bit integer (the integer type supported by
1870
+ * JavaScript)
1871
+ * - `"string"` - A [`String`] data type (encoded internally as a
1872
+ * _dictionary_)
1873
+ *
1874
+ * Note that all [`Table`] columns are _nullable_, regardless of the data
1875
+ * type.
1876
+ * @returns {Promise<any>}
1877
+ */
1878
+ schema() {
1879
+ const ret = wasm.table_schema(this.__wbg_ptr);
1880
+ return takeObject(ret);
1881
+ }
1882
+ /**
1883
+ * Returns the column names of this [`Table`] in "natural" order (the
1884
+ * ordering implied by the input format).
1885
+ *
1886
+ * # JavaScript Examples
1887
+ *
1888
+ * ```javascript
1889
+ * const columns = await table.columns();
1890
+ * ```
1891
+ * @returns {Promise<any>}
1892
+ */
1893
+ columns() {
1894
+ const ret = wasm.table_columns(this.__wbg_ptr);
1895
+ return takeObject(ret);
1896
+ }
1897
+ /**
1898
+ * Create a unique channel ID on this [`Table`], which allows
1899
+ * `View::on_update` callback calls to be associated with the
1900
+ * `Table::update` which caused them.
1901
+ * @returns {Promise<number>}
1902
+ */
1903
+ make_port() {
1904
+ const ret = wasm.table_make_port(this.__wbg_ptr);
1905
+ return takeObject(ret);
1906
+ }
1907
+ /**
1908
+ * Register a callback which is called exactly once, when this [`Table`] is
1909
+ * deleted with the [`Table::delete`] method.
1910
+ *
1911
+ * [`Table::on_delete`] resolves when the subscription message is sent, not
1912
+ * when the _delete_ event occurs.
1913
+ * @param {Function} on_delete
1914
+ * @returns {Promise<any>}
1915
+ */
1916
+ on_delete(on_delete) {
1917
+ const ret = wasm.table_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
1918
+ return takeObject(ret);
1919
+ }
1920
+ /**
1921
+ * Removes a listener with a given ID, as returned by a previous call to
1922
+ * [`Table::on_delete`].
1923
+ * @param {number} callback_id
1924
+ * @returns {Promise<any>}
1925
+ */
1926
+ remove_delete(callback_id) {
1927
+ const ret = wasm.table_remove_delete(this.__wbg_ptr, callback_id);
1928
+ return takeObject(ret);
1929
+ }
1930
+ /**
1931
+ * Removes rows from this [`Table`] with the `index` column values
1932
+ * supplied.
1933
+ *
1934
+ * # Arguments
1935
+ *
1936
+ * - `indices` - A list of `index` column values for rows that should be
1937
+ * removed.
1938
+ *
1939
+ * # JavaScript Examples
1940
+ *
1941
+ * ```javascript
1942
+ * await table.remove([1, 2, 3]);
1943
+ * ```
1944
+ * @param {any} value
1945
+ * @param {UpdateOptions | null} [options]
1946
+ * @returns {Promise<void>}
1947
+ */
1948
+ remove(value, options) {
1949
+ const ret = wasm.table_remove(this.__wbg_ptr, addHeapObject(value), isLikeNone(options) ? 0 : addHeapObject(options));
1950
+ return takeObject(ret);
1951
+ }
1952
+ /**
1953
+ * Replace all rows in this [`Table`] with the input data, coerced to this
1954
+ * [`Table`]'s existing [`perspective_client::Schema`], notifying any
1955
+ * derived [`View`] and [`View::on_update`] callbacks.
1956
+ *
1957
+ * Calling [`Table::replace`] is an easy way to replace _all_ the data in a
1958
+ * [`Table`] without losing any derived [`View`] instances or
1959
+ * [`View::on_update`] callbacks. [`Table::replace`] does _not_ infer
1960
+ * data types like [`Client::table`] does, rather it _coerces_ input
1961
+ * data to the `Schema` like [`Table::update`]. If you need a [`Table`]
1962
+ * with a different `Schema`, you must create a new one.
1963
+ *
1964
+ * # JavaScript Examples
1965
+ *
1966
+ * ```javascript
1967
+ * await table.replace("x,y\n1,2");
1968
+ * ```
1969
+ * @param {any} input
1970
+ * @param {UpdateOptions | null} [options]
1971
+ * @returns {Promise<void>}
1972
+ */
1973
+ replace(input, options) {
1974
+ const ret = wasm.table_replace(this.__wbg_ptr, addHeapObject(input), isLikeNone(options) ? 0 : addHeapObject(options));
1975
+ return takeObject(ret);
1976
+ }
1977
+ /**
1978
+ * Updates the rows of this table and any derived [`View`] instances.
1979
+ *
1980
+ * Calling [`Table::update`] will trigger the [`View::on_update`] callbacks
1981
+ * register to derived [`View`], and the call itself will not resolve until
1982
+ * _all_ derived [`View`]'s are notified.
1983
+ *
1984
+ * When updating a [`Table`] with an `index`, [`Table::update`] supports
1985
+ * partial updates, by omitting columns from the update data.
1986
+ *
1987
+ * # Arguments
1988
+ *
1989
+ * - `input` - The input data for this [`Table`]. The schema of a [`Table`]
1990
+ * is immutable after creation, so this method cannot be called with a
1991
+ * schema.
1992
+ * - `options` - Options for this update step - see [`UpdateOptions`].
1993
+ *
1994
+ * # JavaScript Examples
1995
+ *
1996
+ * ```javascript
1997
+ * await table.update("x,y\n1,2");
1998
+ * ```
1999
+ * @param {string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[]} input
2000
+ * @param {UpdateOptions | null} [options]
2001
+ * @returns {Promise<any>}
2002
+ */
2003
+ update(input, options) {
2004
+ const ret = wasm.table_update(this.__wbg_ptr, addHeapObject(input), isLikeNone(options) ? 0 : addHeapObject(options));
2005
+ return takeObject(ret);
2006
+ }
2007
+ /**
2008
+ * Create a new [`View`] from this table with a specified
2009
+ * [`ViewConfigUpdate`].
2010
+ *
2011
+ * See [`View`] struct.
2012
+ *
2013
+ * # JavaScript Examples
2014
+ *
2015
+ * ```javascript
2016
+ * const view = await table.view({
2017
+ * columns: ["Sales"],
2018
+ * aggregates: { Sales: "sum" },
2019
+ * group_by: ["Region", "Country"],
2020
+ * filter: [["Category", "in", ["Furniture", "Technology"]]],
2021
+ * });
2022
+ * ```
2023
+ * @param {ViewConfigUpdate | null} [config]
2024
+ * @returns {Promise<View>}
2025
+ */
2026
+ view(config) {
2027
+ const ret = wasm.table_view(this.__wbg_ptr, isLikeNone(config) ? 0 : addHeapObject(config));
2028
+ return takeObject(ret);
2029
+ }
2030
+ /**
2031
+ * Validates the given expressions.
2032
+ * @param {any} exprs
2033
+ * @returns {Promise<any>}
2034
+ */
2035
+ validate_expressions(exprs) {
2036
+ const ret = wasm.table_validate_expressions(this.__wbg_ptr, addHeapObject(exprs));
2037
+ return takeObject(ret);
2038
+ }
2039
+ }
2040
+
2041
+ const ViewFinalization = (typeof FinalizationRegistry === 'undefined')
2042
+ ? { register: () => {}, unregister: () => {} }
2043
+ : new FinalizationRegistry(ptr => wasm.__wbg_view_free(ptr >>> 0, 1));
2044
+ /**
2045
+ * The [`View`] struct is Perspective's query and serialization interface. It
2046
+ * represents a query on the `Table`'s dataset and is always created from an
2047
+ * existing `Table` instance via the [`Table::view`] method.
2048
+ *
2049
+ * [`View`]s are immutable with respect to the arguments provided to the
2050
+ * [`Table::view`] method; to change these parameters, you must create a new
2051
+ * [`View`] on the same [`Table`]. However, each [`View`] is _live_ with
2052
+ * respect to the [`Table`]'s data, and will (within a conflation window)
2053
+ * update with the latest state as its parent [`Table`] updates, including
2054
+ * incrementally recalculating all aggregates, pivots, filters, etc. [`View`]
2055
+ * query parameters are composable, in that each parameter works independently
2056
+ * _and_ in conjunction with each other, and there is no limit to the number of
2057
+ * pivots, filters, etc. which can be applied.
2058
+ */
2059
+ export class View {
2060
+
2061
+ static __wrap(ptr) {
2062
+ ptr = ptr >>> 0;
2063
+ const obj = Object.create(View.prototype);
2064
+ obj.__wbg_ptr = ptr;
2065
+ ViewFinalization.register(obj, obj.__wbg_ptr, obj);
2066
+ return obj;
2067
+ }
2068
+
2069
+ static __unwrap(jsValue) {
2070
+ if (!(jsValue instanceof View)) {
2071
+ return 0;
2072
+ }
2073
+ return jsValue.__destroy_into_raw();
2074
+ }
2075
+
2076
+ __destroy_into_raw() {
2077
+ const ptr = this.__wbg_ptr;
2078
+ this.__wbg_ptr = 0;
2079
+ ViewFinalization.unregister(this);
2080
+ return ptr;
2081
+ }
2082
+
2083
+ free() {
2084
+ const ptr = this.__destroy_into_raw();
2085
+ wasm.__wbg_view_free(ptr, 0);
2086
+ }
2087
+ /**
2088
+ * @returns {View}
2089
+ */
2090
+ __get_model() {
2091
+ const ret = wasm.view___get_model(this.__wbg_ptr);
2092
+ return View.__wrap(ret);
2093
+ }
2094
+ /**
2095
+ * Returns an array of strings containing the column paths of the [`View`]
2096
+ * without any of the source columns.
2097
+ *
2098
+ * A column path shows the columns that a given cell belongs to after
2099
+ * pivots are applied.
2100
+ * @param {ColumnWindow | null} [window]
2101
+ * @returns {Promise<any>}
2102
+ */
2103
+ column_paths(window) {
2104
+ const ret = wasm.view_column_paths(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2105
+ return takeObject(ret);
2106
+ }
2107
+ /**
2108
+ * Delete this [`View`] and clean up all resources associated with it.
2109
+ * [`View`] objects do not stop consuming resources or processing
2110
+ * updates when they are garbage collected - you must call this method
2111
+ * to reclaim these.
2112
+ * @returns {Promise<void>}
2113
+ */
2114
+ delete() {
2115
+ const ptr = this.__destroy_into_raw();
2116
+ const ret = wasm.view_delete(ptr);
2117
+ return takeObject(ret);
2118
+ }
2119
+ /**
2120
+ * Returns this [`View`]'s _dimensions_, row and column count, as well as
2121
+ * those of the [`crate::Table`] from which it was derived.
2122
+ *
2123
+ * - `num_table_rows` - The number of rows in the underlying
2124
+ * [`crate::Table`].
2125
+ * - `num_table_columns` - The number of columns in the underlying
2126
+ * [`crate::Table`] (including the `index` column if this
2127
+ * [`crate::Table`] was constructed with one).
2128
+ * - `num_view_rows` - The number of rows in this [`View`]. If this
2129
+ * [`View`] has a `group_by` clause, `num_view_rows` will also include
2130
+ * aggregated rows.
2131
+ * - `num_view_columns` - The number of columns in this [`View`]. If this
2132
+ * [`View`] has a `split_by` clause, `num_view_columns` will include all
2133
+ * _column paths_, e.g. the number of `columns` clause times the number
2134
+ * of `split_by` groups.
2135
+ * @returns {Promise<any>}
2136
+ */
2137
+ dimensions() {
2138
+ const ret = wasm.view_dimensions(this.__wbg_ptr);
2139
+ return takeObject(ret);
2140
+ }
2141
+ /**
2142
+ * The expression schema of this [`View`], which contains only the
2143
+ * expressions created on this [`View`]. See [`View::schema`] for
2144
+ * details.
2145
+ * @returns {Promise<any>}
2146
+ */
2147
+ expression_schema() {
2148
+ const ret = wasm.view_expression_schema(this.__wbg_ptr);
2149
+ return takeObject(ret);
2150
+ }
2151
+ /**
2152
+ * A copy of the config object passed to the [`Table::view`] method which
2153
+ * created this [`View`].
2154
+ * @returns {Promise<any>}
2155
+ */
2156
+ get_config() {
2157
+ const ret = wasm.view_get_config(this.__wbg_ptr);
2158
+ return takeObject(ret);
2159
+ }
2160
+ /**
2161
+ * Calculates the [min, max] of the leaf nodes of a column `column_name`.
2162
+ *
2163
+ * # Returns
2164
+ *
2165
+ * A tuple of [min, max], whose types are column and aggregate dependent.
2166
+ * @param {string} name
2167
+ * @returns {Promise<Array<any>>}
2168
+ */
2169
+ get_min_max(name) {
2170
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2171
+ const len0 = WASM_VECTOR_LEN;
2172
+ const ret = wasm.view_get_min_max(this.__wbg_ptr, ptr0, len0);
2173
+ return takeObject(ret);
2174
+ }
2175
+ /**
2176
+ * The number of aggregated rows in this [`View`]. This is affected by the
2177
+ * "group_by" configuration parameter supplied to this view's contructor.
2178
+ *
2179
+ * # Returns
2180
+ *
2181
+ * The number of aggregated rows.
2182
+ * @returns {Promise<number>}
2183
+ */
2184
+ num_rows() {
2185
+ const ret = wasm.view_num_rows(this.__wbg_ptr);
2186
+ return takeObject(ret);
2187
+ }
2188
+ /**
2189
+ * The schema of this [`View`].
2190
+ *
2191
+ * The [`View`] schema differs from the `schema` returned by
2192
+ * [`Table::schema`]; it may have different column names due to
2193
+ * `expressions` or `columns` configs, or it maye have _different
2194
+ * column types_ due to the application og `group_by` and `aggregates`
2195
+ * config. You can think of [`Table::schema`] as the _input_ schema and
2196
+ * [`View::schema`] as the _output_ schema of a Perspective pipeline.
2197
+ * @returns {Promise<any>}
2198
+ */
2199
+ schema() {
2200
+ const ret = wasm.view_schema(this.__wbg_ptr);
2201
+ return takeObject(ret);
2202
+ }
2203
+ /**
2204
+ * Serializes a [`View`] to the Apache Arrow data format.
2205
+ * @param {ViewWindow | null} [window]
2206
+ * @returns {Promise<ArrayBuffer>}
2207
+ */
2208
+ to_arrow(window) {
2209
+ const ret = wasm.view_to_arrow(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2210
+ return takeObject(ret);
2211
+ }
2212
+ /**
2213
+ * Serializes this [`View`] to a string of JSON data. Useful if you want to
2214
+ * save additional round trip serialize/deserialize cycles.
2215
+ * @param {ViewWindow | null} [window]
2216
+ * @returns {Promise<string>}
2217
+ */
2218
+ to_columns_string(window) {
2219
+ const ret = wasm.view_to_columns_string(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2220
+ return takeObject(ret);
2221
+ }
2222
+ /**
2223
+ * Serializes this [`View`] to JavaScript objects in a column-oriented
2224
+ * format.
2225
+ * @param {ViewWindow | null} [window]
2226
+ * @returns {Promise<object>}
2227
+ */
2228
+ to_columns(window) {
2229
+ const ret = wasm.view_to_columns(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2230
+ return takeObject(ret);
2231
+ }
2232
+ /**
2233
+ * Render this `View` as a JSON string.
2234
+ * @param {ViewWindow | null} [window]
2235
+ * @returns {Promise<string>}
2236
+ */
2237
+ to_json_string(window) {
2238
+ const ret = wasm.view_to_json_string(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2239
+ return takeObject(ret);
2240
+ }
2241
+ /**
2242
+ * Serializes this [`View`] to JavaScript objects in a row-oriented
2243
+ * format.
2244
+ * @param {ViewWindow | null} [window]
2245
+ * @returns {Promise<Array<any>>}
2246
+ */
2247
+ to_json(window) {
2248
+ const ret = wasm.view_to_json(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2249
+ return takeObject(ret);
2250
+ }
2251
+ /**
2252
+ * Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
2253
+ * formatted [`String`].
2254
+ * @param {ViewWindow | null} [window]
2255
+ * @returns {Promise<string>}
2256
+ */
2257
+ to_ndjson(window) {
2258
+ const ret = wasm.view_to_ndjson(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2259
+ return takeObject(ret);
2260
+ }
2261
+ /**
2262
+ * Serializes this [`View`] to CSV data in a standard format.
2263
+ * @param {ViewWindow | null} [window]
2264
+ * @returns {Promise<string>}
2265
+ */
2266
+ to_csv(window) {
2267
+ const ret = wasm.view_to_csv(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
2268
+ return takeObject(ret);
2269
+ }
2270
+ /**
2271
+ * Register a callback with this [`View`]. Whenever the view's underlying
2272
+ * table emits an update, this callback will be invoked with an object
2273
+ * containing `port_id`, indicating which port the update fired on, and
2274
+ * optionally `delta`, which is the new data that was updated for each
2275
+ * cell or each row.
2276
+ *
2277
+ * # Arguments
2278
+ *
2279
+ * - `on_update` - A callback function invoked on update, which receives an
2280
+ * object with two keys: `port_id`, indicating which port the update was
2281
+ * triggered on, and `delta`, whose value is dependent on the mode
2282
+ * parameter.
2283
+ * - `options` - If this is provided as `OnUpdateOptions { mode:
2284
+ * Some(OnUpdateMode::Row) }`, then `delta` is an Arrow of the updated
2285
+ * rows. Otherwise `delta` will be [`Option::None`].
2286
+ *
2287
+ * # JavaScript Examples
2288
+ *
2289
+ * ```javascript
2290
+ * // Attach an `on_update` callback
2291
+ * view.on_update((updated) => console.log(updated.port_id));
2292
+ * ```
2293
+ *
2294
+ * ```javascript
2295
+ * // `on_update` with row deltas
2296
+ * view.on_update((updated) => console.log(updated.delta), { mode: "row" });
2297
+ * ```
2298
+ * @param {Function} on_update_js
2299
+ * @param {OnUpdateOptions | null} [options]
2300
+ * @returns {Promise<any>}
2301
+ */
2302
+ on_update(on_update_js, options) {
2303
+ const ret = wasm.view_on_update(this.__wbg_ptr, addHeapObject(on_update_js), isLikeNone(options) ? 0 : addHeapObject(options));
2304
+ return takeObject(ret);
2305
+ }
2306
+ /**
2307
+ * Unregister a previously registered update callback with this [`View`].
2308
+ *
2309
+ * # Arguments
2310
+ *
2311
+ * - `id` - A callback `id` as returned by a recipricol call to
2312
+ * [`View::on_update`].
2313
+ * @param {number} callback_id
2314
+ * @returns {Promise<void>}
2315
+ */
2316
+ remove_update(callback_id) {
2317
+ const ret = wasm.view_remove_update(this.__wbg_ptr, callback_id);
2318
+ return takeObject(ret);
2319
+ }
2320
+ /**
2321
+ * Register a callback with this [`View`]. Whenever the [`View`] is
2322
+ * deleted, this callback will be invoked.
2323
+ * @param {Function} on_delete
2324
+ * @returns {Promise<any>}
2325
+ */
2326
+ on_delete(on_delete) {
2327
+ const ret = wasm.view_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
2328
+ return takeObject(ret);
2329
+ }
2330
+ /**
2331
+ * The number of aggregated columns in this [`View`]. This is affected by
2332
+ * the "split_by" configuration parameter supplied to this view's
2333
+ * contructor.
2334
+ *
2335
+ * # Returns
2336
+ *
2337
+ * The number of aggregated columns.
2338
+ * @returns {Promise<number>}
2339
+ */
2340
+ num_columns() {
2341
+ const ret = wasm.view_num_columns(this.__wbg_ptr);
2342
+ return takeObject(ret);
2343
+ }
2344
+ /**
2345
+ * Unregister a previously registered [`View::on_delete`] callback.
2346
+ * @param {number} callback_id
2347
+ * @returns {Promise<any>}
2348
+ */
2349
+ remove_delete(callback_id) {
2350
+ const ret = wasm.view_remove_delete(this.__wbg_ptr, callback_id);
2351
+ return takeObject(ret);
2352
+ }
2353
+ /**
2354
+ * Collapses the `group_by` row at `row_index`.
2355
+ * @param {number} row_index
2356
+ * @returns {Promise<number>}
2357
+ */
2358
+ collapse(row_index) {
2359
+ const ret = wasm.view_collapse(this.__wbg_ptr, row_index);
2360
+ return takeObject(ret);
2361
+ }
2362
+ /**
2363
+ * Expand the `group_by` row at `row_index`.
2364
+ * @param {number} row_index
2365
+ * @returns {Promise<number>}
2366
+ */
2367
+ expand(row_index) {
2368
+ const ret = wasm.view_expand(this.__wbg_ptr, row_index);
2369
+ return takeObject(ret);
2370
+ }
2371
+ /**
2372
+ * Set expansion `depth` of the `group_by` tree.
2373
+ * @param {number} depth
2374
+ * @returns {Promise<void>}
2375
+ */
2376
+ set_depth(depth) {
2377
+ const ret = wasm.view_set_depth(this.__wbg_ptr, depth);
2378
+ return takeObject(ret);
2379
+ }
2380
+ }
2381
+
2382
+ async function __wbg_load(module, imports) {
2383
+ if (typeof Response === 'function' && module instanceof Response) {
2384
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
2385
+ try {
2386
+ return await WebAssembly.instantiateStreaming(module, imports);
2387
+
2388
+ } catch (e) {
2389
+ if (module.headers.get('Content-Type') != 'application/wasm') {
2390
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
2391
+
2392
+ } else {
2393
+ throw e;
2394
+ }
2395
+ }
2396
+ }
2397
+
2398
+ const bytes = await module.arrayBuffer();
2399
+ return await WebAssembly.instantiate(bytes, imports);
2400
+
2401
+ } else {
2402
+ const instance = await WebAssembly.instantiate(module, imports);
2403
+
2404
+ if (instance instanceof WebAssembly.Instance) {
2405
+ return { instance, module };
2406
+
2407
+ } else {
2408
+ return instance;
2409
+ }
2410
+ }
2411
+ }
2412
+
2413
+ function __wbg_get_imports() {
2414
+ const imports = {};
2415
+ imports.wbg = {};
2416
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
2417
+ const ret = String(getObject(arg1));
2418
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2419
+ const len1 = WASM_VECTOR_LEN;
2420
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2421
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2422
+ };
2423
+ imports.wbg.__wbg_addEventListener_84ae3eac6e15480a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2424
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4));
2425
+ }, arguments) };
2426
+ imports.wbg.__wbg_addEventListener_90e553fdce254421 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2427
+ getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
2428
+ }, arguments) };
2429
+ imports.wbg.__wbg_add_2db0e547e9356c6a = function() { return handleError(function (arg0, arg1) {
2430
+ getObject(arg0).add(...getObject(arg1));
2431
+ }, arguments) };
2432
+ imports.wbg.__wbg_add_9b5191a4a4f767dc = function() { return handleError(function (arg0, arg1, arg2) {
2433
+ getObject(arg0).add(getStringFromWasm0(arg1, arg2));
2434
+ }, arguments) };
2435
+ imports.wbg.__wbg_appendChild_8204974b7328bf98 = function() { return handleError(function (arg0, arg1) {
2436
+ const ret = getObject(arg0).appendChild(getObject(arg1));
2437
+ return addHeapObject(ret);
2438
+ }, arguments) };
2439
+ imports.wbg.__wbg_apply_eb9e9b97497f91e4 = function() { return handleError(function (arg0, arg1, arg2) {
2440
+ const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
2441
+ return addHeapObject(ret);
2442
+ }, arguments) };
2443
+ imports.wbg.__wbg_at_7d852dd9f194d43e = function(arg0, arg1) {
2444
+ const ret = getObject(arg0).at(arg1);
2445
+ return addHeapObject(ret);
2446
+ };
2447
+ imports.wbg.__wbg_attachShadow_a1dedb814fb75a6d = function() { return handleError(function (arg0, arg1) {
2448
+ const ret = getObject(arg0).attachShadow(getObject(arg1));
2449
+ return addHeapObject(ret);
2450
+ }, arguments) };
2451
+ imports.wbg.__wbg_blur_c2ad8cc71bac3974 = function() { return handleError(function (arg0) {
2452
+ getObject(arg0).blur();
2453
+ }, arguments) };
2454
+ imports.wbg.__wbg_body_942ea927546a04ba = function(arg0) {
2455
+ const ret = getObject(arg0).body;
2456
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2457
+ };
2458
+ imports.wbg.__wbg_bootstrap_4ddc681a76c9d6aa = function(arg0, arg1, arg2, arg3, arg4, arg5) {
2459
+ const ret = bootstrap(getObject(arg0), getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), takeObject(arg5));
2460
+ return addHeapObject(ret);
2461
+ };
2462
+ imports.wbg.__wbg_bubbles_afd8dd1d14b05aba = function(arg0) {
2463
+ const ret = getObject(arg0).bubbles;
2464
+ return ret;
2465
+ };
2466
+ imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
2467
+ const ret = getObject(arg0).buffer;
2468
+ return addHeapObject(ret);
2469
+ };
2470
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
2471
+ const ret = getObject(arg0).buffer;
2472
+ return addHeapObject(ret);
2473
+ };
2474
+ imports.wbg.__wbg_button_f75c56aec440ea04 = function(arg0) {
2475
+ const ret = getObject(arg0).button;
2476
+ return ret;
2477
+ };
2478
+ imports.wbg.__wbg_byteLength_e674b853d9c77e1d = function(arg0) {
2479
+ const ret = getObject(arg0).byteLength;
2480
+ return ret;
2481
+ };
2482
+ imports.wbg.__wbg_byteOffset_fd862df290ef848d = function(arg0) {
2483
+ const ret = getObject(arg0).byteOffset;
2484
+ return ret;
2485
+ };
2486
+ imports.wbg.__wbg_cachekey_57601dac16343711 = function(arg0) {
2487
+ const ret = getObject(arg0).__yew_subtree_cache_key;
2488
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
2489
+ };
2490
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
2491
+ const ret = getObject(arg0).call(getObject(arg1));
2492
+ return addHeapObject(ret);
2493
+ }, arguments) };
2494
+ imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
2495
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2496
+ return addHeapObject(ret);
2497
+ }, arguments) };
2498
+ imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2499
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2500
+ return addHeapObject(ret);
2501
+ }, arguments) };
2502
+ imports.wbg.__wbg_cancelBubble_2e66f509cdea4d7e = function(arg0) {
2503
+ const ret = getObject(arg0).cancelBubble;
2504
+ return ret;
2505
+ };
2506
+ imports.wbg.__wbg_canrendercolumnstyles_4abef71c26ed8164 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2507
+ const ret = getObject(arg0).can_render_column_styles(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4));
2508
+ return ret;
2509
+ }, arguments) };
2510
+ imports.wbg.__wbg_category_1e0ba8c71cb12129 = function(arg0, arg1) {
2511
+ const ret = getObject(arg1).category;
2512
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2513
+ var len1 = WASM_VECTOR_LEN;
2514
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2515
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2516
+ };
2517
+ imports.wbg.__wbg_checked_0591091c28a685f0 = function(arg0) {
2518
+ const ret = getObject(arg0).checked;
2519
+ return ret;
2520
+ };
2521
+ imports.wbg.__wbg_childNodes_c4423003f3a9441f = function(arg0) {
2522
+ const ret = getObject(arg0).childNodes;
2523
+ return addHeapObject(ret);
2524
+ };
2525
+ imports.wbg.__wbg_children_9b8d0778c0b363f8 = function(arg0) {
2526
+ const ret = getObject(arg0).children;
2527
+ return addHeapObject(ret);
2528
+ };
2529
+ imports.wbg.__wbg_classList_3fa995ef71da9e8e = function(arg0) {
2530
+ const ret = getObject(arg0).classList;
2531
+ return addHeapObject(ret);
2532
+ };
2533
+ imports.wbg.__wbg_click_c52d7bdb3b6dc9c3 = function(arg0) {
2534
+ getObject(arg0).click();
2535
+ };
2536
+ imports.wbg.__wbg_clientHeight_216178c194000db4 = function(arg0) {
2537
+ const ret = getObject(arg0).clientHeight;
2538
+ return ret;
2539
+ };
2540
+ imports.wbg.__wbg_clientWidth_ce67a04dc15fce39 = function(arg0) {
2541
+ const ret = getObject(arg0).clientWidth;
2542
+ return ret;
2543
+ };
2544
+ imports.wbg.__wbg_clientX_5eb380a5f1fec6fd = function(arg0) {
2545
+ const ret = getObject(arg0).clientX;
2546
+ return ret;
2547
+ };
2548
+ imports.wbg.__wbg_clientY_d8b9c7f0c4e2e677 = function(arg0) {
2549
+ const ret = getObject(arg0).clientY;
2550
+ return ret;
2551
+ };
2552
+ imports.wbg.__wbg_client_new = function(arg0) {
2553
+ const ret = Client.__wrap(arg0);
2554
+ return addHeapObject(ret);
2555
+ };
2556
+ imports.wbg.__wbg_clipboard_93f8aa8cc426db44 = function(arg0) {
2557
+ const ret = getObject(arg0).clipboard;
2558
+ return addHeapObject(ret);
2559
+ };
2560
+ imports.wbg.__wbg_cloneNode_a8ce4052a2c37536 = function() { return handleError(function (arg0, arg1) {
2561
+ const ret = getObject(arg0).cloneNode(arg1 !== 0);
2562
+ return addHeapObject(ret);
2563
+ }, arguments) };
2564
+ imports.wbg.__wbg_cloneNode_e35b333b87d51340 = function() { return handleError(function (arg0) {
2565
+ const ret = getObject(arg0).cloneNode();
2566
+ return addHeapObject(ret);
2567
+ }, arguments) };
2568
+ imports.wbg.__wbg_code_459c120478e1ab6e = function(arg0, arg1) {
2569
+ const ret = getObject(arg1).code;
2570
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2571
+ const len1 = WASM_VECTOR_LEN;
2572
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2573
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2574
+ };
2575
+ imports.wbg.__wbg_columnstylecontrols_3fa107406feaa486 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2576
+ const ret = getObject(arg0).column_style_controls(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4));
2577
+ return addHeapObject(ret);
2578
+ }, arguments) };
2579
+ imports.wbg.__wbg_composedPath_977ce97a0ef39358 = function(arg0) {
2580
+ const ret = getObject(arg0).composedPath();
2581
+ return addHeapObject(ret);
2582
+ };
2583
+ imports.wbg.__wbg_configcolumnnames_ba81cdf305a3b66e = function(arg0) {
2584
+ const ret = getObject(arg0).config_column_names;
2585
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2586
+ };
2587
+ imports.wbg.__wbg_contains_3361c7eda6c95afd = function(arg0, arg1) {
2588
+ const ret = getObject(arg0).contains(getObject(arg1));
2589
+ return ret;
2590
+ };
2591
+ imports.wbg.__wbg_contentRect_a5b9c3f7578fb6e6 = function(arg0) {
2592
+ const ret = getObject(arg0).contentRect;
2593
+ return addHeapObject(ret);
2594
+ };
2595
+ imports.wbg.__wbg_createElementNS_914d752e521987da = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2596
+ const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2597
+ return addHeapObject(ret);
2598
+ }, arguments) };
2599
+ imports.wbg.__wbg_createElement_8c9931a732ee2fea = function() { return handleError(function (arg0, arg1, arg2) {
2600
+ const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
2601
+ return addHeapObject(ret);
2602
+ }, arguments) };
2603
+ imports.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764 = function() { return handleError(function (arg0, arg1) {
2604
+ const ret = URL.createObjectURL(getObject(arg1));
2605
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2606
+ const len1 = WASM_VECTOR_LEN;
2607
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2608
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2609
+ }, arguments) };
2610
+ imports.wbg.__wbg_createTextNode_42af1a9f21bb3360 = function(arg0, arg1, arg2) {
2611
+ const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2));
2612
+ return addHeapObject(ret);
2613
+ };
2614
+ imports.wbg.__wbg_cssRules_8216d7fc3a4e8360 = function() { return handleError(function (arg0) {
2615
+ const ret = getObject(arg0).cssRules;
2616
+ return addHeapObject(ret);
2617
+ }, arguments) };
2618
+ imports.wbg.__wbg_dataTransfer_86283b0702a1aff1 = function(arg0) {
2619
+ const ret = getObject(arg0).dataTransfer;
2620
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2621
+ };
2622
+ imports.wbg.__wbg_dataset_81053fc75d7f9006 = function(arg0) {
2623
+ const ret = getObject(arg0).dataset;
2624
+ return addHeapObject(ret);
2625
+ };
2626
+ imports.wbg.__wbg_debug_3cb59063b29f58c1 = function(arg0) {
2627
+ console.debug(getObject(arg0));
2628
+ };
2629
+ imports.wbg.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {
2630
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2631
+ };
2632
+ imports.wbg.__wbg_delete_1e8688469e73fcd3 = function(arg0, arg1, arg2) {
2633
+ delete getObject(arg0)[getStringFromWasm0(arg1, arg2)];
2634
+ };
2635
+ imports.wbg.__wbg_dispatchEvent_9e259d7c1d603dfb = function() { return handleError(function (arg0, arg1) {
2636
+ const ret = getObject(arg0).dispatchEvent(getObject(arg1));
2637
+ return ret;
2638
+ }, arguments) };
2639
+ imports.wbg.__wbg_document_d249400bd7bd996d = function(arg0) {
2640
+ const ret = getObject(arg0).document;
2641
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2642
+ };
2643
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
2644
+ const ret = getObject(arg0).done;
2645
+ return ret;
2646
+ };
2647
+ imports.wbg.__wbg_draw_402669b850eec220 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2648
+ const ret = getObject(arg0).draw(View.__wrap(arg1), arg2 === 0x100000001 ? undefined : arg2, arg3 === 0x100000001 ? undefined : arg3, arg4 !== 0);
2649
+ return addHeapObject(ret);
2650
+ }, arguments) };
2651
+ imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
2652
+ const ret = Object.entries(getObject(arg0));
2653
+ return addHeapObject(ret);
2654
+ };
2655
+ imports.wbg.__wbg_error_1004b8c64097413f = function(arg0, arg1) {
2656
+ console.error(getObject(arg0), getObject(arg1));
2657
+ };
2658
+ imports.wbg.__wbg_error_3c7d958458bf649b = function(arg0, arg1) {
2659
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2660
+ wasm.__wbindgen_export_3(arg0, arg1 * 4, 4);
2661
+ console.error(...v0);
2662
+ };
2663
+ imports.wbg.__wbg_error_524f506f44df1645 = function(arg0) {
2664
+ console.error(getObject(arg0));
2665
+ };
2666
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
2667
+ let deferred0_0;
2668
+ let deferred0_1;
2669
+ try {
2670
+ deferred0_0 = arg0;
2671
+ deferred0_1 = arg1;
2672
+ console.error(getStringFromWasm0(arg0, arg1));
2673
+ } finally {
2674
+ wasm.__wbindgen_export_3(deferred0_0, deferred0_1, 1);
2675
+ }
2676
+ };
2677
+ imports.wbg.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
2678
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2679
+ };
2680
+ imports.wbg.__wbg_family_5295634be10c7821 = function(arg0, arg1) {
2681
+ const ret = getObject(arg1).family;
2682
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2683
+ const len1 = WASM_VECTOR_LEN;
2684
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2685
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2686
+ };
2687
+ imports.wbg.__wbg_focus_7d08b55eba7b368d = function() { return handleError(function (arg0) {
2688
+ getObject(arg0).focus();
2689
+ }, arguments) };
2690
+ imports.wbg.__wbg_fonts_c31a8b1701c57868 = function(arg0) {
2691
+ const ret = getObject(arg0).fonts;
2692
+ return addHeapObject(ret);
2693
+ };
2694
+ imports.wbg.__wbg_format_0545b83dc1d8a934 = function(arg0) {
2695
+ const ret = getObject(arg0).format;
2696
+ return addHeapObject(ret);
2697
+ };
2698
+ imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
2699
+ const ret = Array.from(getObject(arg0));
2700
+ return addHeapObject(ret);
2701
+ };
2702
+ imports.wbg.__wbg_getAttribute_ea5166be2deba45e = function(arg0, arg1, arg2, arg3) {
2703
+ const ret = getObject(arg1).getAttribute(getStringFromWasm0(arg2, arg3));
2704
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2705
+ var len1 = WASM_VECTOR_LEN;
2706
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2707
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2708
+ };
2709
+ imports.wbg.__wbg_getBoundingClientRect_9073b0ff7574d76b = function(arg0) {
2710
+ const ret = getObject(arg0).getBoundingClientRect();
2711
+ return addHeapObject(ret);
2712
+ };
2713
+ imports.wbg.__wbg_getComputedStyle_046dd6472f8e7f1d = function() { return handleError(function (arg0, arg1) {
2714
+ const ret = getObject(arg0).getComputedStyle(getObject(arg1));
2715
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2716
+ }, arguments) };
2717
+ imports.wbg.__wbg_getEntriesByName_2a5a14d4b09f36a4 = function(arg0, arg1, arg2, arg3, arg4) {
2718
+ const ret = getObject(arg0).getEntriesByName(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2719
+ return addHeapObject(ret);
2720
+ };
2721
+ imports.wbg.__wbg_getPropertyValue_e623c23a05dfb30c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2722
+ const ret = getObject(arg1).getPropertyValue(getStringFromWasm0(arg2, arg3));
2723
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2724
+ const len1 = WASM_VECTOR_LEN;
2725
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2726
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2727
+ }, arguments) };
2728
+ imports.wbg.__wbg_getRandomValues_21a0191e74d0e1d3 = function() { return handleError(function (arg0, arg1) {
2729
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
2730
+ }, arguments) };
2731
+ imports.wbg.__wbg_getTimezoneOffset_6b5752021c499c47 = function(arg0) {
2732
+ const ret = getObject(arg0).getTimezoneOffset();
2733
+ return ret;
2734
+ };
2735
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
2736
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
2737
+ return addHeapObject(ret);
2738
+ }, arguments) };
2739
+ imports.wbg.__wbg_get_74b8744f6a23f4fa = function(arg0, arg1, arg2) {
2740
+ const ret = getObject(arg0)[getStringFromWasm0(arg1, arg2)];
2741
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2742
+ };
2743
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
2744
+ const ret = getObject(arg0)[arg1 >>> 0];
2745
+ return addHeapObject(ret);
2746
+ };
2747
+ imports.wbg.__wbg_get_f4c75eca0d58d29a = function(arg0, arg1, arg2, arg3) {
2748
+ const ret = getObject(arg1)[getStringFromWasm0(arg2, arg3)];
2749
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2750
+ var len1 = WASM_VECTOR_LEN;
2751
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2752
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2753
+ };
2754
+ imports.wbg.__wbg_getwithindex_5a108af1d9b5b5b4 = function(arg0, arg1) {
2755
+ const ret = getObject(arg0)[arg1 >>> 0];
2756
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2757
+ };
2758
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
2759
+ const ret = getObject(arg0)[getObject(arg1)];
2760
+ return addHeapObject(ret);
2761
+ };
2762
+ imports.wbg.__wbg_hasAttribute_db31090c2e646f57 = function(arg0, arg1, arg2) {
2763
+ const ret = getObject(arg0).hasAttribute(getStringFromWasm0(arg1, arg2));
2764
+ return ret;
2765
+ };
2766
+ imports.wbg.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
2767
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
2768
+ return ret;
2769
+ }, arguments) };
2770
+ imports.wbg.__wbg_height_1f8226c8f6875110 = function(arg0) {
2771
+ const ret = getObject(arg0).height;
2772
+ return ret;
2773
+ };
2774
+ imports.wbg.__wbg_height_592a89ec0fb63726 = function(arg0) {
2775
+ const ret = getObject(arg0).height;
2776
+ return ret;
2777
+ };
2778
+ imports.wbg.__wbg_host_166cb082dae71d08 = function(arg0) {
2779
+ const ret = getObject(arg0).host;
2780
+ return addHeapObject(ret);
2781
+ };
2782
+ imports.wbg.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {
2783
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2784
+ };
2785
+ imports.wbg.__wbg_info_3daf2e093e091b66 = function(arg0) {
2786
+ console.info(getObject(arg0));
2787
+ };
2788
+ imports.wbg.__wbg_innerHeight_05f4225d754a7929 = function() { return handleError(function (arg0) {
2789
+ const ret = getObject(arg0).innerHeight;
2790
+ return addHeapObject(ret);
2791
+ }, arguments) };
2792
+ imports.wbg.__wbg_innerWidth_7e0498dbd876d498 = function() { return handleError(function (arg0) {
2793
+ const ret = getObject(arg0).innerWidth;
2794
+ return addHeapObject(ret);
2795
+ }, arguments) };
2796
+ imports.wbg.__wbg_insertBefore_c181fb91844cd959 = function() { return handleError(function (arg0, arg1, arg2) {
2797
+ const ret = getObject(arg0).insertBefore(getObject(arg1), getObject(arg2));
2798
+ return addHeapObject(ret);
2799
+ }, arguments) };
2800
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
2801
+ let result;
2802
+ try {
2803
+ result = getObject(arg0) instanceof ArrayBuffer;
2804
+ } catch (_) {
2805
+ result = false;
2806
+ }
2807
+ const ret = result;
2808
+ return ret;
2809
+ };
2810
+ imports.wbg.__wbg_instanceof_Array_6ac07133d621675a = function(arg0) {
2811
+ let result;
2812
+ try {
2813
+ result = getObject(arg0) instanceof Array;
2814
+ } catch (_) {
2815
+ result = false;
2816
+ }
2817
+ const ret = result;
2818
+ return ret;
2819
+ };
2820
+ imports.wbg.__wbg_instanceof_CssStyleRule_060949726898853d = function(arg0) {
2821
+ let result;
2822
+ try {
2823
+ result = getObject(arg0) instanceof CSSStyleRule;
2824
+ } catch (_) {
2825
+ result = false;
2826
+ }
2827
+ const ret = result;
2828
+ return ret;
2829
+ };
2830
+ imports.wbg.__wbg_instanceof_Element_0af65443936d5154 = function(arg0) {
2831
+ let result;
2832
+ try {
2833
+ result = getObject(arg0) instanceof Element;
2834
+ } catch (_) {
2835
+ result = false;
2836
+ }
2837
+ const ret = result;
2838
+ return ret;
2839
+ };
2840
+ imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
2841
+ let result;
2842
+ try {
2843
+ result = getObject(arg0) instanceof Error;
2844
+ } catch (_) {
2845
+ result = false;
2846
+ }
2847
+ const ret = result;
2848
+ return ret;
2849
+ };
2850
+ imports.wbg.__wbg_instanceof_FontFace_05ca60fd7c6286d4 = function(arg0) {
2851
+ let result;
2852
+ try {
2853
+ result = getObject(arg0) instanceof FontFace;
2854
+ } catch (_) {
2855
+ result = false;
2856
+ }
2857
+ const ret = result;
2858
+ return ret;
2859
+ };
2860
+ imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
2861
+ let result;
2862
+ try {
2863
+ result = getObject(arg0) instanceof Map;
2864
+ } catch (_) {
2865
+ result = false;
2866
+ }
2867
+ const ret = result;
2868
+ return ret;
2869
+ };
2870
+ imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
2871
+ let result;
2872
+ try {
2873
+ result = getObject(arg0) instanceof Object;
2874
+ } catch (_) {
2875
+ result = false;
2876
+ }
2877
+ const ret = result;
2878
+ return ret;
2879
+ };
2880
+ imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
2881
+ let result;
2882
+ try {
2883
+ result = getObject(arg0) instanceof Promise;
2884
+ } catch (_) {
2885
+ result = false;
2886
+ }
2887
+ const ret = result;
2888
+ return ret;
2889
+ };
2890
+ imports.wbg.__wbg_instanceof_ShadowRoot_726578bcd7fa418a = function(arg0) {
2891
+ let result;
2892
+ try {
2893
+ result = getObject(arg0) instanceof ShadowRoot;
2894
+ } catch (_) {
2895
+ result = false;
2896
+ }
2897
+ const ret = result;
2898
+ return ret;
2899
+ };
2900
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
2901
+ let result;
2902
+ try {
2903
+ result = getObject(arg0) instanceof Uint8Array;
2904
+ } catch (_) {
2905
+ result = false;
2906
+ }
2907
+ const ret = result;
2908
+ return ret;
2909
+ };
2910
+ imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
2911
+ let result;
2912
+ try {
2913
+ result = getObject(arg0) instanceof Window;
2914
+ } catch (_) {
2915
+ result = false;
2916
+ }
2917
+ const ret = result;
2918
+ return ret;
2919
+ };
2920
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
2921
+ const ret = Array.isArray(getObject(arg0));
2922
+ return ret;
2923
+ };
2924
+ imports.wbg.__wbg_isConnected_61ed8d7b311467d5 = function(arg0) {
2925
+ const ret = getObject(arg0).isConnected;
2926
+ return ret;
2927
+ };
2928
+ imports.wbg.__wbg_isIntersecting_ad7078bfeb161339 = function(arg0) {
2929
+ const ret = getObject(arg0).isIntersecting;
2930
+ return ret;
2931
+ };
2932
+ imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
2933
+ const ret = Number.isSafeInteger(getObject(arg0));
2934
+ return ret;
2935
+ };
2936
+ imports.wbg.__wbg_is_c7481c65e7e5df9e = function(arg0, arg1) {
2937
+ const ret = Object.is(getObject(arg0), getObject(arg1));
2938
+ return ret;
2939
+ };
2940
+ imports.wbg.__wbg_item_b60dbec76ee795fd = function(arg0, arg1, arg2) {
2941
+ const ret = getObject(arg1).item(arg2 >>> 0);
2942
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2943
+ const len1 = WASM_VECTOR_LEN;
2944
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2945
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2946
+ };
2947
+ imports.wbg.__wbg_item_b85c09a4b5a5a211 = function(arg0, arg1) {
2948
+ const ret = getObject(arg0).item(arg1 >>> 0);
2949
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2950
+ };
2951
+ imports.wbg.__wbg_item_c913ec46ff615ff2 = function(arg0, arg1) {
2952
+ const ret = getObject(arg0).item(arg1 >>> 0);
2953
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2954
+ };
2955
+ imports.wbg.__wbg_item_cfe204c1386c8374 = function(arg0, arg1) {
2956
+ const ret = getObject(arg0).item(arg1 >>> 0);
2957
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2958
+ };
2959
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
2960
+ const ret = Symbol.iterator;
2961
+ return addHeapObject(ret);
2962
+ };
2963
+ imports.wbg.__wbg_keyCode_237a8d1a040910b8 = function(arg0) {
2964
+ const ret = getObject(arg0).keyCode;
2965
+ return ret;
2966
+ };
2967
+ imports.wbg.__wbg_key_7b5c6cb539be8e13 = function(arg0, arg1) {
2968
+ const ret = getObject(arg1).key;
2969
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
2970
+ const len1 = WASM_VECTOR_LEN;
2971
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2972
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2973
+ };
2974
+ imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
2975
+ const ret = Object.keys(getObject(arg0));
2976
+ return addHeapObject(ret);
2977
+ };
2978
+ imports.wbg.__wbg_languages_d8dad509faf757df = function(arg0) {
2979
+ const ret = getObject(arg0).languages;
2980
+ return addHeapObject(ret);
2981
+ };
2982
+ imports.wbg.__wbg_lastChild_e20d4dc0f9e02ce7 = function(arg0) {
2983
+ const ret = getObject(arg0).lastChild;
2984
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2985
+ };
2986
+ imports.wbg.__wbg_left_e46801720267b66d = function(arg0) {
2987
+ const ret = getObject(arg0).left;
2988
+ return ret;
2989
+ };
2990
+ imports.wbg.__wbg_length_3ac7da8148d2efa0 = function(arg0) {
2991
+ const ret = getObject(arg0).length;
2992
+ return ret;
2993
+ };
2994
+ imports.wbg.__wbg_length_41ac2a29fd3d00b8 = function(arg0) {
2995
+ const ret = getObject(arg0).length;
2996
+ return ret;
2997
+ };
2998
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
2999
+ const ret = getObject(arg0).length;
3000
+ return ret;
3001
+ };
3002
+ imports.wbg.__wbg_length_d912dac1deec0b3d = function(arg0) {
3003
+ const ret = getObject(arg0).length;
3004
+ return ret;
3005
+ };
3006
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
3007
+ const ret = getObject(arg0).length;
3008
+ return ret;
3009
+ };
3010
+ imports.wbg.__wbg_listenerid_ed1678830a5b97ec = function(arg0) {
3011
+ const ret = getObject(arg0).__yew_listener_id;
3012
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3013
+ };
3014
+ imports.wbg.__wbg_loaded_01146b49122e3a34 = function() { return handleError(function (arg0) {
3015
+ const ret = getObject(arg0).loaded;
3016
+ return addHeapObject(ret);
3017
+ }, arguments) };
3018
+ imports.wbg.__wbg_mark_001da84b098c950f = function() { return handleError(function (arg0, arg1, arg2) {
3019
+ getObject(arg0).mark(getStringFromWasm0(arg1, arg2));
3020
+ }, arguments) };
3021
+ imports.wbg.__wbg_matches_33a2000d7f67f964 = function() { return handleError(function (arg0, arg1, arg2) {
3022
+ const ret = getObject(arg0).matches(getStringFromWasm0(arg1, arg2));
3023
+ return ret;
3024
+ }, arguments) };
3025
+ imports.wbg.__wbg_maxcells_b5f922e2dd9d58cf = function(arg0) {
3026
+ const ret = getObject(arg0).max_cells;
3027
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3028
+ };
3029
+ imports.wbg.__wbg_maxcolumns_8462a12e889c5b54 = function(arg0) {
3030
+ const ret = getObject(arg0).max_columns;
3031
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3032
+ };
3033
+ imports.wbg.__wbg_measure_65e49f8bc0e203a8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3034
+ getObject(arg0).measure(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
3035
+ }, arguments) };
3036
+ imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
3037
+ const ret = getObject(arg0).message;
3038
+ return addHeapObject(ret);
3039
+ };
3040
+ imports.wbg.__wbg_minconfigcolumns_8bacf6e9a9028581 = function(arg0) {
3041
+ const ret = getObject(arg0).min_config_columns;
3042
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3043
+ };
3044
+ imports.wbg.__wbg_name_b1c52bbe8eb9a9f1 = function(arg0, arg1) {
3045
+ const ret = getObject(arg1).name;
3046
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3047
+ const len1 = WASM_VECTOR_LEN;
3048
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3049
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3050
+ };
3051
+ imports.wbg.__wbg_namespaceURI_63ddded7f2fdbe94 = function(arg0, arg1) {
3052
+ const ret = getObject(arg1).namespaceURI;
3053
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3054
+ var len1 = WASM_VECTOR_LEN;
3055
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3056
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3057
+ };
3058
+ imports.wbg.__wbg_navigator_1577371c070c8947 = function(arg0) {
3059
+ const ret = getObject(arg0).navigator;
3060
+ return addHeapObject(ret);
3061
+ };
3062
+ imports.wbg.__wbg_new_08dc65a1d6785f11 = function(arg0, arg1) {
3063
+ const ret = new Intl.NumberFormat(getObject(arg0), getObject(arg1));
3064
+ return addHeapObject(ret);
3065
+ };
3066
+ imports.wbg.__wbg_new_1b8f676ab7549097 = function() { return handleError(function (arg0, arg1) {
3067
+ const ret = new CustomEvent(getStringFromWasm0(arg0, arg1));
3068
+ return addHeapObject(ret);
3069
+ }, arguments) };
3070
+ imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
3071
+ try {
3072
+ var state0 = {a: arg0, b: arg1};
3073
+ var cb0 = (arg0, arg1) => {
3074
+ const a = state0.a;
3075
+ state0.a = 0;
3076
+ try {
3077
+ return __wbg_adapter_735(a, state0.b, arg0, arg1);
3078
+ } finally {
3079
+ state0.a = a;
3080
+ }
3081
+ };
3082
+ const ret = new Promise(cb0);
3083
+ return addHeapObject(ret);
3084
+ } finally {
3085
+ state0.a = state0.b = 0;
3086
+ }
3087
+ };
3088
+ imports.wbg.__wbg_new_31a97dac4f10fab7 = function(arg0) {
3089
+ const ret = new Date(getObject(arg0));
3090
+ return addHeapObject(ret);
3091
+ };
3092
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
3093
+ const ret = new Object();
3094
+ return addHeapObject(ret);
3095
+ };
3096
+ imports.wbg.__wbg_new_5348423366659c3b = function(arg0) {
3097
+ const ret = new ClipboardItem(getObject(arg0));
3098
+ return addHeapObject(ret);
3099
+ };
3100
+ imports.wbg.__wbg_new_559cd32d2c038fa5 = function(arg0) {
3101
+ const ret = new ResizeObserver(getObject(arg0));
3102
+ return addHeapObject(ret);
3103
+ };
3104
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
3105
+ const ret = new Map();
3106
+ return addHeapObject(ret);
3107
+ };
3108
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
3109
+ const ret = new Array();
3110
+ return addHeapObject(ret);
3111
+ };
3112
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
3113
+ const ret = new Error();
3114
+ return addHeapObject(ret);
3115
+ };
3116
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
3117
+ const ret = new Uint8Array(getObject(arg0));
3118
+ return addHeapObject(ret);
3119
+ };
3120
+ imports.wbg.__wbg_new_a1a2ee2fcc5b1f8a = function() { return handleError(function () {
3121
+ const ret = new CSSStyleSheet();
3122
+ return addHeapObject(ret);
3123
+ }, arguments) };
3124
+ imports.wbg.__wbg_new_a25df4e69ea90297 = function(arg0) {
3125
+ const ret = new IntersectionObserver(getObject(arg0));
3126
+ return addHeapObject(ret);
3127
+ };
3128
+ imports.wbg.__wbg_new_a84b4fa486a621ad = function(arg0, arg1) {
3129
+ const ret = new Intl.DateTimeFormat(getObject(arg0), getObject(arg1));
3130
+ return addHeapObject(ret);
3131
+ };
3132
+ imports.wbg.__wbg_new_aa4747a1877a860f = function() { return handleError(function (arg0, arg1) {
3133
+ const ret = new InputEvent(getStringFromWasm0(arg0, arg1));
3134
+ return addHeapObject(ret);
3135
+ }, arguments) };
3136
+ imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
3137
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
3138
+ return addHeapObject(ret);
3139
+ };
3140
+ imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
3141
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
3142
+ return addHeapObject(ret);
3143
+ };
3144
+ imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
3145
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3146
+ return addHeapObject(ret);
3147
+ };
3148
+ imports.wbg.__wbg_newwitheventinitdict_fae2ef218b85b0d2 = function() { return handleError(function (arg0, arg1, arg2) {
3149
+ const ret = new CustomEvent(getStringFromWasm0(arg0, arg1), getObject(arg2));
3150
+ return addHeapObject(ret);
3151
+ }, arguments) };
3152
+ imports.wbg.__wbg_newwithstrsequenceandoptions_aaff55b467c81b63 = function() { return handleError(function (arg0, arg1) {
3153
+ const ret = new Blob(getObject(arg0), getObject(arg1));
3154
+ return addHeapObject(ret);
3155
+ }, arguments) };
3156
+ imports.wbg.__wbg_newwithu8arraysequence_1e24f242a67f6fdd = function() { return handleError(function (arg0) {
3157
+ const ret = new Blob(getObject(arg0));
3158
+ return addHeapObject(ret);
3159
+ }, arguments) };
3160
+ imports.wbg.__wbg_nextSibling_f17f68d089a20939 = function(arg0) {
3161
+ const ret = getObject(arg0).nextSibling;
3162
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3163
+ };
3164
+ imports.wbg.__wbg_next_14ee77ba07b561e8 = function() { return handleError(function (arg0) {
3165
+ const ret = getObject(arg0).next();
3166
+ return addHeapObject(ret);
3167
+ }, arguments) };
3168
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
3169
+ const ret = getObject(arg0).next;
3170
+ return addHeapObject(ret);
3171
+ };
3172
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
3173
+ const ret = getObject(arg0).next();
3174
+ return addHeapObject(ret);
3175
+ }, arguments) };
3176
+ imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
3177
+ const ret = getObject(arg0).now();
3178
+ return ret;
3179
+ };
3180
+ imports.wbg.__wbg_observe_40eacbf745dd49e3 = function(arg0, arg1) {
3181
+ getObject(arg0).observe(getObject(arg1));
3182
+ };
3183
+ imports.wbg.__wbg_observe_575b97519682be7b = function(arg0, arg1) {
3184
+ getObject(arg0).observe(getObject(arg1));
3185
+ };
3186
+ imports.wbg.__wbg_offsetHeight_4b2bc94377e10979 = function(arg0) {
3187
+ const ret = getObject(arg0).offsetHeight;
3188
+ return ret;
3189
+ };
3190
+ imports.wbg.__wbg_offsetParent_eb6119f334bb7dda = function(arg0) {
3191
+ const ret = getObject(arg0).offsetParent;
3192
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3193
+ };
3194
+ imports.wbg.__wbg_offsetWidth_3cf4cc9df4051078 = function(arg0) {
3195
+ const ret = getObject(arg0).offsetWidth;
3196
+ return ret;
3197
+ };
3198
+ imports.wbg.__wbg_offsetX_adb14e39bdd32e22 = function(arg0) {
3199
+ const ret = getObject(arg0).offsetX;
3200
+ return ret;
3201
+ };
3202
+ imports.wbg.__wbg_offsetY_e88dc24ec0418dd4 = function(arg0) {
3203
+ const ret = getObject(arg0).offsetY;
3204
+ return ret;
3205
+ };
3206
+ imports.wbg.__wbg_parentElement_be28a1a931f9c9b7 = function(arg0) {
3207
+ const ret = getObject(arg0).parentElement;
3208
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3209
+ };
3210
+ imports.wbg.__wbg_parentNode_9de97a0e7973ea4e = function(arg0) {
3211
+ const ret = getObject(arg0).parentNode;
3212
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3213
+ };
3214
+ imports.wbg.__wbg_parse_def2e24ef1252aff = function() { return handleError(function (arg0, arg1) {
3215
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
3216
+ return addHeapObject(ret);
3217
+ }, arguments) };
3218
+ imports.wbg.__wbg_performance_c185c0cdc2766575 = function(arg0) {
3219
+ const ret = getObject(arg0).performance;
3220
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3221
+ };
3222
+ imports.wbg.__wbg_pointerId_585e63ee80a49927 = function(arg0) {
3223
+ const ret = getObject(arg0).pointerId;
3224
+ return ret;
3225
+ };
3226
+ imports.wbg.__wbg_preventDefault_c2314fd813c02b3c = function(arg0) {
3227
+ getObject(arg0).preventDefault();
3228
+ };
3229
+ imports.wbg.__wbg_priority_131c27b055a686fe = function(arg0) {
3230
+ const ret = getObject(arg0).priority;
3231
+ return isLikeNone(ret) ? 0x100000001 : (ret) >> 0;
3232
+ };
3233
+ imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
3234
+ const ret = getObject(arg0).push(getObject(arg1));
3235
+ return ret;
3236
+ };
3237
+ imports.wbg.__wbg_queueMicrotask_6808622725a52272 = function(arg0) {
3238
+ const ret = getObject(arg0).queueMicrotask;
3239
+ return addHeapObject(ret);
3240
+ };
3241
+ imports.wbg.__wbg_queueMicrotask_ef0e86b0263a71ee = function(arg0) {
3242
+ queueMicrotask(getObject(arg0));
3243
+ };
3244
+ imports.wbg.__wbg_readText_c5c32cada2022712 = function(arg0) {
3245
+ const ret = getObject(arg0).readText();
3246
+ return addHeapObject(ret);
3247
+ };
3248
+ imports.wbg.__wbg_readyState_bcffb7ab5bdd0be6 = function(arg0, arg1) {
3249
+ const ret = getObject(arg1).readyState;
3250
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3251
+ const len1 = WASM_VECTOR_LEN;
3252
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3253
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3254
+ };
3255
+ imports.wbg.__wbg_reject_b3fcf99063186ff7 = function(arg0) {
3256
+ const ret = Promise.reject(getObject(arg0));
3257
+ return addHeapObject(ret);
3258
+ };
3259
+ imports.wbg.__wbg_relatedTarget_5ad799ea45a574ef = function(arg0) {
3260
+ const ret = getObject(arg0).relatedTarget;
3261
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3262
+ };
3263
+ imports.wbg.__wbg_releasePointerCapture_e950e66cb5438c50 = function() { return handleError(function (arg0, arg1) {
3264
+ getObject(arg0).releasePointerCapture(arg1);
3265
+ }, arguments) };
3266
+ imports.wbg.__wbg_removeAttribute_e419cd6726b4c62f = function() { return handleError(function (arg0, arg1, arg2) {
3267
+ getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
3268
+ }, arguments) };
3269
+ imports.wbg.__wbg_removeChild_841bf1dc802c0a2c = function() { return handleError(function (arg0, arg1) {
3270
+ const ret = getObject(arg0).removeChild(getObject(arg1));
3271
+ return addHeapObject(ret);
3272
+ }, arguments) };
3273
+ imports.wbg.__wbg_removeEventListener_056dfe8c3d6c58f9 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3274
+ getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
3275
+ }, arguments) };
3276
+ imports.wbg.__wbg_remove_282d941ca37d0c63 = function() { return handleError(function (arg0, arg1, arg2) {
3277
+ getObject(arg0).remove(getStringFromWasm0(arg1, arg2));
3278
+ }, arguments) };
3279
+ imports.wbg.__wbg_remove_ac5c4ef6b298b070 = function() { return handleError(function (arg0, arg1) {
3280
+ getObject(arg0).remove(...getObject(arg1));
3281
+ }, arguments) };
3282
+ imports.wbg.__wbg_renderwarning_6a699b99e9144915 = function(arg0) {
3283
+ const ret = getObject(arg0).render_warning;
3284
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
3285
+ };
3286
+ imports.wbg.__wbg_replaceSync_5b0a44fbd533b9ea = function() { return handleError(function (arg0, arg1, arg2) {
3287
+ getObject(arg0).replaceSync(getStringFromWasm0(arg1, arg2));
3288
+ }, arguments) };
3289
+ imports.wbg.__wbg_requestAnimationFrame_d7fd890aaefc3246 = function() { return handleError(function (arg0, arg1) {
3290
+ const ret = getObject(arg0).requestAnimationFrame(getObject(arg1));
3291
+ return ret;
3292
+ }, arguments) };
3293
+ imports.wbg.__wbg_resize_b28838bc215b9a2a = function() { return handleError(function (arg0) {
3294
+ const ret = getObject(arg0).resize();
3295
+ return addHeapObject(ret);
3296
+ }, arguments) };
3297
+ imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
3298
+ const ret = Promise.resolve(getObject(arg0));
3299
+ return addHeapObject(ret);
3300
+ };
3301
+ imports.wbg.__wbg_resolvedOptions_d495c21c27a8f865 = function(arg0) {
3302
+ const ret = getObject(arg0).resolvedOptions();
3303
+ return addHeapObject(ret);
3304
+ };
3305
+ imports.wbg.__wbg_restore_96a78ef6cf3b5a3c = function() { return handleError(function (arg0, arg1, arg2) {
3306
+ getObject(arg0).restore(getObject(arg1), getObject(arg2));
3307
+ }, arguments) };
3308
+ imports.wbg.__wbg_restyle_a2d6a502e838e33f = function() { return handleError(function (arg0, arg1) {
3309
+ const ret = getObject(arg0).restyle(View.__wrap(arg1));
3310
+ return addHeapObject(ret);
3311
+ }, arguments) };
3312
+ imports.wbg.__wbg_save_602c93f008beabe3 = function() { return handleError(function (arg0) {
3313
+ const ret = getObject(arg0).save();
3314
+ return addHeapObject(ret);
3315
+ }, arguments) };
3316
+ imports.wbg.__wbg_scrollLeft_b195ce13f48fdfef = function(arg0) {
3317
+ const ret = getObject(arg0).scrollLeft;
3318
+ return ret;
3319
+ };
3320
+ imports.wbg.__wbg_scrollTop_8a5774351f38b4cb = function(arg0) {
3321
+ const ret = getObject(arg0).scrollTop;
3322
+ return ret;
3323
+ };
3324
+ imports.wbg.__wbg_scrollTop_fa6a185d62b9a4ab = function(arg0) {
3325
+ const ret = getObject(arg0).scrollTop;
3326
+ return ret;
3327
+ };
3328
+ imports.wbg.__wbg_selectedIndex_18a395c5d5ffa0ed = function(arg0) {
3329
+ const ret = getObject(arg0).selectedIndex;
3330
+ return ret;
3331
+ };
3332
+ imports.wbg.__wbg_selectionEnd_a88c1e30434af1b1 = function() { return handleError(function (arg0) {
3333
+ const ret = getObject(arg0).selectionEnd;
3334
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3335
+ }, arguments) };
3336
+ imports.wbg.__wbg_selectionStart_dc44e18e14639dcd = function() { return handleError(function (arg0) {
3337
+ const ret = getObject(arg0).selectionStart;
3338
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3339
+ }, arguments) };
3340
+ imports.wbg.__wbg_selectmode_8fc689bd2185436b = function(arg0) {
3341
+ const ret = getObject(arg0).select_mode;
3342
+ return addHeapObject(ret);
3343
+ };
3344
+ imports.wbg.__wbg_selectorText_322ff84d30ae27e4 = function(arg0, arg1) {
3345
+ const ret = getObject(arg1).selectorText;
3346
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3347
+ const len1 = WASM_VECTOR_LEN;
3348
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3349
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3350
+ };
3351
+ imports.wbg.__wbg_setAttribute_2704501201f15687 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3352
+ getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
3353
+ }, arguments) };
3354
+ imports.wbg.__wbg_setData_900170484a66dcfb = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3355
+ getObject(arg0).setData(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
3356
+ }, arguments) };
3357
+ imports.wbg.__wbg_setDragImage_9aca0f75c4b47a0a = function(arg0, arg1, arg2, arg3) {
3358
+ getObject(arg0).setDragImage(getObject(arg1), arg2, arg3);
3359
+ };
3360
+ imports.wbg.__wbg_setPointerCapture_c04dafaf4d00ffad = function() { return handleError(function (arg0, arg1) {
3361
+ getObject(arg0).setPointerCapture(arg1);
3362
+ }, arguments) };
3363
+ imports.wbg.__wbg_setProperty_f2cf326652b9a713 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3364
+ getObject(arg0).setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
3365
+ }, arguments) };
3366
+ imports.wbg.__wbg_setSelectionRange_d21aba914df4914b = function() { return handleError(function (arg0, arg1, arg2) {
3367
+ getObject(arg0).setSelectionRange(arg1 >>> 0, arg2 >>> 0);
3368
+ }, arguments) };
3369
+ imports.wbg.__wbg_setTimeout_f2fe5af8e3debeb3 = function() { return handleError(function (arg0, arg1, arg2) {
3370
+ const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
3371
+ return ret;
3372
+ }, arguments) };
3373
+ imports.wbg.__wbg_set_2ae42725079709b3 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3374
+ getObject(arg0)[getStringFromWasm0(arg1, arg2)] = getStringFromWasm0(arg3, arg4);
3375
+ }, arguments) };
3376
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
3377
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3378
+ };
3379
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
3380
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3381
+ };
3382
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
3383
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3384
+ };
3385
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
3386
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
3387
+ return addHeapObject(ret);
3388
+ };
3389
+ imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
3390
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
3391
+ return ret;
3392
+ }, arguments) };
3393
+ imports.wbg.__wbg_setcachekey_bb5f908a0e3ee714 = function(arg0, arg1) {
3394
+ getObject(arg0).__yew_subtree_cache_key = arg1 >>> 0;
3395
+ };
3396
+ imports.wbg.__wbg_setcapture_46bd7043887eba02 = function(arg0, arg1) {
3397
+ getObject(arg0).capture = arg1 !== 0;
3398
+ };
3399
+ imports.wbg.__wbg_setchecked_5024c3767a6970c2 = function(arg0, arg1) {
3400
+ getObject(arg0).checked = arg1 !== 0;
3401
+ };
3402
+ imports.wbg.__wbg_setdetail_fc5160ccbec4ee24 = function(arg0, arg1) {
3403
+ getObject(arg0).detail = getObject(arg1);
3404
+ };
3405
+ imports.wbg.__wbg_setdropEffect_97b2f783058fdea8 = function(arg0, arg1, arg2) {
3406
+ getObject(arg0).dropEffect = getStringFromWasm0(arg1, arg2);
3407
+ };
3408
+ imports.wbg.__wbg_setinnerHTML_31bde41f835786f7 = function(arg0, arg1, arg2) {
3409
+ getObject(arg0).innerHTML = getStringFromWasm0(arg1, arg2);
3410
+ };
3411
+ imports.wbg.__wbg_setinnerText_b11978b8158639c4 = function(arg0, arg1, arg2) {
3412
+ getObject(arg0).innerText = getStringFromWasm0(arg1, arg2);
3413
+ };
3414
+ imports.wbg.__wbg_setlistenerid_3d14d37a42484593 = function(arg0, arg1) {
3415
+ getObject(arg0).__yew_listener_id = arg1 >>> 0;
3416
+ };
3417
+ imports.wbg.__wbg_setmode_7ac588c6f73c590c = function(arg0, arg1) {
3418
+ getObject(arg0).mode = __wbindgen_enum_ShadowRootMode[arg1];
3419
+ };
3420
+ imports.wbg.__wbg_setnodeValue_58cb1b2f6b6c33d2 = function(arg0, arg1, arg2) {
3421
+ getObject(arg0).nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
3422
+ };
3423
+ imports.wbg.__wbg_setpassive_57a5a4c4b00a7c62 = function(arg0, arg1) {
3424
+ getObject(arg0).passive = arg1 !== 0;
3425
+ };
3426
+ imports.wbg.__wbg_setrenderwarning_1e66cede8bb34ebd = function(arg0, arg1) {
3427
+ getObject(arg0).render_warning = arg1 !== 0;
3428
+ };
3429
+ imports.wbg.__wbg_setscrollLeft_4a32d6dd95043f07 = function(arg0, arg1) {
3430
+ getObject(arg0).scrollLeft = arg1;
3431
+ };
3432
+ imports.wbg.__wbg_setscrollTop_f15a2d1f8cd45571 = function(arg0, arg1) {
3433
+ getObject(arg0).scrollTop = arg1;
3434
+ };
3435
+ imports.wbg.__wbg_setselectionEnd_d0dfa434c176031a = function() { return handleError(function (arg0, arg1) {
3436
+ getObject(arg0).selectionEnd = arg1 === 0x100000001 ? undefined : arg1;
3437
+ }, arguments) };
3438
+ imports.wbg.__wbg_setselectionStart_253f7c8500199419 = function() { return handleError(function (arg0, arg1) {
3439
+ getObject(arg0).selectionStart = arg1 === 0x100000001 ? undefined : arg1;
3440
+ }, arguments) };
3441
+ imports.wbg.__wbg_setsubtreeid_32b8ceff55862e29 = function(arg0, arg1) {
3442
+ getObject(arg0).__yew_subtree_id = arg1 >>> 0;
3443
+ };
3444
+ imports.wbg.__wbg_settype_39ed370d3edd403c = function(arg0, arg1, arg2) {
3445
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
3446
+ };
3447
+ imports.wbg.__wbg_setvalue_08d17a42e5d5069d = function(arg0, arg1, arg2) {
3448
+ getObject(arg0).value = getStringFromWasm0(arg1, arg2);
3449
+ };
3450
+ imports.wbg.__wbg_setvalue_6ad9ef6c692ea746 = function(arg0, arg1, arg2) {
3451
+ getObject(arg0).value = getStringFromWasm0(arg1, arg2);
3452
+ };
3453
+ imports.wbg.__wbg_setvalue_f76614f551612e39 = function(arg0, arg1, arg2) {
3454
+ getObject(arg0).value = getStringFromWasm0(arg1, arg2);
3455
+ };
3456
+ imports.wbg.__wbg_shadowRoot_4d9a9fd1d2f67c15 = function(arg0) {
3457
+ const ret = getObject(arg0).shadowRoot;
3458
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3459
+ };
3460
+ imports.wbg.__wbg_shiftKey_2bebb3b703254f47 = function(arg0) {
3461
+ const ret = getObject(arg0).shiftKey;
3462
+ return ret;
3463
+ };
3464
+ imports.wbg.__wbg_shiftKey_86e737105bab1a54 = function(arg0) {
3465
+ const ret = getObject(arg0).shiftKey;
3466
+ return ret;
3467
+ };
3468
+ imports.wbg.__wbg_slice_ab0b7e3d75dccdee = function(arg0, arg1, arg2) {
3469
+ const ret = getObject(arg0).slice(arg1 >>> 0, arg2 >>> 0);
3470
+ return addHeapObject(ret);
3471
+ };
3472
+ imports.wbg.__wbg_splice_ee284c704bebb18b = function(arg0, arg1, arg2, arg3) {
3473
+ const ret = getObject(arg0).splice(arg1 >>> 0, arg2 >>> 0, getObject(arg3));
3474
+ return addHeapObject(ret);
3475
+ };
3476
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
3477
+ const ret = getObject(arg1).stack;
3478
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3479
+ const len1 = WASM_VECTOR_LEN;
3480
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3481
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3482
+ };
3483
+ imports.wbg.__wbg_startTime_c051731d0a31602f = function(arg0) {
3484
+ const ret = getObject(arg0).startTime;
3485
+ return ret;
3486
+ };
3487
+ imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
3488
+ const ret = typeof global === 'undefined' ? null : global;
3489
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3490
+ };
3491
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
3492
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
3493
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3494
+ };
3495
+ imports.wbg.__wbg_static_accessor_PSP_2a9a3a8d7dcaef39 = function() {
3496
+ const ret = psp;
3497
+ return addHeapObject(ret);
3498
+ };
3499
+ imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
3500
+ const ret = typeof self === 'undefined' ? null : self;
3501
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3502
+ };
3503
+ imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
3504
+ const ret = typeof window === 'undefined' ? null : window;
3505
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3506
+ };
3507
+ imports.wbg.__wbg_stopPropagation_11d220a858e5e0fb = function(arg0) {
3508
+ getObject(arg0).stopPropagation();
3509
+ };
3510
+ imports.wbg.__wbg_stringify_e3eb82f5aa1ea94d = function() { return handleError(function (arg0, arg1, arg2) {
3511
+ const ret = JSON.stringify(getObject(arg0), getObject(arg1), getObject(arg2));
3512
+ return addHeapObject(ret);
3513
+ }, arguments) };
3514
+ imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
3515
+ const ret = JSON.stringify(getObject(arg0));
3516
+ return addHeapObject(ret);
3517
+ }, arguments) };
3518
+ imports.wbg.__wbg_styleSheets_4e03b9e094ac4796 = function(arg0) {
3519
+ const ret = getObject(arg0).styleSheets;
3520
+ return addHeapObject(ret);
3521
+ };
3522
+ imports.wbg.__wbg_style_f9abbd71e4e4c9e2 = function(arg0) {
3523
+ const ret = getObject(arg0).style;
3524
+ return addHeapObject(ret);
3525
+ };
3526
+ imports.wbg.__wbg_style_fb30c14e5815805c = function(arg0) {
3527
+ const ret = getObject(arg0).style;
3528
+ return addHeapObject(ret);
3529
+ };
3530
+ imports.wbg.__wbg_subtreeid_e65dfcc52d403fd9 = function(arg0) {
3531
+ const ret = getObject(arg0).__yew_subtree_id;
3532
+ return isLikeNone(ret) ? 0x100000001 : (ret) >>> 0;
3533
+ };
3534
+ imports.wbg.__wbg_supportedValuesOf_166054508d220751 = function(arg0) {
3535
+ const ret = Intl.supportedValuesOf(getObject(arg0));
3536
+ return addHeapObject(ret);
3537
+ };
3538
+ imports.wbg.__wbg_table_new = function(arg0) {
3539
+ const ret = Table.__wrap(arg0);
3540
+ return addHeapObject(ret);
3541
+ };
3542
+ imports.wbg.__wbg_tagName_b284ab9c1479c38d = function(arg0, arg1) {
3543
+ const ret = getObject(arg1).tagName;
3544
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3545
+ const len1 = WASM_VECTOR_LEN;
3546
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3547
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3548
+ };
3549
+ imports.wbg.__wbg_target_0a62d9d79a2a1ede = function(arg0) {
3550
+ const ret = getObject(arg0).target;
3551
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
3552
+ };
3553
+ imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
3554
+ const ret = getObject(arg0).then(getObject(arg1));
3555
+ return addHeapObject(ret);
3556
+ };
3557
+ imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
3558
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
3559
+ return addHeapObject(ret);
3560
+ };
3561
+ imports.wbg.__wbg_toString_5285597960676b7b = function(arg0) {
3562
+ const ret = getObject(arg0).toString();
3563
+ return addHeapObject(ret);
3564
+ };
3565
+ imports.wbg.__wbg_toggleAttribute_c3884c3487bd80cf = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3566
+ const ret = getObject(arg0).toggleAttribute(getStringFromWasm0(arg1, arg2), arg3 !== 0);
3567
+ return ret;
3568
+ }, arguments) };
3569
+ imports.wbg.__wbg_toggle_eb55caf936454eda = function() { return handleError(function (arg0, arg1, arg2) {
3570
+ const ret = getObject(arg0).toggle(getStringFromWasm0(arg1, arg2));
3571
+ return ret;
3572
+ }, arguments) };
3573
+ imports.wbg.__wbg_top_ec9fceb1f030f2ea = function(arg0) {
3574
+ const ret = getObject(arg0).top;
3575
+ return ret;
3576
+ };
3577
+ imports.wbg.__wbg_trace_d12a9ac890a2cbb8 = function(arg0, arg1, arg2, arg3) {
3578
+ console.trace(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3579
+ };
3580
+ imports.wbg.__wbg_trace_e758b839df8d34f1 = function(arg0) {
3581
+ console.trace(getObject(arg0));
3582
+ };
3583
+ imports.wbg.__wbg_unobserve_6f6bead36e21368b = function(arg0, arg1) {
3584
+ getObject(arg0).unobserve(getObject(arg1));
3585
+ };
3586
+ imports.wbg.__wbg_unobserve_8d1e18a9772dd0e5 = function(arg0, arg1) {
3587
+ getObject(arg0).unobserve(getObject(arg1));
3588
+ };
3589
+ imports.wbg.__wbg_update_5ddab2f560aeb789 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3590
+ const ret = getObject(arg0).update(View.__wrap(arg1), arg2 === 0x100000001 ? undefined : arg2, arg3 === 0x100000001 ? undefined : arg3, arg4 !== 0);
3591
+ return addHeapObject(ret);
3592
+ }, arguments) };
3593
+ imports.wbg.__wbg_valueAsNumber_043294bd69d4d3e6 = function(arg0) {
3594
+ const ret = getObject(arg0).valueAsNumber;
3595
+ return ret;
3596
+ };
3597
+ imports.wbg.__wbg_value_1d971aac958c6f2f = function(arg0, arg1) {
3598
+ const ret = getObject(arg1).value;
3599
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3600
+ const len1 = WASM_VECTOR_LEN;
3601
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3602
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3603
+ };
3604
+ imports.wbg.__wbg_value_91cbf0dd3ab84c1e = function(arg0, arg1) {
3605
+ const ret = getObject(arg1).value;
3606
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3607
+ const len1 = WASM_VECTOR_LEN;
3608
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3609
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3610
+ };
3611
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
3612
+ const ret = getObject(arg0).value;
3613
+ return addHeapObject(ret);
3614
+ };
3615
+ imports.wbg.__wbg_values_5e6b81a918af9f75 = function(arg0) {
3616
+ const ret = getObject(arg0).values();
3617
+ return addHeapObject(ret);
3618
+ };
3619
+ imports.wbg.__wbg_values_fcb8ba8c0aad8b58 = function(arg0) {
3620
+ const ret = Object.values(getObject(arg0));
3621
+ return addHeapObject(ret);
3622
+ };
3623
+ imports.wbg.__wbg_view_new = function(arg0) {
3624
+ const ret = View.__wrap(arg0);
3625
+ return addHeapObject(ret);
3626
+ };
3627
+ imports.wbg.__wbg_view_unwrap = function(arg0) {
3628
+ const ret = View.__unwrap(takeObject(arg0));
3629
+ return ret;
3630
+ };
3631
+ imports.wbg.__wbg_warn_4ca3906c248c47c4 = function(arg0) {
3632
+ console.warn(getObject(arg0));
3633
+ };
3634
+ imports.wbg.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {
3635
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3636
+ };
3637
+ imports.wbg.__wbg_weight_dbff438d3f4611fa = function(arg0, arg1) {
3638
+ const ret = getObject(arg1).weight;
3639
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3640
+ const len1 = WASM_VECTOR_LEN;
3641
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3642
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3643
+ };
3644
+ imports.wbg.__wbg_which_bba8e8ae7a01d1db = function(arg0) {
3645
+ const ret = getObject(arg0).which;
3646
+ return ret;
3647
+ };
3648
+ imports.wbg.__wbg_width_cdaf02311c1621d1 = function(arg0) {
3649
+ const ret = getObject(arg0).width;
3650
+ return ret;
3651
+ };
3652
+ imports.wbg.__wbg_width_f0759bd8bad335bd = function(arg0) {
3653
+ const ret = getObject(arg0).width;
3654
+ return ret;
3655
+ };
3656
+ imports.wbg.__wbg_write_e357400b06c0ccf5 = function(arg0, arg1) {
3657
+ const ret = getObject(arg0).write(getObject(arg1));
3658
+ return addHeapObject(ret);
3659
+ };
3660
+ imports.wbg.__wbindgen_as_number = function(arg0) {
3661
+ const ret = +getObject(arg0);
3662
+ return ret;
3663
+ };
3664
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
3665
+ const ret = arg0;
3666
+ return addHeapObject(ret);
3667
+ };
3668
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
3669
+ const ret = BigInt.asUintN(64, arg0);
3670
+ return addHeapObject(ret);
3671
+ };
3672
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
3673
+ const v = getObject(arg1);
3674
+ const ret = typeof(v) === 'bigint' ? v : undefined;
3675
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
3676
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
3677
+ };
3678
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
3679
+ const v = getObject(arg0);
3680
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
3681
+ return ret;
3682
+ };
3683
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
3684
+ const obj = takeObject(arg0).original;
3685
+ if (obj.cnt-- == 1) {
3686
+ obj.a = 0;
3687
+ return true;
3688
+ }
3689
+ const ret = false;
3690
+ return ret;
3691
+ };
3692
+ imports.wbg.__wbindgen_closure_wrapper14427 = function(arg0, arg1, arg2) {
3693
+ const ret = makeClosure(arg0, arg1, 3716, __wbg_adapter_65);
3694
+ return addHeapObject(ret);
3695
+ };
3696
+ imports.wbg.__wbindgen_closure_wrapper17934 = function(arg0, arg1, arg2) {
3697
+ const ret = makeClosure(arg0, arg1, 4298, __wbg_adapter_68);
3698
+ return addHeapObject(ret);
3699
+ };
3700
+ imports.wbg.__wbindgen_closure_wrapper18845 = function(arg0, arg1, arg2) {
3701
+ const ret = makeMutClosure(arg0, arg1, 4390, __wbg_adapter_71);
3702
+ return addHeapObject(ret);
3703
+ };
3704
+ imports.wbg.__wbindgen_closure_wrapper18894 = function(arg0, arg1, arg2) {
3705
+ const ret = makeMutClosure(arg0, arg1, 4394, __wbg_adapter_74);
3706
+ return addHeapObject(ret);
3707
+ };
3708
+ imports.wbg.__wbindgen_closure_wrapper5960 = function(arg0, arg1, arg2) {
3709
+ const ret = makeClosure(arg0, arg1, 74, __wbg_adapter_52);
3710
+ return addHeapObject(ret);
3711
+ };
3712
+ imports.wbg.__wbindgen_closure_wrapper5962 = function(arg0, arg1, arg2) {
3713
+ const ret = makeClosure(arg0, arg1, 74, __wbg_adapter_52);
3714
+ return addHeapObject(ret);
3715
+ };
3716
+ imports.wbg.__wbindgen_closure_wrapper5964 = function(arg0, arg1, arg2) {
3717
+ const ret = makeMutClosure(arg0, arg1, 74, __wbg_adapter_57);
3718
+ return addHeapObject(ret);
3719
+ };
3720
+ imports.wbg.__wbindgen_closure_wrapper5966 = function(arg0, arg1, arg2) {
3721
+ const ret = makeMutClosure(arg0, arg1, 74, __wbg_adapter_57);
3722
+ return addHeapObject(ret);
3723
+ };
3724
+ imports.wbg.__wbindgen_closure_wrapper5968 = function(arg0, arg1, arg2) {
3725
+ const ret = makeMutClosure(arg0, arg1, 77, __wbg_adapter_62);
3726
+ return addHeapObject(ret);
3727
+ };
3728
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
3729
+ const ret = debugString(getObject(arg1));
3730
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3731
+ const len1 = WASM_VECTOR_LEN;
3732
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3733
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3734
+ };
3735
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
3736
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
3737
+ return addHeapObject(ret);
3738
+ };
3739
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
3740
+ const ret = getObject(arg0) in getObject(arg1);
3741
+ return ret;
3742
+ };
3743
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
3744
+ const ret = typeof(getObject(arg0)) === 'bigint';
3745
+ return ret;
3746
+ };
3747
+ imports.wbg.__wbindgen_is_function = function(arg0) {
3748
+ const ret = typeof(getObject(arg0)) === 'function';
3749
+ return ret;
3750
+ };
3751
+ imports.wbg.__wbindgen_is_null = function(arg0) {
3752
+ const ret = getObject(arg0) === null;
3753
+ return ret;
3754
+ };
3755
+ imports.wbg.__wbindgen_is_object = function(arg0) {
3756
+ const val = getObject(arg0);
3757
+ const ret = typeof(val) === 'object' && val !== null;
3758
+ return ret;
3759
+ };
3760
+ imports.wbg.__wbindgen_is_string = function(arg0) {
3761
+ const ret = typeof(getObject(arg0)) === 'string';
3762
+ return ret;
3763
+ };
3764
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
3765
+ const ret = getObject(arg0) === undefined;
3766
+ return ret;
3767
+ };
3768
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
3769
+ const ret = getObject(arg0) === getObject(arg1);
3770
+ return ret;
3771
+ };
3772
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
3773
+ const ret = getObject(arg0) == getObject(arg1);
3774
+ return ret;
3775
+ };
3776
+ imports.wbg.__wbindgen_memory = function() {
3777
+ const ret = wasm.memory;
3778
+ return addHeapObject(ret);
3779
+ };
3780
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
3781
+ const obj = getObject(arg1);
3782
+ const ret = typeof(obj) === 'number' ? obj : undefined;
3783
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
3784
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
3785
+ };
3786
+ imports.wbg.__wbindgen_number_new = function(arg0) {
3787
+ const ret = arg0;
3788
+ return addHeapObject(ret);
3789
+ };
3790
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
3791
+ const ret = getObject(arg0);
3792
+ return addHeapObject(ret);
3793
+ };
3794
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
3795
+ takeObject(arg0);
3796
+ };
3797
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
3798
+ const obj = getObject(arg1);
3799
+ const ret = typeof(obj) === 'string' ? obj : undefined;
3800
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
3801
+ var len1 = WASM_VECTOR_LEN;
3802
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
3803
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
3804
+ };
3805
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
3806
+ const ret = getStringFromWasm0(arg0, arg1);
3807
+ return addHeapObject(ret);
3808
+ };
3809
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
3810
+ throw new Error(getStringFromWasm0(arg0, arg1));
3811
+ };
3812
+
3813
+ return imports;
3814
+ }
3815
+
3816
+ function __wbg_init_memory(imports, memory) {
3817
+
3818
+ }
3819
+
3820
+ function __wbg_finalize_init(instance, module) {
3821
+ wasm = instance.exports;
3822
+ __wbg_init.__wbindgen_wasm_module = module;
3823
+ cachedDataViewMemory0 = null;
3824
+ cachedUint8ArrayMemory0 = null;
3825
+
3826
+
3827
+
3828
+ return wasm;
3829
+ }
3830
+
3831
+ function initSync(module) {
3832
+ if (wasm !== undefined) return wasm;
3833
+
3834
+
3835
+ if (typeof module !== 'undefined') {
3836
+ if (Object.getPrototypeOf(module) === Object.prototype) {
3837
+ ({module} = module)
3838
+ } else {
3839
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
3840
+ }
3841
+ }
3842
+
3843
+ const imports = __wbg_get_imports();
3844
+
3845
+ __wbg_init_memory(imports);
3846
+
3847
+ if (!(module instanceof WebAssembly.Module)) {
3848
+ module = new WebAssembly.Module(module);
3849
+ }
3850
+
3851
+ const instance = new WebAssembly.Instance(module, imports);
3852
+
3853
+ return __wbg_finalize_init(instance, module);
3854
+ }
3855
+
3856
+ async function __wbg_init(module_or_path) {
3857
+ if (wasm !== undefined) return wasm;
3858
+
3859
+
3860
+ if (typeof module_or_path !== 'undefined') {
3861
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
3862
+ ({module_or_path} = module_or_path)
3863
+ } else {
3864
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
3865
+ }
3866
+ }
3867
+
3868
+
3869
+ const imports = __wbg_get_imports();
3870
+
3871
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
3872
+ module_or_path = fetch(module_or_path);
3873
+ }
3874
+
3875
+ __wbg_init_memory(imports);
3876
+
3877
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
3878
+
3879
+ return __wbg_finalize_init(instance, module);
3880
+ }
3881
+
3882
+ export { initSync };
3883
+ export default __wbg_init;