pybiolib 0.2.951__py3-none-any.whl → 1.2.1890__py3-none-any.whl
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.
- biolib/__init__.py +357 -11
- biolib/_data_record/data_record.py +380 -0
- biolib/_index/__init__.py +0 -0
- biolib/_index/index.py +55 -0
- biolib/_index/query_result.py +103 -0
- biolib/_internal/__init__.py +0 -0
- biolib/_internal/add_copilot_prompts.py +58 -0
- biolib/_internal/add_gui_files.py +81 -0
- biolib/_internal/data_record/__init__.py +1 -0
- biolib/_internal/data_record/data_record.py +85 -0
- biolib/_internal/data_record/push_data.py +116 -0
- biolib/_internal/data_record/remote_storage_endpoint.py +43 -0
- biolib/_internal/errors.py +5 -0
- biolib/_internal/file_utils.py +125 -0
- biolib/_internal/fuse_mount/__init__.py +1 -0
- biolib/_internal/fuse_mount/experiment_fuse_mount.py +209 -0
- biolib/_internal/http_client.py +159 -0
- biolib/_internal/lfs/__init__.py +1 -0
- biolib/_internal/lfs/cache.py +51 -0
- biolib/_internal/libs/__init__.py +1 -0
- biolib/_internal/libs/fusepy/__init__.py +1257 -0
- biolib/_internal/push_application.py +488 -0
- biolib/_internal/runtime.py +22 -0
- biolib/_internal/string_utils.py +13 -0
- biolib/_internal/templates/__init__.py +1 -0
- biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md +10 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md +20 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md +16 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md +47 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md +11 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md +19 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md +12 -0
- biolib/_internal/templates/dashboard_template/.biolib/config.yml +5 -0
- biolib/_internal/templates/github_workflow_template/.github/workflows/biolib.yml +21 -0
- biolib/_internal/templates/gitignore_template/.gitignore +10 -0
- biolib/_internal/templates/gui_template/.yarnrc.yml +1 -0
- biolib/_internal/templates/gui_template/App.tsx +53 -0
- biolib/_internal/templates/gui_template/Dockerfile +27 -0
- biolib/_internal/templates/gui_template/biolib-sdk.ts +82 -0
- biolib/_internal/templates/gui_template/dev-data/output.json +7 -0
- biolib/_internal/templates/gui_template/index.css +5 -0
- biolib/_internal/templates/gui_template/index.html +13 -0
- biolib/_internal/templates/gui_template/index.tsx +10 -0
- biolib/_internal/templates/gui_template/package.json +27 -0
- biolib/_internal/templates/gui_template/tsconfig.json +24 -0
- biolib/_internal/templates/gui_template/vite-plugin-dev-data.ts +50 -0
- biolib/_internal/templates/gui_template/vite.config.mts +10 -0
- biolib/_internal/templates/init_template/.biolib/config.yml +19 -0
- biolib/_internal/templates/init_template/Dockerfile +14 -0
- biolib/_internal/templates/init_template/requirements.txt +1 -0
- biolib/_internal/templates/init_template/run.py +12 -0
- biolib/_internal/templates/init_template/run.sh +4 -0
- biolib/_internal/templates/templates.py +25 -0
- biolib/_internal/tree_utils.py +106 -0
- biolib/_internal/utils/__init__.py +65 -0
- biolib/_internal/utils/auth.py +46 -0
- biolib/_internal/utils/job_url.py +33 -0
- biolib/_internal/utils/multinode.py +263 -0
- biolib/_runtime/runtime.py +157 -0
- biolib/_session/session.py +44 -0
- biolib/_shared/__init__.py +0 -0
- biolib/_shared/types/__init__.py +74 -0
- biolib/_shared/types/account.py +12 -0
- biolib/_shared/types/account_member.py +8 -0
- biolib/_shared/types/app.py +9 -0
- biolib/_shared/types/data_record.py +40 -0
- biolib/_shared/types/experiment.py +32 -0
- biolib/_shared/types/file_node.py +17 -0
- biolib/_shared/types/push.py +6 -0
- biolib/_shared/types/resource.py +37 -0
- biolib/_shared/types/resource_deploy_key.py +11 -0
- biolib/_shared/types/resource_permission.py +14 -0
- biolib/_shared/types/resource_version.py +19 -0
- biolib/_shared/types/result.py +14 -0
- biolib/_shared/types/typing.py +10 -0
- biolib/_shared/types/user.py +19 -0
- biolib/_shared/utils/__init__.py +7 -0
- biolib/_shared/utils/resource_uri.py +75 -0
- biolib/api/__init__.py +6 -0
- biolib/api/client.py +168 -0
- biolib/app/app.py +252 -49
- biolib/app/search_apps.py +45 -0
- biolib/biolib_api_client/api_client.py +126 -31
- biolib/biolib_api_client/app_types.py +24 -4
- biolib/biolib_api_client/auth.py +31 -8
- biolib/biolib_api_client/biolib_app_api.py +147 -52
- biolib/biolib_api_client/biolib_job_api.py +161 -141
- biolib/biolib_api_client/job_types.py +21 -5
- biolib/biolib_api_client/lfs_types.py +7 -23
- biolib/biolib_api_client/user_state.py +56 -0
- biolib/biolib_binary_format/__init__.py +1 -4
- biolib/biolib_binary_format/file_in_container.py +105 -0
- biolib/biolib_binary_format/module_input.py +24 -7
- biolib/biolib_binary_format/module_output_v2.py +149 -0
- biolib/biolib_binary_format/remote_endpoints.py +34 -0
- biolib/biolib_binary_format/remote_stream_seeker.py +59 -0
- biolib/biolib_binary_format/saved_job.py +3 -2
- biolib/biolib_binary_format/{attestation_document.py → stdout_and_stderr.py} +8 -8
- biolib/biolib_binary_format/system_status_update.py +3 -2
- biolib/biolib_binary_format/utils.py +175 -0
- biolib/biolib_docker_client/__init__.py +11 -2
- biolib/biolib_errors.py +36 -0
- biolib/biolib_logging.py +27 -10
- biolib/cli/__init__.py +38 -0
- biolib/cli/auth.py +46 -0
- biolib/cli/data_record.py +164 -0
- biolib/cli/index.py +32 -0
- biolib/cli/init.py +421 -0
- biolib/cli/lfs.py +101 -0
- biolib/cli/push.py +50 -0
- biolib/cli/run.py +63 -0
- biolib/cli/runtime.py +14 -0
- biolib/cli/sdk.py +16 -0
- biolib/cli/start.py +56 -0
- biolib/compute_node/cloud_utils/cloud_utils.py +110 -161
- biolib/compute_node/job_worker/cache_state.py +66 -88
- biolib/compute_node/job_worker/cache_types.py +1 -6
- biolib/compute_node/job_worker/docker_image_cache.py +112 -37
- biolib/compute_node/job_worker/executors/__init__.py +0 -3
- biolib/compute_node/job_worker/executors/docker_executor.py +532 -199
- biolib/compute_node/job_worker/executors/docker_types.py +9 -1
- biolib/compute_node/job_worker/executors/types.py +19 -9
- biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +30 -0
- biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +3 -5
- biolib/compute_node/job_worker/job_storage.py +108 -0
- biolib/compute_node/job_worker/job_worker.py +397 -212
- biolib/compute_node/job_worker/large_file_system.py +87 -38
- biolib/compute_node/job_worker/network_alloc.py +99 -0
- biolib/compute_node/job_worker/network_buffer.py +240 -0
- biolib/compute_node/job_worker/utilization_reporter_thread.py +197 -0
- biolib/compute_node/job_worker/utils.py +9 -24
- biolib/compute_node/remote_host_proxy.py +400 -98
- biolib/compute_node/utils.py +31 -9
- biolib/compute_node/webserver/compute_node_results_proxy.py +189 -0
- biolib/compute_node/webserver/proxy_utils.py +28 -0
- biolib/compute_node/webserver/webserver.py +130 -44
- biolib/compute_node/webserver/webserver_types.py +2 -6
- biolib/compute_node/webserver/webserver_utils.py +77 -12
- biolib/compute_node/webserver/worker_thread.py +183 -42
- biolib/experiments/__init__.py +0 -0
- biolib/experiments/experiment.py +356 -0
- biolib/jobs/__init__.py +1 -0
- biolib/jobs/job.py +741 -0
- biolib/jobs/job_result.py +185 -0
- biolib/jobs/types.py +50 -0
- biolib/py.typed +0 -0
- biolib/runtime/__init__.py +14 -0
- biolib/sdk/__init__.py +91 -0
- biolib/tables.py +34 -0
- biolib/typing_utils.py +2 -7
- biolib/user/__init__.py +1 -0
- biolib/user/sign_in.py +54 -0
- biolib/utils/__init__.py +162 -0
- biolib/utils/cache_state.py +94 -0
- biolib/utils/multipart_uploader.py +194 -0
- biolib/utils/seq_util.py +150 -0
- biolib/utils/zip/remote_zip.py +640 -0
- pybiolib-1.2.1890.dist-info/METADATA +41 -0
- pybiolib-1.2.1890.dist-info/RECORD +177 -0
- {pybiolib-0.2.951.dist-info → pybiolib-1.2.1890.dist-info}/WHEEL +1 -1
- pybiolib-1.2.1890.dist-info/entry_points.txt +2 -0
- README.md +0 -17
- biolib/app/app_result.py +0 -68
- biolib/app/utils.py +0 -62
- biolib/biolib-js/0-biolib.worker.js +0 -1
- biolib/biolib-js/1-biolib.worker.js +0 -1
- biolib/biolib-js/2-biolib.worker.js +0 -1
- biolib/biolib-js/3-biolib.worker.js +0 -1
- biolib/biolib-js/4-biolib.worker.js +0 -1
- biolib/biolib-js/5-biolib.worker.js +0 -1
- biolib/biolib-js/6-biolib.worker.js +0 -1
- biolib/biolib-js/index.html +0 -10
- biolib/biolib-js/main-biolib.js +0 -1
- biolib/biolib_api_client/biolib_account_api.py +0 -21
- biolib/biolib_api_client/biolib_large_file_system_api.py +0 -108
- biolib/biolib_binary_format/aes_encrypted_package.py +0 -42
- biolib/biolib_binary_format/module_output.py +0 -58
- biolib/biolib_binary_format/rsa_encrypted_aes_package.py +0 -57
- biolib/biolib_push.py +0 -114
- biolib/cli.py +0 -203
- biolib/cli_utils.py +0 -273
- biolib/compute_node/cloud_utils/enclave_parent_types.py +0 -7
- biolib/compute_node/enclave/__init__.py +0 -2
- biolib/compute_node/enclave/enclave_remote_hosts.py +0 -53
- biolib/compute_node/enclave/nitro_secure_module_utils.py +0 -64
- biolib/compute_node/job_worker/executors/base_executor.py +0 -18
- biolib/compute_node/job_worker/executors/pyppeteer_executor.py +0 -173
- biolib/compute_node/job_worker/executors/remote/__init__.py +0 -1
- biolib/compute_node/job_worker/executors/remote/nitro_enclave_utils.py +0 -81
- biolib/compute_node/job_worker/executors/remote/remote_executor.py +0 -51
- biolib/lfs.py +0 -196
- biolib/pyppeteer/.circleci/config.yml +0 -100
- biolib/pyppeteer/.coveragerc +0 -3
- biolib/pyppeteer/.gitignore +0 -89
- biolib/pyppeteer/.pre-commit-config.yaml +0 -28
- biolib/pyppeteer/CHANGES.md +0 -253
- biolib/pyppeteer/CONTRIBUTING.md +0 -26
- biolib/pyppeteer/LICENSE +0 -12
- biolib/pyppeteer/README.md +0 -137
- biolib/pyppeteer/docs/Makefile +0 -177
- biolib/pyppeteer/docs/_static/custom.css +0 -28
- biolib/pyppeteer/docs/_templates/layout.html +0 -10
- biolib/pyppeteer/docs/changes.md +0 -1
- biolib/pyppeteer/docs/conf.py +0 -299
- biolib/pyppeteer/docs/index.md +0 -21
- biolib/pyppeteer/docs/make.bat +0 -242
- biolib/pyppeteer/docs/reference.md +0 -211
- biolib/pyppeteer/docs/server.py +0 -60
- biolib/pyppeteer/poetry.lock +0 -1699
- biolib/pyppeteer/pyppeteer/__init__.py +0 -135
- biolib/pyppeteer/pyppeteer/accessibility.py +0 -286
- biolib/pyppeteer/pyppeteer/browser.py +0 -401
- biolib/pyppeteer/pyppeteer/browser_fetcher.py +0 -194
- biolib/pyppeteer/pyppeteer/command.py +0 -22
- biolib/pyppeteer/pyppeteer/connection/__init__.py +0 -242
- biolib/pyppeteer/pyppeteer/connection/cdpsession.py +0 -101
- biolib/pyppeteer/pyppeteer/coverage.py +0 -346
- biolib/pyppeteer/pyppeteer/device_descriptors.py +0 -787
- biolib/pyppeteer/pyppeteer/dialog.py +0 -79
- biolib/pyppeteer/pyppeteer/domworld.py +0 -597
- biolib/pyppeteer/pyppeteer/emulation_manager.py +0 -53
- biolib/pyppeteer/pyppeteer/errors.py +0 -48
- biolib/pyppeteer/pyppeteer/events.py +0 -63
- biolib/pyppeteer/pyppeteer/execution_context.py +0 -156
- biolib/pyppeteer/pyppeteer/frame/__init__.py +0 -299
- biolib/pyppeteer/pyppeteer/frame/frame_manager.py +0 -306
- biolib/pyppeteer/pyppeteer/helpers.py +0 -245
- biolib/pyppeteer/pyppeteer/input.py +0 -371
- biolib/pyppeteer/pyppeteer/jshandle.py +0 -598
- biolib/pyppeteer/pyppeteer/launcher.py +0 -683
- biolib/pyppeteer/pyppeteer/lifecycle_watcher.py +0 -169
- biolib/pyppeteer/pyppeteer/models/__init__.py +0 -103
- biolib/pyppeteer/pyppeteer/models/_protocol.py +0 -12460
- biolib/pyppeteer/pyppeteer/multimap.py +0 -82
- biolib/pyppeteer/pyppeteer/network_manager.py +0 -678
- biolib/pyppeteer/pyppeteer/options.py +0 -8
- biolib/pyppeteer/pyppeteer/page.py +0 -1728
- biolib/pyppeteer/pyppeteer/pipe_transport.py +0 -59
- biolib/pyppeteer/pyppeteer/target.py +0 -147
- biolib/pyppeteer/pyppeteer/task_queue.py +0 -24
- biolib/pyppeteer/pyppeteer/timeout_settings.py +0 -36
- biolib/pyppeteer/pyppeteer/tracing.py +0 -93
- biolib/pyppeteer/pyppeteer/us_keyboard_layout.py +0 -305
- biolib/pyppeteer/pyppeteer/util.py +0 -18
- biolib/pyppeteer/pyppeteer/websocket_transport.py +0 -47
- biolib/pyppeteer/pyppeteer/worker.py +0 -101
- biolib/pyppeteer/pyproject.toml +0 -97
- biolib/pyppeteer/spell.txt +0 -137
- biolib/pyppeteer/tox.ini +0 -72
- biolib/pyppeteer/utils/generate_protocol_types.py +0 -603
- biolib/start_cli.py +0 -7
- biolib/utils.py +0 -47
- biolib/validators/validate_app_version.py +0 -183
- biolib/validators/validate_argument.py +0 -134
- biolib/validators/validate_module.py +0 -323
- biolib/validators/validate_zip_file.py +0 -40
- biolib/validators/validator_utils.py +0 -103
- pybiolib-0.2.951.dist-info/LICENSE +0 -21
- pybiolib-0.2.951.dist-info/METADATA +0 -61
- pybiolib-0.2.951.dist-info/RECORD +0 -153
- pybiolib-0.2.951.dist-info/entry_points.txt +0 -3
- /LICENSE → /pybiolib-1.2.1890.dist-info/licenses/LICENSE +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=243)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){var i=r(2),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=a),a.prototype=Object.create(n.prototype),o(n,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,r){"use strict";(function(e){var i=r(121),n=r(122),o=r(54);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,r),n=(e=s(e,i)).write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function d(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return H(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function b(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=u.from(t,i)),u.isBuffer(t))return 0===t.length?-1:y(e,t,r,i,n);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,i,n){var o,a=1,s=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){l=!1;break}if(l)return o}return-1}function g(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a<i;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function v(e,t,r,i){return X(H(t,e.length-r),e,r,i)}function w(e,t,r,i){return X(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function E(e,t,r,i){return w(e,t,r,i)}function S(e,t,r,i){return X(z(t),e,r,i)}function M(e,t,r,i){return X(function(e,t){for(var r,i,n,o=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(r=e.charCodeAt(a))>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function T(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var o,a,s,u,c=e[n],f=null,l=c>239?4:c>223?3:c>191?2:1;if(n+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[n+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[n+1],a=e[n+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[n+1],a=e[n+2],s=e[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=O));return r}(i)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,i){return f(t),t<=0?s(e,t):void 0!==r?"string"==typeof i?s(e,t).fill(r,i):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=u.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,n),n+=a.length}return i},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):_.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,i,n){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(i,n),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function N(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function I(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=t;o<r;++o)n+=U(e[o]);return n}function x(e,t,r){for(var i=e.slice(t,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,i,n,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function F(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-r,2);n<o;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function D(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-r,4);n<o;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function B(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,i,o){return o||B(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function L(e,t,r,i,o){return o||B(e,0,r,8),n.write(e,t,r,i,52,8),r+8}u.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var n=t-e;r=new u(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=this[e],n=1,o=0;++o<t&&(n*=256);)i+=this[e+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||P(e,t,this.length);for(var i=t,n=1,o=this[e+--i];i>0&&(n*=256);)o+=this[e+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),n.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),n.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),n.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),n.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||k(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||k(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);k(this,e,t,r,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);k(this,e,t,r,n-1,-n)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n,o=i-r;if(this===e&&r<t&&t<i)for(n=o-1;n>=0;--n)e[n+t]=this[n+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:H(new u(e,i).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){var r;t=t||1/0;for(var i=e.length,n=null,o=[],a=0;a<i;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}}).call(this,r(5))},function(e,t){var r,i,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,c=[],f=!1,l=-1;function d(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!f){var e=s(d);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=_,n.addListener=_,n.once=_,n.off=_,n.removeListener=_,n.removeAllListeners=_,n.emit=_,n.prependListener=_,n.prependOnceListener=_,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,r){(function(e){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(175).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function c(e,t,r,i){for(var n=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;n*=i,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=i)u=c(e,f,f+i,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var f=u>>>26,l=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;f+=(a=(n=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|o)).toString(16);r=0!==(o=s>>>24-n&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var _=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?_+r:f[c-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-n;s++)c[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var i,n,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,_=h>>>13,m=0|a[2],b=8191&m,y=m>>>13,g=0|a[3],v=8191&g,w=g>>>13,E=0|a[4],S=8191&E,M=E>>>13,T=0|a[5],A=8191&T,O=T>>>13,R=0|a[6],N=8191&R,I=R>>>13,x=0|a[7],P=8191&x,k=x>>>13,F=0|a[8],D=8191&F,B=F>>>13,C=0|a[9],L=8191&C,j=C>>>13,U=0|s[0],H=8191&U,z=U>>>13,X=0|s[1],q=8191&X,Y=X>>>13,W=0|s[2],$=8191&W,G=W>>>13,V=0|s[3],K=8191&V,J=V>>>13,Q=0|s[4],Z=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,de=fe>>>13,he=0|s[9],pe=8191&he,_e=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(i=Math.imul(l,H))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,H),n=(n=Math.imul(p,z))+Math.imul(_,H)|0,o=Math.imul(_,z);var be=(c+(i=i+Math.imul(l,q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,H),n=(n=Math.imul(b,z))+Math.imul(y,H)|0,o=Math.imul(y,z),i=i+Math.imul(p,q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Y)|0;var ye=(c+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(v,H),n=(n=Math.imul(v,z))+Math.imul(w,H)|0,o=Math.imul(w,z),i=i+Math.imul(b,q)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,Y)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0;var ge=(c+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,J)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(S,H),n=(n=Math.imul(S,z))+Math.imul(M,H)|0,o=Math.imul(M,z),i=i+Math.imul(v,q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0;var ve=(c+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(A,H),n=(n=Math.imul(A,z))+Math.imul(O,H)|0,o=Math.imul(O,z),i=i+Math.imul(S,q)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Y)|0,i=i+Math.imul(v,$)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,i=i+Math.imul(b,K)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,J)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,ee)|0;var we=(c+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(N,H),n=(n=Math.imul(N,z))+Math.imul(I,H)|0,o=Math.imul(I,z),i=i+Math.imul(A,q)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,i=i+Math.imul(v,K)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,J)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0;var Ee=(c+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(P,H),n=(n=Math.imul(P,z))+Math.imul(k,H)|0,o=Math.imul(k,z),i=i+Math.imul(N,q)|0,n=(n=n+Math.imul(N,Y)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,Y)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,i=i+Math.imul(v,Z)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,ee)|0,i=i+Math.imul(b,re)|0,n=(n=n+Math.imul(b,ie)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0;var Se=(c+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(D,H),n=(n=Math.imul(D,z))+Math.imul(B,H)|0,o=Math.imul(B,z),i=i+Math.imul(P,q)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,Y)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,J)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ie)|0,i=i+Math.imul(b,oe)|0,n=(n=n+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0;var Me=(c+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(L,H),n=(n=Math.imul(L,z))+Math.imul(j,H)|0,o=Math.imul(j,z),i=i+Math.imul(D,q)|0,n=(n=n+Math.imul(D,Y)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Y)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(N,K)|0,n=(n=n+Math.imul(N,J)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ie)|0,i=i+Math.imul(v,oe)|0,n=(n=n+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,i=i+Math.imul(b,ue)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Te=(c+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,_e)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,_e)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(L,q),n=(n=Math.imul(L,Y))+Math.imul(j,q)|0,o=Math.imul(j,Y),i=i+Math.imul(D,$)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,ee)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(A,re)|0,n=(n=n+Math.imul(A,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,i=i+Math.imul(v,ue)|0,n=(n=n+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,i=i+Math.imul(b,le)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Ae=(c+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,_e)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(L,$),n=(n=Math.imul(L,G))+Math.imul(j,$)|0,o=Math.imul(j,G),i=i+Math.imul(D,K)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(N,re)|0,n=(n=n+Math.imul(N,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,i=i+Math.imul(v,le)|0,n=(n=n+Math.imul(v,de)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,de)|0;var Oe=(c+(i=i+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,_e)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,_e)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(L,K),n=(n=Math.imul(L,J))+Math.imul(j,K)|0,o=Math.imul(j,J),i=i+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(N,oe)|0,n=(n=n+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,i=i+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Re=(c+(i=i+Math.imul(v,pe)|0)|0)+((8191&(n=(n=n+Math.imul(v,_e)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,_e)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(L,Z),n=(n=Math.imul(L,ee))+Math.imul(j,Z)|0,o=Math.imul(j,ee),i=i+Math.imul(D,re)|0,n=(n=n+Math.imul(D,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,i=i+Math.imul(N,ue)|0,n=(n=n+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,i=i+Math.imul(A,le)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Ne=(c+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,_e)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,_e)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(L,re),n=(n=Math.imul(L,ie))+Math.imul(j,re)|0,o=Math.imul(j,ie),i=i+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,i=i+Math.imul(N,le)|0,n=(n=n+Math.imul(N,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Ie=(c+(i=i+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,_e)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,_e)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(L,oe),n=(n=Math.imul(L,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),i=i+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var xe=(c+(i=i+Math.imul(N,pe)|0)|0)+((8191&(n=(n=n+Math.imul(N,_e)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,_e)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(L,ue),n=(n=Math.imul(L,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),i=i+Math.imul(D,le)|0,n=(n=n+Math.imul(D,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Pe=(c+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,_e)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,_e)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(L,le),n=(n=Math.imul(L,de))+Math.imul(j,le)|0,o=Math.imul(j,de);var ke=(c+(i=i+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,_e)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,_e)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Fe=(c+(i=Math.imul(L,pe))|0)+((8191&(n=(n=Math.imul(L,_e))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,_e))+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,u[0]=me,u[1]=be,u[2]=ye,u[3]=ge,u[4]=ve,u[5]=we,u[6]=Ee,u[7]=Se,u[8]=Me,u[9]=Te,u[10]=Ae,u[11]=Oe,u[12]=Re,u[13]=Ne,u[14]=Ie,u[15]=xe,u[16]=Pe,u[17]=ke,u[18]=Fe,0!==c&&(u[19]=c,r.length++),r};function _(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var a=n;n=0;for(var s=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),d=67108863&l;s=67108863&(d=d+s|0),n+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):_(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a<o;a++)i[a]=t[e[a]],n[a]=r[e[a]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<n;f+=s)for(var l=u,d=c,h=0;h<a;h++){var p=r[f+h],_=i[f+h],m=r[f+h+a],b=i[f+h+a],y=l*m-d*b;b=l*b+d*m,m=y,r[f+h]=p+m,i[f+h]=_+b,r[f+h+a]=p-m,i[f+h+a]=_-b,h!==s&&(y=u*l-c*d,d=u*d+c*l,l=y)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,r,n){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<n;++a)r[a]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),a=new Array(i),s=new Array(i),u=new Array(i),c=new Array(i),f=new Array(i),l=new Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,a,i),this.convert13b(t.words,t.length,c,i),this.transform(a,o,s,u,i,n),this.transform(c,o,f,l,i,n);for(var h=0;h<i;h++){var p=s[h]*f[h]-u[h]*l[h];u[h]=s[h]*l[h]+u[h]*f[h],s[h]=p}return this.conjugate(s,u,i),this.transform(s,u,d,o,i,n),this.conjugate(d,o,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),_(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,a=e.length+r;this._expand(a);var s=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+s;var u=(0|e.words[n])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)s=(o=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=i.clone()._ishlnsubmul(n,1,u);0===f.negative&&(i=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(n,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(l)),n.iushrn(1),a.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),a.isub(u)):(r.isub(t),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(n=0===t.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(g,y),g.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(v,y),n(w,y),n(E,y),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t,t},S.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),d=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=a;0!==h.cmp(s);){for(var _=h,m=0;0!==_.cmp(s);m++)_=_.redSqr();i(m<p);var b=this.pow(l,new o(1).iushln(p-m-1));d=d.redMul(b),l=b.redSqr(),h=h.redMul(l),p=m}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var c=t.words[i],f=u-1;f>=0;f--){var l=c>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},n(M,S),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(43)(e))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var i=r(108),n=Object.prototype.toString;function o(e){return"[object Array]"===n.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==n.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===n.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===n.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===n.call(e)},isFile:function(e){return"[object File]"===n.call(e)},isBlob:function(e){return"[object Blob]"===n.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,i){u(t[i])&&u(r)?t[i]=e(t[i],r):u(r)?t[i]=e({},r):o(r)?t[i]=r.slice():t[i]=r}for(var i=0,n=arguments.length;i<n;i++)f(arguments[i],r);return t},extend:function(e,t,r){return f(t,(function(t,n){e[n]=r&&"function"==typeof t?i(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var i=t,n=r(4),o=r(7),a=r(93);i.assert=o,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1);i.fill(0);for(var n=1<<t+1,o=e.clone(),a=0;a<i.length;a++){var s,u=o.andln(n-1);o.isOdd()?(s=u>(n>>1)-1?(n>>1)-u:u,o.isubn(s)):s=0,i[a]=s,o.iushrn(1)}return i},i.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i,n=0,o=0;e.cmpn(-n)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+n&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(i=e.andln(7)+n&7)&&5!==i||2!==c?u:-u,r[0].push(a),s=0==(1&c)?0:3!==(i=t.andln(7)+o&7)&&5!==i||2!==u?c:-c,r[1].push(s),2*n===a+1&&(n=1-n),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},i.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new n(e,"hex","le")}},function(e,t,r){"use strict";var i=r(7),n=r(0);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=n,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=63&a|128):o(e,n)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(n=0;n<e.length;n++)r[n]=0|e[n];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=a(n)),r+=u(n.toString(16))}return r},t.zero2=s,t.zero8=u,t.join32=function(e,t,r,n){var o=r-t;i(o%4==0);for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===n?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];"big"===t?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},t.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},t.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0,a=(o<i?1:0)+r+n;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,i){return t+i>>>0},t.sum64_4_hi=function(e,t,r,i,n,o,a,s){var u=0,c=t;return u+=(c=c+i>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+n+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,i,n,o,a,s){return t+i+o+s>>>0},t.sum64_5_hi=function(e,t,r,i,n,o,a,s,u,c){var f=0,l=t;return f+=(l=l+i>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+s>>>0)<s?1:0,e+r+n+a+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,i,n,o,a,s,u,c){return t+i+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){e.exports=r(131)},function(e,t,r){var i=r(1).Buffer,n=r(145).Transform,o=r(13).StringDecoder;function a(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(a,n),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=i.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i},e.exports=a},function(e,t,r){"use strict";var i,n="object"==typeof Reflect?Reflect:null,o=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};i=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,i){function n(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,r)}(e,n,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,i){var n,o,a,s;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=f(e))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function p(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):m(n,n.length)}function _(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function b(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(o){i.once&&e.removeEventListener(t,n),r(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=n[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,f=m(u,c);for(r=0;r<c;++r)o(f[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,i,n,o,a;if(c(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_.call(e,t)},s.prototype.listenerCount=_,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,r){"use strict";var i=r(1).Buffer,n=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var n=a(t[i]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if((n=a(t[i]))>=0)return n>0&&(e.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if((n=a(t[i]))>=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";var i=r(27),n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=Object.create(r(23));o.inherits=r(0);var a=r(66),s=r(39);o.inherits(l,a);for(var u=n(s.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||i.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(e,t){this.push(null),this.end(),i.nextTick(t,e)}},function(e,t,r){"use strict";(function(t,i){var n=65536,o=4294967295;var a=r(1).Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>o)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(e);if(e>0)if(e>n)for(var u=0;u<e;u+=n)s.getRandomValues(r.slice(u,u+n));else s.getRandomValues(r);if("function"==typeof t)return i.nextTick((function(){t(null,r)}));return r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(5),r(3))},function(e,t,r){"use strict";var i={};function n(e,t,r){r||(r=Error);var n=function(e){var r,i;function n(r,i,n){return e.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,n))||this}return i=e,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,n,a,s;if("string"==typeof t&&(n="not ",t.substr(!a||a<0?0:+a,n.length)===n)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var n=r(58),o=r(62);r(0)(c,n);for(var a=i(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||t.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r(3))},function(e,t,r){var i=r(1).Buffer;function n(e,t){this._block=i.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=i.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var u=a%n,c=Math.min(o-s,n-u),f=0;f<c;f++)r[u+f]=e[s+f];s+=c,(a+=c)%n==0&&this._update(r)}return this._len+=o,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=n},function(e,t,r){"use strict";var i={};function n(e,t,r){r||(r=Error);var n=function(e){var r,i;function n(r,i,n){return e.call(this,function(e,r,i){return"string"==typeof t?t:t(e,r,i)}(r,i,n))||this}return i=e,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,n,a,s;if("string"==typeof t&&(n="not ",t.substr(!a||a<0?0:+a,n.length)===n)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var n=r(87),o=r(91);r(0)(c,n);for(var a=i(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||t.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r(3))},function(e,t){e.exports=i;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function i(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}i.prototype.__isLong__,Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=n;var o={},a={};function s(e,t){var r,i,n;return t?(n=0<=(e>>>=0)&&e<256)&&(i=a[e])?i:(r=c(e,(0|e)<0?-1:0,!0),n&&(a[e]=r),r):(n=-128<=(e|=0)&&e<128)&&(i=o[e])?i:(r=c(e,e<0?-1:0,!1),n&&(o[e]=r),r)}function u(e,t){if(isNaN(e))return t?y:b;if(t){if(e<0)return y;if(e>=p)return S}else{if(e<=-_)return M;if(e+1>=_)return E}return e<0?u(-e,t).neg():c(e%h|0,e/h|0,t)}function c(e,t,r){return new i(e,t,r)}i.fromInt=s,i.fromNumber=u,i.fromBits=c;var f=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return b;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return l(e.substring(1),t,r).neg();for(var n=u(f(r,8)),o=b,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+s),r);if(s<8){var d=u(f(r,s));o=o.mul(d).add(u(c))}else o=(o=o.mul(n)).add(u(c))}return o.unsigned=t,o}function d(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?l(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}i.fromString=l,i.fromValue=d;var h=4294967296,p=h*h,_=p/2,m=s(1<<24),b=s(0);i.ZERO=b;var y=s(0,!0);i.UZERO=y;var g=s(1);i.ONE=g;var v=s(1,!0);i.UONE=v;var w=s(-1);i.NEG_ONE=w;var E=c(-1,2147483647,!1);i.MAX_VALUE=E;var S=c(-1,-1,!0);i.MAX_UNSIGNED_VALUE=S;var M=c(0,-2147483648,!1);i.MIN_VALUE=M;var T=i.prototype;T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},T.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(M)){var t=u(e),r=this.div(t),i=r.mul(t).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=u(f(e,6),this.unsigned),o=this,a="";;){var s=o.div(n),c=(o.sub(s.mul(n)).toInt()>>>0).toString(e);if((o=s).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(M)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return 1==(1&this.low)},T.isEven=function(){return 0==(1&this.low)},T.equals=function(e){return n(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},T.eq=T.equals,T.notEquals=function(e){return!this.eq(e)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(e){return this.comp(e)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(e){return this.comp(e)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(e){return this.comp(e)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(e){return this.comp(e)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(e){if(n(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(M)?M:this.not().add(g)},T.neg=T.negate,T.add=function(e){n(e)||(e=d(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,f=0,l=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,l+=(h+=i+u)>>>16,f+=(l+=r+s)>>>16,f+=t+a,c((h&=65535)<<16|(p&=65535),(f&=65535)<<16|(l&=65535),this.unsigned)},T.subtract=function(e){return n(e)||(e=d(e)),this.add(e.neg())},T.sub=T.subtract,T.multiply=function(e){if(this.isZero())return b;if(n(e)||(e=d(e)),r)return c(r.mul(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned);if(e.isZero())return b;if(this.eq(M))return e.isOdd()?M:b;if(e.eq(M))return this.isOdd()?M:b;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return u(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,f=65535&e.high,l=e.low>>>16,h=65535&e.low,p=0,_=0,y=0,g=0;return y+=(g+=a*h)>>>16,_+=(y+=o*h)>>>16,y&=65535,_+=(y+=a*l)>>>16,p+=(_+=i*h)>>>16,_&=65535,p+=(_+=o*l)>>>16,_&=65535,p+=(_+=a*f)>>>16,p+=t*h+i*l+o*f+a*s,c((y&=65535)<<16|(g&=65535),(p&=65535)<<16|(_&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(e){if(n(e)||(e=d(e)),e.isZero())throw Error("division by zero");var t,i,o;if(r)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?r.div_u:r.div_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:b;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return v;o=y}else{if(this.eq(M))return e.eq(g)||e.eq(w)?M:e.eq(M)?g:(t=this.shr(1).div(e).shl(1)).eq(b)?e.isNegative()?g:w:(i=this.sub(e.mul(t)),o=t.add(i.div(e)));if(e.eq(M))return this.unsigned?y:b;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=b}for(i=this;i.gte(e);){t=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(t)/Math.LN2),s=a<=48?1:f(2,a-48),l=u(t),h=l.mul(e);h.isNegative()||h.gt(i);)h=(l=u(t-=s,this.unsigned)).mul(e);l.isZero()&&(l=g),o=o.add(l),i=i.sub(h)}return o},T.div=T.divide,T.modulo=function(e){return n(e)||(e=d(e)),r?c((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,e.low,e.high),r.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return c(~this.low,~this.high,this.unsigned)},T.and=function(e){return n(e)||(e=d(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},T.or=function(e){return n(e)||(e=d(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},T.xor=function(e){return n(e)||(e=d(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},T.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},T.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},T.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},i.fromBytes=function(e,t,r){return r?i.fromBytesLE(e,t):i.fromBytesBE(e,t)},i.fromBytesLE=function(e,t){return new i(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},i.fromBytesBE=function(e,t){return new i(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,r){"use strict";var i=r(0),n=r(32),o=r(35),a=r(36),s=r(11);function u(e){s.call(this,"digest"),this._hash=e}i(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(2).Buffer)},function(e,t,r){(function(t){e.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new t(i),o=0;o<i;++o)n[o]=e[o]^r[o];return n}}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var i=r(9),n=r(7);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o<this.padLength;o++)i[n++]=0;return i}},function(e,t,r){"use strict";const i=r(0),n=r(52).Reporter,o=r(50).Buffer;function a(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(a,n),t.DecoderBuffer=a,a.isDecoderBuffer=function(e){if(e instanceof a)return!0;return"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.isEncoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,i,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,i)}));case 4:return t.nextTick((function(){e.call(null,r,i,n)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,r(3))},function(e,t,r){var i=r(1).Buffer;function n(e){i.isBuffer(e)||(e=i.from(e));for(var t=e.length/4|0,r=new Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,i,n){for(var o,a,s,u,c=r[0],f=r[1],l=r[2],d=r[3],h=e[0]^t[0],p=e[1]^t[1],_=e[2]^t[2],m=e[3]^t[3],b=4,y=1;y<n;y++)o=c[h>>>24]^f[p>>>16&255]^l[_>>>8&255]^d[255&m]^t[b++],a=c[p>>>24]^f[_>>>16&255]^l[m>>>8&255]^d[255&h]^t[b++],s=c[_>>>24]^f[m>>>16&255]^l[h>>>8&255]^d[255&p]^t[b++],u=c[m>>>24]^f[h>>>16&255]^l[p>>>8&255]^d[255&_]^t[b++],h=o,p=a,_=s,m=u;return o=(i[h>>>24]<<24|i[p>>>16&255]<<16|i[_>>>8&255]<<8|i[255&m])^t[b++],a=(i[p>>>24]<<24|i[_>>>16&255]<<16|i[m>>>8&255]<<8|i[255&h])^t[b++],s=(i[_>>>24]<<24|i[m>>>16&255]<<16|i[h>>>8&255]<<8|i[255&p])^t[b++],u=(i[m>>>24]<<24|i[h>>>16&255]<<16|i[p>>>8&255]<<8|i[255&_])^t[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,i[c]=a;var f=e[a],l=e[f],d=e[l],h=257*e[c]^16843008*c;n[0][a]=h<<24|h>>>8,n[1][a]=h<<16|h>>>16,n[2][a]=h<<8|h>>>24,n[3][a]=h,h=16843009*d^65537*l^257*f^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=f^e[e[e[d^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function c(e){this._key=n(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t==0?(a=a<<8|a>>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),n[o]=n[o-t]^a}for(var c=[],f=0;f<i;f++){var l=i-f,d=n[l-(f%4?0:4)];c[f]=f<4||l<=4?d:u.INV_SUB_MIX[0][u.SBOX[d>>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=n(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=i.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,r){var i=r(1).Buffer,n=r(32);e.exports=function(e,t,r,o){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=i.alloc(a),u=i.alloc(o||0),c=i.alloc(0);a>0||o>0;){var f=new n;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,c.length),c.copy(s,d,0,l),a-=l}if(l<c.length&&o>0){var h=u.length-o,p=Math.min(o,c.length-l);c.copy(u,h,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(e,t,r){"use strict";var i=r(4),n=r(8),o=n.getNAF,a=n.getJSF,s=n.assert;function u(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),i=o(t,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;var a,u,c=[];for(a=0;a<i.length;a+=r.step){u=0;for(var f=a+r.step-1;f>=a;f--)u=(u<<1)+i[f];c.push(u)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=n;h>0;h--){for(a=0;a<c.length;a++)(u=c[a])===h?d=d.mixedAdd(r.points[a]):u===-h&&(d=d.mixedAdd(r.points[a].neg()));l=l.add(d)}return l.toP()},u.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(n[l-1>>1]):u.mixedAdd(n[-l-1>>1].neg()):l>0?u.add(n[l-1>>1]):u.add(n[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,i,n){var s,u,c,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s<i;s++){var p=(c=t[s])._getNAFPoints(e);f[s]=p.wnd,l[s]=p.points}for(s=i-1;s>=1;s-=2){var _=s-1,m=s;if(1===f[_]&&1===f[m]){var b=[t[_],null,null,t[m]];0===t[_].y.cmp(t[m].y)?(b[1]=t[_].add(t[m]),b[2]=t[_].toJ().mixedAdd(t[m].neg())):0===t[_].y.cmp(t[m].y.redNeg())?(b[1]=t[_].toJ().mixedAdd(t[m]),b[2]=t[_].add(t[m].neg())):(b[1]=t[_].toJ().mixedAdd(t[m]),b[2]=t[_].toJ().mixedAdd(t[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[_],r[m]);for(h=Math.max(g[0].length,h),d[_]=new Array(h),d[m]=new Array(h),u=0;u<h;u++){var v=0|g[0][u],w=0|g[1][u];d[_][u]=y[3*(v+1)+(w+1)],d[m][u]=0,l[_]=b}}else d[_]=o(r[_],f[_],this._bitLength),d[m]=o(r[m],f[m],this._bitLength),h=Math.max(d[_].length,h),h=Math.max(d[m].length,h)}var E=this.jpoint(null,null,null),S=this._wnafT4;for(s=h;s>=0;s--){for(var M=0;s>=0;){var T=!0;for(u=0;u<i;u++)S[u]=0|d[u][s],0!==S[u]&&(T=!1);if(!T)break;M++,s--}if(s>=0&&M++,E=E.dblp(M),s<0)break;for(u=0;u<i;u++){var A=S[u];0!==A&&(A>0?c=l[u][A-1>>1]:A<0&&(c=l[u][-A-1>>1].neg()),E="affine"===c.type?E.mixedAdd(c):E.add(c))}}for(s=0;s<i;s++)l[s]=null;return n?E:E.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},function(e,t,r){var i=r(210),n=r(217),o=r(218),a=r(41),s=r(73),u=r(1).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,f=o(e,t),l=f.tag,d=f.data;switch(l){case"CERTIFICATE":c=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=i.PublicKey.decode(d,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=i.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,r,i,l,"sha1"),h=a.createDecipheriv(o,d,c),p=[];return p.push(h.update(f)),p.push(h.final()),u.concat(p)}(d=i.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(r=(c=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:i.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=i.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=c,c.signature=i.signature},function(e,t,r){"use strict";var i=r(0),n=r(57),o=r(1).Buffer,a=new Array(16);function s(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,i,n,o,a){return u(e+(t&r|~t&i)+n+o|0,a)+t|0}function f(e,t,r,i,n,o,a){return u(e+(t&i|r&~i)+n+o|0,a)+t|0}function l(e,t,r,i,n,o,a){return u(e+(t^r^i)+n+o|0,a)+t|0}function d(e,t,r,i,n,o,a){return u(e+(r^(t|~i))+n+o|0,a)+t|0}i(s,n),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,o=this._d;r=c(r,i,n,o,e[0],3614090360,7),o=c(o,r,i,n,e[1],3905402710,12),n=c(n,o,r,i,e[2],606105819,17),i=c(i,n,o,r,e[3],3250441966,22),r=c(r,i,n,o,e[4],4118548399,7),o=c(o,r,i,n,e[5],1200080426,12),n=c(n,o,r,i,e[6],2821735955,17),i=c(i,n,o,r,e[7],4249261313,22),r=c(r,i,n,o,e[8],1770035416,7),o=c(o,r,i,n,e[9],2336552879,12),n=c(n,o,r,i,e[10],4294925233,17),i=c(i,n,o,r,e[11],2304563134,22),r=c(r,i,n,o,e[12],1804603682,7),o=c(o,r,i,n,e[13],4254626195,12),n=c(n,o,r,i,e[14],2792965006,17),r=f(r,i=c(i,n,o,r,e[15],1236535329,22),n,o,e[1],4129170786,5),o=f(o,r,i,n,e[6],3225465664,9),n=f(n,o,r,i,e[11],643717713,14),i=f(i,n,o,r,e[0],3921069994,20),r=f(r,i,n,o,e[5],3593408605,5),o=f(o,r,i,n,e[10],38016083,9),n=f(n,o,r,i,e[15],3634488961,14),i=f(i,n,o,r,e[4],3889429448,20),r=f(r,i,n,o,e[9],568446438,5),o=f(o,r,i,n,e[14],3275163606,9),n=f(n,o,r,i,e[3],4107603335,14),i=f(i,n,o,r,e[8],1163531501,20),r=f(r,i,n,o,e[13],2850285829,5),o=f(o,r,i,n,e[2],4243563512,9),n=f(n,o,r,i,e[7],1735328473,14),r=l(r,i=f(i,n,o,r,e[12],2368359562,20),n,o,e[5],4294588738,4),o=l(o,r,i,n,e[8],2272392833,11),n=l(n,o,r,i,e[11],1839030562,16),i=l(i,n,o,r,e[14],4259657740,23),r=l(r,i,n,o,e[1],2763975236,4),o=l(o,r,i,n,e[4],1272893353,11),n=l(n,o,r,i,e[7],4139469664,16),i=l(i,n,o,r,e[10],3200236656,23),r=l(r,i,n,o,e[13],681279174,4),o=l(o,r,i,n,e[0],3936430074,11),n=l(n,o,r,i,e[3],3572445317,16),i=l(i,n,o,r,e[6],76029189,23),r=l(r,i,n,o,e[9],3654602809,4),o=l(o,r,i,n,e[12],3873151461,11),n=l(n,o,r,i,e[15],530742520,16),r=d(r,i=l(i,n,o,r,e[2],3299628645,23),n,o,e[0],4096336452,6),o=d(o,r,i,n,e[7],1126891415,10),n=d(n,o,r,i,e[14],2878612391,15),i=d(i,n,o,r,e[5],4237533241,21),r=d(r,i,n,o,e[12],1700485571,6),o=d(o,r,i,n,e[3],2399980690,10),n=d(n,o,r,i,e[10],4293915773,15),i=d(i,n,o,r,e[1],2240044497,21),r=d(r,i,n,o,e[8],1873313359,6),o=d(o,r,i,n,e[15],4264355552,10),n=d(n,o,r,i,e[6],2734768916,15),i=d(i,n,o,r,e[13],1309151649,21),r=d(r,i,n,o,e[4],4149444226,6),o=d(o,r,i,n,e[11],3174756917,10),n=d(n,o,r,i,e[2],718787259,15),i=d(i,n,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){"use strict";var i=r(16).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(o||n);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,l=!0,s||o.call(t)},h=function(e){o.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new i),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new i),o.call(t,e)):void 0},_=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?_():t.on("request",_)),t.on("end",d),t.on("finish",f),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",_),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}}},function(e,t,r){"use strict";var i=r(2).Buffer,n=r(0),o=r(57),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function _(e,t,r,i,n,o,a,s){return p(e+(t^r^i)+o+a|0,s)+n|0}function m(e,t,r,i,n,o,a,s){return p(e+(t&r|~t&i)+o+a|0,s)+n|0}function b(e,t,r,i,n,o,a,s){return p(e+((t|~r)^i)+o+a|0,s)+n|0}function y(e,t,r,i,n,o,a,s){return p(e+(t&i|r&~i)+o+a|0,s)+n|0}function g(e,t,r,i,n,o,a,s){return p(e+(t^(r|~i))+o+a|0,s)+n|0}n(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,h=0|this._e,v=0|this._a,w=0|this._b,E=0|this._c,S=0|this._d,M=0|this._e,T=0;T<80;T+=1){var A,O;T<16?(A=_(r,i,n,o,h,e[s[T]],l[0],c[T]),O=g(v,w,E,S,M,e[u[T]],d[0],f[T])):T<32?(A=m(r,i,n,o,h,e[s[T]],l[1],c[T]),O=y(v,w,E,S,M,e[u[T]],d[1],f[T])):T<48?(A=b(r,i,n,o,h,e[s[T]],l[2],c[T]),O=b(v,w,E,S,M,e[u[T]],d[2],f[T])):T<64?(A=y(r,i,n,o,h,e[s[T]],l[3],c[T]),O=m(v,w,E,S,M,e[u[T]],d[3],f[T])):(A=g(r,i,n,o,h,e[s[T]],l[4],c[T]),O=_(v,w,E,S,M,e[u[T]],d[4],f[T])),r=h,h=o,o=p(n,10),n=i,i=A,v=M,M=S,S=p(E,10),E=w,w=O}var R=this._b+n+S|0;this._b=this._c+o+M|0,this._c=this._d+h+v|0,this._d=this._e+r+w|0,this._e=this._a+i+E|0,this._a=R},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=i.alloc?i.alloc(20):new i(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(141),t.sha1=r(142),t.sha224=r(143),t.sha256=r(64),t.sha384=r(144),t.sha512=r(65)},function(e,t,r){(t=e.exports=r(66)).Stream=t,t.Readable=t,t.Writable=r(39),t.Duplex=r(14),t.Transform=r(69),t.PassThrough=r(151)},function(e,t,r){var i=r(2),n=i.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=a),o(n,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,r){"use strict";(function(t,i,n){var o=r(27);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:o.nextTick;y.WritableState=b;var c=Object.create(r(23));c.inherits=r(0);var f={deprecate:r(33)},l=r(67),d=r(38).Buffer,h=n.Uint8Array||function(){};var p,_=r(68);function m(){}function b(e,t){s=s||r(14),e=e||{};var i=t instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?(o.nextTick(n,i),o.nextTick(M,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),M(e,t))}(e,r,i,t,n);else{var a=E(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),i?u(v,e,r,a,n):v(e,r,a,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(e){if(s=s||r(14),!(p.call(y,this)||this instanceof s))return new y(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function g(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function v(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),M(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)n[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;n.allBuffers=u,g(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(g(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(y,l),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var i,n=this._writableState,a=!1,s=!n.objectMode&&(i=e,d.isBuffer(i)||i instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=m),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(i,a),n=!1),n}(this,n,e,r))&&(n.pendingcb++,a=function(e,t,r,i,n,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else g(e,t,!1,s,i,n,o);return u}(this,n,s,e,t,r)),a},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=_.destroy,y.prototype._undestroy=_.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(3),r(149).setImmediate,r(5))},function(e,t,r){"use strict";var i=r(7);function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,r){var i=r(164),n=r(172),o=r(82);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var i={ECB:r(165),CBC:r(166),CFB:r(167),CFB8:r(168),CFB1:r(169),OFB:r(170),CTR:r(80),GCM:r(80)},n=r(82);for(var o in n)n[o].module=i[n[o].mode];e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var i;function n(e){this.rand=e}if(e.exports=function(e){return i||(i=new n(null)),i.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(176);if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t,r){"use strict";var i=r(19).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(o||n);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,l=!0,s||o.call(t)},h=function(e){o.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new i),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new i),o.call(t,e)):void 0},_=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?_():t.on("request",_)),t.on("end",d),t.on("finish",f),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",_),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}}},function(e,t,r){(function(t){var i=r(189),n=r(15);function o(e){var t,r=e.modulus.byteLength();do{t=new i(n(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,r){var n=function(e){var t=o(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),a=r.modulus.byteLength(),s=new i(e).mul(n.blinder).umod(r.modulus),u=s.toRed(i.mont(r.prime1)),c=s.toRed(i.mont(r.prime2)),f=r.coefficient,l=r.prime1,d=r.prime2,h=u.redPow(r.exponent1).fromRed(),p=c.redPow(r.exponent2).fromRed(),_=h.isub(p).imul(f).umod(l).imul(d);return p.iadd(_).imul(n.unblinder).umod(r.modulus).toArrayLike(t,"be",a)}a.getr=o,e.exports=a}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var i=t;i.version=r(191).version,i.utils=r(8),i.rand=r(44),i.curve=r(94),i.curves=r(48),i.ec=r(202),i.eddsa=r(206)},function(e,t,r){"use strict";var i,n=t,o=r(49),a=r(94),s=r(8).assert;function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(201)}catch(e){i=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},function(e,t,r){var i=t;i.utils=r(9),i.common=r(25),i.sha=r(195),i.ripemd=r(199),i.hmac=r(200),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(e,t,r){"use strict";(function(t){var i,n=r(2),o=n.Buffer,a={};for(i in n)n.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(a[i]=n[i]);var s=a.Buffer={};for(i in o)o.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(s[i]=o[i]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,r)}),s.alloc||(s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=o(e);return t&&0!==t.length?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i}),!a.kStringMaxLength)try{a.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a}).call(this,r(3))},function(e,t,r){"use strict";const i=r(52).Reporter,n=r(26).EncoderBuffer,o=r(26).DecoderBuffer,a=r(7),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,r){const i={};this._baseState=i,i.name=r,i.enc=e,i.parent=t||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}e.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const i=e[r];t[i]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let i,n=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){let i=null;if(null!==r.explicit?i=r.explicit:null!==r.implicit?i=r.implicit:null!==r.tag&&(i=r.tag),null!==i||r.any){if(a=this._peekTag(e,i,r.any),e.isError(a))return a}else{const i=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(i)}}if(r.obj&&a&&(i=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const i=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const i=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(i))return i;r.any?n=e.raw(t):e=i}if(t&&t.track&&null!==r.tag&&t.track(e.path(),i,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const i=new o(n);n=this._getUse(r.contains,e._reporterState.obj)._decode(i,t)}}return r.obj&&a&&(n=e.leaveObject(i)),null===r.key||null===n&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,n),n},c.prototype._decodeGeneric=function(e,t,r){const i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let i=null,n=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;i={type:o,value:r},n=!0}catch(t){return e.restore(a),!1}return!0}),this),n?i:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},c.prototype._encode=function(e,t,r){const i=this._baseState;if(null!==i.default&&i.default===e)return;const n=this._encodeValue(e,t,r);return void 0===n||this._skipDefault(n,t,r)?void 0:n},c.prototype._encodeValue=function(e,t,r){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new i);let o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let a=null,s=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)a=this._getUse(n.contains,r)._encode(e,t),s=!0;else if(n.children)a=n.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const i=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),n}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){const i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)}),r))}else null!==n.use?o=this._getUse(n.use,r)._encode(e,t):(a=this._encodePrimitive(n.tag,e),s=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,r=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(e,s,r,a))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,i=r.choice[e.type];return i||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,r){"use strict";const i=r(0);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=n,n.prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){const i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){let t;const r=this._reporterState,i=e instanceof o;if(t=i?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return i||r.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},i(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,r){"use strict";function i(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const i=e[r];t[i]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=i(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=i(t.tag)},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(127);let n=i.DefaultSerializer;t.registerSerializer=function(e){n=i.extendSerializer(n,e)},t.deserialize=function(e){return n.deserialize(e)},t.serialize=function(e){return n.serialize(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(128);t.isTransferDescriptor=function(e){return e&&"object"==typeof e&&e[i.$transferable]},t.Transfer=function(e,t){if(!t){if(!(r=e)||"object"!=typeof r)throw Error();t=[e]}var r;return{[i.$transferable]:!0,send:e,transferables:t}}},function(e,t,r){"use strict";var i=r(1).Buffer,n=r(133).Transform;function o(e){n.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,n),o.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,i){var n;e.exports=T,T.ReadableState=M;r(12).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(59),s=r(2).Buffer,u=t.Uint8Array||function(){};var c,f=r(134);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,d,h,p=r(135),_=r(60),m=r(61).getHighWaterMark,b=r(16).codes,y=b.ERR_INVALID_ARG_TYPE,g=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(0)(T,a);var E=_.errorOrDestroy,S=["error","close","destroy","pause","resume"];function M(e,t,i){n=n||r(17),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(13).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function T(e){if(n=n||r(17),!(this instanceof T))return new T(e);var t=this instanceof n;this._readableState=new M(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function A(e,t,r,i,n){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}(e,a);else if(n||(o=function(e,t){var r;i=t,s.isBuffer(i)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(a,t)),o)E(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),i)a.endEmitted?E(e,new w):O(e,a,t,!0);else if(a.ended)E(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):P(e,a)):O(e,a,t,!1)}else i||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function O(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),P(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=_.destroy,T.prototype._undestroy=_.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=s.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},T.prototype.unshift=function(e){return A(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){l||(l=r(13).StringDecoder);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=t.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var R=1073741824;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(x,e))}function x(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,C(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(U,t,e))}function U(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}T.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):I(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&j(this),null;var i,n=t.needReadable;return c("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",n=!0),t.ended||t.reading?c("reading or ended",n=!1):n&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(r,t))),null===(i=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==i&&this.emit("data",i),i},T.prototype._read=function(e){E(this,new v("_read()"))},T.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:m;function s(t,i){c("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",f),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,C(e))}}(r);e.on("drain",f);var l=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==H(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){c("onerror",t),m(),e.removeListener("error",h),0===o(e,"error")&&E(e,t)}function p(){e.removeListener("finish",_),m()}function _(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",_),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?I(this):n.reading||i.nextTick(D,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(F,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(F,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(c("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){c("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(137)),d(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=L,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===h&&(h=r(138)),h(T,e,t)})}).call(this,r(5),r(3))},function(e,t,r){e.exports=r(12).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){n(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(n,this,e)):t.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(i,a):(a._writableState.errorEmitted=!0,t.nextTick(r,a,e)):t.nextTick(r,a,e):o?(t.nextTick(i,a),o(e)):t.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(3))},function(e,t,r){"use strict";var i=r(16).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new i(n?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,i){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=T,T.WritableState=M;var a={deprecate:r(33)},s=r(59),u=r(2).Buffer,c=t.Uint8Array||function(){};var f,l=r(60),d=r(61).getHighWaterMark,h=r(16).codes,p=h.ERR_INVALID_ARG_TYPE,_=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,b=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,g=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function S(){}function M(e,t,a){o=o||r(17),e=e||{},"boolean"!=typeof a&&(a=t instanceof o),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(x,e,t),e._writableState.errorEmitted=!0,E(e,n)):(o(n),e._writableState.errorEmitted=!0,E(e,n),x(e,t))}(e,r,n,t,o);else{var a=N(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?i.nextTick(O,e,r,a,o):O(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(e){var t=this instanceof(o=o||r(17));if(!t&&!f.call(T,this))return new T(e);this._writableState=new M(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function A(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function O(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),x(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,A(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(A(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var r=N(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(0)(T,s),M.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(M.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===T&&(e&&e._writableState instanceof M)}})):f=function(e){return e instanceof this},T.prototype.pipe=function(){E(this,new b)},T.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new v;E(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new g:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,i,n,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,s,i,n,o);return c}(this,o,s,e,t,r)),a},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new _("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(3))},function(e,t,r){"use strict";e.exports=f;var i=r(16).codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,u=r(17);function c(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(0)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new n("_transform()"))},f.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){var i=r(0),n=r(18),o=r(1).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,n.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(u,n),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,_=0|this._g,m=0|this._h,b=0;b<16;++b)r[b]=e.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((t=r[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[b-7]+h(r[b-15])+r[b-16];for(var y=0;y<64;++y){var g=m+d(u)+c(u,p,_)+a[y]+r[y]|0,v=l(i)+f(i,n,o)|0;m=_,_=p,p=u,u=s+g|0,s=o,o=n,n=i,i=g+v|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=_+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var i=r(0),n=r(18),o=r(1).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0<t>>>0?1:0}i(u,n),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,y=0|this._gh,g=0|this._hh,v=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,M=0|this._el,T=0|this._fl,A=0|this._gl,O=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var N=t[R-30],I=t[R-30+1],x=h(N,I),P=p(I,N),k=_(N=t[R-4],I=t[R-4+1]),F=m(I,N),D=t[R-14],B=t[R-14+1],C=t[R-32],L=t[R-32+1],j=P+B|0,U=x+D+b(j,P)|0;U=(U=U+k+b(j=j+F|0,F)|0)+C+b(j=j+L|0,L)|0,t[R]=U,t[R+1]=j}for(var H=0;H<160;H+=2){U=t[H],j=t[H+1];var z=f(r,i,n),X=f(v,w,E),q=l(r,v),Y=l(v,r),W=d(s,M),$=d(M,s),G=a[H],V=a[H+1],K=c(s,u,y),J=c(M,T,A),Q=O+$|0,Z=g+W+b(Q,O)|0;Z=(Z=(Z=Z+K+b(Q=Q+J|0,J)|0)+G+b(Q=Q+V|0,V)|0)+U+b(Q=Q+j|0,j)|0;var ee=Y+X|0,te=q+z+b(ee,Y)|0;g=y,O=A,y=u,A=T,u=s,T=M,s=o+Z+b(M=S+Q|0,S)|0,o=n,S=E,n=i,E=w,i=r,w=v,r=Z+te+b(v=Q+ee|0,Q)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+M|0,this._fl=this._fl+T|0,this._gl=this._gl+A|0,this._hl=this._hl+O|0,this._ah=this._ah+r+b(this._al,v)|0,this._bh=this._bh+i+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+o+b(this._dl,S)|0,this._eh=this._eh+s+b(this._el,M)|0,this._fh=this._fh+u+b(this._fl,T)|0,this._gh=this._gh+y+b(this._gl,A)|0,this._hh=this._hh+g+b(this._hl,O)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){"use strict";(function(t,i){var n=r(27);e.exports=g;var o,a=r(54);g.ReadableState=y;r(12).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r(67),c=r(38).Buffer,f=t.Uint8Array||function(){};var l=Object.create(r(23));l.inherits=r(0);var d=r(146),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,_=r(147),m=r(68);l.inherits(g,u);var b=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var i=t instanceof(o=o||r(14));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(13).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||r(14),!(this instanceof g))return new g(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,r,i,n){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,M(e)}(e,a)):(n||(o=function(e,t){var r;i=t,c.isBuffer(i)||i instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):A(e,a)):w(e,a,t,!1))):i||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&M(e)),A(e,t)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.push(null),t(e)},g.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=c.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},g.prototype.unshift=function(e){return v(this,e,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return p||(p=r(13).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var E=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){h("emit readable"),e.emit("readable"),I(e)}function A(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(O,e,t))}function O(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function R(e){h("readable nexttick read 0"),e.read(0)}function N(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function x(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var i;e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,i=1,n=r.data;e-=n.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t):function(e,t){var r=c.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}(e,t);return i}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(k,t,e))}function k(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function F(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}g.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):M(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var i,n=t.needReadable;return h("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",n=!0),t.ended||t.reading?h("reading or ended",n=!1):n&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(i=e>0?x(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==i&&this.emit("data",i),i},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?f:g;function c(t,i){h("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),e.removeListener("close",b),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",g),r.removeListener("data",_),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){h("onend"),e.end()}o.endEmitted?n.nextTick(u):r.once("end",u),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",l);var d=!1;var p=!1;function _(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function m(t){h("onerror",t),g(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",y),g()}function y(){h("onfinish"),e.removeListener("close",b),g()}function g(){h("unpipe"),r.unpipe(e)}return r.on("data",_),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",b),e.once("finish",y),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,r);return this}var a=F(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},g.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&M(this):n.nextTick(R,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),this},g.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<b.length;o++)e.on(b[o],this.emit.bind(this,b[o]));return this._read=function(t){h("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=x}).call(this,r(5),r(3))},function(e,t,r){e.exports=r(12).EventEmitter},function(e,t,r){"use strict";var i=r(27);function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(i.nextTick(n,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){"use strict";e.exports=a;var i=r(14),n=Object.create(r(23));function o(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);i.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}n.inherits=r(0),n.inherits(a,i),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;i.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";var i=r(0),n=r(156),o=r(11),a=r(1).Buffer,s=r(71),u=r(35),c=r(36),f=a.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=a.concat([t,f],r));for(var i=this._ipad=a.allocUnsafe(r),n=this._opad=a.allocUnsafe(r),s=0;s<r;s++)i[s]=54^t[s],n[s]=92^t[s];this._hash="rmd160"===e?new u:c(e),this._hash.update(i)}i(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new l("rmd160",t):"md5"===e?new n(s,t):new l(e,t)}},function(e,t,r){var i=r(32);e.exports=function(e){return(new i).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,r){t.pbkdf2=r(158),t.pbkdf2Sync=r(76)},function(e,t){var r=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){(function(t){var r;if(t.browser)r="utf-8";else if(t.version){r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,r(3))},function(e,t,r){var i=r(71),n=r(35),o=r(36),a=r(1).Buffer,s=r(74),u=r(75),c=r(77),f=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var s=function(e){function t(t){return o(e).update(t).digest()}function r(e){return(new n).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?i:t}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length<u&&(t=a.concat([t,f],u));for(var c=a.allocUnsafe(u+l[e]),d=a.allocUnsafe(u+l[e]),h=0;h<u;h++)c[h]=54^t[h],d[h]=92^t[h];var p=a.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=d,this.alg=e,this.blocksize=u,this.hash=s,this.size=l[e]}d.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,i,n){s(r,i);var o=new d(n=n||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),f=a.allocUnsafe(i),h=a.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var p=0,_=l[n],m=Math.ceil(i/_),b=1;b<=m;b++){h.writeUInt32BE(b,t.length);for(var y=o.run(h,o.ipad1),g=y,v=1;v<r;v++){g=o.run(g,o.ipad2);for(var w=0;w<_;w++)y[w]^=g[w]}y.copy(f,p),p+=_}return f}},function(e,t,r){var i=r(1).Buffer;e.exports=function(e,t,r){if(i.isBuffer(e))return e;if("string"==typeof e)return i.from(e,t);if(ArrayBuffer.isView(e))return i.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,i){for(var n=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[i+0]=n>>>0,r[i+1]=o>>>0},t.rip=function(e,t,r,i){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)n<<=1,n|=t>>>s+a&1,n<<=1,n|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},t.pc1=function(e,t,r,i){for(var n=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,n){for(var o=0,a=0,s=i.length>>>1,u=0;u<s;u++)o<<=1,o|=e>>>i[u]&1;for(u=s;u<i.length;u++)a<<=1,a|=t>>>i[u]&1;r[n+0]=o>>>0,r[n+1]=a>>>0},t.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=e>>>o&63;for(o=11;o>=3;o-=4)n|=e>>>o&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<o.length;r++)t<<=1,t|=e>>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],o=0;o<t;o+=r)n.push(i.slice(o,o+r));return n.join(" ")}},function(e,t,r){"use strict";var i=r(7),n=r(0),o=r(78),a=r(40);function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}n(u,a),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),i.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),n=o.readUInt32BE(t,4);o.pc1(r,n,e.tmp,0),r=e.tmp[0],n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];r=o.r28shl(r,s),n=o.r28shl(n,s),o.pc2(r,n,e.keys,a)}},u.prototype._update=function(e,t,r,i){var n=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,s,n.tmp,0):this._decrypt(n,a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],o.writeUInt32BE(r,a,i),o.writeUInt32BE(r,s,i+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)i.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,i,n){for(var a=t,s=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],f=e.keys[u+1];o.expand(s,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),d=s;s=(a^o.permute(l))>>>0,a=d}o.rip(s,a,i,n)},u.prototype._decrypt=function(e,t,r,i,n){for(var a=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var l=o.substitute(c,f),d=a;a=(s^o.permute(l))>>>0,s=d}o.rip(a,s,i,n)}},function(e,t,r){var i=r(24),n=r(1).Buffer,o=r(81);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var u=a(e),c=o+16*s;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,f)}},function(e,t){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,r){var i=r(28),n=r(1).Buffer,o=r(11),a=r(0),s=r(171),u=r(24),c=r(81);function f(e,t,r,a){o.call(this);var u=n.alloc(4,0);this._cipher=new i.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var i=new s(r),o=t.length,a=o%16;i.update(t),a&&(a=16-a,i.update(n.alloc(a,0))),i.update(n.alloc(8,0));var u=8*o,f=n.alloc(8);f.writeUIntBE(u,0,8),i.update(f),e._finID=i.state;var l=n.from(e._finID);return c(l),l}(this,r,f),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},function(e,t,r){var i=r(28),n=r(1).Buffer,o=r(11);function a(e,t,r,a){o.call(this),this._cipher=new i.AES(t),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._mode=e}r(0)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},function(e,t,r){var i=r(15);e.exports=y,y.simpleSieve=m,y.fermatTest=b;var n=r(4),o=new n(24),a=new(r(86)),s=new n(1),u=new n(2),c=new n(5),f=(new n(16),new n(8),new n(10)),l=new n(3),d=(new n(7),new n(11)),h=new n(4),p=(new n(12),null);function _(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return p=e,e}function m(e){for(var t=_(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function b(e){var t=n.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function y(e,t){if(e<16)return new n(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new n(t);;){for(r=new n(i(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(l);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(m(p=r.shrn(1))&&m(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},function(e,t,r){var i=r(4),n=r(44);function o(e){this.rand=e||new n.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(e)>=0);return n},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var n=e.bitLength(),o=i.mont(e),a=new i(1).toRed(o);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(o);t>0;t--){var l=this._randrange(new i(2),s);r&&r(l);var d=l.toRed(o).redPow(c);if(0!==d.cmp(a)&&0!==d.cmp(f)){for(var h=1;h<u;h++){if(0===(d=d.redSqr()).cmp(a))return!1;if(0===d.cmp(f))break}if(h===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),n=i.mont(e),o=new i(1).toRed(n);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var u=e.shrn(s),c=a.toRed(n);t>0;t--){var f=this._randrange(new i(2),a),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(n).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var h=1;h<s;h++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(c))break}if(h===s)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,r){"use strict";(function(t,i){var n;e.exports=T,T.ReadableState=M;r(12).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(88),s=r(2).Buffer,u=t.Uint8Array||function(){};var c,f=r(181);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,d,h,p=r(182),_=r(89),m=r(90).getHighWaterMark,b=r(19).codes,y=b.ERR_INVALID_ARG_TYPE,g=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(0)(T,a);var E=_.errorOrDestroy,S=["error","close","destroy","pause","resume"];function M(e,t,i){n=n||r(20),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(13).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function T(e){if(n=n||r(20),!(this instanceof T))return new T(e);var t=this instanceof n;this._readableState=new M(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function A(e,t,r,i,n){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}(e,a);else if(n||(o=function(e,t){var r;i=t,s.isBuffer(i)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var i;return r}(a,t)),o)E(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),i)a.endEmitted?E(e,new w):O(e,a,t,!0);else if(a.ended)E(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):P(e,a)):O(e,a,t,!1)}else i||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function O(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),P(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=_.destroy,T.prototype._undestroy=_.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=s.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},T.prototype.unshift=function(e){return A(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){l||(l=r(13).StringDecoder);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=t.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var R=1073741824;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(x,e))}function x(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,C(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(U,t,e))}function U(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}T.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):I(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&j(this),null;var i,n=t.needReadable;return c("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",n=!0),t.ended||t.reading?c("reading or ended",n=!1):n&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(r,t))),null===(i=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==i&&this.emit("data",i),i},T.prototype._read=function(e){E(this,new v("_read()"))},T.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:m;function s(t,i){c("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",f),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",d),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,C(e))}}(r);e.on("drain",f);var l=!1;function d(t){c("ondata");var i=e.write(t);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==H(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){c("onerror",t),m(),e.removeListener("error",h),0===o(e,"error")&&E(e,t)}function p(){e.removeListener("finish",_),m()}function _(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",_),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?I(this):n.reading||i.nextTick(D,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(F,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(F,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(B,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(c("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){c("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=r(184)),d(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=L,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===h&&(h=r(185)),h(T,e,t)})}).call(this,r(5),r(3))},function(e,t,r){e.exports=r(12).EventEmitter},function(e,t,r){"use strict";(function(t){function r(e,t){n(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(n,this,e)):t.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(i,a):(a._writableState.errorEmitted=!0,t.nextTick(r,a,e)):t.nextTick(r,a,e):o?(t.nextTick(i,a),o(e)):t.nextTick(i,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(3))},function(e,t,r){"use strict";var i=r(19).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new i(n?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},function(e,t,r){"use strict";(function(t,i){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=T,T.WritableState=M;var a={deprecate:r(33)},s=r(88),u=r(2).Buffer,c=t.Uint8Array||function(){};var f,l=r(89),d=r(90).getHighWaterMark,h=r(19).codes,p=h.ERR_INVALID_ARG_TYPE,_=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,b=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,g=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function S(){}function M(e,t,a){o=o||r(20),e=e||{},"boolean"!=typeof a&&(a=t instanceof o),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(x,e,t),e._writableState.errorEmitted=!0,E(e,n)):(o(n),e._writableState.errorEmitted=!0,E(e,n),x(e,t))}(e,r,n,t,o);else{var a=N(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?i.nextTick(O,e,r,a,o):O(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(e){var t=this instanceof(o=o||r(20));if(!t&&!f.call(T,this))return new T(e);this._writableState=new M(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function A(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function O(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),x(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,A(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(A(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var r=N(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(0)(T,s),M.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(M.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===T&&(e&&e._writableState instanceof M)}})):f=function(e){return e instanceof this},T.prototype.pipe=function(){E(this,new b)},T.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new v;E(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new g:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,i,n,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,s,i,n,o);return c}(this,o,s,e,t,r)),a},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new _("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(3))},function(e,t,r){"use strict";e.exports=f;var i=r(19).codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,u=r(20);function c(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(0)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new n("_transform()"))},f.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){"use strict";var i=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,a=255&n;o?r.push(o,a):r.push(a)}return r},i.zero2=n,i.toHex=o,i.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var i=t;i.base=r(30),i.short=r(192),i.mont=r(193),i.edwards=r(194)},function(e,t,r){"use strict";var i=r(9).rotr32;function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,i){return 0===e?n(t,r,i):1===e||3===e?a(t,r,i):2===e?o(t,r,i):void 0},t.ch32=n,t.maj32=o,t.p32=a,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},function(e,t,r){"use strict";var i=r(9),n=r(25),o=r(95),a=r(7),s=i.sum32,u=i.sum32_4,c=i.sum32_5,f=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,_=o.g1_256,m=n.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}i.inherits(y,m),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=u(_(r[i-2]),r[i-7],p(r[i-15]),r[i-16]);var n=this.h[0],o=this.h[1],m=this.h[2],b=this.h[3],y=this.h[4],g=this.h[5],v=this.h[6],w=this.h[7];for(a(this.k.length===r.length),i=0;i<r.length;i++){var E=c(w,h(y),f(y,g,v),this.k[i],r[i]),S=s(d(n),l(n,o,m));w=v,v=g,g=y,y=s(b,E),b=m,m=o,o=n,n=s(E,S)}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],g),this.h[6]=s(this.h[6],v),this.h[7]=s(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(e,t,r){"use strict";var i=r(9),n=r(25),o=r(7),a=i.rotr64_hi,s=i.rotr64_lo,u=i.shr64_hi,c=i.shr64_lo,f=i.sum64,l=i.sum64_hi,d=i.sum64_lo,h=i.sum64_4_hi,p=i.sum64_4_lo,_=i.sum64_5_hi,m=i.sum64_5_lo,b=n.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function v(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function w(e,t,r,i,n,o){var a=t&i^~t&o;return a<0&&(a+=4294967296),a}function E(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function S(e,t,r,i,n,o){var a=t&i^t&o^i&o;return a<0&&(a+=4294967296),a}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function N(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}i.inherits(g,b),e.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=I(r[i-4],r[i-3]),o=x(r[i-4],r[i-3]),a=r[i-14],s=r[i-13],u=R(r[i-30],r[i-29]),c=N(r[i-30],r[i-29]),f=r[i-32],l=r[i-31];r[i]=h(n,o,a,s,u,c,f,l),r[i+1]=p(n,o,a,s,u,c,f,l)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],n=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],h=this.h[6],p=this.h[7],b=this.h[8],y=this.h[9],g=this.h[10],R=this.h[11],N=this.h[12],I=this.h[13],x=this.h[14],P=this.h[15];o(this.k.length===r.length);for(var k=0;k<r.length;k+=2){var F=x,D=P,B=A(b,y),C=O(b,y),L=v(b,y,g,R,N),j=w(b,y,g,R,N,I),U=this.k[k],H=this.k[k+1],z=r[k],X=r[k+1],q=_(F,D,B,C,L,j,U,H,z,X),Y=m(F,D,B,C,L,j,U,H,z,X);F=M(i,n),D=T(i,n),B=E(i,n,a,s,u),C=S(i,n,a,s,u,c);var W=l(F,D,B,C),$=d(F,D,B,C);x=N,P=I,N=g,I=R,g=b,R=y,b=l(h,p,q,Y),y=d(p,p,q,Y),h=u,p=c,u=a,c=s,a=i,s=n,i=l(q,Y,W,$),n=d(q,Y,W,$)}f(this.h,0,i,n),f(this.h,2,a,s),f(this.h,4,u,c),f(this.h,6,h,p),f(this.h,8,b,y),f(this.h,10,g,R),f(this.h,12,N,I),f(this.h,14,x,P)},g.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(e,t,r){(function(e){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(209).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function u(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function c(e,t,r,n){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;o*=n,a=c>=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&a<n,"Invalid character"),o+=a}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=i)u=c(e,f,f+i,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|o)).toString(16);r=0!==(o=s>>>24-n&16777215)||a!==this.length-1?d[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var _=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?_+r:d[c-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var f=u>>>26,l=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;f+=(a=(n=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r>=0)for(e[r--]=i;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var i,n,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,_=h>>>13,m=0|a[2],b=8191&m,y=m>>>13,g=0|a[3],v=8191&g,w=g>>>13,E=0|a[4],S=8191&E,M=E>>>13,T=0|a[5],A=8191&T,O=T>>>13,R=0|a[6],N=8191&R,I=R>>>13,x=0|a[7],P=8191&x,k=x>>>13,F=0|a[8],D=8191&F,B=F>>>13,C=0|a[9],L=8191&C,j=C>>>13,U=0|s[0],H=8191&U,z=U>>>13,X=0|s[1],q=8191&X,Y=X>>>13,W=0|s[2],$=8191&W,G=W>>>13,V=0|s[3],K=8191&V,J=V>>>13,Q=0|s[4],Z=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,de=fe>>>13,he=0|s[9],pe=8191&he,_e=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(i=Math.imul(l,H))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,H),n=(n=Math.imul(p,z))+Math.imul(_,H)|0,o=Math.imul(_,z);var be=(c+(i=i+Math.imul(l,q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,H),n=(n=Math.imul(b,z))+Math.imul(y,H)|0,o=Math.imul(y,z),i=i+Math.imul(p,q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Y)|0;var ye=(c+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(v,H),n=(n=Math.imul(v,z))+Math.imul(w,H)|0,o=Math.imul(w,z),i=i+Math.imul(b,q)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,Y)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0;var ge=(c+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,J)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(S,H),n=(n=Math.imul(S,z))+Math.imul(M,H)|0,o=Math.imul(M,z),i=i+Math.imul(v,q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0;var ve=(c+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(A,H),n=(n=Math.imul(A,z))+Math.imul(O,H)|0,o=Math.imul(O,z),i=i+Math.imul(S,q)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Y)|0,i=i+Math.imul(v,$)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,i=i+Math.imul(b,K)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,J)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,ee)|0;var we=(c+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(N,H),n=(n=Math.imul(N,z))+Math.imul(I,H)|0,o=Math.imul(I,z),i=i+Math.imul(A,q)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,i=i+Math.imul(v,K)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,J)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0;var Ee=(c+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(P,H),n=(n=Math.imul(P,z))+Math.imul(k,H)|0,o=Math.imul(k,z),i=i+Math.imul(N,q)|0,n=(n=n+Math.imul(N,Y)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,Y)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,i=i+Math.imul(v,Z)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,ee)|0,i=i+Math.imul(b,re)|0,n=(n=n+Math.imul(b,ie)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0;var Se=(c+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(D,H),n=(n=Math.imul(D,z))+Math.imul(B,H)|0,o=Math.imul(B,z),i=i+Math.imul(P,q)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,Y)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,J)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ie)|0,i=i+Math.imul(b,oe)|0,n=(n=n+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0;var Me=(c+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(L,H),n=(n=Math.imul(L,z))+Math.imul(j,H)|0,o=Math.imul(j,z),i=i+Math.imul(D,q)|0,n=(n=n+Math.imul(D,Y)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Y)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(N,K)|0,n=(n=n+Math.imul(N,J)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ie)|0,i=i+Math.imul(v,oe)|0,n=(n=n+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,i=i+Math.imul(b,ue)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Te=(c+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,_e)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,_e)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(L,q),n=(n=Math.imul(L,Y))+Math.imul(j,q)|0,o=Math.imul(j,Y),i=i+Math.imul(D,$)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,ee)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(A,re)|0,n=(n=n+Math.imul(A,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,i=i+Math.imul(v,ue)|0,n=(n=n+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,i=i+Math.imul(b,le)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Ae=(c+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,_e)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(L,$),n=(n=Math.imul(L,G))+Math.imul(j,$)|0,o=Math.imul(j,G),i=i+Math.imul(D,K)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(N,re)|0,n=(n=n+Math.imul(N,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,i=i+Math.imul(v,le)|0,n=(n=n+Math.imul(v,de)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,de)|0;var Oe=(c+(i=i+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,_e)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,_e)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(L,K),n=(n=Math.imul(L,J))+Math.imul(j,K)|0,o=Math.imul(j,J),i=i+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(N,oe)|0,n=(n=n+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,i=i+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Re=(c+(i=i+Math.imul(v,pe)|0)|0)+((8191&(n=(n=n+Math.imul(v,_e)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,_e)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(L,Z),n=(n=Math.imul(L,ee))+Math.imul(j,Z)|0,o=Math.imul(j,ee),i=i+Math.imul(D,re)|0,n=(n=n+Math.imul(D,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,i=i+Math.imul(N,ue)|0,n=(n=n+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,i=i+Math.imul(A,le)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Ne=(c+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,_e)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,_e)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(L,re),n=(n=Math.imul(L,ie))+Math.imul(j,re)|0,o=Math.imul(j,ie),i=i+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,i=i+Math.imul(N,le)|0,n=(n=n+Math.imul(N,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Ie=(c+(i=i+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,_e)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,_e)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(L,oe),n=(n=Math.imul(L,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),i=i+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var xe=(c+(i=i+Math.imul(N,pe)|0)|0)+((8191&(n=(n=n+Math.imul(N,_e)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,_e)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(L,ue),n=(n=Math.imul(L,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),i=i+Math.imul(D,le)|0,n=(n=n+Math.imul(D,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Pe=(c+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,_e)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,_e)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(L,le),n=(n=Math.imul(L,de))+Math.imul(j,le)|0,o=Math.imul(j,de);var ke=(c+(i=i+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,_e)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,_e)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Fe=(c+(i=Math.imul(L,pe))|0)+((8191&(n=(n=Math.imul(L,_e))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,_e))+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,u[0]=me,u[1]=be,u[2]=ye,u[3]=ge,u[4]=ve,u[5]=we,u[6]=Ee,u[7]=Se,u[8]=Me,u[9]=Te,u[10]=Ae,u[11]=Oe,u[12]=Re,u[13]=Ne,u[14]=Ie,u[15]=xe,u[16]=Pe,u[17]=ke,u[18]=Fe,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var a=n;n=0;for(var s=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),d=67108863&l;s=67108863&(d=d+s|0),n+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(e,t,r){return b(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=_),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?_(this,e,t):r<1024?b(this,e,t):y(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a<o;a++)i[a]=t[e[a]],n[a]=r[e[a]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<n;f+=s)for(var l=u,d=c,h=0;h<a;h++){var p=r[f+h],_=i[f+h],m=r[f+h+a],b=i[f+h+a],y=l*m-d*b;b=l*b+d*m,m=y,r[f+h]=p+m,i[f+h]=_+b,r[f+h+a]=p-m,i[f+h+a]=_-b,h!==s&&(y=u*l-c*d,d=u*d+c*l,l=y)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<n;++a)r[a]=0;i(0===o),i(0==(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),a=new Array(i),s=new Array(i),u=new Array(i),c=new Array(i),f=new Array(i),l=new Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,a,i),this.convert13b(t.words,t.length,c,i),this.transform(a,o,s,u,i,n),this.transform(c,o,f,l,i,n);for(var h=0;h<i;h++){var p=s[h]*f[h]-u[h]*l[h];u[h]=s[h]*l[h]+u[h]*f[h],s[h]=p}return this.conjugate(s,u,i),this.transform(s,u,d,o,i,n),this.conjugate(d,o,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),i("number"==typeof e),i(e<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=e.words[i]>>>n&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,a=e.length+r;this._expand(a);var s=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+s;var u=(0|e.words[n])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)s=(o=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=i.clone()._ishlnsubmul(n,1,u);0===f.negative&&(i=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(n,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(l)),n.iushrn(1),a.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),a.isub(u)):(r.isub(t),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(n=0===t.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(E,w),E.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,w),n(M,w),n(T,w),T.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new S;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return v[e]=t,t},A.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),d=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=a;0!==h.cmp(s);){for(var _=h,m=0;0!==_.cmp(s);m++)_=_.redSqr();i(m<p);var b=this.pow(l,new o(1).iushln(p-m-1));d=d.redMul(b),l=b.redSqr(),h=h.redMul(l),p=m}return d},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var c=t.words[i],f=u-1;f>=0;f--){var l=c>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},n(O,A),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(43)(e))},function(e,t,r){"use strict";const i=t;i.bignum=r(4),i.define=r(211).define,i.base=r(214),i.constants=r(215),i.decoders=r(102),i.encoders=r(100)},function(e,t,r){"use strict";const i=t;i.der=r(101),i.pem=r(212)},function(e,t,r){"use strict";const i=r(0),n=r(50).Buffer,o=r(51),a=r(53);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(u,o),u.prototype._encodeComposite=function(e,t,r,i){const o=function(e,t,r,i){let n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))n=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}if(n>=31)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=a.tagClassByName[r||"universal"]<<6,n}(e,t,r,this.reporter);if(i.length<128){const e=n.alloc(2);return e[0]=o,e[1]=i.length,this._createEncoderBuffer([e,i])}let s=1;for(let e=i.length;e>=256;e>>=8)s++;const u=n.alloc(2+s);u[0]=o,u[1]=128|s;for(let e=1+s,t=i.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,i])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=n.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let i=0;for(let t=0;t<e.length;t++){let r=e[t];for(i++;r>=128;r>>=7)i++}const o=n.alloc(i);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const i=new Date(e);return"gentime"===t?r=[c(i.getUTCFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(i.getUTCFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!n.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=n.from(t)}if(n.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=n.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const i=new Array(r);for(let t=i.length-1;t>=0;t--)i[t]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(n.from(i))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const i=this._baseState;let n;if(null===i.default)return!1;const o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(e,t,r){"use strict";const i=t;i.der=r(103),i.pem=r(213)},function(e,t,r){"use strict";const i=r(0),n=r(4),o=r(26).DecoderBuffer,a=r(51),s=r(53);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function f(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const i=s.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){let i=r;for(r=0;128==(128&i);){if(i=e.readUInt8(t),e.isError(i))return i;r<<=7,r|=127&i}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:s.tag[r]}}function l(e,t,r){let i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;const n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(let t=0;t<n;t++){i<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;i|=t}return i}e.exports=u,u.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},i(c,a),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const i=e.save(),n=f(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){const i=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;let n=l(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(i.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');const o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const r=f(e,t);if(e.isError(r))return r;const i=l(e,r.primitive,t);if(e.isError(i))return i;let n;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,i){const n=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",i);if(e.isError(o)&&t)break;n.push(o)}return n},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){let i;const n=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(n.push(o),o=0);128&a&&n.push(o);const s=n[0]/40|0,u=n[0]%40;if(i=r?n:[s,u].concat(n.slice(1)),t){let e=t[i.join(" ")];void 0===e&&(e=t[i.join(".")]),void 0!==e&&(i=e)}return i},c.prototype._decodeTime=function(e,t){const r=e.raw().toString();let i,n,o,a,s,u;if("gentime"===t)i=0|r.slice(0,4),n=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,o,a,s,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const r=e.raw();let i=new n(r);return t&&(i=t[i.toString(10)]||i),i},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,r){var i=r(22),n=r(1).Buffer;function o(e){var t=n.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=n.alloc(0),s=0;a.length<t;)r=o(s++),a=n.concat([a,i("sha1").update(e).update(r).digest()]);return a.slice(0,t)}},function(e,t){e.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},function(e,t,r){var i=r(4),n=r(1).Buffer;e.exports=function(e,t){return n.from(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return e.apply(t,r)}}},function(e,t,r){"use strict";var i=r(6);function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(i.isURLSearchParams(t))o=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(n(t)+"="+n(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var i=r(6),n=r(230),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(s=r(112)),s),transformRequest:[function(e,t){return n(t,"Accept"),n(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){u.headers[e]=i.merge(o)})),e.exports=u}).call(this,r(3))},function(e,t,r){"use strict";var i=r(6),n=r(231),o=r(233),a=r(109),s=r(234),u=r(237),c=r(238),f=r(113);e.exports=function(e){return new Promise((function(t,r){var l=e.data,d=e.headers;i.isFormData(l)&&delete d["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(p+":"+_)}var m=s(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:i,config:e,request:h};n(t,r,o),h=null}},h.onabort=function(){h&&(r(f("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){r(f("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,"ECONNABORTED",h)),h=null},i.isStandardBrowserEnv()){var b=(e.withCredentials||c(m))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}if("setRequestHeader"in h&&i.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),r(e),h=null)})),l||(l=null),h.send(l)}))}},function(e,t,r){"use strict";var i=r(232);e.exports=function(e,t,r,n,o){var a=new Error(e);return i(a,t,r,n,o)}},function(e,t,r){"use strict";var i=r(6);e.exports=function(e,t){t=t||{};var r={},n=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function c(n){i.isUndefined(t[n])?i.isUndefined(e[n])||(r[n]=u(void 0,e[n])):r[n]=u(e[n],t[n])}i.forEach(n,(function(e){i.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),i.forEach(o,c),i.forEach(a,(function(n){i.isUndefined(t[n])?i.isUndefined(e[n])||(r[n]=u(void 0,e[n])):r[n]=u(void 0,t[n])})),i.forEach(s,(function(i){i in t?r[i]=u(e[i],t[i]):i in e&&(r[i]=u(void 0,e[i]))}));var f=n.concat(o).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return i.forEach(l,c),r}},function(e,t,r){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(global,Buffer){__webpack_require__.d(__webpack_exports__,"a",(function(){return bson_47}));var long__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(21),long__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(long__WEBPACK_IMPORTED_MODULE_0__),buffer__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2),buffer__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(buffer__WEBPACK_IMPORTED_MODULE_1__),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var map=createCommonjsModule((function(e){if(void 0!==commonjsGlobal.Map)e.exports=commonjsGlobal.Map,e.exports.Map=commonjsGlobal.Map;else{var t=function(e){this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],i=r[0],n=r[1];this._keys.push(i),this._values[i]={v:n,i:this._keys.length-1}}};t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},t.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},t.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(t,this._values[i].v,i,t)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return null!=this._values[e]},t.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},t.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(t.prototype,"size",{enumerable:!0,get:function(){return this._keys.length}}),e.exports=t}})),map_1=map.Map;long__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},long__WEBPACK_IMPORTED_MODULE_0___default.a.fromExtendedJSON=function(e,t){var r=long__WEBPACK_IMPORTED_MODULE_0___default.a.fromString(e.$numberLong);return t&&t.relaxed?r.toNumber():r},Object.defineProperty(long__WEBPACK_IMPORTED_MODULE_0___default.a.prototype,"_bsontype",{value:"Long"});var long_1=long__WEBPACK_IMPORTED_MODULE_0___default.a;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var Double=function(){function e(t){_classCallCheck(this,e),t instanceof Number&&(t=t.valueOf()),this.value=t}return _createClass(e,[{key:"valueOf",value:function(){return this.value}},{key:"toJSON",value:function(){return this.value}},{key:"toExtendedJSON",value:function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:{$numberDouble:this.value.toString()}}}],[{key:"fromExtendedJSON",value:function(t,r){return r&&r.relaxed?parseFloat(t.$numberDouble):new e(parseFloat(t.$numberDouble))}}]),e}();Object.defineProperty(Double.prototype,"_bsontype",{value:"Double"});var double_1=Double;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Timestamp=function(e){function t(e,r){var i;return _classCallCheck$1(this,t),i=long_1.isLong(e)?_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e.low,e.high,!0)):_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,r,!0)),_possibleConstructorReturn(i)}return _inherits(t,e),_createClass$1(t,[{key:"toJSON",value:function(){return{$timestamp:this.toString()}}},{key:"toExtendedJSON",value:function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}}}],[{key:"fromInt",value:function(e){return new t(long_1.fromInt(e,!0))}},{key:"fromNumber",value:function(e){return new t(long_1.fromNumber(e,!0))}},{key:"fromBits",value:function(e,r){return new t(e,r)}},{key:"fromString",value:function(e,r){return new t(long_1.fromString(e,r,!0))}},{key:"fromExtendedJSON",value:function(e){return new t(e.$timestamp.i,e.$timestamp.t)}}]),t}(long_1);Object.defineProperty(Timestamp.prototype,"_bsontype",{value:"Timestamp"}),Timestamp.MAX_VALUE=Timestamp.MAX_UNSIGNED_VALUE;var timestamp=Timestamp,require$$0={};function normalizedFunctionString(e){return e.toString().replace("function(","function (")}function insecureRandomBytes(e){for(var t=new Uint8Array(e),r=0;r<e;++r)t[r]=Math.floor(256*Math.random());return t}var randomBytes=insecureRandomBytes;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)randomBytes=function(e){return window.crypto.getRandomValues(new Uint8Array(e))};else{try{randomBytes=require$$0.randomBytes}catch(e){}null==randomBytes&&(randomBytes=insecureRandomBytes)}var utils={normalizedFunctionString:normalizedFunctionString,randomBytes:randomBytes};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}"function"==typeof global.setTimeout&&(cachedSetTimeout=setTimeout),"function"==typeof global.clearTimeout&&(cachedClearTimeout=clearTimeout);var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function nextTick(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)}function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)};var title="browser",platform="browser",browser=!0,env={},argv=[],version="",versions={},release={},config={};function noop(){}var on=noop,addListener=noop,once=noop,off=noop,removeListener=noop,removeAllListeners=noop,emit=noop;function binding(e){throw new Error("process.binding is not supported")}function cwd(){return"/"}function chdir(e){throw new Error("process.chdir is not supported")}function umask(){return 0}var performance=global.performance||{},performanceNow=performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()};function hrtime(e){var t=.001*performanceNow.call(performance),r=Math.floor(t),i=Math.floor(t%1*1e9);return e&&(r-=e[0],(i-=e[1])<0&&(r--,i+=1e9)),[r,i]}var startTime=new Date;function uptime(){return(new Date-startTime)/1e3}var process={nextTick:nextTick,title:title,browser:browser,env:env,argv:argv,version:version,versions:versions,on:on,addListener:addListener,once:once,off:off,removeListener:removeListener,removeAllListeners:removeAllListeners,emit:emit,binding:binding,cwd:cwd,chdir:chdir,umask:umask,hrtime:hrtime,platform:platform,release:release,config:config,uptime:uptime},inherits;inherits="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};var inherits$1=inherits;function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var formatRegExp=/%[sdj%]/g;function format(e){if(!isString(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(inspect(arguments[r]));return t.join(" ")}r=1;for(var i=arguments,n=i.length,o=String(e).replace(formatRegExp,(function(e){if("%%"===e)return"%";if(r>=n)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}})),a=i[r];r<n;a=i[++r])isNull(a)||!isObject(a)?o+=" "+a:o+=" "+inspect(a);return o}function deprecate(e,t){if(isUndefined(global.process))return function(){return deprecate(e,t).apply(this,arguments)};var r=!1;return function(){return r||(console.error(t),r=!0),e.apply(this,arguments)}}var debugs={},debugEnviron;function debuglog(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){debugs[e]=function(){var t=format.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else debugs[e]=function(){};return debugs[e]}function inspect(e,t){var r={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),isBoolean(t)?r.showHidden=t:t&&_extend(r,t),isUndefined(r.showHidden)&&(r.showHidden=!1),isUndefined(r.depth)&&(r.depth=2),isUndefined(r.colors)&&(r.colors=!1),isUndefined(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=stylizeWithColor),formatValue(r,e,r.depth)}function stylizeWithColor(e,t){var r=inspect.styles[t];return r?"["+inspect.colors[r][0]+"m"+e+"["+inspect.colors[r][1]+"m":e}function stylizeNoColor(e,t){return e}function arrayToHash(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}function formatValue(e,t,r){if(e.customInspect&&t&&isFunction(t.inspect)&&t.inspect!==inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return isString(i)||(i=formatValue(e,i,r)),i}var n=formatPrimitive(e,t);if(n)return n;var o=Object.keys(t),a=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),isError(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(t);if(0===o.length){if(isFunction(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(isRegExp(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(isDate(t))return e.stylize(Date.prototype.toString.call(t),"date");if(isError(t))return formatError(t)}var u,c="",f=!1,l=["{","}"];(isArray(t)&&(f=!0,l=["[","]"]),isFunction(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return isRegExp(t)&&(c=" "+RegExp.prototype.toString.call(t)),isDate(t)&&(c=" "+Date.prototype.toUTCString.call(t)),isError(t)&&(c=" "+formatError(t)),0!==o.length||f&&0!=t.length?r<0?isRegExp(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=f?formatArray(e,t,r,a,o):o.map((function(i){return formatProperty(e,t,r,a,i,f)})),e.seen.pop(),reduceToSingleString(u,c,l)):l[0]+c+l[1]}function formatPrimitive(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return isNumber(t)?e.stylize(""+t,"number"):isBoolean(t)?e.stylize(""+t,"boolean"):isNull(t)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,t,r,i,n){for(var o=[],a=0,s=t.length;a<s;++a)hasOwnProperty(t,String(a))?o.push(formatProperty(e,t,r,i,String(a),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(formatProperty(e,t,r,i,n,!0))})),o}function formatProperty(e,t,r,i,n,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),hasOwnProperty(i,n)||(a="["+n+"]"),s||(e.seen.indexOf(u.value)<0?(s=isNull(r)?formatValue(e,u.value,null):formatValue(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),isUndefined(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function reduceToSingleString(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"===_typeof$1(e)}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"===_typeof$1(e)&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===_typeof$1(e)||void 0===e}function isBuffer(e){return Buffer.isBuffer(e)}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp$1(){var e=new Date,t=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],t].join(" ")}function log(){console.log("%s - %s",timestamp$1(),format.apply(null,arguments))}function _extend(e,t){if(!t||!isObject(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var util={inherits:inherits$1,_extend:_extend,log:log,isBuffer:isBuffer,isPrimitive:isPrimitive,isFunction:isFunction,isError:isError,isDate:isDate,isObject:isObject,isRegExp:isRegExp,isUndefined:isUndefined,isSymbol:isSymbol,isString:isString,isNumber:isNumber,isNullOrUndefined:isNullOrUndefined,isNull:isNull,isBoolean:isBoolean,isArray:isArray,inspect:inspect,deprecate:deprecate,format:format,debuglog:debuglog};function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$2(e,t,r){return t&&_defineProperties$2(e.prototype,t),r&&_defineProperties$2(e,r),e}var Buffer$1=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,randomBytes$1=utils.randomBytes,deprecate$1=util.deprecate,PROCESS_UNIQUE=randomBytes$1(5),checkForHexRegExp=new RegExp("^[0-9a-fA-F]{24}$"),hasBufferType=!1;try{Buffer$1&&Buffer$1.from&&(hasBufferType=!0)}catch(e){hasBufferType=!1}for(var hexTable=[],_i=0;_i<256;_i++)hexTable[_i]=(_i<=15?"0":"")+_i.toString(16);for(var decodeLookup=[],i=0;i<10;)decodeLookup[48+i]=i++;for(;i<16;)decodeLookup[55+i]=decodeLookup[87+i]=i++;var _Buffer=Buffer$1;function convertToHex(e){return e.toString("hex")}function makeObjectIdError(e,t){var r=e[t];return new TypeError('ObjectId string "'.concat(e,'" contains invalid character "').concat(r,'" with character code (').concat(e.charCodeAt(t),"). All character codes for a non-hex string must be less than 256."))}var ObjectId=function(){function e(t){if(_classCallCheck$2(this,e),t instanceof e)return t;if(null==t||"number"==typeof t)return this.id=e.generate(t),void(e.cacheHexString&&(this.__id=this.toString("hex")));var r=e.isValid(t);if(!r&&null!=t)throw new TypeError("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(r&&"string"==typeof t&&24===t.length&&hasBufferType)return new e(Buffer$1.from(t,"hex"));if(r&&"string"==typeof t&&24===t.length)return e.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&t.toHexString)return e.createFromHexString(t.toHexString());throw new TypeError("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t,e.cacheHexString&&(this.__id=this.toString("hex"))}return _createClass$2(e,[{key:"toHexString",value:function(){if(e.cacheHexString&&this.__id)return this.__id;var t="";if(!this.id||!this.id.length)throw new TypeError("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(this.id instanceof _Buffer)return t=convertToHex(this.id),e.cacheHexString&&(this.__id=t),t;for(var r=0;r<this.id.length;r++){var i=hexTable[this.id.charCodeAt(r)];if("string"!=typeof i)throw makeObjectIdError(this.id,r);t+=i}return e.cacheHexString&&(this.__id=t),t}},{key:"toString",value:function(e){return this.id&&this.id.copy?this.id.toString("string"==typeof e?e:"hex"):this.toHexString()}},{key:"toJSON",value:function(){return this.toHexString()}},{key:"equals",value:function(t){return t instanceof e?this.toString()===t.toString():"string"==typeof t&&e.isValid(t)&&12===t.length&&this.id instanceof _Buffer?t===this.id.toString("binary"):"string"==typeof t&&e.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&e.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof e||t.toHexString))&&t.toHexString()===this.toHexString()}},{key:"getTimestamp",value:function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e}},{key:"toExtendedJSON",value:function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}}],[{key:"getInc",value:function(){return e.index=(e.index+1)%16777215}},{key:"generate",value:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3));var r=e.getInc(),i=Buffer$1.alloc(12);return i[3]=255&t,i[2]=t>>8&255,i[1]=t>>16&255,i[0]=t>>24&255,i[4]=PROCESS_UNIQUE[0],i[5]=PROCESS_UNIQUE[1],i[6]=PROCESS_UNIQUE[2],i[7]=PROCESS_UNIQUE[3],i[8]=PROCESS_UNIQUE[4],i[11]=255&r,i[10]=r>>8&255,i[9]=r>>16&255,i}},{key:"createPk",value:function(){return new e}},{key:"createFromTime",value:function(t){var r=Buffer$1.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r[3]=255&t,r[2]=t>>8&255,r[1]=t>>16&255,r[0]=t>>24&255,new e(r)}},{key:"createFromHexString",value:function(t){if(void 0===t||null!=t&&24!==t.length)throw new TypeError("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(hasBufferType)return new e(Buffer$1.from(t,"hex"));for(var r=new _Buffer(12),i=0,n=0;n<24;)r[i++]=decodeLookup[t.charCodeAt(n++)]<<4|decodeLookup[t.charCodeAt(n++)];return new e(r)}},{key:"isValid",value:function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&checkForHexRegExp.test(t):t instanceof e||(t instanceof _Buffer&&12===t.length||!!t.toHexString&&(12===t.id.length||24===t.id.length&&checkForHexRegExp.test(t.id)))))}},{key:"fromExtendedJSON",value:function(t){return new e(t.$oid)}}]),e}();ObjectId.get_inc=deprecate$1((function(){return ObjectId.getInc()}),"Please use the static `ObjectId.getInc()` instead"),ObjectId.prototype.get_inc=deprecate$1((function(){return ObjectId.getInc()}),"Please use the static `ObjectId.getInc()` instead"),ObjectId.prototype.getInc=deprecate$1((function(){return ObjectId.getInc()}),"Please use the static `ObjectId.getInc()` instead"),ObjectId.prototype.generate=deprecate$1((function(e){return ObjectId.generate(e)}),"Please use the static `ObjectId.generate(time)` instead"),Object.defineProperty(ObjectId.prototype,"generationTime",{enumerable:!0,get:function(){return this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24},set:function(e){this.id[3]=255&e,this.id[2]=e>>8&255,this.id[1]=e>>16&255,this.id[0]=e>>24&255}}),ObjectId.prototype[util.inspect.custom||"inspect"]=ObjectId.prototype.toString,ObjectId.index=~~(16777215*Math.random()),Object.defineProperty(ObjectId.prototype,"_bsontype",{value:"ObjectID"});var objectid=ObjectId;function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$3(e,t,r){return t&&_defineProperties$3(e.prototype,t),r&&_defineProperties$3(e,r),e}function alphabetize(e){return e.split("").sort().join("")}var BSONRegExp=function(){function e(t,r){_classCallCheck$3(this,e),this.pattern=t||"",this.options=r?alphabetize(r):"";for(var i=0;i<this.options.length;i++)if("i"!==this.options[i]&&"m"!==this.options[i]&&"x"!==this.options[i]&&"l"!==this.options[i]&&"s"!==this.options[i]&&"u"!==this.options[i])throw new Error("The regular expression option [".concat(this.options[i],"] is not supported"))}return _createClass$3(e,[{key:"toExtendedJSON",value:function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}}],[{key:"parseOptions",value:function(e){return e?e.split("").sort().join(""):""}},{key:"fromExtendedJSON",value:function(t){return t.$regex?"BSONRegExp"===t.$regex._bsontype?t:new e(t.$regex,e.parseOptions(t.$options)):new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options))}}]),e}();Object.defineProperty(BSONRegExp.prototype,"_bsontype",{value:"BSONRegExp"});var regexp=BSONRegExp;function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$4(e,t,r){return t&&_defineProperties$4(e.prototype,t),r&&_defineProperties$4(e,r),e}var BSONSymbol=function(){function e(t){_classCallCheck$4(this,e),this.value=t}return _createClass$4(e,[{key:"valueOf",value:function(){return this.value}},{key:"toString",value:function(){return this.value}},{key:"inspect",value:function(){return this.value}},{key:"toJSON",value:function(){return this.value}},{key:"toExtendedJSON",value:function(){return{$symbol:this.value}}}],[{key:"fromExtendedJSON",value:function(t){return new e(t.$symbol)}}]),e}();Object.defineProperty(BSONSymbol.prototype,"_bsontype",{value:"Symbol"});var symbol=BSONSymbol;function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$5(e,t,r){return t&&_defineProperties$5(e.prototype,t),r&&_defineProperties$5(e,r),e}var Int32=function(){function e(t){_classCallCheck$5(this,e),t instanceof Number&&(t=t.valueOf()),this.value=t}return _createClass$5(e,[{key:"valueOf",value:function(){return this.value}},{key:"toJSON",value:function(){return this.value}},{key:"toExtendedJSON",value:function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}}}],[{key:"fromExtendedJSON",value:function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)}}]),e}();Object.defineProperty(Int32.prototype,"_bsontype",{value:"Int32"});var int_32=Int32;function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$6(e,t,r){return t&&_defineProperties$6(e.prototype,t),r&&_defineProperties$6(e,r),e}var Code=function(){function e(t,r){_classCallCheck$6(this,e),this.code=t,this.scope=r}return _createClass$6(e,[{key:"toJSON",value:function(){return{scope:this.scope,code:this.code}}},{key:"toExtendedJSON",value:function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}}],[{key:"fromExtendedJSON",value:function(t){return new e(t.$code,t.$scope)}}]),e}();Object.defineProperty(Code.prototype,"_bsontype",{value:"Code"});var code=Code,Buffer$2=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,PARSE_STRING_REGEXP=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,PARSE_INF_REGEXP=/^(\+|-)?(Infinity|inf)$/i,PARSE_NAN_REGEXP=/^(\+|-)?NaN$/i,EXPONENT_MAX=6111,EXPONENT_MIN=-6176,EXPONENT_BIAS=6176,MAX_DIGITS=34,NAN_BUFFER=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),INF_NEGATIVE_BUFFER=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),INF_POSITIVE_BUFFER=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),EXPONENT_REGEX=/^([-+])?(\d+)?$/;function isDigit(e){return!isNaN(parseInt(e,10))}function divideu128(e){var t=long_1.fromNumber(1e9),r=long_1.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var i=0;i<=3;i++)r=(r=r.shiftLeft(32)).add(new long_1(e.parts[i],0)),e.parts[i]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function multiply64x2(e,t){if(!e&&!t)return{high:long_1.fromNumber(0),low:long_1.fromNumber(0)};var r=e.shiftRightUnsigned(32),i=new long_1(e.getLowBits(),0),n=t.shiftRightUnsigned(32),o=new long_1(t.getLowBits(),0),a=r.multiply(n),s=r.multiply(o),u=i.multiply(n),c=i.multiply(o);return a=a.add(s.shiftRightUnsigned(32)),s=new long_1(s.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:a=a.add(s.shiftRightUnsigned(32)),low:c=s.shiftLeft(32).add(new long_1(c.getLowBits(),0))}}function lessThan(e,t){var r=e.high>>>0,i=t.high>>>0;return r<i||r===i&&e.low>>>0<t.low>>>0}function invalidErr(e,t){throw new TypeError('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}function Decimal128(e){this.bytes=e}Decimal128.fromString=function(e){var t,r=!1,i=!1,n=!1,o=0,a=0,s=0,u=0,c=0,f=[0],l=0,d=0,h=0,p=0,_=0,m=0,b=[0,0],y=[0,0],g=0;if(e.length>=7e3)throw new TypeError(e+" not a valid Decimal128 string");var v=e.match(PARSE_STRING_REGEXP),w=e.match(PARSE_INF_REGEXP),E=e.match(PARSE_NAN_REGEXP);if(!v&&!w&&!E||0===e.length)throw new TypeError(e+" not a valid Decimal128 string");if(v){var S=v[2],M=v[4],T=v[5],A=v[6];M&&void 0===A&&invalidErr(e,"missing exponent power"),M&&void 0===S&&invalidErr(e,"missing exponent base"),void 0===M&&(T||A)&&invalidErr(e,"missing e before exponent")}if("+"!==e[g]&&"-"!==e[g]||(r="-"===e[g++]),!isDigit(e[g])&&"."!==e[g]){if("i"===e[g]||"I"===e[g])return new Decimal128(Buffer$2.from(r?INF_NEGATIVE_BUFFER:INF_POSITIVE_BUFFER));if("N"===e[g])return new Decimal128(Buffer$2.from(NAN_BUFFER))}for(;isDigit(e[g])||"."===e[g];)"."!==e[g]?(l<34&&("0"!==e[g]||n)&&(n||(c=a),n=!0,f[d++]=parseInt(e[g],10),l+=1),n&&(s+=1),i&&(u+=1),a+=1,g+=1):(i&&invalidErr(e,"contains multiple periods"),i=!0,g+=1);if(i&&!a)throw new TypeError(e+" not a valid Decimal128 string");if("e"===e[g]||"E"===e[g]){var O=e.substr(++g).match(EXPONENT_REGEX);if(!O||!O[2])return new Decimal128(Buffer$2.from(NAN_BUFFER));_=parseInt(O[0],10),g+=O[0].length}if(e[g])return new Decimal128(Buffer$2.from(NAN_BUFFER));if(h=0,l){if(p=l-1,1!==(o=s))for(;"0"===e[c+o-1];)o-=1}else h=0,p=0,f[0]=0,s=1,l=1,o=0;for(_<=u&&u-_>16384?_=EXPONENT_MIN:_-=u;_>EXPONENT_MAX;){if((p+=1)-h>MAX_DIGITS){if(f.join("").match(/^0+$/)){_=EXPONENT_MAX;break}invalidErr(e,"overflow")}_-=1}for(;_<EXPONENT_MIN||l<s;){if(0===p&&o<l){_=EXPONENT_MIN,o=0;break}if(l<s?s-=1:p-=1,_<EXPONENT_MAX)_+=1;else{if(f.join("").match(/^0+$/)){_=EXPONENT_MAX;break}invalidErr(e,"overflow")}}if(p-h+1<o){var R=a;i&&(c+=1,R+=1),r&&(c+=1,R+=1);var N=parseInt(e[c+p+1],10),I=0;if(N>=5&&(I=1,5===N))for(I=f[p]%2==1,m=c+p+2;m<R;m++)if(parseInt(e[m],10)){I=1;break}if(I)for(var x=p;x>=0;x--)if(++f[x]>9&&(f[x]=0,0===x)){if(!(_<EXPONENT_MAX))return new Decimal128(Buffer$2.from(r?INF_NEGATIVE_BUFFER:INF_POSITIVE_BUFFER));_+=1,f[x]=1}}if(b=long_1.fromNumber(0),y=long_1.fromNumber(0),0===o)b=long_1.fromNumber(0),y=long_1.fromNumber(0);else if(p-h<17){var P=h;for(y=long_1.fromNumber(f[P++]),b=new long_1(0,0);P<=p;P++)y=(y=y.multiply(long_1.fromNumber(10))).add(long_1.fromNumber(f[P]))}else{var k=h;for(b=long_1.fromNumber(f[k++]);k<=p-17;k++)b=(b=b.multiply(long_1.fromNumber(10))).add(long_1.fromNumber(f[k]));for(y=long_1.fromNumber(f[k++]);k<=p;k++)y=(y=y.multiply(long_1.fromNumber(10))).add(long_1.fromNumber(f[k]))}var F=multiply64x2(b,long_1.fromString("100000000000000000"));F.low=F.low.add(y),lessThan(F.low,y)&&(F.high=F.high.add(long_1.fromNumber(1))),t=_+EXPONENT_BIAS;var D={low:long_1.fromNumber(0),high:long_1.fromNumber(0)};F.high.shiftRightUnsigned(49).and(long_1.fromNumber(1)).equals(long_1.fromNumber(1))?(D.high=D.high.or(long_1.fromNumber(3).shiftLeft(61)),D.high=D.high.or(long_1.fromNumber(t).and(long_1.fromNumber(16383).shiftLeft(47))),D.high=D.high.or(F.high.and(long_1.fromNumber(0x7fffffffffff)))):(D.high=D.high.or(long_1.fromNumber(16383&t).shiftLeft(49)),D.high=D.high.or(F.high.and(long_1.fromNumber(562949953421311)))),D.low=F.low,r&&(D.high=D.high.or(long_1.fromString("9223372036854775808")));var B=Buffer$2.alloc(16);return g=0,B[g++]=255&D.low.low,B[g++]=D.low.low>>8&255,B[g++]=D.low.low>>16&255,B[g++]=D.low.low>>24&255,B[g++]=255&D.low.high,B[g++]=D.low.high>>8&255,B[g++]=D.low.high>>16&255,B[g++]=D.low.high>>24&255,B[g++]=255&D.high.low,B[g++]=D.high.low>>8&255,B[g++]=D.high.low>>16&255,B[g++]=D.high.low>>24&255,B[g++]=255&D.high.high,B[g++]=D.high.high>>8&255,B[g++]=D.high.high>>16&255,B[g++]=D.high.high>>24&255,new Decimal128(B)};var COMBINATION_MASK=31,EXPONENT_MASK=16383,COMBINATION_INFINITY=30,COMBINATION_NAN=31;Decimal128.prototype.toString=function(){for(var e,t,r,i,n,o,a=0,s=new Array(36),u=0;u<s.length;u++)s[u]=0;var c,f,l,d,h,p=0,_=!1,m={parts:new Array(4)},b=[];p=0;var y=this.bytes;if(i=y[p++]|y[p++]<<8|y[p++]<<16|y[p++]<<24,r=y[p++]|y[p++]<<8|y[p++]<<16|y[p++]<<24,t=y[p++]|y[p++]<<8|y[p++]<<16|y[p++]<<24,e=y[p++]|y[p++]<<8|y[p++]<<16|y[p++]<<24,p=0,{low:new long_1(i,r),high:new long_1(t,e)}.high.lessThan(long_1.ZERO)&&b.push("-"),(n=e>>26&COMBINATION_MASK)>>3==3){if(n===COMBINATION_INFINITY)return b.join("")+"Infinity";if(n===COMBINATION_NAN)return"NaN";o=e>>15&EXPONENT_MASK,l=8+(e>>14&1)}else l=e>>14&7,o=e>>17&EXPONENT_MASK;if(c=o-EXPONENT_BIAS,m.parts[0]=(16383&e)+((15&l)<<14),m.parts[1]=t,m.parts[2]=r,m.parts[3]=i,0===m.parts[0]&&0===m.parts[1]&&0===m.parts[2]&&0===m.parts[3])_=!0;else for(h=3;h>=0;h--){var g=0,v=divideu128(m);if(m=v.quotient,g=v.rem.low)for(d=8;d>=0;d--)s[9*h+d]=g%10,g=Math.floor(g/10)}if(_)a=1,s[p]=0;else for(a=36;!s[p];)a-=1,p+=1;if((f=a-1+c)>=34||f<=-7||c>0){if(a>34)return b.push(0),c>0?b.push("E+"+c):c<0&&b.push("E"+c),b.join("");b.push(s[p++]),(a-=1)&&b.push(".");for(var w=0;w<a;w++)b.push(s[p++]);b.push("E"),f>0?b.push("+"+f):b.push(f)}else if(c>=0)for(var E=0;E<a;E++)b.push(s[p++]);else{var S=a+c;if(S>0)for(var M=0;M<S;M++)b.push(s[p++]);else b.push("0");for(b.push(".");S++<0;)b.push("0");for(var T=0;T<a-Math.max(S-1,0);T++)b.push(s[p++])}return b.join("")},Decimal128.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},Decimal128.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},Decimal128.fromExtendedJSON=function(e){return Decimal128.fromString(e.$numberDecimal)},Object.defineProperty(Decimal128.prototype,"_bsontype",{value:"Decimal128"});var decimal128=Decimal128;function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$7(e,t,r){return t&&_defineProperties$7(e.prototype,t),r&&_defineProperties$7(e,r),e}var MinKey=function(){function e(){_classCallCheck$7(this,e)}return _createClass$7(e,[{key:"toExtendedJSON",value:function(){return{$minKey:1}}}],[{key:"fromExtendedJSON",value:function(){return new e}}]),e}();Object.defineProperty(MinKey.prototype,"_bsontype",{value:"MinKey"});var min_key=MinKey;function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$8(e,t,r){return t&&_defineProperties$8(e.prototype,t),r&&_defineProperties$8(e,r),e}var MaxKey=function(){function e(){_classCallCheck$8(this,e)}return _createClass$8(e,[{key:"toExtendedJSON",value:function(){return{$maxKey:1}}}],[{key:"fromExtendedJSON",value:function(){return new e}}]),e}();Object.defineProperty(MaxKey.prototype,"_bsontype",{value:"MaxKey"});var max_key=MaxKey;function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$9(e,t,r){return t&&_defineProperties$9(e.prototype,t),r&&_defineProperties$9(e,r),e}var DBRef=function(){function e(t,r,i,n){_classCallCheck$9(this,e);var o=t.split(".");2===o.length&&(i=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=i,this.fields=n||{}}return _createClass$9(e,[{key:"toJSON",value:function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e}},{key:"toExtendedJSON",value:function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))}}],[{key:"fromExtendedJSON",value:function(t){var r=Object.assign({},t);return["$ref","$id","$db"].forEach((function(e){return delete r[e]})),new e(t.$ref,t.$id,t.$db,r)}}]),e}();Object.defineProperty(DBRef.prototype,"_bsontype",{value:"DBRef"}),Object.defineProperty(DBRef.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},configurable:!1});var db_ref=DBRef;function _classCallCheck$a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$a(e,t,r){return t&&_defineProperties$a(e.prototype,t),r&&_defineProperties$a(e,r),e}var Buffer$3=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,Binary=function(){function e(t,r){if(_classCallCheck$a(this,e),!(null==t||"string"==typeof t||Buffer$3.isBuffer(t)||t instanceof Uint8Array||Array.isArray(t)))throw new TypeError("only String, Buffer, Uint8Array or Array accepted");if(this.sub_type=null==r?BSON_BINARY_SUBTYPE_DEFAULT:r,this.position=0,null==t||t instanceof Number)void 0!==Buffer$3?this.buffer=Buffer$3.alloc(e.BUFFER_SIZE):"undefined"!=typeof Uint8Array?this.buffer=new Uint8Array(new ArrayBuffer(e.BUFFER_SIZE)):this.buffer=new Array(e.BUFFER_SIZE);else{if("string"==typeof t)if(void 0!==Buffer$3)this.buffer=Buffer$3.from(t);else{if("undefined"==typeof Uint8Array&&!Array.isArray(t))throw new TypeError("only String, Buffer, Uint8Array or Array accepted");this.buffer=writeStringToArray(t)}else this.buffer=t;this.position=t.length}}return _createClass$a(e,[{key:"put",value:function(t){if(null!=t.length&&"number"!=typeof t&&1!==t.length)throw new TypeError("only accepts single character String, Uint8Array or Array");if("number"!=typeof t&&t<0||t>255)throw new TypeError("only accepts number in a valid unsigned byte range 0-255");var r=null;if(r="string"==typeof t?t.charCodeAt(0):null!=t.length?t[0]:t,this.buffer.length>this.position)this.buffer[this.position++]=r;else if(void 0!==Buffer$3&&Buffer$3.isBuffer(this.buffer)){var i=Buffer$3.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i,this.buffer[this.position++]=r}else{var n=null;n=isUint8Array(this.buffer)?new Uint8Array(new ArrayBuffer(e.BUFFER_SIZE+this.buffer.length)):new Array(e.BUFFER_SIZE+this.buffer.length);for(var o=0;o<this.buffer.length;o++)n[o]=this.buffer[o];this.buffer=n,this.buffer[this.position++]=r}}},{key:"write",value:function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=null;if(void 0!==Buffer$3&&Buffer$3.isBuffer(this.buffer))r=Buffer$3.alloc(this.buffer.length+e.length),this.buffer.copy(r,0,0,this.buffer.length);else if(isUint8Array(this.buffer)){r=new Uint8Array(new ArrayBuffer(this.buffer.length+e.length));for(var i=0;i<this.position;i++)r[i]=this.buffer[i]}this.buffer=r}if(void 0!==Buffer$3&&Buffer$3.isBuffer(e)&&Buffer$3.isBuffer(this.buffer))e.copy(this.buffer,t,0,e.length),this.position=t+e.length>this.position?t+e.length:this.position;else if(void 0!==Buffer$3&&"string"==typeof e&&Buffer$3.isBuffer(this.buffer))this.buffer.write(e,t,"binary"),this.position=t+e.length>this.position?t+e.length:this.position;else if(isUint8Array(e)||Array.isArray(e)&&"string"!=typeof e){for(var n=0;n<e.length;n++)this.buffer[t++]=e[n];this.position=t>this.position?t:this.position}else if("string"==typeof e){for(var o=0;o<e.length;o++)this.buffer[t++]=e.charCodeAt(o);this.position=t>this.position?t:this.position}}},{key:"read",value:function(e,t){if(t=t&&t>0?t:this.position,this.buffer.slice)return this.buffer.slice(e,e+t);for(var r="undefined"!=typeof Uint8Array?new Uint8Array(new ArrayBuffer(t)):new Array(t),i=0;i<t;i++)r[i]=this.buffer[e++];return r}},{key:"value",value:function(e){if((e=null!=e&&e)&&void 0!==Buffer$3&&Buffer$3.isBuffer(this.buffer)&&this.buffer.length===this.position)return this.buffer;if(void 0!==Buffer$3&&Buffer$3.isBuffer(this.buffer))return e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position);if(e){if(null!=this.buffer.slice)return this.buffer.slice(0,this.position);for(var t=isUint8Array(this.buffer)?new Uint8Array(new ArrayBuffer(this.position)):new Array(this.position),r=0;r<this.position;r++)t[r]=this.buffer[r];return t}return convertArraytoUtf8BinaryString(this.buffer,0,this.position)}},{key:"length",value:function(){return this.position}},{key:"toJSON",value:function(){return null!=this.buffer?this.buffer.toString("base64"):""}},{key:"toString",value:function(e){return null!=this.buffer?this.buffer.slice(0,this.position).toString(e):""}},{key:"toExtendedJSON",value:function(e){e=e||{};var t=Buffer$3.isBuffer(this.buffer)?this.buffer.toString("base64"):Buffer$3.from(this.buffer).toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}}}],[{key:"fromExtendedJSON",value:function(t,r){var i,n;return(r=r||{}).legacy?(n=t.$type?parseInt(t.$type,16):0,i=Buffer$3.from(t.$binary,"base64")):(n=t.$binary.subType?parseInt(t.$binary.subType,16):0,i=Buffer$3.from(t.$binary.base64,"base64")),new e(i,n)}}]),e}(),BSON_BINARY_SUBTYPE_DEFAULT=0;function isUint8Array(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function writeStringToArray(e){for(var t="undefined"!=typeof Uint8Array?new Uint8Array(new ArrayBuffer(e.length)):new Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function convertArraytoUtf8BinaryString(e,t,r){for(var i="",n=t;n<r;n++)i+=String.fromCharCode(e[n]);return i}Binary.BUFFER_SIZE=256,Binary.SUBTYPE_DEFAULT=0,Binary.SUBTYPE_FUNCTION=1,Binary.SUBTYPE_BYTE_ARRAY=2,Binary.SUBTYPE_UUID_OLD=3,Binary.SUBTYPE_UUID=4,Binary.SUBTYPE_MD5=5,Binary.SUBTYPE_USER_DEFINED=128,Object.defineProperty(Binary.prototype,"_bsontype",{value:"Binary"});var binary=Binary,constants={BSON_INT32_MAX:2147483647,BSON_INT32_MIN:-2147483648,BSON_INT64_MAX:Math.pow(2,63)-1,BSON_INT64_MIN:-Math.pow(2,63),JS_INT_MAX:9007199254740992,JS_INT_MIN:-9007199254740992,BSON_DATA_NUMBER:1,BSON_DATA_STRING:2,BSON_DATA_OBJECT:3,BSON_DATA_ARRAY:4,BSON_DATA_BINARY:5,BSON_DATA_UNDEFINED:6,BSON_DATA_OID:7,BSON_DATA_BOOLEAN:8,BSON_DATA_DATE:9,BSON_DATA_NULL:10,BSON_DATA_REGEXP:11,BSON_DATA_DBPOINTER:12,BSON_DATA_CODE:13,BSON_DATA_SYMBOL:14,BSON_DATA_CODE_W_SCOPE:15,BSON_DATA_INT:16,BSON_DATA_TIMESTAMP:17,BSON_DATA_LONG:18,BSON_DATA_DECIMAL128:19,BSON_DATA_MIN_KEY:255,BSON_DATA_MAX_KEY:127,BSON_BINARY_SUBTYPE_DEFAULT:0,BSON_BINARY_SUBTYPE_FUNCTION:1,BSON_BINARY_SUBTYPE_BYTE_ARRAY:2,BSON_BINARY_SUBTYPE_UUID:3,BSON_BINARY_SUBTYPE_MD5:4,BSON_BINARY_SUBTYPE_USER_DEFINED:128};function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var keysToCodecs={$oid:objectid,$binary:binary,$symbol:symbol,$numberInt:int_32,$numberDecimal:decimal128,$numberDouble:double_1,$numberLong:long_1,$minKey:min_key,$maxKey:max_key,$regex:regexp,$regularExpression:regexp,$timestamp:timestamp};function deserializeValue(e,t,r,i){if("number"==typeof r){if(i.relaxed||i.legacy)return r;if(Math.floor(r)===r){if(r>=BSON_INT32_MIN&&r<=BSON_INT32_MAX)return new int_32(r);if(r>=BSON_INT64_MIN&&r<=BSON_INT64_MAX)return new long_1.fromNumber(r)}return new double_1(r)}if(null==r||"object"!==_typeof$2(r))return r;if(r.$undefined)return null;for(var n=Object.keys(r).filter((function(e){return e.startsWith("$")&&null!=r[e]})),o=0;o<n.length;o++){var a=keysToCodecs[n[o]];if(a)return a.fromExtendedJSON(r,i)}if(null!=r.$date){var s=r.$date,u=new Date;return i.legacy?"number"==typeof s?u.setTime(s):"string"==typeof s&&u.setTime(Date.parse(s)):"string"==typeof s?u.setTime(Date.parse(s)):long_1.isLong(s)?u.setTime(s.toNumber()):"number"==typeof s&&i.relaxed&&u.setTime(s),u}if(null!=r.$code){var c=Object.assign({},r);return r.$scope&&(c.$scope=deserializeValue(e,null,r.$scope)),code.fromExtendedJSON(r)}if(null!=r.$ref||null!=r.$dbPointer){var f=r.$ref?r:r.$dbPointer;if(f instanceof db_ref)return f;var l=Object.keys(f).filter((function(e){return e.startsWith("$")})),d=!0;if(l.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(d=!1)})),d)return db_ref.fromExtendedJSON(f)}return r}function parse(e,t){var r=this;return"boolean"==typeof(t=Object.assign({},{relaxed:!0,legacy:!1},t)).relaxed&&(t.strict=!t.relaxed),"boolean"==typeof t.strict&&(t.relaxed=!t.strict),JSON.parse(e,(function(e,i){return deserializeValue(r,e,i,t)}))}var BSON_INT32_MAX=2147483647,BSON_INT32_MIN=-2147483648,BSON_INT64_MAX=0x8000000000000000,BSON_INT64_MIN=-0x8000000000000000;function stringify(e,t,r,i){null!=r&&"object"===_typeof$2(r)&&(i=r,r=0),null==t||"object"!==_typeof$2(t)||Array.isArray(t)||(i=t,t=null,r=0),i=Object.assign({},{relaxed:!0,legacy:!1},i);var n=Array.isArray(e)?serializeArray(e,i):serializeDocument(e,i);return JSON.stringify(n,t,r)}function serialize(e,t){return t=t||{},JSON.parse(stringify(e,t))}function deserialize(e,t){return t=t||{},parse(JSON.stringify(e),t)}function serializeArray(e,t){return e.map((function(e){return serializeValue(e,t)}))}function getISOString(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function serializeValue(e,t){if(Array.isArray(e))return serializeArray(e,t);if(void 0===e)return null;if(e instanceof Date){var r=e.getTime(),i=r>-1&&r<2534023188e5;return t.legacy?t.relaxed&&i?{$date:e.getTime()}:{$date:getISOString(e)}:t.relaxed&&i?{$date:getISOString(e)}:{$date:{$numberLong:e.getTime().toString()}}}if("number"==typeof e&&!t.relaxed){if(Math.floor(e)===e){var n=e>=BSON_INT64_MIN&&e<=BSON_INT64_MAX;if(e>=BSON_INT32_MIN&&e<=BSON_INT32_MAX)return{$numberInt:e.toString()};if(n)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp){var o=e.flags;return void 0===o&&(o=e.toString().match(/[gimuy]*$/)[0]),new regexp(e.source,o).toExtendedJSON(t)}return null!=e&&"object"===_typeof$2(e)?serializeDocument(e,t):e}var BSON_TYPE_MAPPINGS={Binary:function(e){return new binary(e.value(),e.subtype)},Code:function(e){return new code(e.code,e.scope)},DBRef:function(e){return new db_ref(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new decimal128(e.bytes)},Double:function(e){return new double_1(e.value)},Int32:function(e){return new int_32(e.value)},Long:function(e){return long_1.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new max_key},MinKey:function(){return new min_key},ObjectID:function(e){return new objectid(e)},ObjectId:function(e){return new objectid(e)},BSONRegExp:function(e){return new regexp(e.pattern,e.options)},Symbol:function(e){return new symbol(e.value)},Timestamp:function(e){return timestamp.fromBits(e.low,e.high)}};function serializeDocument(e,t){if(null==e||"object"!==_typeof$2(e))throw new Error("not an object instance");var r=e._bsontype;if(void 0===r){var i={};for(var n in e)i[n]=serializeValue(e[n],t);return i}if("string"==typeof r){var o=e;if("function"!=typeof o.toExtendedJSON){var a=BSON_TYPE_MAPPINGS[r];if(!a)throw new TypeError("Unrecognized or invalid _bsontype: "+r);o=a(o)}return"Code"===r&&o.scope?o=new code(o.code,serializeValue(o.scope,t)):"DBRef"===r&&o.oid&&(o=new db_ref(o.collection,serializeValue(o.oid,t),o.db,o.fields)),o.toExtendedJSON(t)}throw new Error("_bsontype must be a string, but was: "+_typeof$2(r))}var extended_json={parse:parse,deserialize:deserialize,serialize:serialize,stringify:stringify},FIRST_BIT=128,FIRST_TWO_BITS=192,FIRST_THREE_BITS=224,FIRST_FOUR_BITS=240,FIRST_FIVE_BITS=248,TWO_BIT_CHAR=192,THREE_BIT_CHAR=224,FOUR_BIT_CHAR=240,CONTINUING_CHAR=128;function validateUtf8(e,t,r){for(var i=0,n=t;n<r;n+=1){var o=e[n];if(i){if((o&FIRST_TWO_BITS)!==CONTINUING_CHAR)return!1;i-=1}else if(o&FIRST_BIT)if((o&FIRST_THREE_BITS)===TWO_BIT_CHAR)i=1;else if((o&FIRST_FOUR_BITS)===THREE_BIT_CHAR)i=2;else{if((o&FIRST_FIVE_BITS)!==FOUR_BIT_CHAR)return!1;i=3}}return!i}var validateUtf8_1=validateUtf8,validate_utf8={validateUtf8:validateUtf8_1},Buffer$4=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,validateUtf8$1=validate_utf8.validateUtf8,JS_INT_MAX_LONG=long_1.fromNumber(constants.JS_INT_MAX),JS_INT_MIN_LONG=long_1.fromNumber(constants.JS_INT_MIN),functionCache={};function deserialize$1(e,t,r){var i=(t=null==t?{}:t)&&t.index?t.index:0,n=e[i]|e[i+1]<<8|e[i+2]<<16|e[i+3]<<24;if(n<5)throw new Error("bson size must be >= 5, is ".concat(n));if(t.allowObjectSmallerThanBufferSize&&e.length<n)throw new Error("buffer length ".concat(e.length," must be >= bson size ").concat(n));if(!t.allowObjectSmallerThanBufferSize&&e.length!==n)throw new Error("buffer length ".concat(e.length," must === bson size ").concat(n));if(n+i>e.length)throw new Error("(bson size ".concat(n," + options.index ").concat(i," must be <= buffer length ").concat(Buffer$4.byteLength(e),")"));if(0!==e[i+n-1])throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return deserializeObject(e,i,t,r)}function deserializeObject(e,t,r,i){var n=null!=r.evalFunctions&&r.evalFunctions,o=null!=r.cacheFunctions&&r.cacheFunctions,a=null!=r.cacheFunctionsCrc32&&r.cacheFunctionsCrc32;if(!a)var s=null;var u=null==r.fieldsAsRaw?null:r.fieldsAsRaw,c=null!=r.raw&&r.raw,f="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,d=null==r.promoteLongs||r.promoteLongs,h=null==r.promoteValues||r.promoteValues,p=t;if(e.length<5)throw new Error("corrupt bson message < 5 bytes long");var _=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(_<5||_>e.length)throw new Error("corrupt bson message");for(var m=i?[]:{},b=0;;){var y=e[t++];if(0===y)break;for(var g=t;0!==e[g]&&g<e.length;)g++;if(g>=Buffer$4.byteLength(e))throw new Error("Bad BSON Document: illegal CString");var v=i?b++:e.toString("utf8",t,g);if(t=g+1,y===constants.BSON_DATA_STRING){var w=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(w<=0||w>e.length-t||0!==e[t+w-1])throw new Error("bad string length in bson");if(!validateUtf8$1(e,t,t+w-1))throw new Error("Invalid UTF-8 string in BSON document");var E=e.toString("utf8",t,t+w-1);m[v]=E,t+=w}else if(y===constants.BSON_DATA_OID){var S=Buffer$4.alloc(12);e.copy(S,0,t,t+12),m[v]=new objectid(S),t+=12}else if(y===constants.BSON_DATA_INT&&!1===h)m[v]=new int_32(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(y===constants.BSON_DATA_INT)m[v]=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(y===constants.BSON_DATA_NUMBER&&!1===h)m[v]=new double_1(e.readDoubleLE(t)),t+=8;else if(y===constants.BSON_DATA_NUMBER)m[v]=e.readDoubleLE(t),t+=8;else if(y===constants.BSON_DATA_DATE){var M=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,T=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;m[v]=new Date(new long_1(M,T).toNumber())}else if(y===constants.BSON_DATA_BOOLEAN){if(0!==e[t]&&1!==e[t])throw new Error("illegal boolean type value");m[v]=1===e[t++]}else if(y===constants.BSON_DATA_OBJECT){var A=t,O=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;if(O<=0||O>e.length-t)throw new Error("bad embedded document length in bson");m[v]=c?e.slice(t,t+O):deserializeObject(e,A,r,!1),t+=O}else if(y===constants.BSON_DATA_ARRAY){var R=t,N=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,I=r,x=t+N;if(u&&u[v]){for(var P in I={},r)I[P]=r[P];I.raw=!0}if(m[v]=deserializeObject(e,R,I,!0),0!==e[(t+=N)-1])throw new Error("invalid array terminator byte");if(t!==x)throw new Error("corrupted array bson")}else if(y===constants.BSON_DATA_UNDEFINED)m[v]=void 0;else if(y===constants.BSON_DATA_NULL)m[v]=null;else if(y===constants.BSON_DATA_LONG){var k=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,F=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new long_1(k,F);m[v]=d&&!0===h&&D.lessThanOrEqual(JS_INT_MAX_LONG)&&D.greaterThanOrEqual(JS_INT_MIN_LONG)?D.toNumber():D}else if(y===constants.BSON_DATA_DECIMAL128){var B=Buffer$4.alloc(16);e.copy(B,0,t,t+16),t+=16;var C=new decimal128(B);m[v]=C.toObject?C.toObject():C}else if(y===constants.BSON_DATA_BINARY){var L=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,j=L,U=e[t++];if(L<0)throw new Error("Negative binary type element size found");if(L>Buffer$4.byteLength(e))throw new Error("Binary type size larger than document size");if(null!=e.slice){if(U===binary.SUBTYPE_BYTE_ARRAY){if((L=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new Error("Negative binary type element size found for subtype 0x02");if(L>j-4)throw new Error("Binary type with subtype 0x02 contains to long binary size");if(L<j-4)throw new Error("Binary type with subtype 0x02 contains to short binary size")}m[v]=l&&h?e.slice(t,t+L):new binary(e.slice(t,t+L),U)}else{var H="undefined"!=typeof Uint8Array?new Uint8Array(new ArrayBuffer(L)):new Array(L);if(U===binary.SUBTYPE_BYTE_ARRAY){if((L=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new Error("Negative binary type element size found for subtype 0x02");if(L>j-4)throw new Error("Binary type with subtype 0x02 contains to long binary size");if(L<j-4)throw new Error("Binary type with subtype 0x02 contains to short binary size")}for(g=0;g<L;g++)H[g]=e[t+g];m[v]=l&&h?H:new binary(H,U)}t+=L}else if(y===constants.BSON_DATA_REGEXP&&!1===f){for(g=t;0!==e[g]&&g<e.length;)g++;if(g>=e.length)throw new Error("Bad BSON Document: illegal CString");var z=e.toString("utf8",t,g);for(g=t=g+1;0!==e[g]&&g<e.length;)g++;if(g>=e.length)throw new Error("Bad BSON Document: illegal CString");var X=e.toString("utf8",t,g);t=g+1;var q=new Array(X.length);for(g=0;g<X.length;g++)switch(X[g]){case"m":q[g]="m";break;case"s":q[g]="g";break;case"i":q[g]="i"}m[v]=new RegExp(z,q.join(""))}else if(y===constants.BSON_DATA_REGEXP&&!0===f){for(g=t;0!==e[g]&&g<e.length;)g++;if(g>=e.length)throw new Error("Bad BSON Document: illegal CString");var Y=e.toString("utf8",t,g);for(g=t=g+1;0!==e[g]&&g<e.length;)g++;if(g>=e.length)throw new Error("Bad BSON Document: illegal CString");var W=e.toString("utf8",t,g);t=g+1,m[v]=new regexp(Y,W)}else if(y===constants.BSON_DATA_SYMBOL){var $=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if($<=0||$>e.length-t||0!==e[t+$-1])throw new Error("bad string length in bson");m[v]=e.toString("utf8",t,t+$-1),t+=$}else if(y===constants.BSON_DATA_TIMESTAMP){var G=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,V=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;m[v]=new timestamp(G,V)}else if(y===constants.BSON_DATA_MIN_KEY)m[v]=new min_key;else if(y===constants.BSON_DATA_MAX_KEY)m[v]=new max_key;else if(y===constants.BSON_DATA_CODE){var K=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(K<=0||K>e.length-t||0!==e[t+K-1])throw new Error("bad string length in bson");var J=e.toString("utf8",t,t+K-1);if(n)if(o){var Q=a?s(J):J;m[v]=isolateEvalWithHash(functionCache,Q,J,m)}else m[v]=isolateEval(J);else m[v]=new code(J);t+=K}else if(y===constants.BSON_DATA_CODE_W_SCOPE){var Z=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Z<13)throw new Error("code_w_scope total size shorter minimum expected length");var ee=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(ee<=0||ee>e.length-t||0!==e[t+ee-1])throw new Error("bad string length in bson");var te=e.toString("utf8",t,t+ee-1),re=t+=ee,ie=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,ne=deserializeObject(e,re,r,!1);if(t+=ie,Z<8+ie+ee)throw new Error("code_w_scope total size is to short, truncating scope");if(Z>8+ie+ee)throw new Error("code_w_scope total size is to long, clips outer document");if(n){if(o){var oe=a?s(te):te;m[v]=isolateEvalWithHash(functionCache,oe,te,m)}else m[v]=isolateEval(te);m[v].scope=ne}else m[v]=new code(te,ne)}else{if(y!==constants.BSON_DATA_DBPOINTER)throw new Error("Detected unknown BSON type "+y.toString(16)+' for fieldname "'+v+'", are you using the latest BSON parser?');var ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(ae<=0||ae>e.length-t||0!==e[t+ae-1])throw new Error("bad string length in bson");if(!validateUtf8$1(e,t,t+ae-1))throw new Error("Invalid UTF-8 string in BSON document");var se=e.toString("utf8",t,t+ae-1);t+=ae;var ue=Buffer$4.alloc(12);e.copy(ue,0,t,t+12);var ce=new objectid(ue);t+=12,m[v]=new db_ref(se,ce)}}if(_!==t-p){if(i)throw new Error("corrupt array bson");throw new Error("corrupt object bson")}var fe=Object.keys(m).filter((function(e){return e.startsWith("$")})),le=!0;if(fe.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(le=!1)})),!le)return m;if(null!=m.$id&&null!=m.$ref){var de=Object.assign({},m);return delete de.$ref,delete de.$id,delete de.$db,new db_ref(m.$ref,m.$id,m.$db||null,de)}return m}function isolateEvalWithHash(functionCache,hash,functionString,object){var value=null;return null==functionCache[hash]&&(eval("value = "+functionString),functionCache[hash]=value),functionCache[hash].bind(object)}function isolateEval(functionString){var value=null;return eval("value = "+functionString),value}var deserializer=deserialize$1;function readIEEE754(e,t,r,i,n){var o,a,s="big"===r,u=8*n-i-1,c=(1<<u)-1,f=c>>1,l=-7,d=s?0:n-1,h=s?1:-1,p=e[t+d];for(d+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+e[t+d],d+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=i;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===o)o=1-f;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),o-=f}return(p?-1:1)*a*Math.pow(2,o-i)}function writeIEEE754(e,t,r,i,n,o){var a,s,u,c="big"===i,f=8*o-n-1,l=(1<<f)-1,d=l>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=c?o-1:0,_=c?-1:1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*u-1)*Math.pow(2,n),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),a=0)),isNaN(t)&&(s=0);n>=8;)e[r+p]=255&s,p+=_,s/=256,n-=8;for(a=a<<n|s,isNaN(t)&&(a+=8),f+=n;f>0;)e[r+p]=255&a,p+=_,a/=256,f-=8;e[r+p-_]|=128*m}var float_parser={readIEEE754:readIEEE754,writeIEEE754:writeIEEE754};function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Buffer$5=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,writeIEEE754$1=float_parser.writeIEEE754,normalizedFunctionString$1=utils.normalizedFunctionString,regexp$1=/\x00/,ignoreKeys=new Set(["$db","$ref","$id","$clusterTime"]),isDate$1=function(e){return"object"===_typeof$3(e)&&"[object Date]"===Object.prototype.toString.call(e)},isRegExp$1=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)};function serializeString(e,t,r,i,n){e[i++]=constants.BSON_DATA_STRING;var o=n?e.write(t,i,"ascii"):e.write(t,i,"utf8");e[(i=i+o+1)-1]=0;var a=e.write(r,i+4,"utf8");return e[i+3]=a+1>>24&255,e[i+2]=a+1>>16&255,e[i+1]=a+1>>8&255,e[i]=a+1&255,i=i+4+a,e[i++]=0,i}function serializeNumber(e,t,r,i,n){if(Math.floor(r)===r&&r>=constants.JS_INT_MIN&&r<=constants.JS_INT_MAX)if(r>=constants.BSON_INT32_MIN&&r<=constants.BSON_INT32_MAX)e[i++]=constants.BSON_DATA_INT,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=r>>16&255,e[i++]=r>>24&255;else if(r>=constants.JS_INT_MIN&&r<=constants.JS_INT_MAX){e[i++]=constants.BSON_DATA_NUMBER,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,writeIEEE754$1(e,r,i,"little",52,8),i+=8}else{e[i++]=constants.BSON_DATA_LONG,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=long_1.fromNumber(r),a=o.getLowBits(),s=o.getHighBits();e[i++]=255&a,e[i++]=a>>8&255,e[i++]=a>>16&255,e[i++]=a>>24&255,e[i++]=255&s,e[i++]=s>>8&255,e[i++]=s>>16&255,e[i++]=s>>24&255}else e[i++]=constants.BSON_DATA_NUMBER,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,writeIEEE754$1(e,r,i,"little",52,8),i+=8;return i}function serializeNull(e,t,r,i,n){return e[i++]=constants.BSON_DATA_NULL,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,i}function serializeBoolean(e,t,r,i,n){return e[i++]=constants.BSON_DATA_BOOLEAN,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,e[i++]=r?1:0,i}function serializeDate(e,t,r,i,n){e[i++]=constants.BSON_DATA_DATE,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=long_1.fromNumber(r.getTime()),a=o.getLowBits(),s=o.getHighBits();return e[i++]=255&a,e[i++]=a>>8&255,e[i++]=a>>16&255,e[i++]=a>>24&255,e[i++]=255&s,e[i++]=s>>8&255,e[i++]=s>>16&255,e[i++]=s>>24&255,i}function serializeRegExp(e,t,r,i,n){if(e[i++]=constants.BSON_DATA_REGEXP,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,r.source&&null!=r.source.match(regexp$1))throw Error("value "+r.source+" must not contain null bytes");return i+=e.write(r.source,i,"utf8"),e[i++]=0,r.ignoreCase&&(e[i++]=105),r.global&&(e[i++]=115),r.multiline&&(e[i++]=109),e[i++]=0,i}function serializeBSONRegExp(e,t,r,i,n){if(e[i++]=constants.BSON_DATA_REGEXP,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,null!=r.pattern.match(regexp$1))throw Error("pattern "+r.pattern+" must not contain null bytes");return i+=e.write(r.pattern,i,"utf8"),e[i++]=0,i+=e.write(r.options.split("").sort().join(""),i,"utf8"),e[i++]=0,i}function serializeMinMax(e,t,r,i,n){return null===r?e[i++]=constants.BSON_DATA_NULL:"MinKey"===r._bsontype?e[i++]=constants.BSON_DATA_MIN_KEY:e[i++]=constants.BSON_DATA_MAX_KEY,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,i}function serializeObjectId(e,t,r,i,n){if(e[i++]=constants.BSON_DATA_OID,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,"string"==typeof r.id)e.write(r.id,i,"binary");else{if(!r.id||!r.id.copy)throw new TypeError("object ["+JSON.stringify(r)+"] is not a valid ObjectId");r.id.copy(e,i,0,12)}return i+12}function serializeBuffer(e,t,r,i,n){e[i++]=constants.BSON_DATA_BINARY,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=r.length;return e[i++]=255&o,e[i++]=o>>8&255,e[i++]=o>>16&255,e[i++]=o>>24&255,e[i++]=constants.BSON_BINARY_SUBTYPE_DEFAULT,r.copy(e,i,0,o),i+=o}function serializeObject(e,t,r,i,n,o,a,s,u,c){for(var f=0;f<c.length;f++)if(c[f]===r)throw new Error("cyclic dependency detected");c.push(r),e[i++]=Array.isArray(r)?constants.BSON_DATA_ARRAY:constants.BSON_DATA_OBJECT,i+=u?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var l=serializeInto(e,r,n,i,o+1,a,s,c);return c.pop(),l}function serializeDecimal128(e,t,r,i,n){return e[i++]=constants.BSON_DATA_DECIMAL128,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,r.bytes.copy(e,i,0,16),i+16}function serializeLong(e,t,r,i,n){e[i++]="Long"===r._bsontype?constants.BSON_DATA_LONG:constants.BSON_DATA_TIMESTAMP,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=r.getLowBits(),a=r.getHighBits();return e[i++]=255&o,e[i++]=o>>8&255,e[i++]=o>>16&255,e[i++]=o>>24&255,e[i++]=255&a,e[i++]=a>>8&255,e[i++]=a>>16&255,e[i++]=a>>24&255,i}function serializeInt32(e,t,r,i,n){return e[i++]=constants.BSON_DATA_INT,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=r>>16&255,e[i++]=r>>24&255,i}function serializeDouble(e,t,r,i,n){return e[i++]=constants.BSON_DATA_NUMBER,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0,writeIEEE754$1(e,r.value,i,"little",52,8),i+=8}function serializeFunction(e,t,r,i,n,o,a){e[i++]=constants.BSON_DATA_CODE,i+=a?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var s=normalizedFunctionString$1(r),u=e.write(s,i+4,"utf8")+1;return e[i]=255&u,e[i+1]=u>>8&255,e[i+2]=u>>16&255,e[i+3]=u>>24&255,i=i+4+u-1,e[i++]=0,i}function serializeCode(e,t,r,i,n,o,a,s,u){if(r.scope&&"object"===_typeof$3(r.scope)){e[i++]=constants.BSON_DATA_CODE_W_SCOPE,i+=u?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var c=i,f="string"==typeof r.code?r.code:r.code.toString();i+=4;var l=e.write(f,i+4,"utf8")+1;e[i]=255&l,e[i+1]=l>>8&255,e[i+2]=l>>16&255,e[i+3]=l>>24&255,e[i+4+l-1]=0,i=i+l+4;var d=serializeInto(e,r.scope,n,i,o+1,a,s);i=d-1;var h=d-c;e[c++]=255&h,e[c++]=h>>8&255,e[c++]=h>>16&255,e[c++]=h>>24&255,e[i++]=0}else{e[i++]=constants.BSON_DATA_CODE,i+=u?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var p=r.code.toString(),_=e.write(p,i+4,"utf8")+1;e[i]=255&_,e[i+1]=_>>8&255,e[i+2]=_>>16&255,e[i+3]=_>>24&255,i=i+4+_-1,e[i++]=0}return i}function serializeBinary(e,t,r,i,n){e[i++]=constants.BSON_DATA_BINARY,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=r.value(!0),a=r.position;return r.sub_type===binary.SUBTYPE_BYTE_ARRAY&&(a+=4),e[i++]=255&a,e[i++]=a>>8&255,e[i++]=a>>16&255,e[i++]=a>>24&255,e[i++]=r.sub_type,r.sub_type===binary.SUBTYPE_BYTE_ARRAY&&(a-=4,e[i++]=255&a,e[i++]=a>>8&255,e[i++]=a>>16&255,e[i++]=a>>24&255),o.copy(e,i,0,r.position),i+=r.position}function serializeSymbol(e,t,r,i,n){e[i++]=constants.BSON_DATA_SYMBOL,i+=n?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var o=e.write(r.value,i+4,"utf8")+1;return e[i]=255&o,e[i+1]=o>>8&255,e[i+2]=o>>16&255,e[i+3]=o>>24&255,i=i+4+o-1,e[i++]=0,i}function serializeDBRef(e,t,r,i,n,o,a){e[i++]=constants.BSON_DATA_OBJECT,i+=a?e.write(t,i,"ascii"):e.write(t,i,"utf8"),e[i++]=0;var s,u=i,c={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(c.$db=r.db);var f=(s=serializeInto(e,c=Object.assign(c,r.fields),!1,i,n+1,o))-u;return e[u++]=255&f,e[u++]=f>>8&255,e[u++]=f>>16&255,e[u++]=f>>24&255,s}function serializeInto(e,t,r,i,n,o,a,s){i=i||0,(s=s||[]).push(t);var u=i+4;if(Array.isArray(t))for(var c=0;c<t.length;c++){var f=""+c,l=t[c];if(l&&l.toBSON){if("function"!=typeof l.toBSON)throw new TypeError("toBSON is not a function");l=l.toBSON()}var d=_typeof$3(l);if("string"===d)u=serializeString(e,f,l,u,!0);else if("number"===d)u=serializeNumber(e,f,l,u,!0);else if("boolean"===d)u=serializeBoolean(e,f,l,u,!0);else if(l instanceof Date||isDate$1(l))u=serializeDate(e,f,l,u,!0);else if(void 0===l)u=serializeNull(e,f,l,u,!0);else if(null===l)u=serializeNull(e,f,l,u,!0);else if("ObjectId"===l._bsontype||"ObjectID"===l._bsontype)u=serializeObjectId(e,f,l,u,!0);else if(Buffer$5.isBuffer(l))u=serializeBuffer(e,f,l,u,!0);else if(l instanceof RegExp||isRegExp$1(l))u=serializeRegExp(e,f,l,u,!0);else if("object"===d&&null==l._bsontype)u=serializeObject(e,f,l,u,r,n,o,a,!0,s);else if("object"===d&&"Decimal128"===l._bsontype)u=serializeDecimal128(e,f,l,u,!0);else if("Long"===l._bsontype||"Timestamp"===l._bsontype)u=serializeLong(e,f,l,u,!0);else if("Double"===l._bsontype)u=serializeDouble(e,f,l,u,!0);else if("function"==typeof l&&o)u=serializeFunction(e,f,l,u,r,n,o,!0);else if("Code"===l._bsontype)u=serializeCode(e,f,l,u,r,n,o,a,!0);else if("Binary"===l._bsontype)u=serializeBinary(e,f,l,u,!0);else if("Symbol"===l._bsontype)u=serializeSymbol(e,f,l,u,!0);else if("DBRef"===l._bsontype)u=serializeDBRef(e,f,l,u,n,o,!0);else if("BSONRegExp"===l._bsontype)u=serializeBSONRegExp(e,f,l,u,!0);else if("Int32"===l._bsontype)u=serializeInt32(e,f,l,u,!0);else if("MinKey"===l._bsontype||"MaxKey"===l._bsontype)u=serializeMinMax(e,f,l,u,!0);else if(void 0!==l._bsontype)throw new TypeError("Unrecognized or invalid _bsontype: "+l._bsontype)}else if(t instanceof map)for(var h=t.entries(),p=!1;!p;){var _=h.next();if(!(p=_.done)){var m=_.value[0],b=_.value[1],y=_typeof$3(b);if("string"==typeof m&&!ignoreKeys.has(m)){if(null!=m.match(regexp$1))throw Error("key "+m+" must not contain null bytes");if(r){if("$"===m[0])throw Error("key "+m+" must not start with '$'");if(~m.indexOf("."))throw Error("key "+m+" must not contain '.'")}}if("string"===y)u=serializeString(e,m,b,u);else if("number"===y)u=serializeNumber(e,m,b,u);else if("boolean"===y)u=serializeBoolean(e,m,b,u);else if(b instanceof Date||isDate$1(b))u=serializeDate(e,m,b,u);else if(null===b||void 0===b&&!1===a)u=serializeNull(e,m,b,u);else if("ObjectId"===b._bsontype||"ObjectID"===b._bsontype)u=serializeObjectId(e,m,b,u);else if(Buffer$5.isBuffer(b))u=serializeBuffer(e,m,b,u);else if(b instanceof RegExp||isRegExp$1(b))u=serializeRegExp(e,m,b,u);else if("object"===y&&null==b._bsontype)u=serializeObject(e,m,b,u,r,n,o,a,!1,s);else if("object"===y&&"Decimal128"===b._bsontype)u=serializeDecimal128(e,m,b,u);else if("Long"===b._bsontype||"Timestamp"===b._bsontype)u=serializeLong(e,m,b,u);else if("Double"===b._bsontype)u=serializeDouble(e,m,b,u);else if("Code"===b._bsontype)u=serializeCode(e,m,b,u,r,n,o,a);else if("function"==typeof b&&o)u=serializeFunction(e,m,b,u,r,n,o);else if("Binary"===b._bsontype)u=serializeBinary(e,m,b,u);else if("Symbol"===b._bsontype)u=serializeSymbol(e,m,b,u);else if("DBRef"===b._bsontype)u=serializeDBRef(e,m,b,u,n,o);else if("BSONRegExp"===b._bsontype)u=serializeBSONRegExp(e,m,b,u);else if("Int32"===b._bsontype)u=serializeInt32(e,m,b,u);else if("MinKey"===b._bsontype||"MaxKey"===b._bsontype)u=serializeMinMax(e,m,b,u);else if(void 0!==b._bsontype)throw new TypeError("Unrecognized or invalid _bsontype: "+b._bsontype)}}else{if(t.toBSON){if("function"!=typeof t.toBSON)throw new TypeError("toBSON is not a function");if(null!=(t=t.toBSON())&&"object"!==_typeof$3(t))throw new TypeError("toBSON function did not return an object")}for(var g in t){var v=t[g];if(v&&v.toBSON){if("function"!=typeof v.toBSON)throw new TypeError("toBSON is not a function");v=v.toBSON()}var w=_typeof$3(v);if("string"==typeof g&&!ignoreKeys.has(g)){if(null!=g.match(regexp$1))throw Error("key "+g+" must not contain null bytes");if(r){if("$"===g[0])throw Error("key "+g+" must not start with '$'");if(~g.indexOf("."))throw Error("key "+g+" must not contain '.'")}}if("string"===w)u=serializeString(e,g,v,u);else if("number"===w)u=serializeNumber(e,g,v,u);else if("boolean"===w)u=serializeBoolean(e,g,v,u);else if(v instanceof Date||isDate$1(v))u=serializeDate(e,g,v,u);else if(void 0===v)!1===a&&(u=serializeNull(e,g,v,u));else if(null===v)u=serializeNull(e,g,v,u);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)u=serializeObjectId(e,g,v,u);else if(Buffer$5.isBuffer(v))u=serializeBuffer(e,g,v,u);else if(v instanceof RegExp||isRegExp$1(v))u=serializeRegExp(e,g,v,u);else if("object"===w&&null==v._bsontype)u=serializeObject(e,g,v,u,r,n,o,a,!1,s);else if("object"===w&&"Decimal128"===v._bsontype)u=serializeDecimal128(e,g,v,u);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)u=serializeLong(e,g,v,u);else if("Double"===v._bsontype)u=serializeDouble(e,g,v,u);else if("Code"===v._bsontype)u=serializeCode(e,g,v,u,r,n,o,a);else if("function"==typeof v&&o)u=serializeFunction(e,g,v,u,r,n,o);else if("Binary"===v._bsontype)u=serializeBinary(e,g,v,u);else if("Symbol"===v._bsontype)u=serializeSymbol(e,g,v,u);else if("DBRef"===v._bsontype)u=serializeDBRef(e,g,v,u,n,o);else if("BSONRegExp"===v._bsontype)u=serializeBSONRegExp(e,g,v,u);else if("Int32"===v._bsontype)u=serializeInt32(e,g,v,u);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)u=serializeMinMax(e,g,v,u);else if(void 0!==v._bsontype)throw new TypeError("Unrecognized or invalid _bsontype: "+v._bsontype)}}s.pop(),e[u++]=0;var E=u-i;return e[i++]=255&E,e[i++]=E>>8&255,e[i++]=E>>16&255,e[i++]=E>>24&255,u}var serializer=serializeInto;function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Buffer$6=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,normalizedFunctionString$2=utils.normalizedFunctionString;function isDate$2(e){return"object"===_typeof$4(e)&&"[object Date]"===Object.prototype.toString.call(e)}function calculateObjectSize(e,t,r){var i=5;if(Array.isArray(e))for(var n=0;n<e.length;n++)i+=calculateElement(n.toString(),e[n],t,!0,r);else for(var o in e.toBSON&&(e=e.toBSON()),e)i+=calculateElement(o,e[o],t,!1,r);return i}function calculateElement(e,t,r,i,n){switch(t&&t.toBSON&&(t=t.toBSON()),_typeof$4(t)){case"string":return 1+Buffer$6.byteLength(e,"utf8")+1+4+Buffer$6.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=constants.JS_INT_MIN&&t<=constants.JS_INT_MAX&&t>=constants.BSON_INT32_MIN&&t<=constants.BSON_INT32_MAX?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+5:(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+9;case"undefined":return i||!n?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||isDate$2(t))return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+9;if(void 0!==Buffer$6&&Buffer$6.isBuffer(t))return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+6+t.length;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+4+4+Buffer$6.byteLength(t.code.toString(),"utf8")+1+calculateObjectSize(t.scope,r,n):(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+4+Buffer$6.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype)return t.sub_type===binary.SUBTYPE_BYTE_ARRAY?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+(t.position+1+4+1+4):(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+(t.position+1+4+1);if("Symbol"===t._bsontype)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+Buffer$6.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var o=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(o.$db=t.db),(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+calculateObjectSize(o,r,n)}return t instanceof RegExp||"[object RegExp]"===Object.prototype.toString.call(t)?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+Buffer$6.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+Buffer$6.byteLength(t.pattern,"utf8")+1+Buffer$6.byteLength(t.options,"utf8")+1:(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+calculateObjectSize(t,r,n)+1;case"function":if(t instanceof RegExp||"[object RegExp]"===Object.prototype.toString.call(t)||"[object RegExp]"===String.call(t))return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+Buffer$6.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+4+4+Buffer$6.byteLength(normalizedFunctionString$2(t),"utf8")+1+calculateObjectSize(t.scope,r,n);if(r)return(null!=e?Buffer$6.byteLength(e,"utf8")+1:0)+1+4+Buffer$6.byteLength(normalizedFunctionString$2(t),"utf8")+1}return 0}var calculate_size=calculateObjectSize,Buffer$7=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,ensure_buffer=function(e){if(e instanceof Buffer$7)return e;if(e instanceof Uint8Array)return Buffer$7.from(e.buffer);throw new TypeError("Must use either Buffer or Uint8Array")},Buffer$8=buffer__WEBPACK_IMPORTED_MODULE_1___default.a.Buffer,MAXSIZE=17825792,buffer$1=Buffer$8.alloc(MAXSIZE);function setInternalBufferSize(e){buffer$1.length<e&&(buffer$1=Buffer$8.alloc(e))}function serialize$1(e,t){var r="boolean"==typeof(t=t||{}).checkKeys&&t.checkKeys,i="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,n="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:MAXSIZE;buffer$1.length<o&&(buffer$1=Buffer$8.alloc(o));var a=serializer(buffer$1,e,r,0,0,i,n,[]),s=Buffer$8.alloc(a);return buffer$1.copy(s,0,0,s.length),s}function serializeWithBufferAndIndex(e,t,r){var i="boolean"==typeof(r=r||{}).checkKeys&&r.checkKeys,n="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,a="number"==typeof r.index?r.index:0,s=serializer(buffer$1,e,i,0,0,n,o);return buffer$1.copy(t,a,0,s),a+s-1}function deserialize$2(e,t){return e=ensure_buffer(e),deserializer(e,t)}function calculateObjectSize$1(e,t){var r="boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined;return calculate_size(e,r,i)}function deserializeStream(e,t,r,i,n,o){o=Object.assign({allowObjectSmallerThanBufferSize:!0},o),e=ensure_buffer(e);for(var a=t,s=0;s<r;s++){var u=e[a]|e[a+1]<<8|e[a+2]<<16|e[a+3]<<24;o.index=a,i[n+s]=deserializer(e,o),a+=u}return a}var bson={BSON_INT32_MAX:constants.BSON_INT32_MAX,BSON_INT32_MIN:constants.BSON_INT32_MIN,BSON_INT64_MAX:constants.BSON_INT64_MAX,BSON_INT64_MIN:constants.BSON_INT64_MIN,JS_INT_MAX:constants.JS_INT_MAX,JS_INT_MIN:constants.JS_INT_MIN,BSON_DATA_NUMBER:constants.BSON_DATA_NUMBER,BSON_DATA_STRING:constants.BSON_DATA_STRING,BSON_DATA_OBJECT:constants.BSON_DATA_OBJECT,BSON_DATA_ARRAY:constants.BSON_DATA_ARRAY,BSON_DATA_BINARY:constants.BSON_DATA_BINARY,BSON_DATA_UNDEFINED:constants.BSON_DATA_UNDEFINED,BSON_DATA_OID:constants.BSON_DATA_OID,BSON_DATA_BOOLEAN:constants.BSON_DATA_BOOLEAN,BSON_DATA_DATE:constants.BSON_DATA_DATE,BSON_DATA_NULL:constants.BSON_DATA_NULL,BSON_DATA_REGEXP:constants.BSON_DATA_REGEXP,BSON_DATA_DBPOINTER:constants.BSON_DATA_DBPOINTER,BSON_DATA_CODE:constants.BSON_DATA_CODE,BSON_DATA_SYMBOL:constants.BSON_DATA_SYMBOL,BSON_DATA_CODE_W_SCOPE:constants.BSON_DATA_CODE_W_SCOPE,BSON_DATA_INT:constants.BSON_DATA_INT,BSON_DATA_TIMESTAMP:constants.BSON_DATA_TIMESTAMP,BSON_DATA_LONG:constants.BSON_DATA_LONG,BSON_DATA_DECIMAL128:constants.BSON_DATA_DECIMAL128,BSON_DATA_MIN_KEY:constants.BSON_DATA_MIN_KEY,BSON_DATA_MAX_KEY:constants.BSON_DATA_MAX_KEY,BSON_BINARY_SUBTYPE_DEFAULT:constants.BSON_BINARY_SUBTYPE_DEFAULT,BSON_BINARY_SUBTYPE_FUNCTION:constants.BSON_BINARY_SUBTYPE_FUNCTION,BSON_BINARY_SUBTYPE_BYTE_ARRAY:constants.BSON_BINARY_SUBTYPE_BYTE_ARRAY,BSON_BINARY_SUBTYPE_UUID:constants.BSON_BINARY_SUBTYPE_UUID,BSON_BINARY_SUBTYPE_MD5:constants.BSON_BINARY_SUBTYPE_MD5,BSON_BINARY_SUBTYPE_USER_DEFINED:constants.BSON_BINARY_SUBTYPE_USER_DEFINED,Code:code,Map:map,BSONSymbol:symbol,DBRef:db_ref,Binary:binary,ObjectId:objectid,Long:long_1,Timestamp:timestamp,Double:double_1,Int32:int_32,MinKey:min_key,MaxKey:max_key,BSONRegExp:regexp,Decimal128:decimal128,serialize:serialize$1,serializeWithBufferAndIndex:serializeWithBufferAndIndex,deserialize:deserialize$2,calculateObjectSize:calculateObjectSize$1,deserializeStream:deserializeStream,setInternalBufferSize:setInternalBufferSize,ObjectID:objectid,EJSON:extended_json},bson_1=bson.BSON_INT32_MAX,bson_2=bson.BSON_INT32_MIN,bson_3=bson.BSON_INT64_MAX,bson_4=bson.BSON_INT64_MIN,bson_5=bson.JS_INT_MAX,bson_6=bson.JS_INT_MIN,bson_7=bson.BSON_DATA_NUMBER,bson_8=bson.BSON_DATA_STRING,bson_9=bson.BSON_DATA_OBJECT,bson_10=bson.BSON_DATA_ARRAY,bson_11=bson.BSON_DATA_BINARY,bson_12=bson.BSON_DATA_UNDEFINED,bson_13=bson.BSON_DATA_OID,bson_14=bson.BSON_DATA_BOOLEAN,bson_15=bson.BSON_DATA_DATE,bson_16=bson.BSON_DATA_NULL,bson_17=bson.BSON_DATA_REGEXP,bson_18=bson.BSON_DATA_DBPOINTER,bson_19=bson.BSON_DATA_CODE,bson_20=bson.BSON_DATA_SYMBOL,bson_21=bson.BSON_DATA_CODE_W_SCOPE,bson_22=bson.BSON_DATA_INT,bson_23=bson.BSON_DATA_TIMESTAMP,bson_24=bson.BSON_DATA_LONG,bson_25=bson.BSON_DATA_DECIMAL128,bson_26=bson.BSON_DATA_MIN_KEY,bson_27=bson.BSON_DATA_MAX_KEY,bson_28=bson.BSON_BINARY_SUBTYPE_DEFAULT,bson_29=bson.BSON_BINARY_SUBTYPE_FUNCTION,bson_30=bson.BSON_BINARY_SUBTYPE_BYTE_ARRAY,bson_31=bson.BSON_BINARY_SUBTYPE_UUID,bson_32=bson.BSON_BINARY_SUBTYPE_MD5,bson_33=bson.BSON_BINARY_SUBTYPE_USER_DEFINED,bson_34=bson.Code,bson_35=bson.BSONSymbol,bson_36=bson.DBRef,bson_37=bson.Binary,bson_38=bson.ObjectId,bson_39=bson.Long,bson_40=bson.Timestamp,bson_41=bson.Double,bson_42=bson.Int32,bson_43=bson.MinKey,bson_44=bson.MaxKey,bson_45=bson.BSONRegExp,bson_46=bson.Decimal128,bson_47=bson.serialize,bson_48=bson.serializeWithBufferAndIndex,bson_49=bson.deserialize,bson_50=bson.calculateObjectSize,bson_51=bson.deserializeStream,bson_52=bson.setInternalBufferSize,bson_53=bson.ObjectID,bson_54=bson.EJSON,_unused_webpack_default_export=bson}).call(this,__webpack_require__(5),__webpack_require__(2).Buffer)},function(e,t,r){e.exports=r(123)},function(e,t,r){"use strict";function i(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return i}))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(__dirname,process,Buffer){var Module=function(){var _scriptDir=void 0;return function(Module){Module=Module||{};var Module=void 0!==Module?Module:{},moduleOverrides={},key;for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var arguments_=[],thisProgram="./this.program",quit_=function(e,t){throw t},ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,Module.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var ENVIRONMENT_IS_PTHREAD=Module.ENVIRONMENT_IS_PTHREAD||!1;ENVIRONMENT_IS_PTHREAD&&(buffer=Module.buffer,DYNAMIC_BASE=Module.DYNAMIC_BASE,DYNAMICTOP_PTR=Module.DYNAMICTOP_PTR);var scriptDirectory="",read_,readAsync,readBinary,setWindowTitle,nodeFS,nodePath;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads;scriptDirectory=ENVIRONMENT_IS_WORKER?eval("require")("path").dirname(scriptDirectory)+"/":__dirname+"/",read_=function shell_read(filename,binary){return nodeFS||(nodeFS=eval("require")("fs")),nodePath||(nodePath=eval("require")("path")),filename=nodePath.normalize(filename),nodeFS.readFileSync(filename,binary?null:"utf8")},readBinary=function(e){var t=read_(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e})),process.on("unhandledRejection",abort),quit_=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"};try{nodeWorkerThreads=eval("require")("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_SHELL)"undefined"!=typeof read&&(read_=function(e){return read(e)}),readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(assert("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?arguments_=scriptArgs:void 0!==arguments&&(arguments_=arguments),"function"==typeof quit&&(quit_=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw new Error("environment detection error");ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",ENVIRONMENT_IS_NODE?(read_=function shell_read(filename,binary){return nodeFS||(nodeFS=eval("require")("fs")),nodePath||(nodePath=eval("require")("path")),filename=nodePath.normalize(filename),nodeFS.readFileSync(filename,binary?null:"utf8")},readBinary=function(e){var t=read_(e,!0);return t.buffer||(t=new Uint8Array(t)),assert(t.buffer),t}):(read_=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=function(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}),setWindowTitle=function(e){document.title=e}}var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Object.getOwnPropertyDescriptor(Module,"arguments")||Object.defineProperty(Module,"arguments",{configurable:!0,get:function(){abort("Module.arguments has been replaced with plain arguments_")}}),Module.thisProgram&&(thisProgram=Module.thisProgram),Object.getOwnPropertyDescriptor(Module,"thisProgram")||Object.defineProperty(Module,"thisProgram",{configurable:!0,get:function(){abort("Module.thisProgram has been replaced with plain thisProgram")}}),Module.quit&&(quit_=Module.quit),Object.getOwnPropertyDescriptor(Module,"quit")||Object.defineProperty(Module,"quit",{configurable:!0,get:function(){abort("Module.quit has been replaced with plain quit_")}}),assert(void 0===Module.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),assert(void 0===Module.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),assert(void 0===Module.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),assert(void 0===Module.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),assert(void 0===Module.read,"Module.read option was removed (modify read_ in JS)"),assert(void 0===Module.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),assert(void 0===Module.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),assert(void 0===Module.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(Module,"read")||Object.defineProperty(Module,"read",{configurable:!0,get:function(){abort("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(Module,"readAsync")||Object.defineProperty(Module,"readAsync",{configurable:!0,get:function(){abort("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(Module,"readBinary")||Object.defineProperty(Module,"readBinary",{configurable:!0,get:function(){abort("Module.readBinary has been replaced with plain readBinary")}});var PROXYFS="PROXYFS is no longer included by default; build with -lproxyfs.js",WORKERFS="WORKERFS is no longer included by default; build with -lworkerfs.js";assert(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER||ENVIRONMENT_IS_NODE,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)");var STACK_ALIGN=16;function staticAlloc(e){abort("staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)")}function dynamicAlloc(e){assert(DYNAMICTOP_PTR),assert(!ENVIRONMENT_IS_PTHREAD);var t=HEAP32[DYNAMICTOP_PTR>>2],r=t+e+15&-16;return r>_emscripten_get_heap_size()&&abort("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),HEAP32[DYNAMICTOP_PTR>>2]=r,t}function alignMemory(e,t){return t||(t=STACK_ALIGN),Math.ceil(e/t)*t}function getNativeTypeSize(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var t=parseInt(e.substr(1));return assert(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}function warnOnce(e){warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,err(e))}function convertJsFunctionToWasm(e,t){if("function"==typeof WebAssembly.Function){for(var r={i:"i32",j:"i64",f:"f32",d:"f64"},i={parameters:[],results:"v"==t[0]?[]:[r[t[0]]]},n=1;n<t.length;++n)i.parameters.push(r[t[n]]);return new WebAssembly.Function(i,e)}var o=[1,0,1,96],a=t.slice(0,1),s=t.slice(1),u={i:127,j:126,f:125,d:124};o.push(s.length);for(n=0;n<s.length;++n)o.push(u[s[n]]);"v"==a?o.push(0):o=o.concat([1,u[a]]),o[1]=o.length-2;var c=new Uint8Array([0,97,115,109,1,0,0,0].concat(o,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),f=new WebAssembly.Module(c);return new WebAssembly.Instance(f,{e:{f:e}}).exports.f}function addFunctionWasm(e,t){var r=wasmTable,i=r.length;try{r.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."}try{r.set(i,e)}catch(o){if(!(o instanceof TypeError))throw o;assert(void 0!==t,"Missing signature argument to addFunction");var n=convertJsFunctionToWasm(e,t);r.set(i,n)}return i}function removeFunctionWasm(e){}function addFunction(e,t){return assert(void 0!==e),addFunctionWasm(e,t)}function removeFunction(e){removeFunctionWasm(e)}stackSave=stackRestore=stackAlloc=function(){abort("cannot use the stack before compiled code is ready to run, and has provided stack access")};var funcWrappers={};function getFuncWrapper(e,t){if(e){assert(t),funcWrappers[t]||(funcWrappers[t]={});var r=funcWrappers[t];return r[e]||(1===t.length?r[e]=function(){return dynCall(t,e)}:2===t.length?r[e]=function(r){return dynCall(t,e,[r])}:r[e]=function(){return dynCall(t,e,Array.prototype.slice.call(arguments))}),r[e]}}function makeBigInt(e,t,r){return r?+(e>>>0)+4294967296*+(t>>>0):+(e>>>0)+4294967296*+(0|t)}function dynCall(e,t,r){return r&&r.length?(assert(r.length===e.substring(1).replace(/j/g,"--").length),assert("dynCall_"+e in Module,"bad function pointer type - no table for sig '"+e+"'"),Module["dynCall_"+e].apply(null,[t].concat(r))):(assert(1==e.length),assert("dynCall_"+e in Module,"bad function pointer type - no table for sig '"+e+"'"),Module["dynCall_"+e].call(null,t))}var tempRet0=0,setTempRet0=function(e){tempRet0=e},getTempRet0=function(){return tempRet0};function getCompilerSetting(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for getCompilerSetting or emscripten_get_compiler_setting to work"}var Runtime={getTempRet0:function(){abort('getTempRet0() is now a top-level function, after removing the Runtime object. Remove "Runtime."')},staticAlloc:function(){abort('staticAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."')},stackAlloc:function(){abort('stackAlloc() is now a top-level function, after removing the Runtime object. Remove "Runtime."')}},GLOBAL_BASE=1024;function establishStackSpace(e){stackRestore(e)}var Atomics_load="NOT USED",Atomics_store="NOT USED",Atomics_compareExchange="NOT USED",wasmBinary,noExitRuntime,wasmMemory;function setValue(e,t,r,i){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;default:abort("invalid type for setValue: "+r)}}function getValue(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for getValue: "+t)}return null}Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Object.getOwnPropertyDescriptor(Module,"wasmBinary")||Object.defineProperty(Module,"wasmBinary",{configurable:!0,get:function(){abort("Module.wasmBinary has been replaced with plain wasmBinary")}}),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Object.getOwnPropertyDescriptor(Module,"noExitRuntime")||Object.defineProperty(Module,"noExitRuntime",{configurable:!0,get:function(){abort("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!=typeof WebAssembly&&abort("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var wasmTable=new WebAssembly.Table(Module.tableSize),wasmModule,threadInfoStruct=0,selfThreadId=0,ABORT=!1,EXITSTATUS=0;function assert(e,t){e||abort("Assertion failed: "+t)}function getCFunc(e){var t=Module["_"+e];return assert(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function ccall(e,t,r,i,n){var o={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);stringToUTF8(e,t=stackAlloc(r),r)}return t},array:function(e){var t=stackAlloc(e.length);return writeArrayToMemory(e,t),t}};var a=getCFunc(e),s=[],u=0;if(assert("array"!==t,'Return type should not be "array".'),i)for(var c=0;c<i.length;c++){var f=o[r[c]];f?(0===u&&(u=stackSave()),s[c]=f(i[c])):s[c]=i[c]}var l=a.apply(null,s);return l=function(e){return"string"===t?UTF8ToString(e):"boolean"===t?Boolean(e):e}(l),0!==u&&stackRestore(u),l}function cwrap(e,t,r,i){return function(){return ccall(e,t,r,arguments,i)}}var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_DYNAMIC=2,ALLOC_NONE=3;function allocate(e,t,r,i){var n,o;"number"==typeof e?(n=!0,o=e):(n=!1,o=e.length);var a,s="string"==typeof t?t:null;if(a=r==ALLOC_NONE?i:[_malloc,stackAlloc,dynamicAlloc][r](Math.max(o,s?1:t.length)),n){var u;for(i=a,assert(0==(3&a)),u=a+(-4&o);i<u;i+=4)HEAP32[i>>2]=0;for(u=a+o;i<u;)HEAP8[i++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var c,f,l,d=0;d<o;){var h=e[d];0!==(c=s||t[d])?(assert(c,"Must know what type to store in allocate!"),"i64"==c&&(c="i32"),setValue(a+d,h,c),l!==c&&(f=getNativeTypeSize(c),l=c),d+=f):d++}return a}function getMemory(e){return runtimeInitialized?_malloc(e):dynamicAlloc(e)}var UTF8Decoder=void 0;function UTF8ArrayToString(e,t,r){for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.subarray&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,n));for(var o="";t<n;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|u:(240!=(248&a)&&warnOnce("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),a=(7&a)<<18|s<<12|u<<6|63&e[t++]),a<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function UTF8ToString(e,t){return e?UTF8ArrayToString(HEAPU8,e,t):""}function stringToUTF8Array(e,t,r,i){if(!(i>0))return 0;for(var n=r,o=r+i-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;s>=2097152&&warnOnce("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n}function stringToUTF8(e,t,r){return assert("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),stringToUTF8Array(e,HEAPU8,t,r)}function lengthBytesUTF8(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),i<=127?++t:t+=i<=2047?2:i<=65535?3:4}return t}function AsciiToString(e){for(var t="";;){var r=HEAPU8[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}function stringToAscii(e,t){return writeAsciiToMemory(e,t,!1)}var UTF16Decoder=void 0;function UTF16ToString(e){assert(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var t=e,r=t>>1;HEAP16[r];)++r;if((t=r<<1)-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e,t));for(var i=0,n="";;){var o=HEAP16[e+2*i>>1];if(0==o)return n;++i,n+=String.fromCharCode(o)}}function stringToUTF16(e,t,r){if(assert(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),assert("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,o=0;o<n;++o){var a=e.charCodeAt(o);HEAP16[t>>1]=a,t+=2}return HEAP16[t>>1]=0,t-i}function lengthBytesUTF16(e){return 2*e.length}function UTF32ToString(e){assert(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var t=0,r="";;){var i=HEAP32[e+4*t>>2];if(0==i)return r;if(++t,i>=65536){var n=i-65536;r+=String.fromCharCode(55296|n>>10,56320|1023&n)}else r+=String.fromCharCode(i)}}function stringToUTF32(e,t,r){if(assert(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),assert("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(HEAP32[t>>2]=a,(t+=4)+4>n)break}return HEAP32[t>>2]=0,t-i}function lengthBytesUTF32(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&++r,t+=4}return t}function allocateUTF8(e){var t=lengthBytesUTF8(e)+1,r=_malloc(t);return r&&stringToUTF8Array(e,HEAP8,r,t),r}function allocateUTF8OnStack(e){var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8Array(e,HEAP8,r,t),r}function writeStringToMemory(e,t,r){var i,n;warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!"),r&&(n=t+lengthBytesUTF8(e),i=HEAP8[n]),stringToUTF8(e,t,1/0),r&&(HEAP8[n]=i)}function writeArrayToMemory(e,t){assert(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),HEAP8.set(e,t)}function writeAsciiToMemory(e,t,r){for(var i=0;i<e.length;++i)assert(e.charCodeAt(i)==e.charCodeAt(i)&255),HEAP8[t++>>0]=e.charCodeAt(i);r||(HEAP8[t>>0]=0)}var PAGE_SIZE=16384,WASM_PAGE_SIZE=65536,ASMJS_PAGE_SIZE=16777216,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function alignUp(e,t){return e%t>0&&(e+=t-e%t),e}function updateGlobalBufferAndViews(e){buffer=e,Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var STATIC_BASE="NOT USED",STACK_BASE="NOT USED",STACKTOP="NOT USED",DYNAMIC_BASE=Module.bioLibStaticBump+160,DYNAMICTOP_PTR=Module.bioLibEmscriptenGetSbrkPtr,STACK_MAX=DYNAMICTOP_PTR+160;assert(DYNAMIC_BASE%16==0,"heap must start aligned"),ENVIRONMENT_IS_PTHREAD&&(STACK_MAX=STACKTOP=STACK_MAX=2147483647);var INITIAL_TOTAL_MEMORY=Module.TOTAL_MEMORY||536870912;function writeStackCookie(){assert(0==(3&STACK_MAX)),HEAPU32[1+(STACK_MAX>>2)]=34821223,HEAPU32[2+(STACK_MAX>>2)]=2310721022,HEAP32[0]=1668509029}function checkStackCookie(){var e=HEAPU32[1+(STACK_MAX>>2)],t=HEAPU32[2+(STACK_MAX>>2)];34821223==e&&2310721022==t||abort("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==HEAP32[0]&&abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}function abortStackOverflow(e){abort("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(STACK_MAX-stackSave()+e)+" bytes available!")}function abortFnPtrError(e,t){abort("Invalid function pointer "+e+" called with signature '"+t+"'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with ASSERTIONS=2 for more info.")}function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t.bind(Module)()}}Object.getOwnPropertyDescriptor(Module,"TOTAL_MEMORY")||Object.defineProperty(Module,"TOTAL_MEMORY",{configurable:!0,get:function(){abort("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),ENVIRONMENT_IS_PTHREAD?(wasmMemory=Module.wasmMemory,buffer=Module.buffer):Module.wasmMemory&&(wasmMemory=Module.wasmMemory),wasmMemory&&(buffer=wasmMemory.buffer),INITIAL_TOTAL_MEMORY=buffer.byteLength,assert(INITIAL_TOTAL_MEMORY%WASM_PAGE_SIZE==0),updateGlobalBufferAndViews(buffer),ENVIRONMENT_IS_PTHREAD||(HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(!ENVIRONMENT_IS_PTHREAD){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}}function initRuntime(){checkStackCookie(),assert(!runtimeInitialized),runtimeInitialized=!0,Module.noFSInit||FS.init.initialized||FS.init(),TTY.init(),callRuntimeCallbacks(__ATINIT__)}function preMain(){checkStackCookie(),ENVIRONMENT_IS_PTHREAD||(FS.ignorePermissions=!1,callRuntimeCallbacks(__ATMAIN__))}function exitRuntime(){checkStackCookie(),ENVIRONMENT_IS_PTHREAD||(callRuntimeCallbacks(__ATEXIT__),FS.quit(),TTY.shutdown(),runtimeExited=!0)}function postRun(){if(checkStackCookie(),!ENVIRONMENT_IS_PTHREAD){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function unSign(e,t,r){return e>=0?e:t<=32?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e}function reSign(e,t,r){if(e<=0)return e;var i=t<=32?Math.abs(1<<t-1):Math.pow(2,t-1);return e>=i&&(t<=32||e>i)&&(e=-2*i+e),e}ENVIRONMENT_IS_PTHREAD&&(runtimeInitialized=!0),assert(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),assert(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_max=Math.max,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null,runDependencyTracking={};function getUniqueRunDependency(e){for(var t=e;;){if(!runDependencyTracking[e])return e;e=t+Math.random()}return e}function addRunDependency(e){assert(!ENVIRONMENT_IS_PTHREAD,"addRunDependency cannot be used in a pthread worker"),runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),e?(assert(!runDependencyTracking[e]),runDependencyTracking[e]=1,null===runDependencyWatcher&&"undefined"!=typeof setInterval&&(runDependencyWatcher=setInterval((function(){if(ABORT)return clearInterval(runDependencyWatcher),void(runDependencyWatcher=null);var e=!1;for(var t in runDependencyTracking)e||(e=!0,err("still waiting on run dependencies:")),err("dependency: "+t);e&&err("(end of list)")}),1e4))):err("warning: run dependency added without ID")}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),e?(assert(runDependencyTracking[e]),delete runDependencyTracking[e]):err("warning: run dependency removed without ID"),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){throw Module.onAbort&&Module.onAbort(e),ENVIRONMENT_IS_PTHREAD&&console.error("Pthread aborting at "+(new Error).stack),out(e+=""),err(e),ABORT=!0,EXITSTATUS=1,e="abort("+e+") at "+stackTrace(),Module.rejectFunction(e),new WebAssembly.RuntimeError(e)}Module.preloadedImages={},Module.preloadedAudios={};var memoryInitializer=null,dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(e){return String.prototype.startsWith?e.startsWith(dataURIPrefix):0===e.indexOf(dataURIPrefix)}var wasmBinaryFile="c_to_wasm.wasm",tempDouble,tempI64;function getBinary(){try{if(wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(wasmBinaryFile);throw"both async and sync fetching of the wasm failed"}catch(e){abort(e)}}function getBinaryPromise(){return wasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!=typeof fetch?new Promise((function(e,t){e(getBinary())})):fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()})).catch((function(){return getBinary()}))}function createWasm(){var e={env:asmLibraryArg,wasi_snapshot_preview1:asmLibraryArg};function t(e,t){var r=e.exports;Module.asm=r,wasmModule=t,ENVIRONMENT_IS_PTHREAD||removeRunDependency("wasm-instantiate")}ENVIRONMENT_IS_PTHREAD||addRunDependency("wasm-instantiate");var r=Module;function i(e){assert(Module===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance,e.module)}function n(t){return getBinaryPromise().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){err("failed to asynchronously prepare wasm: "+e),abort(e)}))}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return err("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||"function"!=typeof fetch)return n(i);fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),n(i)}))}))}(),{}}isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));var ASM_CONSTS={160464:function(){throw"Canceled!"}};function _emscripten_asm_const_iii(e,t,r){var i=readAsmConstArgs(t,r);return ASM_CONSTS[e].apply(null,i)}function initPthreadsJS(){PThread.initRuntime()}function demangle(e){return warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function demangleAll(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=demangle(e);return e===t?e:t+" ["+e+"]"}))}ENVIRONMENT_IS_PTHREAD||__ATINIT__.push({func:function(){___wasm_call_ctors()}});var PROCINFO={ppid:1,pid:42,sid:42,pgid:42},__pthread_ptr=0,__pthread_is_main_runtime_thread=0,__pthread_is_main_browser_thread=0;function __register_pthread_ptr(e,t,r){__pthread_ptr=e|=0,__pthread_is_main_browser_thread=t|=0,__pthread_is_main_runtime_thread=r|=0}Module.__register_pthread_ptr=__register_pthread_ptr;var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},__main_thread_futex_wait_address=171120;function _emscripten_futex_wake(e,t){if(e<=0||e>HEAP8.length||!0&e||t<0)return-28;if(0==t)return 0;t>=2147483647&&(t=1/0);var r=Atomics.load(HEAP32,__main_thread_futex_wait_address>>2),i=0;if(r==e&&(Atomics.compareExchange(HEAP32,__main_thread_futex_wait_address>>2,r,0)==r&&(i=1,--t<=0)))return 1;var n=Atomics.notify(HEAP32,e>>2,t);if(n>=0)return n+i;throw"Atomics.notify returned an unexpected value "+n}function __kill_thread(e){if(ENVIRONMENT_IS_PTHREAD)throw"Internal Error! _kill_thread() can only ever be called from main application thread!";if(!e)throw"Internal Error! Null pthread_ptr in _kill_thread!";HEAP32[e+12>>2]=0;var t=PThread.pthreads[e];t.worker.terminate(),PThread.freeThreadData(t),PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(t.worker),1),t.worker.pthread=void 0}function __cancel_thread(e){if(ENVIRONMENT_IS_PTHREAD)throw"Internal Error! _cancel_thread() can only ever be called from main application thread!";if(!e)throw"Internal Error! Null pthread_ptr in _cancel_thread!";PThread.pthreads[e].worker.postMessage({cmd:"cancel"})}function __cleanup_thread(e){if(ENVIRONMENT_IS_PTHREAD)throw"Internal Error! _cleanup_thread() can only ever be called from main application thread!";if(!e)throw"Internal Error! Null pthread_ptr in _cleanup_thread!";HEAP32[e+12>>2]=0;var t=PThread.pthreads[e];if(t){var r=t.worker;PThread.returnWorkerToPool(r)}}Module._emscripten_futex_wake=_emscripten_futex_wake;var PThread={MAIN_THREAD_ID:1,mainThreadInfo:{schedPolicy:0,schedPrio:0},unusedWorkers:[],runningWorkers:[],initRuntime:function(){__register_pthread_ptr(PThread.mainThreadBlock,!ENVIRONMENT_IS_WORKER,1),_emscripten_register_main_browser_thread_id(PThread.mainThreadBlock)},initMainThreadBlock:function(){if(!ENVIRONMENT_IS_PTHREAD){PThread.mainThreadBlock=170368;for(var e=0;e<58;++e)HEAPU32[PThread.mainThreadBlock/4+e]=0;HEAP32[PThread.mainThreadBlock+12>>2]=PThread.mainThreadBlock;var t=PThread.mainThreadBlock+156;HEAP32[t>>2]=t;var r=170608;for(e=0;e<128;++e)HEAPU32[42652+e]=0;!HEAP32 instanceof Uint32Array&&(Atomics.store(HEAPU32,PThread.mainThreadBlock+104>>2,r),Atomics.store(HEAPU32,PThread.mainThreadBlock+40>>2,PThread.mainThreadBlock),Atomics.store(HEAPU32,PThread.mainThreadBlock+44>>2,PROCINFO.pid))}},initWorker:function(){},pthreads:{},exitHandlers:null,setThreadStatus:function(){},runExitHandlers:function(){if(null!==PThread.exitHandlers){for(;PThread.exitHandlers.length>0;)PThread.exitHandlers.pop()();PThread.exitHandlers=null}ENVIRONMENT_IS_PTHREAD&&threadInfoStruct&&___pthread_tsd_run_dtors()},threadExit:function(e){var t=_pthread_self();t&&(err("Pthread 0x"+t.toString(16)+" exited."),Atomics.store(HEAPU32,t+4>>2,e),Atomics.store(HEAPU32,t+0>>2,1),Atomics.store(HEAPU32,t+60>>2,1),Atomics.store(HEAPU32,t+64>>2,0),PThread.runExitHandlers(),_emscripten_futex_wake(t+0,2147483647),__register_pthread_ptr(0,0,0),threadInfoStruct=0,ENVIRONMENT_IS_PTHREAD&&postMessage({cmd:"exit"}))},threadCancel:function(){PThread.runExitHandlers(),Atomics.store(HEAPU32,threadInfoStruct+4>>2,-1),Atomics.store(HEAPU32,threadInfoStruct+0>>2,1),_emscripten_futex_wake(threadInfoStruct+0,2147483647),threadInfoStruct=selfThreadId=0,__register_pthread_ptr(0,0,0),postMessage({cmd:"cancelDone"})},terminateAllThreads:function(){for(var e in PThread.pthreads){(i=PThread.pthreads[e])&&i.worker&&PThread.returnWorkerToPool(i.worker)}PThread.pthreads={};for(var t=0;t<PThread.unusedWorkers.length;++t){assert(!(r=PThread.unusedWorkers[t]).pthread),r.terminate()}PThread.unusedWorkers=[];for(t=0;t<PThread.runningWorkers.length;++t){var r,i;assert(i=(r=PThread.runningWorkers[t]).pthread,"This Worker should have a pthread it is executing"),PThread.freeThreadData(i),r.terminate()}PThread.runningWorkers=[]},freeThreadData:function(e){if(e){if(e.threadInfoStruct){var t=HEAP32[e.threadInfoStruct+104>>2];HEAP32[e.threadInfoStruct+104>>2]=0,_free(t),_free(e.threadInfoStruct)}e.threadInfoStruct=0,e.allocatedOwnStack&&e.stackBase&&_free(e.stackBase),e.stackBase=0,e.worker&&(e.worker.pthread=null)}},returnWorkerToPool:function(e){delete PThread.pthreads[e.pthread.thread],PThread.unusedWorkers.push(e),PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(e),1),PThread.freeThreadData(e.pthread),e.pthread=void 0},receiveObjectTransfer:function(e){},loadWasmModuleToWorker:function(e,t){e.onmessage=function(r){var i=r.data,n=i.cmd;if(e.pthread&&(PThread.currentProxiedOperationCallerThread=e.pthread.threadInfoStruct),i.targetThread&&i.targetThread!=_pthread_self()){var o=PThread.pthreads[i.targetThread];return o?o.worker.postMessage(r.data,i.transferList):console.error('Internal error! Worker sent a message "'+n+'" to target pthread '+i.targetThread+", but that thread no longer exists!"),void(PThread.currentProxiedOperationCallerThread=void 0)}if("processQueuedMainThreadWork"===n)_emscripten_main_thread_process_queued_calls();else if("spawnThread"===n)__spawn_thread(r.data);else if("cleanupThread"===n)__cleanup_thread(i.thread);else if("killThread"===n)__kill_thread(i.thread);else if("cancelThread"===n)__cancel_thread(i.thread);else if("loaded"===n)e.loaded=!0,t&&t(e),e.runPthread&&(e.runPthread(),delete e.runPthread);else if("print"===n)out("Thread "+i.threadId+": "+i.text);else if("printErr"===n)err("Thread "+i.threadId+": "+i.text);else if("alert"===n)alert("Thread "+i.threadId+": "+i.text);else if("exit"===n){e.pthread&&Atomics.load(HEAPU32,e.pthread.thread+68>>2)&&PThread.returnWorkerToPool(e)}else if("exitProcess"===n){noExitRuntime=!1;try{exit(i.returnCode)}catch(r){if(r instanceof ExitStatus)return;throw r}}else"cancelDone"===n?PThread.returnWorkerToPool(e):"objectTransfer"===n?PThread.receiveObjectTransfer(r.data):"setimmediate"===r.data.target?e.postMessage(r.data):err("worker sent an unknown command "+n);PThread.currentProxiedOperationCallerThread=void 0},e.onerror=function(e){err("pthread sent an error! "+e.filename+":"+e.lineno+": "+e.message)},ENVIRONMENT_IS_NODE&&(e.on("message",(function(t){e.onmessage({data:t})})),e.on("error",(function(t){e.onerror(t)})),e.on("exit",(function(e){console.log("worker exited - TODO: update the worker queue?")}))),assert(wasmMemory,"WebAssembly memory should have been loaded by now!"),assert(wasmModule,"WebAssembly Module should have been loaded by now!"),e.postMessage({cmd:"load",urlOrBlob:Module.mainScriptUrlOrBlob||_scriptDir,wasmMemory:wasmMemory,wasmModule:wasmModule,DYNAMIC_BASE:DYNAMIC_BASE,DYNAMICTOP_PTR:DYNAMICTOP_PTR})},allocateUnusedWorker:function(){var e=locateFile("samtools.worker.js");PThread.unusedWorkers.push(new Worker(e))},getNewWorker:function(){return 0==PThread.unusedWorkers.length&&(PThread.allocateUnusedWorker(),PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])),PThread.unusedWorkers.length>0?PThread.unusedWorkers.pop():null},busySpinWait:function(e){for(var t=performance.now()+e;performance.now()<t;);}};function establishStackSpaceInJsModule(e,t){STACK_BASE=STACKTOP=e,___set_stack_limit(STACK_MAX=t),writeStackCookie(),establishStackSpace(e,t)}function getNoExitRuntime(){return noExitRuntime}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),demangleAll(e)}function ___assert_fail(e,t,r,i){abort("Assertion failed: "+UTF8ToString(e)+", at: "+[t?UTF8ToString(t):"unknown filename",r,i?UTF8ToString(i):"unknown function"])}function ___cxa_allocate_exception(e){return _malloc(e)}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module.establishStackSpaceInJsModule=establishStackSpaceInJsModule,Module.getNoExitRuntime=getNoExitRuntime;var ___exception_infos={},___exception_caught=[];function ___exception_addRef(e){e&&___exception_infos[e].refcount++}function ___exception_deAdjust(e){if(!e||___exception_infos[e])return e;for(var t in ___exception_infos)for(var r=+t,i=___exception_infos[r].adjusted,n=i.length,o=0;o<n;o++)if(i[o]===e)return r;return e}function ___cxa_begin_catch(e){var t=___exception_infos[e];return t&&!t.caught&&(t.caught=!0,__ZSt18uncaught_exceptionv.uncaught_exceptions--),t&&(t.rethrown=!1),___exception_caught.push(e),___exception_addRef(___exception_deAdjust(e)),e}var ___exception_last=0;function ___cxa_free_exception(e){try{return _free(e)}catch(e){err("exception during cxa_free_exception: "+e)}}function ___exception_decRef(e){if(e){var t=___exception_infos[e];assert(t.refcount>0),t.refcount--,0!==t.refcount||t.rethrown||(t.destructor&&Module.dynCall_ii(t.destructor,e),delete ___exception_infos[e],___cxa_free_exception(e))}}function ___cxa_end_catch(){_setThrew(0);var e=___exception_caught.pop();e&&(___exception_decRef(___exception_deAdjust(e)),___exception_last=0)}function ___cxa_find_matching_catch_2(){var e=___exception_last;if(!e)return 0|(setTempRet0(0),0);var t=___exception_infos[e],r=t.type;if(!r)return 0|(setTempRet0(0),e);var i=Array.prototype.slice.call(arguments),n=(___cxa_is_pointer_type(r),91296);HEAP32[n>>2]=e,e=n;for(var o=0;o<i.length;o++)if(i[o]&&___cxa_can_catch(i[o],r,e))return e=HEAP32[e>>2],t.adjusted.push(e),0|(setTempRet0(i[o]),e);return e=HEAP32[e>>2],0|(setTempRet0(r),e)}function ___cxa_find_matching_catch_3(){var e=___exception_last;if(!e)return 0|(setTempRet0(0),0);var t=___exception_infos[e],r=t.type;if(!r)return 0|(setTempRet0(0),e);var i=Array.prototype.slice.call(arguments),n=(___cxa_is_pointer_type(r),91296);HEAP32[n>>2]=e,e=n;for(var o=0;o<i.length;o++)if(i[o]&&___cxa_can_catch(i[o],r,e))return e=HEAP32[e>>2],t.adjusted.push(e),0|(setTempRet0(i[o]),e);return e=HEAP32[e>>2],0|(setTempRet0(r),e)}function ___cxa_rethrow(){var e=___exception_caught.pop();throw e=___exception_deAdjust(e),___exception_infos[e].rethrown||(___exception_caught.push(e),___exception_infos[e].rethrown=!0),___exception_last=e,e}function ___cxa_throw(e,t,r){throw ___exception_infos[e]={ptr:e,adjusted:[e],type:t,destructor:r,refcount:0,caught:!1,rethrown:!1},___exception_last=e,"uncaught_exception"in __ZSt18uncaught_exceptionv?__ZSt18uncaught_exceptionv.uncaught_exceptions++:__ZSt18uncaught_exceptionv.uncaught_exceptions=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_uncaught_exceptions(){return __ZSt18uncaught_exceptionv.uncaught_exceptions}function _emscripten_get_now(){abort()}function _nanosleep(e,t){if(0===e)return ___setErrNo(28),-1;var r=HEAP32[e>>2],i=HEAP32[e+4>>2];return i<0||i>999999999||r<0?(___setErrNo(28),-1):(0!==t&&(HEAP32[t>>2]=0,HEAP32[t+4>>2]=0),_usleep(1e6*r+i/1e3))}var _emscripten_get_now_is_monotonic=ENVIRONMENT_IS_NODE||"undefined"!=typeof dateNow||1;function ___setErrNo(e){return Module.___errno_location?HEAP32[Module.___errno_location()>>2]=e:err("failed to set errno from JS"),e}function ___map_file(e,t){return ___setErrNo(63),-1}function ___resumeException(e){throw ___exception_last||(___exception_last=e),e}function _clock_gettime(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!_emscripten_get_now_is_monotonic)return ___setErrNo(28),-1;r=_emscripten_get_now()}return HEAP32[t>>2]=r/1e3|0,HEAP32[t+4>>2]=r%1e3*1e3*1e3|0,0}function ___clock_gettime(e,t){return _clock_gettime(e,t)}function ___handle_stack_overflow(){abort("stack overflow")}function ___lock(){}var PATH={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=PATH.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=PATH.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return PATH.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return PATH.normalize(e.join("/"))},join2:function(e,t){return PATH.normalize(e+"/"+t)}},PATH_FS={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:FS.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t="/"===i.charAt(0)}return(t?"/":"")+(e=PATH.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=PATH_FS.resolve(e).substr(1),t=PATH_FS.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var o=0,a=0;a<i;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new FS.ErrnoError(29)}if(void 0===s&&0===o)throw new FS.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(60);try{for(var o=0;o<i;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new FS.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(ENVIRONMENT_IS_NODE){var r=Buffer.alloc?Buffer.alloc(256):new Buffer(256),i=0;try{i=nodeFS.readSync(process.stdin.fd,r,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;i=0}t=i>0?r.slice(0,i).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=intArrayFromString(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(out(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(err(UTF8ArrayToString(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},MEMFS={ops_table:null,mount:function(e){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(FS.isBlkdev(r)||FS.isFIFO(r))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var n=FS.createNode(e,t,r,i);return FS.isDir(n.mode)?(n.node_ops=MEMFS.ops_table.dir.node,n.stream_ops=MEMFS.ops_table.dir.stream,n.contents={}):FS.isFile(n.mode)?(n.node_ops=MEMFS.ops_table.file.node,n.stream_ops=MEMFS.ops_table.file.stream,n.usedBytes=0,n.contents=null):FS.isLink(n.mode)?(n.node_ops=MEMFS.ops_table.link.node,n.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(n.mode)&&(n.node_ops=MEMFS.ops_table.chrdev.node,n.stream_ops=MEMFS.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r<e.usedBytes;++r)t.push(e.contents[r]);return t}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var r=e.contents;return e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length<t;)e.contents.push(0);e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=FS.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,FS.isDir(e.mode)?t.size=4096:FS.isFile(e.mode)?t.size=e.usedBytes:FS.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&MEMFS.resizeFileStorage(e,t.size)},lookup:function(e,t){throw FS.genericErrors[44]},mknod:function(e,t,r,i){return MEMFS.createNode(e,t,r,i)},rename:function(e,t,r){if(FS.isDir(e.mode)){var i;try{i=FS.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new FS.ErrnoError(55)}delete e.parent.contents[e.name],e.name=r,t.contents[r]=e,e.parent=t},unlink:function(e,t){delete e.contents[t]},rmdir:function(e,t){var r=FS.lookupNode(e,t);for(var i in r.contents)throw new FS.ErrnoError(55);delete e.contents[t]},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var i=MEMFS.createNode(e,t,41471,0);return i.link=r,i},readlink:function(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,i,n){var o=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(assert(a>=0),a>8&&o.subarray)t.set(o.subarray(n,n+a),r);else for(var s=0;s<a;s++)t[r+s]=o[n+s];return a},write:function(e,t,r,i,n,o){if(assert(!(t instanceof ArrayBuffer)),!i)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return assert(0===n,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+i),a.usedBytes=i,i;if(0===a.usedBytes&&0===n)return a.contents=t.slice(r,r+i),a.usedBytes=i,i;if(n+i<=a.usedBytes)return a.contents.set(t.subarray(r,r+i),n),i}if(MEMFS.expandFileStorage(a,n+i),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+i),n);else for(var s=0;s<i;s++)a.contents[n+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,n+i),i},llseek:function(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&FS.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new FS.ErrnoError(28);return i},allocate:function(e,t,r){MEMFS.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,i,n,o,a){if(assert(!(t instanceof ArrayBuffer)),!FS.isFile(e.node.mode))throw new FS.ErrnoError(43);var s,u,c=e.node.contents;if(2&a||c.buffer!==t.buffer){(n>0||n+i<e.node.usedBytes)&&(c=c.subarray?c.subarray(n,n+i):Array.prototype.slice.call(c,n,n+i)),u=!0;var f=t.buffer==HEAP8.buffer;if(!(s=_malloc(i)))throw new FS.ErrnoError(48);(f?HEAP8:t).set(c,s)}else u=!1,s=c.byteOffset;return{ptr:s,allocated:u}},msync:function(e,t,r,i,n){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(43);if(2&n)return 0;MEMFS.stream_ops.write(e,t,0,i,r,!1);return 0}}},IDBFS={dbs:{},indexedDB:function(){if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"==typeof window&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBFS used, but indexedDB not supported"),e},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(e){return MEMFS.mount.apply(null,arguments)},syncfs:function(e,t,r){IDBFS.getLocalSet(e,(function(i,n){if(i)return r(i);IDBFS.getRemoteSet(e,(function(e,i){if(e)return r(e);var o=t?i:n,a=t?n:i;IDBFS.reconcile(o,a,r)}))}))},getDB:function(e,t){var r,i=IDBFS.dbs[e];if(i)return t(null,i);try{r=IDBFS.indexedDB().open(e,IDBFS.DB_VERSION)}catch(e){return t(e)}if(!r)return t("Unable to connect to IndexedDB");r.onupgradeneeded=function(e){var t,r=e.target.result,i=e.target.transaction;(t=r.objectStoreNames.contains(IDBFS.DB_STORE_NAME)?i.objectStore(IDBFS.DB_STORE_NAME):r.createObjectStore(IDBFS.DB_STORE_NAME)).indexNames.contains("timestamp")||t.createIndex("timestamp","timestamp",{unique:!1})},r.onsuccess=function(){i=r.result,IDBFS.dbs[e]=i,t(null,i)},r.onerror=function(e){t(this.error),e.preventDefault()}},getLocalSet:function(e,t){var r={};function i(e){return"."!==e&&".."!==e}function n(e){return function(t){return PATH.join2(e,t)}}for(var o=FS.readdir(e.mountpoint).filter(i).map(n(e.mountpoint));o.length;){var a,s=o.pop();try{a=FS.stat(s)}catch(e){return t(e)}FS.isDir(a.mode)&&o.push.apply(o,FS.readdir(s).filter(i).map(n(s))),r[s]={timestamp:a.mtime}}return t(null,{type:"local",entries:r})},getRemoteSet:function(e,t){var r={};IDBFS.getDB(e.mountpoint,(function(e,i){if(e)return t(e);try{var n=i.transaction([IDBFS.DB_STORE_NAME],"readonly");n.onerror=function(e){t(this.error),e.preventDefault()},n.objectStore(IDBFS.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t(null,{type:"remote",db:i,entries:r});r[n.primaryKey]={timestamp:n.key},n.continue()}}catch(e){return t(e)}}))},loadLocalEntry:function(e,t){var r,i;try{i=FS.lookupPath(e).node,r=FS.stat(e)}catch(e){return t(e)}return FS.isDir(r.mode)?t(null,{timestamp:r.mtime,mode:r.mode}):FS.isFile(r.mode)?(i.contents=MEMFS.getFileDataAsTypedArray(i),t(null,{timestamp:r.mtime,mode:r.mode,contents:i.contents})):t(new Error("node type not supported"))},storeLocalEntry:function(e,t,r){try{if(FS.isDir(t.mode))FS.mkdir(e,t.mode);else{if(!FS.isFile(t.mode))return r(new Error("node type not supported"));FS.writeFile(e,t.contents,{canOwn:!0})}FS.chmod(e,t.mode),FS.utime(e,t.timestamp,t.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(e,t){try{FS.lookupPath(e);var r=FS.stat(e);FS.isDir(r.mode)?FS.rmdir(e):FS.isFile(r.mode)&&FS.unlink(e)}catch(e){return t(e)}t(null)},loadRemoteEntry:function(e,t,r){var i=e.get(t);i.onsuccess=function(e){r(null,e.target.result)},i.onerror=function(e){r(this.error),e.preventDefault()}},storeRemoteEntry:function(e,t,r,i){var n=e.put(r,t);n.onsuccess=function(){i(null)},n.onerror=function(e){i(this.error),e.preventDefault()}},removeRemoteEntry:function(e,t,r){var i=e.delete(t);i.onsuccess=function(){r(null)},i.onerror=function(e){r(this.error),e.preventDefault()}},reconcile:function(e,t,r){var i=0,n=[];Object.keys(e.entries).forEach((function(r){var o=e.entries[r],a=t.entries[r];(!a||o.timestamp>a.timestamp)&&(n.push(r),i++)}));var o=[];if(Object.keys(t.entries).forEach((function(r){t.entries[r];e.entries[r]||(o.push(r),i++)})),!i)return r(null);var a=!1,s=("remote"===e.type?e.db:t.db).transaction([IDBFS.DB_STORE_NAME],"readwrite"),u=s.objectStore(IDBFS.DB_STORE_NAME);function c(e){if(e&&!a)return a=!0,r(e)}s.onerror=function(e){c(this.error),e.preventDefault()},s.oncomplete=function(e){a||r(null)},n.sort().forEach((function(e){"local"===t.type?IDBFS.loadRemoteEntry(u,e,(function(t,r){if(t)return c(t);IDBFS.storeLocalEntry(e,r,c)})):IDBFS.loadLocalEntry(e,(function(t,r){if(t)return c(t);IDBFS.storeRemoteEntry(u,e,r,c)}))})),o.sort().reverse().forEach((function(e){"local"===t.type?IDBFS.removeLocalEntry(e,c):IDBFS.removeRemoteEntry(u,e,c)}))}},NODEFS={isWindows:!1,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/);var e=process.binding("constants");e.fs&&(e=e.fs),NODEFS.flagsForNodeMap={1024:e.O_APPEND,64:e.O_CREAT,128:e.O_EXCL,0:e.O_RDONLY,2:e.O_RDWR,4096:e.O_SYNC,512:e.O_TRUNC,1:e.O_WRONLY}},bufferFrom:function(e){return Buffer.alloc?Buffer.from(e):new Buffer(e)},convertNodeCode:function(e){var t=e.code;return assert(t in ERRNO_CODES),ERRNO_CODES[t]},mount:function(e){return assert(ENVIRONMENT_IS_NODE),NODEFS.createNode(null,"/",NODEFS.getMode(e.opts.root),0)},createNode:function(e,t,r,i){if(!FS.isDir(r)&&!FS.isFile(r)&&!FS.isLink(r))throw new FS.ErrnoError(28);var n=FS.createNode(e,t,r);return n.node_ops=NODEFS.node_ops,n.stream_ops=NODEFS.stream_ops,n},getMode:function(e){var t;try{t=fs.lstatSync(e),NODEFS.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return t.mode},realPath:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.mount.opts.root),t.reverse(),PATH.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var r in NODEFS.flagsForNodeMap)e&r&&(t|=NODEFS.flagsForNodeMap[r],e^=r);if(e)throw new FS.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,r=NODEFS.realPath(e);try{t=fs.lstatSync(r)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return NODEFS.isWindows&&!t.blksize&&(t.blksize=4096),NODEFS.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:function(e,t){var r=NODEFS.realPath(e);try{if(void 0!==t.mode&&(fs.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.timestamp){var i=new Date(t.timestamp);fs.utimesSync(r,i,i)}void 0!==t.size&&fs.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},lookup:function(e,t){var r=PATH.join2(NODEFS.realPath(e),t),i=NODEFS.getMode(r);return NODEFS.createNode(e,t,i)},mknod:function(e,t,r,i){var n=NODEFS.createNode(e,t,r,i),o=NODEFS.realPath(n);try{FS.isDir(n.mode)?fs.mkdirSync(o,n.mode):fs.writeFileSync(o,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return n},rename:function(e,t,r){var i=NODEFS.realPath(e),n=PATH.join2(NODEFS.realPath(t),r);try{fs.renameSync(i,n)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},unlink:function(e,t){var r=PATH.join2(NODEFS.realPath(e),t);try{fs.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},rmdir:function(e,t){var r=PATH.join2(NODEFS.realPath(e),t);try{fs.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readdir:function(e){var t=NODEFS.realPath(e);try{return fs.readdirSync(t)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},symlink:function(e,t,r){var i=PATH.join2(NODEFS.realPath(e),t);try{fs.symlinkSync(r,i)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readlink:function(e){var t=NODEFS.realPath(e);try{return t=fs.readlinkSync(t),t=NODEJS_PATH.relative(NODEJS_PATH.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=NODEFS.realPath(e.node);try{FS.isFile(e.node.mode)&&(e.nfd=fs.openSync(t,NODEFS.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},close:function(e){try{FS.isFile(e.node.mode)&&e.nfd&&fs.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},read:function(e,t,r,i,n){if(0===i)return 0;try{return fs.readSync(e.nfd,NODEFS.bufferFrom(t.buffer),r,i,n)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},write:function(e,t,r,i,n){try{return fs.writeSync(e.nfd,NODEFS.bufferFrom(t.buffer),r,i,n)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},llseek:function(e,t,r){var i=t;if(1===r)i+=e.position;else if(2===r&&FS.isFile(e.node.mode))try{i+=fs.fstatSync(e.nfd).size}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}if(i<0)throw new FS.ErrnoError(28);return i}}},ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=PATH_FS.resolve(FS.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var i in r)void 0===t[i]&&(t[i]=r[i]);if(t.recurse_count>8)throw new FS.ErrnoError(32);for(var n=PATH.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=FS.root,a="/",s=0;s<n.length;s++){var u=s===n.length-1;if(u&&t.parent)break;if(o=FS.lookupNode(o,n[s]),a=PATH.join2(a,n[s]),FS.isMountpoint(o)&&(!u||u&&t.follow_mount)&&(o=o.mounted.root),!u||t.follow)for(var c=0;FS.isLink(o.mode);){var f=FS.readlink(a);if(a=PATH_FS.resolve(PATH.dirname(a),f),o=FS.lookupPath(a,{recurse_count:t.recurse_count}).node,c++>40)throw new FS.ErrnoError(32)}}return{path:a,node:o}},getPath:function(e){for(var t;;){if(FS.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%FS.nameTable.length},hashAddNode:function(e){var t=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[t],FS.nameTable[t]=e},hashRemoveNode:function(e){var t=FS.hashName(e.parent.id,e.name);if(FS.nameTable[t]===e)FS.nameTable[t]=e.name_next;else for(var r=FS.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=FS.mayLookup(e);if(r)throw new FS.ErrnoError(r,e);for(var i=FS.hashName(e.id,t),n=FS.nameTable[i];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return FS.lookup(e,t)},createNode:function(e,t,r,i){if(!FS.FSNode){FS.FSNode=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},FS.FSNode.prototype={};var n=365,o=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&n)===n},set:function(e){e?this.mode|=n:this.mode&=-366}},write:{get:function(){return(this.mode&o)===o},set:function(e){e?this.mode|=o:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var a=new FS.FSNode(e,t,r,i);return FS.hashAddNode(a),a},destroyNode:function(e){FS.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=FS.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return FS.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=FS.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{FS.lookupNode(e,t);return 20}catch(e){}return FS.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var i;try{i=FS.lookupNode(e,t)}catch(e){return e.errno}var n=FS.nodePermissions(e,"wx");if(n)return n;if(r){if(!FS.isDir(i.mode))return 54;if(FS.isRoot(i)||FS.getPath(i)===FS.cwd())return 10}else if(FS.isDir(i.mode))return 31;return 0},mayOpen:function(e,t){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&("r"!==FS.flagsToPermissionString(t)||512&t)?31:FS.nodePermissions(e,FS.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||FS.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!FS.streams[r])return r;throw new FS.ErrnoError(33)},getStream:function(e){return FS.streams[e]},createStream:function(e,t,r){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var i=new FS.FSStream;for(var n in e)i[n]=e[n];e=i;var o=FS.nextfd(t,r);return e.fd=o,FS.streams[o]=e,e},closeStream:function(e){FS.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=FS.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new FS.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){FS.devices[e]={stream_ops:t}},getDevice:function(e){return FS.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=FS.getMounts(FS.root.mount),i=0;function n(e){return assert(FS.syncFSRequests>0),FS.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,r){if("string"==typeof e)throw e;var i,n="/"===r,o=!r;if(n&&FS.root)throw new FS.ErrnoError(10);if(!n&&!o){var a=FS.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,FS.isMountpoint(i))throw new FS.ErrnoError(10);if(!FS.isDir(i.mode))throw new FS.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,n?FS.root=u:i&&(i.mounted=s,i.mount&&i.mount.mounts.push(s)),u},unmount:function(e){var t=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(t.node))throw new FS.ErrnoError(28);var r=t.node,i=r.mounted,n=FS.getMounts(i);Object.keys(FS.nameTable).forEach((function(e){for(var t=FS.nameTable[e];t;){var r=t.name_next;-1!==n.indexOf(t.mount)&&FS.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(i);assert(-1!==o),r.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var i=FS.lookupPath(e,{parent:!0}).node,n=PATH.basename(e);if(!n||"."===n||".."===n)throw new FS.ErrnoError(28);var o=FS.mayCreate(i,n);if(o)throw new FS.ErrnoError(o);if(!i.node_ops.mknod)throw new FS.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,FS.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,FS.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{FS.mkdir(i,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,FS.mknod(e,t,r)},symlink:function(e,t){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var r=FS.lookupPath(t,{parent:!0}).node;if(!r)throw new FS.ErrnoError(44);var i=PATH.basename(t),n=FS.mayCreate(r,i);if(n)throw new FS.ErrnoError(n);if(!r.node_ops.symlink)throw new FS.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename:function(e,t){var r,i,n=PATH.dirname(e),o=PATH.dirname(t),a=PATH.basename(e),s=PATH.basename(t);try{r=FS.lookupPath(e,{parent:!0}).node,i=FS.lookupPath(t,{parent:!0}).node}catch(e){throw new FS.ErrnoError(10)}if(!r||!i)throw new FS.ErrnoError(44);if(r.mount!==i.mount)throw new FS.ErrnoError(75);var u,c=FS.lookupNode(r,a),f=PATH_FS.relative(e,o);if("."!==f.charAt(0))throw new FS.ErrnoError(28);if("."!==(f=PATH_FS.relative(t,n)).charAt(0))throw new FS.ErrnoError(55);try{u=FS.lookupNode(i,s)}catch(e){}if(c!==u){var l=FS.isDir(c.mode),d=FS.mayDelete(r,a,l);if(d)throw new FS.ErrnoError(d);if(d=u?FS.mayDelete(i,s,l):FS.mayCreate(i,s))throw new FS.ErrnoError(d);if(!r.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(c)||u&&FS.isMountpoint(u))throw new FS.ErrnoError(10);if(i!==r&&(d=FS.nodePermissions(r,"w")))throw new FS.ErrnoError(d);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(e,t)}catch(r){err("FS.trackingDelegate['willMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}FS.hashRemoveNode(c);try{r.node_ops.rename(c,i,s)}catch(e){throw e}finally{FS.hashAddNode(c)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(e,t)}catch(r){err("FS.trackingDelegate['onMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}}},rmdir:function(e){var t=FS.lookupPath(e,{parent:!0}).node,r=PATH.basename(e),i=FS.lookupNode(t,r),n=FS.mayDelete(t,r,!0);if(n)throw new FS.ErrnoError(n);if(!t.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(i))throw new FS.ErrnoError(10);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(t){err("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.node_ops.rmdir(t,r),FS.destroyNode(i);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(t){err("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readdir:function(e){var t=FS.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new FS.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=FS.lookupPath(e,{parent:!0}).node,r=PATH.basename(e),i=FS.lookupNode(t,r),n=FS.mayDelete(t,r,!1);if(n)throw new FS.ErrnoError(n);if(!t.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(i))throw new FS.ErrnoError(10);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(t){err("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.node_ops.unlink(t,r),FS.destroyNode(i);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(t){err("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readlink:function(e){var t=FS.lookupPath(e).node;if(!t)throw new FS.ErrnoError(44);if(!t.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=FS.lookupPath(e,{follow:!t}).node;if(!r)throw new FS.ErrnoError(44);if(!r.node_ops.getattr)throw new FS.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return FS.stat(e,!0)},chmod:function(e,t,r){var i;"string"==typeof e?i=FS.lookupPath(e,{follow:!r}).node:i=e;if(!i.node_ops.setattr)throw new FS.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:function(e,t){FS.chmod(e,t,!0)},fchmod:function(e,t){var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);FS.chmod(r.node,t)},chown:function(e,t,r,i){var n;"string"==typeof e?n=FS.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:function(e,t,r){FS.chown(e,t,r,!0)},fchown:function(e,t,r){var i=FS.getStream(e);if(!i)throw new FS.ErrnoError(8);FS.chown(i.node,t,r)},truncate:function(e,t){if(t<0)throw new FS.ErrnoError(28);var r;"string"==typeof e?r=FS.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(r.mode))throw new FS.ErrnoError(31);if(!FS.isFile(r.mode))throw new FS.ErrnoError(28);var i=FS.nodePermissions(r,"w");if(i)throw new FS.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);if(0==(2097155&r.flags))throw new FS.ErrnoError(28);FS.truncate(r.node,t)},utime:function(e,t,r){var i=FS.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open:function(e,t,r,i,n){if(""===e)throw new FS.ErrnoError(44);var o;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?FS.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)o=e;else{e=PATH.normalize(e);try{o=FS.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t)if(o){if(128&t)throw new FS.ErrnoError(20)}else o=FS.mknod(e,r,0),a=!0;if(!o)throw new FS.ErrnoError(44);if(FS.isChrdev(o.mode)&&(t&=-513),65536&t&&!FS.isDir(o.mode))throw new FS.ErrnoError(54);if(!a){var s=FS.mayOpen(o,t);if(s)throw new FS.ErrnoError(s)}512&t&&FS.truncate(o,0),t&=-641;var u=FS.createStream({node:o,path:FS.getPath(o),flags:t,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1},i,n);u.stream_ops.open&&u.stream_ops.open(u),!Module.logReadFiles||1&t||(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1,err("FS.trackingDelegate error on read file: "+e)));try{if(FS.trackingDelegate.onOpenFile){var c=0;1!=(2097155&t)&&(c|=FS.tracking.openFlags.READ),0!=(2097155&t)&&(c|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(e,c)}}catch(t){err("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return u},close:function(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{FS.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,i,n){if(i<0||n<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(1==(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var o=void 0!==n;if(o){if(!e.seekable)throw new FS.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return o||(e.position+=a),a},write:function(e,t,r,i,n,o){if(i<0||n<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(0==(2097155&e.flags))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);1024&e.flags&&FS.llseek(e,0,2);var a=void 0!==n;if(a){if(!e.seekable)throw new FS.ErrnoError(70)}else n=e.position;var s=e.stream_ops.write(e,t,r,i,n,o);a||(e.position+=s);try{e.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(e.path)}catch(t){err("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return s},allocate:function(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(t<0||r<=0)throw new FS.ErrnoError(28);if(0==(2097155&e.flags))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,i,n,o,a){if(0!=(2&o)&&0==(2&a)&&2!=(2097155&e.flags))throw new FS.ErrnoError(2);if(1==(2097155&e.flags))throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n,o,a)},msync:function(e,t,r,i,n){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,i=FS.open(e,t.flags),n=FS.stat(e).size,o=new Uint8Array(n);return FS.read(i,o,0,n,0),"utf8"===t.encoding?r=UTF8ArrayToString(o,0):"binary"===t.encoding&&(r=o),FS.close(i),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||"w";var i=FS.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(lengthBytesUTF8(t)+1),o=stringToUTF8Array(t,n,0,n.length);FS.write(i,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");FS.write(i,t,0,t.byteLength,void 0,r.canOwn)}FS.close(i)},cwd:function(){return FS.currentPath},chdir:function(e){var t=FS.lookupPath(e,{follow:!0});if(null===t.node)throw new FS.ErrnoError(44);if(!FS.isDir(t.node.mode))throw new FS.ErrnoError(54);var r=FS.nodePermissions(t.node,"x");if(r)throw new FS.ErrnoError(r);FS.currentPath=t.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){var e;if(FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(e,t,r,i,n){return i}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);e=function(){return crypto.getRandomValues(t),t[0]}}else if(ENVIRONMENT_IS_NODE)try{var r=__webpack_require__(132);e=function(){return r.randomBytes(1)[0]}}catch(e){}e||(e=function(){abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}),FS.createDevice("/dev","random",e),FS.createDevice("/dev","urandom",e),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc"),FS.mkdir("/proc/self"),FS.mkdir("/proc/self/fd"),FS.mount({mount:function(){var e=FS.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,t){var r=+t,i=FS.getStream(r);if(!i)throw new FS.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return i.path}}};return n.parent=n,n}},e}},{},"/proc/self/fd")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin","r"),t=FS.open("/dev/stdout","w"),r=FS.open("/dev/stderr","w");assert(0===e.fd,"invalid handle for stdin ("+e.fd+")"),assert(1===t.fd,"invalid handle for stdout ("+t.fd+")"),assert(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ERRNO_CODES)if(ERRNO_CODES[t]===e){this.code=t;break}},this.setErrno(e),this.message=ERRNO_MESSAGES[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=demangleAll(this.stack))},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[44].forEach((function(e){FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:NODEFS}},init:function(e,t,r){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=t||Module.stdout,Module.stderr=r||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var e=Module._fflush;e&&e(0);for(var t=0;t<FS.streams.length;t++){var r=FS.streams[t];r&&FS.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},joinPath:function(e,t){var r=PATH.join.apply(null,e);return t&&"/"==r[0]&&(r=r.substr(1)),r},absolutePath:function(e,t){return PATH_FS.resolve(t,e)},standardizePath:function(e){return PATH.normalize(e)},findObject:function(e,t){var r=FS.analyzePath(e,t);return r.exists?r.object:(___setErrNo(r.error),null)},analyzePath:function(e,t){try{e=(i=FS.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=FS.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=i.path,r.parentObject=i.node,r.name=PATH.basename(e),i=FS.lookupPath(e,{follow:!t}),r.exists=!0,r.path=i.path,r.object=i.node,r.name=i.node.name,r.isRoot="/"===i.path}catch(e){r.error=e.errno}return r},createFolder:function(e,t,r,i){var n=PATH.join2("string"==typeof e?e:FS.getPath(e),t),o=FS.getMode(r,i);return FS.mkdir(n,o)},createPath:function(e,t,r,i){e="string"==typeof e?e:FS.getPath(e);for(var n=t.split("/").reverse();n.length;){var o=n.pop();if(o){var a=PATH.join2(e,o);try{FS.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,i,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),t),a=FS.getMode(i,n);return FS.create(o,a)},createDataFile:function(e,t,r,i,n,o){var a=t?PATH.join2("string"==typeof e?e:FS.getPath(e),t):e,s=FS.getMode(i,n),u=FS.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}FS.chmod(u,146|s);var d=FS.open(u,"w");FS.write(d,r,0,r.length,0,o),FS.close(d),FS.chmod(u,s)}return u},createDevice:function(e,t,r,i){var n=PATH.join2("string"==typeof e?e:FS.getPath(e),t),o=FS.getMode(!!r,!!i);FS.createDevice.major||(FS.createDevice.major=64);var a=FS.makedev(FS.createDevice.major++,0);return FS.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){i&&i.buffer&&i.buffer.length&&i(10)},read:function(e,t,i,n,o){for(var a=0,s=0;s<n;s++){var u;try{u=r()}catch(e){throw new FS.ErrnoError(29)}if(void 0===u&&0===a)throw new FS.ErrnoError(6);if(null==u)break;a++,t[i+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n,o){for(var a=0;a<n;a++)try{i(t[r+a])}catch(e){throw new FS.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}}),FS.mkdev(n,o,a)},createLink:function(e,t,r,i,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),t);return FS.symlink(r,o)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var t=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!read_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(read_(e.url),!0),e.usedBytes=e.contents.length}catch(e){t=!1}return t||___setErrNo(29),t},createLazyFile:function(e,t,r,i,n){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var s=this;s.setDataGetter((function(e){var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):intArrayFromString(n.responseText||"",!0)}(t,n)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&i||(a=i=1,i=this.getter(0).length,a=i,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=FS.createFile(e,t,s,i,n);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(u.stream_ops).forEach((function(e){var t=u.stream_ops[e];c[e]=function(){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(29);return t.apply(null,arguments)}})),c.read=function(e,t,r,i,n){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(29);var o=e.node.contents;if(n>=o.length)return 0;var a=Math.min(o.length-n,i);if(assert(a>=0),o.slice)for(var s=0;s<a;s++)t[r+s]=o[n+s];else for(s=0;s<a;s++)t[r+s]=o.get(n+s);return a},u.stream_ops=c,u},createPreloadedFile:function(e,t,r,i,n,o,a,s,u,c){Browser.init();var f=t?PATH_FS.resolve(PATH.join2(e,t)):e,l=getUniqueRunDependency("cp "+f);function d(r){function d(r){c&&c(),s||FS.createDataFile(e,t,r,i,n,u),o&&o(),removeRunDependency(l)}var h=!1;Module.preloadPlugins.forEach((function(e){h||e.canHandle(f)&&(e.handle(r,f,d,(function(){a&&a(),removeRunDependency(l)})),h=!0)})),h||d(r)}addRunDependency(l),"string"==typeof r?Browser.asyncLoad(r,(function(e){d(e)}),a):d(r)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,t,r){t=t||function(){},r=r||function(){};var i=FS.indexedDB();try{var n=i.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return r(e)}n.onupgradeneeded=function(){out("creating db"),n.result.createObjectStore(FS.DB_STORE_NAME)},n.onsuccess=function(){var i=n.result.transaction([FS.DB_STORE_NAME],"readwrite"),o=i.objectStore(FS.DB_STORE_NAME),a=0,s=0,u=e.length;function c(){0==s?t():r()}e.forEach((function(e){var t=o.put(FS.analyzePath(e).object.contents,e);t.onsuccess=function(){++a+s==u&&c()},t.onerror=function(){s++,a+s==u&&c()}})),i.onerror=r},n.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var i=FS.indexedDB();try{var n=i.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return r(e)}n.onupgradeneeded=r,n.onsuccess=function(){var i=n.result;try{var o=i.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=o.objectStore(FS.DB_STORE_NAME),s=0,u=0,c=e.length;function f(){0==u?t():r()}e.forEach((function(e){var t=a.get(e);t.onsuccess=function(){FS.analyzePath(e).exists&&FS.unlink(e),FS.createDataFile(PATH.dirname(e),PATH.basename(e),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=function(){u++,s+u==c&&f()}})),o.onerror=r},n.onerror=r}},SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(e,t){if("/"!==t[0]){var r;if(-100===e)r=FS.cwd();else{var i=FS.getStream(e);if(!i)throw new FS.ErrnoError(8);r=i.path}t=PATH.join2(r,t)}return t},doStat:function(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(FS.getPath(e.node)))return-54;throw e}return HEAP32[r>>2]=i.dev,HEAP32[r+4>>2]=0,HEAP32[r+8>>2]=i.ino,HEAP32[r+12>>2]=i.mode,HEAP32[r+16>>2]=i.nlink,HEAP32[r+20>>2]=i.uid,HEAP32[r+24>>2]=i.gid,HEAP32[r+28>>2]=i.rdev,HEAP32[r+32>>2]=0,tempI64=[i.size>>>0,(tempDouble=i.size,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>2]=tempI64[0],HEAP32[r+44>>2]=tempI64[1],HEAP32[r+48>>2]=4096,HEAP32[r+52>>2]=i.blocks,HEAP32[r+56>>2]=i.atime.getTime()/1e3|0,HEAP32[r+60>>2]=0,HEAP32[r+64>>2]=i.mtime.getTime()/1e3|0,HEAP32[r+68>>2]=0,HEAP32[r+72>>2]=i.ctime.getTime()/1e3|0,HEAP32[r+76>>2]=0,tempI64=[i.ino>>>0,(tempDouble=i.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+80>>2]=tempI64[0],HEAP32[r+84>>2]=tempI64[1],0},doMsync:function(e,t,r,i,n){var o=HEAPU8.slice(e,e+r);FS.msync(t,o,n,r,i)},doMkdir:function(e,t){return"/"===(e=PATH.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),FS.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var i=FS.readlink(e),n=Math.min(r,lengthBytesUTF8(i)),o=HEAP8[t+n];return stringToUTF8(i,t,r+1),HEAP8[t+n]=o,n},doAccess:function(e,t){if(-8&t)return-28;var r;if(!(r=FS.lookupPath(e,{follow:!0}).node))return-44;var i="";return 4&t&&(i+="r"),2&t&&(i+="w"),1&t&&(i+="x"),i&&FS.nodePermissions(r,i)?-2:0},doDup:function(e,t,r){var i=FS.getStream(r);return i&&FS.close(i),FS.open(e,t,0,r,r).fd},doReadv:function(e,t,r,i){for(var n=0,o=0;o<r;o++){var a=HEAP32[t+8*o>>2],s=HEAP32[t+(8*o+4)>>2],u=FS.read(e,HEAP8,a,s,i);if(u<0)return-1;if(n+=u,u<s)break}return n},doWritev:function(e,t,r,i){for(var n=0,o=0;o<r;o++){var a=HEAP32[t+8*o>>2],s=HEAP32[t+(8*o+4)>>2],u=FS.write(e,HEAP8,a,s,i);if(u<0)return-1;n+=u}return n},varargs:0,get:function(e){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return UTF8ToString(SYSCALLS.get())},getStreamFromFD:function(e){void 0===e&&(e=SYSCALLS.get());var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t},get64:function(){var e=SYSCALLS.get(),t=SYSCALLS.get();return assert(e>=0?0===t:-1===t),e},getZero:function(){assert(0===SYSCALLS.get())}};function ___syscall10(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(1,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr();return FS.unlink(r),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall102(e,t){err("missing function: ___syscall102"),abort(-1)}function ___syscall114(e,t){SYSCALLS.varargs=t;try{abort("cannot wait on child processes")}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall140(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get(),o=SYSCALLS.get(),a=SYSCALLS.get(),s=4294967296*i+(n>>>0),u=9007199254740992;return s<=-u||s>=u?-75:(FS.llseek(r,s,a),tempI64=[r.position>>>0,(tempDouble=r.position,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[o>>2]=tempI64[0],HEAP32[o+4>>2]=tempI64[1],r.getdents&&0===s&&0===a&&(r.getdents=null),0)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall142(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(4,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),i=SYSCALLS.get(),n=SYSCALLS.get(),o=SYSCALLS.get();SYSCALLS.get();assert(r<=64,"nfds must be less than or equal to 64"),assert(!o,"exceptfds not supported");for(var a=0,s=i?HEAP32[i>>2]:0,u=i?HEAP32[i+4>>2]:0,c=n?HEAP32[n>>2]:0,f=n?HEAP32[n+4>>2]:0,l=o?HEAP32[o>>2]:0,d=o?HEAP32[o+4>>2]:0,h=0,p=0,_=0,m=0,b=0,y=0,g=(i?HEAP32[i>>2]:0)|(n?HEAP32[n>>2]:0)|(o?HEAP32[o>>2]:0),v=(i?HEAP32[i+4>>2]:0)|(n?HEAP32[n+4>>2]:0)|(o?HEAP32[o+4>>2]:0),w=function(e,t,r,i){return e<32?t&i:r&i},E=0;E<r;E++){var S=1<<E%32;if(w(E,g,v,S)){var M=FS.getStream(E);if(!M)throw new FS.ErrnoError(8);var T=SYSCALLS.DEFAULT_POLLMASK;M.stream_ops.poll&&(T=M.stream_ops.poll(M)),1&T&&w(E,s,u,S)&&(E<32?h|=S:p|=S,a++),4&T&&w(E,c,f,S)&&(E<32?_|=S:m|=S,a++),2&T&&w(E,l,d,S)&&(E<32?b|=S:y|=S,a++)}}return i&&(HEAP32[i>>2]=h,HEAP32[i+4>>2]=p),n&&(HEAP32[n>>2]=_,HEAP32[n+4>>2]=m),o&&(HEAP32[o>>2]=b,HEAP32[o+4>>2]=y),a}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall144(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),i=SYSCALLS.get(),n=(SYSCALLS.get(),SYSCALLS.mappings[r]);return n?(SYSCALLS.doMsync(r,FS.getStream(n.fd),i,n.flags,0),0):0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall145(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();return SYSCALLS.doReadv(r,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function __emscripten_syscall_mmap2(e,t,r,i,n,o){var a;o<<=12;var s=!1;if(0!=(16&i)&&e%PAGE_SIZE!=0)return-28;if(0!=(32&i)){if(!(a=_memalign(PAGE_SIZE,t)))return-48;_memset(a,0,t),s=!0}else{var u=FS.getStream(n);if(!u)return-8;var c=FS.mmap(u,HEAPU8,e,t,o,r,i);a=c.ptr,s=c.allocated}return SYSCALLS.mappings[a]={malloc:a,len:t,allocated:s,fd:n,flags:i,offset:o},a}function ___syscall145(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();return SYSCALLS.doReadv(r,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall146(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();return SYSCALLS.doWritev(r,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall148(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(5,1,e,t);SYSCALLS.varargs=t;try{SYSCALLS.getStreamFromFD();return 0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall15(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(5,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get();return FS.chmod(r,i),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall168(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(7,1,e,t);SYSCALLS.varargs=t;try{for(var r=SYSCALLS.get(),i=SYSCALLS.get(),n=(SYSCALLS.get(),0),o=0;o<i;o++){var a=r+8*o,s=HEAP32[a>>2],u=HEAP16[a+4>>1],c=32,f=FS.getStream(s);f&&(c=SYSCALLS.DEFAULT_POLLMASK,f.stream_ops.poll&&(c=f.stream_ops.poll(f))),(c&=24|u)&&n++,HEAP16[a+6>>1]=c}return n}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall183(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(6,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),i=SYSCALLS.get();if(0===i)return-28;var n=FS.cwd();return i<lengthBytesUTF8(n)+1?-68:(stringToUTF8(n,r,i),r)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall192(e,t){SYSCALLS.varargs=t;try{return __emscripten_syscall_mmap2(SYSCALLS.get(),SYSCALLS.get(),SYSCALLS.get(),SYSCALLS.get(),SYSCALLS.get(),SYSCALLS.get())}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall194(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(7,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),i=(SYSCALLS.getZero(),SYSCALLS.get64());return FS.ftruncate(r,i),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall195(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(8,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get();return SYSCALLS.doStat(FS.stat,r,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall196(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(11,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get();return SYSCALLS.doStat(FS.lstat,r,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall197(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(9,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get();return SYSCALLS.doStat(FS.stat,r.path,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall199(e,t){return ___syscall202(e,t)}var PROCINFO={ppid:1,pid:42,sid:42,pgid:42};function ___syscall20(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(10,1,e,t);SYSCALLS.varargs=t;try{return PROCINFO.pid}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall202(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall219(e,t){SYSCALLS.varargs=t;try{return 0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall220(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();r.getdents||(r.getdents=FS.readdir(r.path));for(var o=280,a=0,s=FS.llseek(r,0,1),u=Math.floor(s/o);u<r.getdents.length&&a+o<=n;){var c,f,l=r.getdents[u];if("."===l[0])c=1,f=4;else{var d=FS.lookupNode(r.node,l);c=d.id,f=FS.isChrdev(d.mode)?2:FS.isDir(d.mode)?4:FS.isLink(d.mode)?10:8}tempI64=[c>>>0,(tempDouble=c,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i+a>>2]=tempI64[0],HEAP32[i+a+4>>2]=tempI64[1],tempI64=[(u+1)*o>>>0,(tempDouble=(u+1)*o,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i+a+8>>2]=tempI64[0],HEAP32[i+a+12>>2]=tempI64[1],HEAP16[i+a+16>>1]=280,HEAP8[i+a+18>>0]=f,stringToUTF8(l,i+a+19,256),a+=o,u+=1}return FS.llseek(r,u*o,0),a}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall221(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(11,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();switch(SYSCALLS.get()){case 0:return(i=SYSCALLS.get())<0?-28:FS.open(r.path,r.flags,0,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=SYSCALLS.get();return r.flags|=i,0;case 12:i=SYSCALLS.get();return HEAP16[i+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return ___setErrNo(28),-1;default:return-28}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall29(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(15,1,e,t);SYSCALLS.varargs=t;try{return-27}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall3(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(12,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();return FS.read(r,HEAP8,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall33(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(13,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get();return SYSCALLS.doAccess(r,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall330(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get();return assert(!SYSCALLS.get()),r.fd===i?-28:SYSCALLS.doDup(r.path,r.flags,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall38(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(14,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.getStr();return FS.rename(r,i),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall39(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(15,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get();return SYSCALLS.doMkdir(r,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall4(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(16,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get(),n=SYSCALLS.get();return FS.write(r,HEAP8,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall40(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr();return FS.rmdir(r),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall41(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(17,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();return FS.open(r.path,r.flags,0).fd}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount:function(e){return FS.createNode(null,"/",16895,0)},createPipe:function(){var e={buckets:[]};e.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=PIPEFS.nextname(),r=PIPEFS.nextname(),i=FS.createNode(PIPEFS.root,t,4096,0),n=FS.createNode(PIPEFS.root,r,4096,0);i.pipe=e,n.pipe=e;var o=FS.createStream({path:t,node:i,flags:FS.modeStringToFlags("r"),seekable:!1,stream_ops:PIPEFS.stream_ops});i.stream=o;var a=FS.createStream({path:r,node:n,flags:FS.modeStringToFlags("w"),seekable:!1,stream_ops:PIPEFS.stream_ops});return n.stream=a,{readable_fd:o.fd,writable_fd:a.fd}},stream_ops:{poll:function(e){var t=e.node.pipe;if(1==(2097155&e.flags))return 260;if(t.buckets.length>0)for(var r=0;r<t.buckets.length;r++){var i=t.buckets[r];if(i.offset-i.roffset>0)return 65}return 0},ioctl:function(e,t,r){return ERRNO_CODES.EINVAL},fsync:function(e){return ERRNO_CODES.EINVAL},read:function(e,t,r,i,n){for(var o=e.node.pipe,a=0,s=0;s<o.buckets.length;s++){var u=o.buckets[s];a+=u.offset-u.roffset}assert(t instanceof ArrayBuffer||ArrayBuffer.isView(t));var c=t.subarray(r,r+i);if(i<=0)return 0;if(0==a)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);var f=Math.min(a,i),l=f,d=0;for(s=0;s<o.buckets.length;s++){var h=o.buckets[s],p=h.offset-h.roffset;if(f<=p){var _=h.buffer.subarray(h.roffset,h.offset);f<p?(_=_.subarray(0,f),h.roffset+=f):d++,c.set(_);break}_=h.buffer.subarray(h.roffset,h.offset);c.set(_),c=c.subarray(_.byteLength),f-=_.byteLength,d++}return d&&d==o.buckets.length&&(d--,o.buckets[d].offset=0,o.buckets[d].roffset=0),o.buckets.splice(0,d),l},write:function(e,t,r,i,n){var o=e.node.pipe;assert(t instanceof ArrayBuffer||ArrayBuffer.isView(t));var a=t.subarray(r,r+i),s=a.byteLength;if(s<=0)return 0;var u=null;0==o.buckets.length?(u={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0},o.buckets.push(u)):u=o.buckets[o.buckets.length-1],assert(u.offset<=PIPEFS.BUCKET_BUFFER_SIZE);var c=PIPEFS.BUCKET_BUFFER_SIZE-u.offset;if(c>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;c>0&&(u.buffer.set(a.subarray(0,c),u.offset),u.offset+=c,a=a.subarray(c,a.byteLength));for(var f=a.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0,l=a.byteLength%PIPEFS.BUCKET_BUFFER_SIZE,d=0;d<f;d++){var h={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:PIPEFS.BUCKET_BUFFER_SIZE,roffset:0};o.buckets.push(h),h.buffer.set(a.subarray(0,PIPEFS.BUCKET_BUFFER_SIZE)),a=a.subarray(PIPEFS.BUCKET_BUFFER_SIZE,a.byteLength)}if(l>0){h={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0};o.buckets.push(h),h.buffer.set(a)}return s},close:function(e){e.node.pipe.buckets=null}},nextname:function(){return PIPEFS.nextname.current||(PIPEFS.nextname.current=0),"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall42(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.get();if(0==r)throw new FS.ErrnoError(21);var i=PIPEFS.createPipe();return HEAP32[r>>2]=i.readable_fd,HEAP32[r+4>>2]=i.writable_fd,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall5(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(18,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get(),n=SYSCALLS.get();return FS.open(r,i,n).fd}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall54(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(19,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get();switch(i){case 21509:case 21505:return r.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var n=SYSCALLS.get();return HEAP32[n>>2]=0,0;case 21520:return r.tty?-28:-59;case 21531:n=SYSCALLS.get();return FS.ioctl(r,i,n);case 21523:case 21524:return r.tty?0:-59;default:abort("bad ioctl syscall "+i)}}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall6(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall63(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.getStreamFromFD(),i=SYSCALLS.get();return r.fd===i?i:SYSCALLS.doDup(r.path,r.flags,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall85(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(20,1,e,t);SYSCALLS.varargs=t;try{var r=SYSCALLS.getStr(),i=SYSCALLS.get(),n=SYSCALLS.get();return SYSCALLS.doReadlink(r,i,n)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___syscall91(e,t){SYSCALLS.varargs=t;try{var r=SYSCALLS.get(),i=SYSCALLS.get();return __emscripten_syscall_munmap(r,i)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),-e.errno}}function ___unlock(){}function ___wait(){}function __emscripten_notify_thread_queue(e,t){if(e==t)postMessage({cmd:"processQueuedMainThreadWork"});else if(ENVIRONMENT_IS_PTHREAD)postMessage({targetThread:e,cmd:"processThreadQueue"});else{var r=PThread.pthreads[e],i=r&&r.worker;if(!i)return void err("Cannot send message to thread with ID "+e+", unknown thread ID!");i.postMessage({cmd:"processThreadQueue"})}return 1}function _args_get(e,t){var r=0;return mainArgs.forEach((function(i,n){var o=t+r;HEAP32[e+4*n>>2]=o,writeAsciiToMemory(i,o),r+=i.length+1})),0}function _args_sizes_get(e,t){HEAP32[e>>2]=mainArgs.length;var r=0;return mainArgs.forEach((function(e){r+=e.length+1})),HEAP32[t>>2]=r,0}var _abs=Math_abs;function _abort(){abort()}function _atexit(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(21,1,e,t);__ATEXIT__.unshift({func:e,arg:t})}var __sigalrm_handler=0;function _alarm(e){setTimeout((function(){__sigalrm_handler&&dynCall_vi(__sigalrm_handler,0)}),1e3*e)}function _clock(){return void 0===_clock.start&&(_clock.start=Date.now()),1e3*(Date.now()-_clock.start)|0}function _curl_easy_cleanup(){err("missing function: curl_easy_cleanup"),abort(-1)}function _curl_easy_duphandle(){err("missing function: curl_easy_duphandle"),abort(-1)}function _curl_easy_getinfo(){err("missing function: curl_easy_getinfo"),abort(-1)}function _curl_easy_init(){err("missing function: curl_easy_init"),abort(-1)}function _curl_easy_pause(){err("missing function: curl_easy_pause"),abort(-1)}function _curl_easy_reset(){err("missing function: curl_easy_reset"),abort(-1)}function _curl_easy_setopt(){err("missing function: curl_easy_setopt"),abort(-1)}function _curl_global_cleanup(){err("missing function: curl_global_cleanup"),abort(-1)}function _curl_global_init(){err("missing function: curl_global_init"),abort(-1)}function _curl_multi_add_handle(){err("missing function: curl_multi_add_handle"),abort(-1)}function _curl_multi_cleanup(){err("missing function: curl_multi_cleanup"),abort(-1)}function _curl_multi_fdset(){err("missing function: curl_multi_fdset"),abort(-1)}function _curl_multi_info_read(){err("missing function: curl_multi_info_read"),abort(-1)}function _curl_multi_init(){err("missing function: curl_multi_init"),abort(-1)}function _curl_multi_perform(){err("missing function: curl_multi_perform"),abort(-1)}function _curl_multi_remove_handle(){err("missing function: curl_multi_remove_handle"),abort(-1)}function _curl_multi_timeout(){err("missing function: curl_multi_timeout"),abort(-1)}function _curl_share_cleanup(){err("missing function: curl_share_cleanup"),abort(-1)}function _curl_share_init(){err("missing function: curl_share_init"),abort(-1)}function _curl_share_setopt(){err("missing function: curl_share_setopt"),abort(-1)}function _curl_version_info(){err("missing function: curl_version_info"),abort(-1)}function _emscripten_check_blocking_allowed(){assert(ENVIRONMENT_IS_WEB),warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function _emscripten_conditional_set_current_thread_status_js(e,t){}function _emscripten_conditional_set_current_thread_status(e,t){}function _emscripten_futex_wait(e,t,r){if(e<=0||e>HEAP8.length||!0&e)return-28;if(ENVIRONMENT_IS_WORKER){var i=Atomics.wait(HEAP32,e>>2,t,r);if("timed-out"===i)return-73;if("not-equal"===i)return-6;if("ok"===i)return 0;throw"Atomics.wait returned an unexpected value "+i}if(t!=Atomics.load(HEAP32,e>>2))return-6;var n=performance.now(),o=n+r;Atomics.store(HEAP32,__main_thread_futex_wait_address>>2,e);for(var a=e;e==a;){if((n=performance.now())>o)return-73;_emscripten_main_thread_process_queued_calls(),e=Atomics.load(HEAP32,__main_thread_futex_wait_address>>2)}return 0}function _ctime_r(e,t){var r=stackSave(),i=_asctime_r(_localtime_r(e,stackAlloc(44)),t);return stackRestore(r),i}function _ctime(e){return _ctime_r(e,___tm_current)}function _emscripten_get_heap_size(){return HEAPU8.length}function _emscripten_get_sbrk_ptr(){return DYNAMICTOP_PTR}function _emscripten_is_main_browser_thread(){return 0|__pthread_is_main_browser_thread}function _emscripten_is_main_runtime_thread(){return 0|__pthread_is_main_runtime_thread}var setjmpId=0;function _saveSetjmp(e,t,r,i){t|=0,r|=0,i|=0;var n=0;for(setjmpId=setjmpId+1|0,HEAP32[(e|=0)>>2]=setjmpId;(0|n)<(0|i);){if(0==(0|HEAP32[r+(n<<3)>>2]))return HEAP32[r+(n<<3)>>2]=setjmpId,HEAP32[r+(4+(n<<3))>>2]=t,HEAP32[r+(8+(n<<3))>>2]=0,setTempRet0(0|i),0|r;n=n+1|0}return i=2*i|0,r=0|_saveSetjmp(0|e,0|t,0|(r=0|_realloc(0|r,8*(i+1|0)|0)),0|i),setTempRet0(0|i),0|r}function _testSetjmp(e,t,r){e|=0,t|=0,r|=0;for(var i=0,n=0;(0|i)<(0|r)&&0!=(0|(n=0|HEAP32[t+(i<<3)>>2]));){if((0|n)==(0|e))return 0|HEAP32[t+(4+(i<<3))>>2];i=i+1|0}return 0}function _longjmp(e,t){throw _setThrew(e,t||1),"longjmp"}function _emscripten_longjmp(e,t){_longjmp(e,t)}function _emscripten_memcpy_big(e,t,r){HEAPU8.set(HEAPU8.subarray(t,t+r),e)}function _emscripten_proxy_to_main_thread_js(e,t){var r=arguments.length-2;if(r>19)throw"emscripten_proxy_to_main_thread_js: Too many arguments "+r+" to proxied function idx="+e+", maximum supported is 19!";for(var i=stackSave(),n=stackAlloc(8*r),o=n>>3,a=0;a<r;a++)HEAPF64[o+a]=arguments[2+a];var s=_emscripten_run_in_main_runtime_thread_js(e,r,n,t);return stackRestore(i),s}var _emscripten_receive_on_main_thread_js_callArgs=[];function readAsmConstArgs(e,t){readAsmConstArgs.array||(readAsmConstArgs.array=[]);var r,i=readAsmConstArgs.array;for(i.length=0;r=HEAPU8[e++];)100===r||102===r?(t=t+7&-8,i.push(HEAPF64[t>>3]),t+=8):105===r?(t=t+3&-4,i.push(HEAP32[t>>2]),t+=4):abort("unexpected char in asm const signature "+r);return i}function _emscripten_receive_on_main_thread_js(e,t,r){_emscripten_receive_on_main_thread_js_callArgs.length=t;for(var i=r>>3,n=0;n<t;n++)_emscripten_receive_on_main_thread_js_callArgs[n]=HEAPF64[i+n];var o=e<0,a=o?ASM_CONSTS[-e-1]:proxiedFunctionTable[e];if(o){var s=readAsmConstArgs(_emscripten_receive_on_main_thread_js_callArgs[1],_emscripten_receive_on_main_thread_js_callArgs[2]);return a.apply(null,s)}return assert(a.length==t,"Call args mismatch in emscripten_receive_on_main_thread_js"),a.apply(null,_emscripten_receive_on_main_thread_js_callArgs)}function abortOnCannotGrowMemory(e){abort("Cannot enlarge memory arrays to size "+e+" bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+HEAP8.length+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function _emscripten_resize_heap(e){abortOnCannotGrowMemory(e)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:!1,removeAllEventListeners:function(){for(var e=JSEvents.eventHandlers.length-1;e>=0;--e)JSEvents._removeHandler(e);JSEvents.eventHandlers=[],JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){JSEvents.removeEventListenersRegistered||(__ATEXIT__.push(JSEvents.removeAllEventListeners),JSEvents.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function i(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var n in JSEvents.deferredCalls){var o=JSEvents.deferredCalls[n];if(o.targetFunction==e&&i(o.argsList,r))return}JSEvents.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),JSEvents.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<JSEvents.deferredCalls.length;++t)JSEvents.deferredCalls[t].targetFunction==e&&(JSEvents.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(JSEvents.canPerformEventHandlerRequests())for(var e=0;e<JSEvents.deferredCalls.length;++e){var t=JSEvents.deferredCalls[e];JSEvents.deferredCalls.splice(e,1),--e,t.targetFunction.apply(this,t.argsList)}},inEventHandler:0,currentEventHandler:null,eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<JSEvents.eventHandlers.length;++r)JSEvents.eventHandlers[r].target!=e||t&&t!=JSEvents.eventHandlers[r].eventTypeString||JSEvents._removeHandler(r--)},_removeHandler:function(e){var t=JSEvents.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),JSEvents.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++JSEvents.inEventHandler,JSEvents.currentEventHandler=e,JSEvents.runDeferredCalls(),e.handlerFunc(t),JSEvents.runDeferredCalls(),--JSEvents.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),JSEvents.eventHandlers.push(e),JSEvents.registerRemoveEventListeners();else for(var r=0;r<JSEvents.eventHandlers.length;++r)JSEvents.eventHandlers[r].target==e.target&&JSEvents.eventHandlers[r].eventTypeString==e.eventTypeString&&JSEvents._removeHandler(r--)},queueEventHandlerOnThread_iiii:function(e,t,r,i,n){var o=stackSave(),a=stackAlloc(12);HEAP32[a>>2]=r,HEAP32[a+4>>2]=i,HEAP32[a+8>>2]=n,_emscripten_async_queue_on_thread_(e,637534208,t,i,a),stackRestore(o)},getTargetThreadForEventCallback:function(e){switch(e){case 1:return 0;case 2:return PThread.currentProxiedOperationCallerThread;default:return e}},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};function stringToNewUTF8(e){var t=lengthBytesUTF8(e)+1,r=_malloc(t);return stringToUTF8(e,r,t),r}function _emscripten_set_offscreencanvas_size_on_target_thread_js(e,t,r,i){var n=stackSave(),o=stackAlloc(12),a=0;t&&(a=stringToNewUTF8(t)),HEAP32[o>>2]=a,HEAP32[o+4>>2]=r,HEAP32[o+8>>2]=i,_emscripten_async_queue_on_thread_(e,657457152,0,a,o),stackRestore(n)}function _emscripten_set_offscreencanvas_size_on_target_thread(e,t,r,i){_emscripten_set_offscreencanvas_size_on_target_thread_js(e,t=t?UTF8ToString(t):"",r,i)}function __maybeCStringToJsString(e){return e===e+0?UTF8ToString(e):e}var __specialEventTargets=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];function __findEventTarget(e){return __specialEventTargets[e]||("undefined"!=typeof document?document.querySelector(__maybeCStringToJsString(e)):void 0)}function __findCanvasEventTarget(e){return __findEventTarget(e)}function _emscripten_set_canvas_element_size_calling_thread(e,t,r){var i=__findCanvasEventTarget(e);if(!i)return-4;if(i.canvasSharedPtr&&(HEAP32[i.canvasSharedPtr>>2]=t,HEAP32[i.canvasSharedPtr+4>>2]=r),!i.offscreenCanvas&&i.controlTransferredOffscreen)return i.canvasSharedPtr?(_emscripten_set_offscreencanvas_size_on_target_thread(HEAP32[i.canvasSharedPtr+8>>2],e,t,r),1):-4;i.offscreenCanvas&&(i=i.offscreenCanvas);var n=!1;if(i.GLctxObject&&i.GLctxObject.GLctx){var o=i.GLctxObject.GLctx.getParameter(2978);n=0===o[0]&&0===o[1]&&o[2]===i.width&&o[3]===i.height}return i.width=t,i.height=r,n&&i.GLctxObject.GLctx.viewport(0,0,t,r),0}function _emscripten_set_canvas_element_size_main_thread(e,t,r){return ENVIRONMENT_IS_PTHREAD?_emscripten_proxy_to_main_thread_js(22,1,e,t,r):_emscripten_set_canvas_element_size_calling_thread(e,t,r)}function _emscripten_set_canvas_element_size(e,t,r){return __findCanvasEventTarget(e)?_emscripten_set_canvas_element_size_calling_thread(e,t,r):_emscripten_set_canvas_element_size_main_thread(e,t,r)}function _emscripten_set_current_thread_status_js(e){}function _emscripten_set_current_thread_status(e){0}function _emscripten_syscall(e,t){switch(e){case 10:return ___syscall10(e,t);case 102:return ___syscall102(e,t);case 114:return ___syscall114(e,t);case 142:return ___syscall142(e,t);case 148:return ___syscall148(e,t);case 15:return ___syscall15(e,t);case 168:return ___syscall168(e,t);case 183:return ___syscall183(e,t);case 192:return ___syscall192(e,t);case 194:return ___syscall194(e,t);case 195:return ___syscall195(e,t);case 196:return ___syscall196(e,t);case 197:return ___syscall197(e,t);case 20:return ___syscall20(e,t);case 221:return ___syscall221(e,t);case 29:return ___syscall29(e,t);case 3:return ___syscall3(e,t);case 33:return ___syscall33(e,t);case 38:return ___syscall38(e,t);case 39:return ___syscall39(e,t);case 4:return ___syscall4(e,t);case 40:return ___syscall40(e,t);case 41:return ___syscall41(e,t);case 42:return ___syscall42(e,t);case 5:return ___syscall5(e,t);case 54:return ___syscall54(e,t);case 85:return ___syscall85(e,t);case 91:return ___syscall91(e,t);default:throw"surprising proxied syscall: "+e}}function __webgl_acquireInstancedArraysExtension(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,i,n){t.drawArraysInstancedANGLE(e,r,i,n)},e.drawElementsInstanced=function(e,r,i,n,o){t.drawElementsInstancedANGLE(e,r,i,n,o)})}function __webgl_acquireVertexArrayObjectExtension(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}function __webgl_acquireDrawBuffersExtension(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)})}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){for(var e=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE),t=0;t<GL.MINI_TEMP_BUFFER_SIZE;t++)GL.miniTempBufferFloatViews[t]=e.subarray(0,t+1);var r=new Int32Array(GL.MINI_TEMP_BUFFER_SIZE);for(t=0;t<GL.MINI_TEMP_BUFFER_SIZE;t++)GL.miniTempBufferIntViews[t]=r.subarray(0,t+1)},recordError:function(e){GL.lastError||(GL.lastError=e)},getNewId:function(e){for(var t=GL.counter++,r=e.length;r<t;r++)e[r]=null;return t},MINI_TEMP_BUFFER_SIZE:256,miniTempBufferFloatViews:[0],miniTempBufferIntViews:[0],getSource:function(e,t,r,i){for(var n="",o=0;o<t;++o){var a=i?HEAP32[i+4*o>>2]:-1;n+=UTF8ToString(HEAP32[r+4*o>>2],a<0?void 0:a)}return n},createContext:function(e,t){var r=e.getContext("webgl",t);return r?GL.registerContext(r,t):0},registerContext:function(e,t){var r=_malloc(8);HEAP32[r+4>>2]=_pthread_self();var i={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=i),GL.contexts[r]=i,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&GL.initExtensions(i),r},makeContextCurrent:function(e){return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx,!(e&&!GLctx)},getContext:function(e){return GL.contexts[e]},deleteContext:function(e){GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),"object"==typeof JSEvents&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),_free(GL.contexts[e]),GL.contexts[e]=null},initExtensions:function(e){if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;e.version<2&&(__webgl_acquireInstancedArraysExtension(t),__webgl_acquireVertexArrayObjectExtension(t),__webgl_acquireDrawBuffersExtension(t)),t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query");var r=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","EXT_texture_norm16","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2","WEBKIT_WEBGL_compressed_texture_pvrtc"];(t.getSupportedExtensions()||[]).forEach((function(e){-1!=r.indexOf(e)&&t.getExtension(e)}))}},populateUniformTable:function(e){for(var t=GL.programs[e],r=GL.programInfos[e]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1},i=r.uniforms,n=GLctx.getProgramParameter(t,35718),o=0;o<n;++o){var a=GLctx.getActiveUniform(t,o),s=a.name;r.maxUniformLength=Math.max(r.maxUniformLength,s.length+1),"]"==s.slice(-1)&&(s=s.slice(0,s.lastIndexOf("[")));var u=GLctx.getUniformLocation(t,s);if(u){var c=GL.getNewId(GL.uniforms);i[s]=[a.size,c],GL.uniforms[c]=u;for(var f=1;f<a.size;++f){var l=s+"["+f+"]";u=GLctx.getUniformLocation(t,l),c=GL.getNewId(GL.uniforms),GL.uniforms[c]=u}}}}},__emscripten_webgl_power_preferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(e,t){assert(t);var r={},i=t>>2;r.alpha=!!HEAP32[i+0],r.depth=!!HEAP32[i+1],r.stencil=!!HEAP32[i+2],r.antialias=!!HEAP32[i+3],r.premultipliedAlpha=!!HEAP32[i+4],r.preserveDrawingBuffer=!!HEAP32[i+5];var n=HEAP32[i+6];r.powerPreference=__emscripten_webgl_power_preferences[n],r.failIfMajorPerformanceCaveat=!!HEAP32[i+7],r.majorVersion=HEAP32[i+8],r.minorVersion=HEAP32[i+9],r.enableExtensionsByDefault=HEAP32[i+10],r.explicitSwapControl=HEAP32[i+11],r.proxyContextToMainThread=HEAP32[i+12],r.renderViaOffscreenBackBuffer=HEAP32[i+13];var o=__findCanvasEventTarget(e);return o?r.explicitSwapControl?0:GL.createContext(o,r):0}function _emscripten_webgl_create_context(e,t){return _emscripten_webgl_do_create_context(e,t)}var ENV={};function __getExecutableName(){return thisProgram||"./this.program"}function _emscripten_get_environ(){if(!_emscripten_get_environ.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:__getExecutableName()};for(var t in ENV)e[t]=ENV[t];var r=[];for(var t in e)r.push(t+"="+e[t]);_emscripten_get_environ.strings=r}return _emscripten_get_environ.strings}function _environ_get(e,t){var r=_emscripten_get_environ(),i=0;return r.forEach((function(r,n){var o=t+i;HEAP32[e+4*n>>2]=o,writeAsciiToMemory(r,o),i+=r.length+1})),0}function _environ_sizes_get(e,t){var r=_emscripten_get_environ();HEAP32[e>>2]=r.length;var i=0;return r.forEach((function(e){i+=e.length+1})),HEAP32[t>>2]=i,0}function _exit(e){exit(e)}function _execl(){return ___setErrNo(45),-1}function _execvp(){return _execl.apply(null,arguments)}function _fd_close(e){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(23,1,e);try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_fdstat_get(e,t){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(24,1,e,t);try{var r=SYSCALLS.getStreamFromFD(e),i=r.tty?2:FS.isDir(r.mode)?3:FS.isLink(r.mode)?7:4;return HEAP8[t>>0]=i,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_read(e,t,r,i){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(25,1,e,t,r,i);try{var n=SYSCALLS.getStreamFromFD(e),o=SYSCALLS.doReadv(n,t,r);return HEAP32[i>>2]=o,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_seek(e,t,r,i,n){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(26,1,e,t,r,i,n);try{var o=SYSCALLS.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(FS.llseek(o,a,i),tempI64=[o.position>>>0,(tempDouble=o.position,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[n>>2]=tempI64[0],HEAP32[n+4>>2]=tempI64[1],o.getdents&&0===a&&0===i&&(o.getdents=null),0)}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_sync(e){try{var t=SYSCALLS.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?-t.stream_ops.fsync(t):0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}function _fd_write(e,t,r,i){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(27,1,e,t,r,i);try{var n=SYSCALLS.getStreamFromFD(e),o=SYSCALLS.doWritev(n,t,r);return HEAP32[i>>2]=o,0}catch(e){return void 0!==FS&&e instanceof FS.ErrnoError||abort(e),e.errno}}var GAI_ERRNO_MESSAGES={};function _gai_strerror(e){_gai_strerror.buffer||(_gai_strerror.buffer=_malloc(256),GAI_ERRNO_MESSAGES[0]="Success",GAI_ERRNO_MESSAGES[-1]="Invalid value for 'ai_flags' field",GAI_ERRNO_MESSAGES[-2]="NAME or SERVICE is unknown",GAI_ERRNO_MESSAGES[-3]="Temporary failure in name resolution",GAI_ERRNO_MESSAGES[-4]="Non-recoverable failure in name res",GAI_ERRNO_MESSAGES[-6]="'ai_family' not supported",GAI_ERRNO_MESSAGES[-7]="'ai_socktype' not supported",GAI_ERRNO_MESSAGES[-8]="SERVICE not supported for 'ai_socktype'",GAI_ERRNO_MESSAGES[-10]="Memory allocation failure",GAI_ERRNO_MESSAGES[-11]="System error returned in 'errno'",GAI_ERRNO_MESSAGES[-12]="Argument buffer overflow");var t="Unknown error";return e in GAI_ERRNO_MESSAGES&&(t=GAI_ERRNO_MESSAGES[e].length>255?"Message too long":GAI_ERRNO_MESSAGES[e]),writeAsciiToMemory(t,_gai_strerror.buffer),_gai_strerror.buffer}function _getTempRet0(){return 0|getTempRet0()}function _getaddrinfo(e,t,r,i){err("missing function: _getaddrinfo"),abort(-1)}function __exit(e){return _exit(e)}function _clock(){return void 0===_clock.start&&(_clock.start=Date.now()),1e3*(Date.now()-_clock.start)|0}function _difftime(e,t){return e-t}function _getpwnam(){throw"getpwnam: TODO"}function _getpwuid(){throw"getpwuid: TODO"}function _gettimeofday(e){var t=Date.now();return HEAP32[e>>2]=t/1e3|0,HEAP32[e+4>>2]=t%1e3*1e3|0,0}function _kill(e,t){return err("Calling stub instead of kill()"),___setErrNo(ERRNO_CODES.EPERM),-1}function _lzma_code(){err("missing function: lzma_code"),abort(-1)}function _lzma_easy_buffer_encode(){err("missing function: lzma_easy_buffer_encode"),abort(-1)}function _lzma_easy_decoder_memusage(){err("missing function: lzma_easy_decoder_memusage"),abort(-1)}function _lzma_end(){err("missing function: lzma_end"),abort(-1)}function _lzma_stream_buffer_bound(){err("missing function: lzma_stream_buffer_bound"),abort(-1)}function _lzma_stream_decoder(){err("missing function: lzma_stream_decoder"),abort(-1)}function _memcpy(e,t,r){e|=0,t|=0;var i,n,o=0,a=0;if((0|(r|=0))>=8192)return _emscripten_memcpy_big(0|e,0|t,0|r),0|e;if(i=0|e,n=e+r|0,(3&e)==(3&t)){for(;3&e;){if(0==(0|r))return 0|i;HEAP8[e>>0]=0|HEAP8[t>>0],e=e+1|0,t=t+1|0,r=r-1|0}for(a=(o=-4&n|0)-64|0;(0|e)<=(0|a);)HEAP32[e>>2]=0|HEAP32[t>>2],HEAP32[e+4>>2]=0|HEAP32[t+4>>2],HEAP32[e+8>>2]=0|HEAP32[t+8>>2],HEAP32[e+12>>2]=0|HEAP32[t+12>>2],HEAP32[e+16>>2]=0|HEAP32[t+16>>2],HEAP32[e+20>>2]=0|HEAP32[t+20>>2],HEAP32[e+24>>2]=0|HEAP32[t+24>>2],HEAP32[e+28>>2]=0|HEAP32[t+28>>2],HEAP32[e+32>>2]=0|HEAP32[t+32>>2],HEAP32[e+36>>2]=0|HEAP32[t+36>>2],HEAP32[e+40>>2]=0|HEAP32[t+40>>2],HEAP32[e+44>>2]=0|HEAP32[t+44>>2],HEAP32[e+48>>2]=0|HEAP32[t+48>>2],HEAP32[e+52>>2]=0|HEAP32[t+52>>2],HEAP32[e+56>>2]=0|HEAP32[t+56>>2],HEAP32[e+60>>2]=0|HEAP32[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|o);)HEAP32[e>>2]=0|HEAP32[t>>2],e=e+4|0,t=t+4|0}else for(o=n-4|0;(0|e)<(0|o);)HEAP8[e>>0]=0|HEAP8[t>>0],HEAP8[e+1>>0]=0|HEAP8[t+1>>0],HEAP8[e+2>>0]=0|HEAP8[t+2>>0],HEAP8[e+3>>0]=0|HEAP8[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|n);)HEAP8[e>>0]=0|HEAP8[t>>0],e=e+1|0,t=t+1|0;return 0|i}function _memset(e,t,r){t|=0;var i,n=0,o=0,a=0;if(i=(e|=0)+(r|=0)|0,t&=255,(0|r)>=67){for(;0!=(3&e);)HEAP8[e>>0]=t,e=e+1|0;for(a=t|t<<8|t<<16|t<<24,o=(n=-4&i|0)-64|0;(0|e)<=(0|o);)HEAP32[e>>2]=a,HEAP32[e+4>>2]=a,HEAP32[e+8>>2]=a,HEAP32[e+12>>2]=a,HEAP32[e+16>>2]=a,HEAP32[e+20>>2]=a,HEAP32[e+24>>2]=a,HEAP32[e+28>>2]=a,HEAP32[e+32>>2]=a,HEAP32[e+36>>2]=a,HEAP32[e+40>>2]=a,HEAP32[e+44>>2]=a,HEAP32[e+48>>2]=a,HEAP32[e+52>>2]=a,HEAP32[e+56>>2]=a,HEAP32[e+60>>2]=a,e=e+64|0;for(;(0|e)<(0|n);)HEAP32[e>>2]=a,e=e+4|0}for(;(0|e)<(0|i);)HEAP8[e>>0]=t,e=e+1|0;return i-r|0}function _proc_exit(e){return _exit(e)}function _gettimeofday(e){var t=Date.now();return HEAP32[e>>2]=t/1e3|0,HEAP32[e+4>>2]=t%1e3*1e3|0,0}function _popen(){err("missing function: popen"),abort(-1)}function _pthread_cleanup_pop(e){var t=PThread.exitHandlers.pop();e&&t()}function _pthread_cleanup_push(e,t){null===PThread.exitHandlers&&(PThread.exitHandlers=[],ENVIRONMENT_IS_PTHREAD||__ATEXIT__.push((function(){PThread.runExitHandlers()}))),PThread.exitHandlers.push((function(){dynCall_vi(e,t)}))}function __spawn_thread(e){if(ENVIRONMENT_IS_PTHREAD)throw"Internal Error! _spawn_thread() can only ever be called from main application thread!";var t=PThread.getNewWorker();if(void 0!==t.pthread)throw"Internal error!";if(!e.pthread_ptr)throw"Internal error, no pthread ptr!";PThread.runningWorkers.push(t);for(var r=_malloc(512),i=0;i<128;++i)HEAP32[r+4*i>>2]=0;var n=e.stackBase+e.stackSize,o=PThread.pthreads[e.pthread_ptr]={worker:t,stackBase:e.stackBase,stackSize:e.stackSize,allocatedOwnStack:e.allocatedOwnStack,thread:e.pthread_ptr,threadInfoStruct:e.pthread_ptr},a=o.threadInfoStruct>>2;Atomics.store(HEAPU32,a+0,0),Atomics.store(HEAPU32,a+1,0),Atomics.store(HEAPU32,a+2,0),Atomics.store(HEAPU32,a+17,e.detached),Atomics.store(HEAPU32,a+26,r),Atomics.store(HEAPU32,a+12,0),Atomics.store(HEAPU32,a+10,o.threadInfoStruct),Atomics.store(HEAPU32,a+11,PROCINFO.pid),Atomics.store(HEAPU32,a+27,e.stackSize),Atomics.store(HEAPU32,a+21,e.stackSize),Atomics.store(HEAPU32,a+20,n),Atomics.store(HEAPU32,a+29,n),Atomics.store(HEAPU32,a+30,e.detached),Atomics.store(HEAPU32,a+32,e.schedPolicy),Atomics.store(HEAPU32,a+33,e.schedPrio);var s=_emscripten_get_global_libc()+40;Atomics.store(HEAPU32,a+44,s),t.pthread=o;var u={cmd:"run",start_routine:e.startRoutine,arg:e.arg,threadInfoStruct:e.pthread_ptr,selfThreadId:e.pthread_ptr,parentThreadId:e.parent_pthread_ptr,stackBase:e.stackBase,stackSize:e.stackSize};t.runPthread=function(){u.time=performance.now(),t.postMessage(u,e.transferList)},t.loaded&&(t.runPthread(),delete t.runPthread)}function _pthread_getschedparam(e,t,r){if(!t&&!r)return ERRNO_CODES.EINVAL;if(!e)return err("pthread_getschedparam called with a null thread pointer!"),ERRNO_CODES.ESRCH;if(HEAP32[e+12>>2]!==e)return err("pthread_getschedparam attempted on thread "+e+", which does not point to a valid thread, or does not exist anymore!"),ERRNO_CODES.ESRCH;var i=Atomics.load(HEAPU32,e+108+20>>2),n=Atomics.load(HEAPU32,e+108+24>>2);return t&&(HEAP32[t>>2]=i),r&&(HEAP32[r>>2]=n),0}function _pthread_self(){return 0|__pthread_ptr}function _pthread_create(e,t,r,i){if("undefined"==typeof SharedArrayBuffer)return err("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!e)return err("pthread_create called with a null thread pointer!"),28;var n=[];if(ENVIRONMENT_IS_PTHREAD&&0===n.length)return _emscripten_sync_run_in_main_thread_4(687865856,e,t,r,i);var o=0,a=0,s=0,u=0,c=0;if(t)if(o=HEAP32[t>>2],o+=81920,a=HEAP32[t+8>>2],s=0!==HEAP32[t+12>>2],0===HEAP32[t+16>>2]){var f=HEAP32[t+20>>2],l=HEAP32[t+24>>2];_pthread_getschedparam(PThread.currentProxiedOperationCallerThread?PThread.currentProxiedOperationCallerThread:_pthread_self(),t+20,t+24),u=HEAP32[t+20>>2],c=HEAP32[t+24>>2],HEAP32[t+20>>2]=f,HEAP32[t+24>>2]=l}else u=HEAP32[t+20>>2],c=HEAP32[t+24>>2];else o=2097152;var d=0==a;d?a=_memalign(16,o):assert((a-=o)>0);for(var h=_malloc(232),p=0;p<58;++p)HEAPU32[(h>>2)+p]=0;HEAP32[e>>2]=h,HEAP32[h+12>>2]=h;var _=h+156;HEAP32[_>>2]=_;var m={stackBase:a,stackSize:o,allocatedOwnStack:d,schedPolicy:u,schedPrio:c,detached:s,startRoutine:r,pthread_ptr:h,parent_pthread_ptr:_pthread_self(),arg:i,transferList:n};return ENVIRONMENT_IS_PTHREAD?(m.cmd="spawnThread",postMessage(m,n)):__spawn_thread(m),0}function _pthread_detach(e){if(!e)return err("pthread_detach attempted on a null thread pointer!"),ERRNO_CODES.ESRCH;if(HEAP32[e+12>>2]!==e)return err("pthread_detach attempted on thread "+e+", which does not point to a valid thread, or does not exist anymore!"),ERRNO_CODES.ESRCH;Atomics.load(HEAPU32,e+0>>2);return Atomics.compareExchange(HEAPU32,e+68>>2,0,2)?ERRNO_CODES.EINVAL:0}function __pthread_testcancel_js(){if(ENVIRONMENT_IS_PTHREAD&&(threadInfoStruct&&!Atomics.load(HEAPU32,threadInfoStruct+60>>2)&&2==Atomics.load(HEAPU32,threadInfoStruct+0>>2)))throw"Canceled!"}function __emscripten_do_pthread_join(e,t,r){if(!e)return err("pthread_join attempted on a null thread pointer!"),ERRNO_CODES.ESRCH;if(ENVIRONMENT_IS_PTHREAD&&selfThreadId==e)return err("PThread "+e+" is attempting to join to itself!"),ERRNO_CODES.EDEADLK;if(!ENVIRONMENT_IS_PTHREAD&&PThread.mainThreadBlock==e)return err("Main thread "+e+" is attempting to join to itself!"),ERRNO_CODES.EDEADLK;if(HEAP32[e+12>>2]!==e)return err("pthread_join attempted on thread "+e+", which does not point to a valid thread, or does not exist anymore!"),ERRNO_CODES.ESRCH;if(Atomics.load(HEAPU32,e+68>>2))return err("Attempted to join thread "+e+", which was already detached!"),ERRNO_CODES.EINVAL;for(r&&ENVIRONMENT_IS_WEB&&_emscripten_check_blocking_allowed();;){var i=Atomics.load(HEAPU32,e+0>>2);if(1==i){var n=Atomics.load(HEAPU32,e+4>>2);return t&&(HEAP32[t>>2]=n),Atomics.store(HEAPU32,e+68>>2,1),ENVIRONMENT_IS_PTHREAD?postMessage({cmd:"cleanupThread",thread:e}):__cleanup_thread(e),0}if(!r)return ERRNO_CODES.EBUSY;__pthread_testcancel_js(),ENVIRONMENT_IS_PTHREAD||_emscripten_main_thread_process_queued_calls(),_emscripten_futex_wait(e+0,i,ENVIRONMENT_IS_PTHREAD?100:1)}}function _pthread_join(e,t){return __emscripten_do_pthread_join(e,t,!0)}function _pthread_attr_init(e){return 0}function _pthread_attr_setdetachstate(){}function _pthread_cond_destroy(){return 0}function _pthread_cond_init(){return 0}function _pthread_cond_signal(){return 0}function _pthread_cond_timedwait(){return 0}function _pthread_cond_wait(){return 0}function _pthread_create(){return 6}function _pthread_exit(e){_exit(e)}function _pthread_join(){}function _pthread_mutexattr_destroy(){}function _pthread_mutexattr_init(){}function _pthread_mutexattr_settype(){}function _pthread_sigmask(e,t,r){return err("pthread_sigmask() is not supported: this is a no-op."),0}function _fork(){return ___setErrNo(6),-1}function _ftok(){err("missing function: ftok"),abort(-1)}function _round(e){return(e=+e)>=0?+Math_floor(e+.5):+Math_ceil(e-.5)}function _setTempRet0(e){setTempRet0(0|e)}function _sigaction(e,t,r){return err("Calling stub instead of sigaction()"),0}function _sigaddset(e,t){return HEAP32[e>>2]=HEAP32[e>>2]|1<<t-1,0}function _sigemptyset(e){return HEAP32[e>>2]=0,0}function _sigfillset(e){return HEAP32[e>>2]=-1>>>0,0}function _signal(e,t){return 14==e?__sigalrm_handler=t:err("Calling stub instead of signal()"),0}function _system(e){return ___setErrNo(6),-1}Module._pthread_self=_pthread_self;var ___tm_formatted=329120;function _tzset(){if(!_tzset.called){_tzset.called=!0,HEAP32[__get_timezone()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),r=new Date(e,6,1);HEAP32[__get_daylight()>>2]=Number(t.getTimezoneOffset()!=r.getTimezoneOffset());var i=s(t),n=s(r),o=allocate(intArrayFromString(i),"i8",ALLOC_NORMAL),a=allocate(intArrayFromString(n),"i8",ALLOC_NORMAL);r.getTimezoneOffset()<t.getTimezoneOffset()?(HEAP32[__get_tzname()>>2]=o,HEAP32[__get_tzname()+4>>2]=a):(HEAP32[__get_tzname()>>2]=a,HEAP32[__get_tzname()+4>>2]=o)}function s(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}function _mktime(e){_tzset();var t=new Date(HEAP32[e+20>>2]+1900,HEAP32[e+16>>2],HEAP32[e+12>>2],HEAP32[e+8>>2],HEAP32[e+4>>2],HEAP32[e>>2],0),r=HEAP32[e+32>>2],i=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=Math.min(a,o);if(r<0)HEAP32[e+32>>2]=Number(o!=a&&s==i);else if(r>0!=(s==i)){var u=Math.max(a,o),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-i))}HEAP32[e+24>>2]=t.getDay();var f=(t.getTime()-n.getTime())/864e5|0;return HEAP32[e+28>>2]=f,t.getTime()/1e3|0}function _asctime_r(e,t){var r=HEAP32[e>>2],i=HEAP32[e+4>>2],n=HEAP32[e+8>>2],o=HEAP32[e+12>>2],a=HEAP32[e+16>>2],s=HEAP32[e+20>>2];return stringToUTF8(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][HEAP32[e+24>>2]]+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a]+(o<10?" ":" ")+o+(n<10?" 0":" ")+n+(i<10?":0":":")+i+(r<10?":0":":")+r+" "+(1900+s)+"\n",t,26),t}function _asctime(e){return _asctime_r(e,___tm_formatted)}var ___tm_current=329056,___tm_timezone=(stringToUTF8("GMT",329104,4),329104);function _localtime_r(e,t){_tzset();var r=new Date(1e3*HEAP32[e>>2]);HEAP32[t>>2]=r.getSeconds(),HEAP32[t+4>>2]=r.getMinutes(),HEAP32[t+8>>2]=r.getHours(),HEAP32[t+12>>2]=r.getDate(),HEAP32[t+16>>2]=r.getMonth(),HEAP32[t+20>>2]=r.getFullYear()-1900,HEAP32[t+24>>2]=r.getDay();var i=new Date(r.getFullYear(),0,1),n=(r.getTime()-i.getTime())/864e5|0;HEAP32[t+28>>2]=n,HEAP32[t+36>>2]=-60*r.getTimezoneOffset();var o=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=i.getTimezoneOffset(),s=0|(o!=a&&r.getTimezoneOffset()==Math.min(a,o));HEAP32[t+32>>2]=s;var u=HEAP32[__get_tzname()+(s?4:0)>>2];return HEAP32[t+40>>2]=u,t}function _localtime(e){return _localtime_r(e,___tm_current)}function _pthread_create(){err("missing function: _pthread_create"),abort(-1)}function _pthread_join(){err("missing function: _pthread_join"),abort(-1)}function _shmat(){err("missing function: shmat"),abort(-1)}function _shmctl(){err("missing function: shmctl"),abort(-1)}function _shmdt(){err("missing function: shmdt"),abort(-1)}function _shmget(){err("missing function: shmget"),abort(-1)}function _strbuf_chomp(){err("missing function: strbuf_chomp"),abort(-1)}function _strbuf_new(){err("missing function: strbuf_new"),abort(-1)}function _strbuf_reset_gzreadline(){err("missing function: strbuf_reset_gzreadline"),abort(-1)}function _string_is_all_whitespace(){err("missing function: string_is_all_whitespace"),abort(-1)}function _string_next_nonwhitespace(){err("missing function: string_next_nonwhitespace"),abort(-1)}function __isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function __arraySum(e,t){for(var r=0,i=0;i<=t;r+=e[i++]);return r}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31],GLctx;function __addDays(e,t){for(var r=new Date(e.getTime());t>0;){var i=__isLeapYear(r.getFullYear()),n=r.getMonth(),o=(i?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[n];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),n<11?r.setMonth(n+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function _strftime(e,t,r,i){var n=HEAP32[i+40>>2],o={tm_sec:HEAP32[i>>2],tm_min:HEAP32[i+4>>2],tm_hour:HEAP32[i+8>>2],tm_mday:HEAP32[i+12>>2],tm_mon:HEAP32[i+16>>2],tm_year:HEAP32[i+20>>2],tm_wday:HEAP32[i+24>>2],tm_yday:HEAP32[i+28>>2],tm_isdst:HEAP32[i+32>>2],tm_gmtoff:HEAP32[i+36>>2],tm_zone:n?UTF8ToString(n):""},a=UTF8ToString(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e,t,r){for(var i="number"==typeof e?e.toString():e||"";i.length<t;)i=r[0]+i;return i}function d(e,t){return l(e,t,"0")}function h(e,t){function r(e){return e<0?-1:e>0?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function _(e){var t=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),n=p(r),o=p(i);return h(n,t)<=0?h(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+__arraySum(__isLeapYear(e.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:__addDays(t,7-t.getDay()),i=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(h(r,i)<0){var n=__arraySum(__isLeapYear(i.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,i.getMonth()-1)-31,o=31-r.getDate()+n+i.getDate();return d(Math.ceil(o/7),2)}return 0===h(r,t)?"01":"00"},"%V":function(e){var t,r=new Date(e.tm_year+1900,0,4),i=new Date(e.tm_year+1901,0,4),n=p(r),o=p(i),a=__addDays(new Date(e.tm_year+1900,0,1),e.tm_yday);return h(a,n)<0?"53":h(o,a)<=0?"01":(t=n.getFullYear()<e.tm_year+1900?e.tm_yday+32-n.getDate():e.tm_yday+1-n.getDate(),d(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:__addDays(t,0===t.getDay()?1:7-t.getDay()+1),i=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(h(r,i)<0){var n=__arraySum(__isLeapYear(i.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,i.getMonth()-1)-31,o=31-r.getDate()+n+i.getDate();return d(Math.ceil(o/7),2)}return 0===h(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in m)a.indexOf(u)>=0&&(a=a.replace(new RegExp(u,"g"),m[u](o)));var b=intArrayFromString(a,!1);return b.length>t?0:(writeArrayToMemory(b,e),b.length-1)}function _strftime_l(e,t,r,i){return _strftime(e,t,r,i)}function _time(e){var t=Date.now()/1e3|0;return e&&(HEAP32[e>>2]=t),t}function _usleep(e){for(var t=_emscripten_get_now();_emscripten_get_now()-t<e/1e3;);}function _wait(e){return ___setErrNo(12),-1}function _waitpid(){return _wait.apply(null,arguments)}if(ENVIRONMENT_IS_PTHREAD?PThread.initWorker():PThread.initMainThreadBlock(),_emscripten_get_now=ENVIRONMENT_IS_NODE?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:ENVIRONMENT_IS_PTHREAD?function(){return performance.now()-Module.__performance_now_clock_drift}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()},FS.staticInit(),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,ENVIRONMENT_IS_NODE){var fs=eval("require")("fs"),NODEJS_PATH=eval("require")("path");NODEFS.staticInit()}GL.init();var proxiedFunctionTable=[null,___syscall10,___syscall102,___syscall114,___syscall142,___syscall148,___syscall15,___syscall168,___syscall183,___syscall192,___syscall194,___syscall195,___syscall196,___syscall197,___syscall20,___syscall221,___syscall29,___syscall3,___syscall33,___syscall38,___syscall39,___syscall4,___syscall40,___syscall41,___syscall42,___syscall5,___syscall54,___syscall85,___syscall91,_atexit,_emscripten_set_canvas_element_size_main_thread,_fd_close,_fd_fdstat_get,_fd_read,_fd_seek,_fd_write,_getaddrinfo,_tzset],ASSERTIONS=!0;function intArrayFromString(e,t,r){var i=r>0?r:lengthBytesUTF8(e)+1,n=new Array(i),o=stringToUTF8Array(e,n,0,n.length);return t&&(n.length=o),n}function intArrayToString(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];i>255&&(ASSERTIONS&&assert(!1,"Character code "+i+" ("+String.fromCharCode(i)+") at offset "+r+" not in 0x00-0xFF."),i&=255),t.push(String.fromCharCode(i))}return t.join("")}function nullFunc_ii(e){abortFnPtrError(e,"ii")}function nullFunc_iidiiii(e){abortFnPtrError(e,"iidiiii")}function nullFunc_iii(e){abortFnPtrError(e,"iii")}function nullFunc_iiid(e){abortFnPtrError(e,"iiid")}function nullFunc_iiii(e){abortFnPtrError(e,"iiii")}function nullFunc_iiiiddi(e){abortFnPtrError(e,"iiiiddi")}function nullFunc_iiiii(e){abortFnPtrError(e,"iiiii")}function nullFunc_iiiiiddii(e){abortFnPtrError(e,"iiiiiddii")}function nullFunc_iiiiidi(e){abortFnPtrError(e,"iiiiidi")}function nullFunc_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii(e){abortFnPtrError(e,"iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii")}function nullFunc_iiiiii(e){abortFnPtrError(e,"iiiiii")}function nullFunc_iiiiiii(e){abortFnPtrError(e,"iiiiiii")}function nullFunc_iiiiiiii(e){abortFnPtrError(e,"iiiiiiii")}function nullFunc_iiiiiiiii(e){abortFnPtrError(e,"iiiiiiiii")}function nullFunc_iiiiiiiiii(e){abortFnPtrError(e,"iiiiiiiiii")}function nullFunc_iiiiiiiiiii(e){abortFnPtrError(e,"iiiiiiiiiii")}function nullFunc_iiiiiiiiiiiiii(e){abortFnPtrError(e,"iiiiiiiiiiiiii")}function nullFunc_iiiiiiiiiiiiiiiii(e){abortFnPtrError(e,"iiiiiiiiiiiiiiiii")}function nullFunc_iiiiiijj(e){abortFnPtrError(e,"iiiiiijj")}function nullFunc_iij(e){abortFnPtrError(e,"iij")}function nullFunc_iiji(e){abortFnPtrError(e,"iiji")}function nullFunc_iijii(e){abortFnPtrError(e,"iijii")}function nullFunc_jii(e){abortFnPtrError(e,"jii")}function nullFunc_jij(e){abortFnPtrError(e,"jij")}function nullFunc_jiji(e){abortFnPtrError(e,"jiji")}function nullFunc_vi(e){abortFnPtrError(e,"vi")}function nullFunc_vii(e){abortFnPtrError(e,"vii")}function nullFunc_viii(e){abortFnPtrError(e,"viii")}function nullFunc_viiii(e){abortFnPtrError(e,"viiii")}function nullFunc_viiiiii(e){abortFnPtrError(e,"viiiiii")}function nullFunc_viiiiiiii(e){abortFnPtrError(e,"viiiiiiii")}function nullFunc_viiiiiiiiiiiiiiii(e){abortFnPtrError(e,"viiiiiiiiiiiiiiii")}function nullFunc_viji(e){abortFnPtrError(e,"viji")}function nullFunc_vijj(e){abortFnPtrError(e,"vijj")}var asmGlobalArg={},asmLibraryArg={___assert_fail:___assert_fail,___lock:___lock,___setErrNo:___setErrNo,___syscall10:___syscall10,___syscall114:___syscall114,___syscall140:___syscall140,___syscall142:___syscall142,___syscall144:___syscall144,___syscall145:___syscall145,___syscall146:___syscall146,___syscall15:___syscall15,___syscall183:___syscall183,___syscall192:___syscall192,___syscall194:___syscall194,___syscall195:___syscall195,___syscall197:___syscall197,___syscall20:___syscall20,___syscall219:___syscall219,___syscall221:___syscall221,___syscall3:___syscall3,___syscall33:___syscall33,___syscall38:___syscall38,___syscall39:___syscall39,___syscall4:___syscall4,___syscall40:___syscall40,___syscall41:___syscall41,___syscall42:___syscall42,___syscall5:___syscall5,___syscall54:___syscall54,___syscall6:___syscall6,___wait:___wait,__addDays:__addDays,__arraySum:__arraySum,__assert_fail:___assert_fail,__clock_gettime:___clock_gettime,__cxa_allocate_exception:___cxa_allocate_exception,__cxa_atexit:___cxa_atexit,__cxa_begin_catch:___cxa_begin_catch,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_free_exception:___cxa_free_exception,__cxa_rethrow:___cxa_rethrow,__cxa_throw:___cxa_throw,__cxa_uncaught_exceptions:___cxa_uncaught_exceptions,__emscripten_syscall_mmap2:__emscripten_syscall_mmap2,__exit:__exit,__handle_stack_overflow:___handle_stack_overflow,__isLeapYear:__isLeapYear,__lock:___lock,__map_file:___map_file,__memory_base:1024,__resumeException:___resumeException,__setErrNo:___setErrNo,__syscall10:___syscall10,__syscall102:___syscall102,__syscall114:___syscall114,__syscall140:___syscall140,__syscall142:___syscall142,__syscall144:___syscall144,__syscall145:___syscall145,__syscall148:___syscall148,__syscall15:___syscall15,__syscall168:___syscall168,__syscall183:___syscall183,__syscall192:___syscall192,__syscall194:___syscall194,__syscall195:___syscall195,__syscall196:___syscall196,__syscall197:___syscall197,__syscall199:___syscall199,__syscall20:___syscall20,__syscall219:___syscall219,__syscall220:___syscall220,__syscall221:___syscall221,__syscall29:___syscall29,__syscall3:___syscall3,__syscall33:___syscall33,__syscall330:___syscall330,__syscall38:___syscall38,__syscall39:___syscall39,__syscall4:___syscall4,__syscall40:___syscall40,__syscall41:___syscall41,__syscall42:___syscall42,__syscall5:___syscall5,__syscall54:___syscall54,__syscall6:___syscall6,__syscall63:___syscall63,__syscall85:___syscall85,__syscall91:___syscall91,__table_base:0,__unlock:___unlock,_emscripten_notify_thread_queue:__emscripten_notify_thread_queue,__wait:___wait,_abort:_abort,_atexit:_atexit,_clock:_clock,_difftime:_difftime,_emscripten_get_heap_size:_emscripten_get_heap_size,_exit:_exit,_fd_write:_fd_write,_fork:_fork,_ftok:_ftok,_gettimeofday:_gettimeofday,_localtime:_localtime,_localtime_r:_localtime_r,_popen:_popen,_pthread_attr_init:_pthread_attr_init,_pthread_attr_setdetachstate:_pthread_attr_setdetachstate,_pthread_cond_destroy:_pthread_cond_destroy,_pthread_cond_init:_pthread_cond_init,_pthread_cond_signal:_pthread_cond_signal,_pthread_cond_timedwait:_pthread_cond_timedwait,_pthread_cond_wait:_pthread_cond_wait,_pthread_create:_pthread_create,_pthread_join:_pthread_join,_pthread_mutexattr_destroy:_pthread_mutexattr_destroy,_pthread_mutexattr_init:_pthread_mutexattr_init,_pthread_mutexattr_settype:_pthread_mutexattr_settype,_shmat:_shmat,_shmctl:_shmctl,_shmdt:_shmdt,_shmget:_shmget,_strftime:_strftime,_time:_time,_tzset:_tzset,_usleep:_usleep,_wait:_wait,_waitpid:_waitpid,abort:_abort,alarm:_alarm,atexit:_atexit,abortOnCannotGrowMemory:abortOnCannotGrowMemory,abortStackOverflow:abortStackOverflow,abs:_abs,args_get:_args_get,args_sizes_get:_args_sizes_get,asctime:_asctime,clock:_clock,ctime:_ctime,clock_gettime:_clock_gettime,difftime:_difftime,curl_easy_cleanup:_curl_easy_cleanup,curl_easy_duphandle:_curl_easy_duphandle,curl_easy_getinfo:_curl_easy_getinfo,curl_easy_init:_curl_easy_init,curl_easy_pause:_curl_easy_pause,curl_easy_reset:_curl_easy_reset,curl_easy_setopt:_curl_easy_setopt,curl_global_cleanup:_curl_global_cleanup,curl_global_init:_curl_global_init,curl_multi_add_handle:_curl_multi_add_handle,curl_multi_cleanup:_curl_multi_cleanup,curl_multi_fdset:_curl_multi_fdset,curl_multi_info_read:_curl_multi_info_read,curl_multi_init:_curl_multi_init,curl_multi_perform:_curl_multi_perform,curl_multi_remove_handle:_curl_multi_remove_handle,curl_multi_timeout:_curl_multi_timeout,curl_share_cleanup:_curl_share_cleanup,curl_share_init:_curl_share_init,curl_share_setopt:_curl_share_setopt,curl_version_info:_curl_version_info,demangle:demangle,demangleAll:demangleAll,emscripten_asm_const_iii:_emscripten_asm_const_iii,emscripten_check_blocking_allowed:_emscripten_check_blocking_allowed,emscripten_conditional_set_current_thread_status:_emscripten_conditional_set_current_thread_status,emscripten_futex_wait:_emscripten_futex_wait,emscripten_futex_wake:_emscripten_futex_wake,emscripten_get_heap_size:_emscripten_get_heap_size,emscripten_get_now:_emscripten_get_now,emscripten_get_sbrk_ptr:_emscripten_get_sbrk_ptr,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_is_main_runtime_thread:_emscripten_is_main_runtime_thread,emscripten_longjmp:_emscripten_longjmp,emscripten_memcpy_big:_emscripten_memcpy_big,emscripten_receive_on_main_thread_js:_emscripten_receive_on_main_thread_js,emscripten_resize_heap:_emscripten_resize_heap,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_current_thread_status:_emscripten_set_current_thread_status,emscripten_syscall:_emscripten_syscall,emscripten_webgl_create_context:_emscripten_webgl_create_context,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,execvp:_execvp,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,fork:_fork,ftok:_ftok,gai_strerror:_gai_strerror,getTempRet0:_getTempRet0,getaddrinfo:_getaddrinfo,getpwnam:_getpwnam,getpwuid:_getpwuid,gettimeofday:_gettimeofday,initPthreadsJS:initPthreadsJS,invoke_dii:invoke_dii,invoke_diii:invoke_diii,invoke_fiii:invoke_fiii,invoke_diiiddd:invoke_diiiddd,invoke_i:invoke_i,invoke_ii:invoke_ii,invoke_iii:invoke_iii,invoke_iiii:invoke_iiii,invoke_iiiii:invoke_iiiii,invoke_iiiiid:invoke_iiiiid,invoke_iiiiii:invoke_iiiiii,invoke_iiiiiii:invoke_iiiiiii,invoke_iiiiiiii:invoke_iiiiiiii,invoke_iiiiiiiii:invoke_iiiiiiiii,invoke_iiiiiiiiii:invoke_iiiiiiiiii,invoke_iiiiiiiiiii:invoke_iiiiiiiiiii,invoke_iiiiiiiiiiii:invoke_iiiiiiiiiiii,invoke_iiiiiiiiiiiii:invoke_iiiiiiiiiiiii,invoke_iiiiij:invoke_iiiiij,invoke_ijii:invoke_ijii,invoke_jiiii:invoke_jiiii,invoke_v:invoke_v,invoke_vi:invoke_vi,invoke_vii:invoke_vii,invoke_viii:invoke_viii,invoke_viiii:invoke_viiii,invoke_viiiii:invoke_viiiii,invoke_viiiiii:invoke_viiiiii,invoke_viiiiiii:invoke_viiiiiii,invoke_viiiiiiii:invoke_viiiiiiii,invoke_viiiiiiiii:invoke_viiiiiiiii,invoke_viiiiiiiiii:invoke_viiiiiiiiii,invoke_viiiiiiiiiiiiiii:invoke_viiiiiiiiiiiiiii,invoke_viijii:invoke_viijii,jsStackTrace:jsStackTrace,kill:_kill,localtime:_localtime,localtime_r:_localtime_r,lzma_code:_lzma_code,lzma_easy_buffer_encode:_lzma_easy_buffer_encode,lzma_easy_decoder_memusage:_lzma_easy_decoder_memusage,lzma_end:_lzma_end,lzma_stream_buffer_bound:_lzma_stream_buffer_bound,lzma_stream_decoder:_lzma_stream_decoder,memcpy:_memcpy,memory:wasmMemory,memset:_memset,mktime:_mktime,nanosleep:_nanosleep,nullFunc_ii:nullFunc_ii,nullFunc_iidiiii:nullFunc_iidiiii,nullFunc_iii:nullFunc_iii,nullFunc_iiid:nullFunc_iiid,nullFunc_iiii:nullFunc_iiii,nullFunc_iiiiddi:nullFunc_iiiiddi,nullFunc_iiiii:nullFunc_iiiii,nullFunc_iiiiiddii:nullFunc_iiiiiddii,nullFunc_iiiiidi:nullFunc_iiiiidi,nullFunc_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii:nullFunc_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii,nullFunc_iiiiii:nullFunc_iiiiii,nullFunc_iiiiiii:nullFunc_iiiiiii,nullFunc_iiiiiiii:nullFunc_iiiiiiii,nullFunc_iiiiiiiii:nullFunc_iiiiiiiii,nullFunc_iiiiiiiiii:nullFunc_iiiiiiiiii,nullFunc_iiiiiiiiiii:nullFunc_iiiiiiiiiii,nullFunc_iiiiiiiiiiiiii:nullFunc_iiiiiiiiiiiiii,nullFunc_iiiiiiiiiiiiiiiii:nullFunc_iiiiiiiiiiiiiiiii,nullFunc_iiiiiijj:nullFunc_iiiiiijj,nullFunc_iij:nullFunc_iij,nullFunc_iiji:nullFunc_iiji,nullFunc_iijii:nullFunc_iijii,nullFunc_jii:nullFunc_jii,nullFunc_jij:nullFunc_jij,nullFunc_jiji:nullFunc_jiji,nullFunc_vi:nullFunc_vi,nullFunc_vii:nullFunc_vii,nullFunc_viii:nullFunc_viii,nullFunc_viiii:nullFunc_viiii,nullFunc_viiiiii:nullFunc_viiiiii,nullFunc_viiiiiiii:nullFunc_viiiiiiii,nullFunc_viiiiiiiiiiiiiiii:nullFunc_viiiiiiiiiiiiiiii,nullFunc_viji:nullFunc_viji,nullFunc_vijj:nullFunc_vijj,popen:_popen,proc_exit:_proc_exit,pthread_attr_init:_pthread_attr_init,pthread_attr_setdetachstate:_pthread_attr_setdetachstate,pthread_cleanup_pop:_pthread_cleanup_pop,pthread_cleanup_push:_pthread_cleanup_push,pthread_cond_destroy:_pthread_cond_destroy,pthread_cond_init:_pthread_cond_init,pthread_cond_timedwait:_pthread_cond_timedwait,pthread_create:_pthread_create,pthread_detach:_pthread_detach,pthread_exit:_pthread_exit,pthread_join:_pthread_join,pthread_mutexattr_destroy:_pthread_mutexattr_destroy,pthread_mutexattr_init:_pthread_mutexattr_init,pthread_mutexattr_settype:_pthread_mutexattr_settype,pthread_self:_pthread_self,pthread_sigmask:_pthread_sigmask,round:_round,saveSetjmp:_saveSetjmp,setTempRet0:_setTempRet0,shmat:_shmat,shmctl:_shmctl,shmdt:_shmdt,shmget:_shmget,sigaction:_sigaction,sigaddset:_sigaddset,sigemptyset:_sigemptyset,sigfillset:_sigfillset,signal:_signal,stackTrace:stackTrace,strbuf_chomp:_strbuf_chomp,strbuf_new:_strbuf_new,strbuf_reset_gzreadline:_strbuf_reset_gzreadline,strftime:_strftime,strftime_l:_strftime_l,string_is_all_whitespace:_string_is_all_whitespace,string_next_nonwhitespace:_string_next_nonwhitespace,system:_system,table:wasmTable,testSetjmp:_testSetjmp,time:_time,usleep:_usleep,waitpid:_waitpid},asm=createWasm();Module.asm=asm;var ___wasm_call_ctors=Module.___wasm_call_ctors=function(){if(assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__wasm_call_ctors)return Module.asm.__wasm_call_ctors.apply(null,arguments)},_free=Module._free=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.free.apply(null,arguments)},_malloc=Module._malloc=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.malloc?Module.asm.malloc.apply(null,arguments):Module.asm._malloc.apply(null,arguments)},___emscripten_environ_constructor=Module.___emscripten_environ_constructor=function(){if(assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.___emscripten_environ_constructor)return Module.asm.___emscripten_environ_constructor.apply(null,arguments)},___errno_location=Module.___errno_location=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__errno_location.apply(null,arguments)},__get_environ=Module.__get_environ=function(){return Module.asm.__get_environ.apply(null,arguments)},__get_daylight=Module.__get_daylight=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__get_daylight.apply(null,arguments)},__get_timezone=Module.__get_timezone=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__get_timezone.apply(null,arguments)},__get_tzname=Module.__get_tzname=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__get_tzname.apply(null,arguments)},_emscripten_replace_memory=Module._emscripten_replace_memory=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._emscripten_replace_memory.apply(null,arguments)},_fflush=Module._fflush=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.fflush.apply(null,arguments)},_main=Module._main=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.main.apply(null,arguments)},__get_tzname=Module.__get_tzname=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._get_tzname.apply(null,arguments)},__get_daylight=Module.__get_daylight=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._get_daylight.apply(null,arguments)},__get_timezone=Module.__get_timezone=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._get_timezone.apply(null,arguments)},_free=Module._free=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.free.apply(null,arguments)},_emscripten_get_global_libc=Module._emscripten_get_global_libc=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_get_global_libc.apply(null,arguments)},___emscripten_pthread_data_constructor=Module.___emscripten_pthread_data_constructor=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__emscripten_pthread_data_constructor.apply(null,arguments)},_htons=Module._htons=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.htons.apply(null,arguments)},_htonl=Module._htonl=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.htonl.apply(null,arguments)},_ntohs=Module._ntohs=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.ntohs.apply(null,arguments)},_setThrew=Module._setThrew=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.setThrew.apply(null,arguments)},_memalign=Module._memalign=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.memalign.apply(null,arguments)},_emscripten_main_browser_thread_id=Module._emscripten_main_browser_thread_id=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_main_browser_thread_id.apply(null,arguments)},___pthread_tsd_run_dtors=Module.___pthread_tsd_run_dtors=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__pthread_tsd_run_dtors.apply(null,arguments)},_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_main_thread_process_queued_calls.apply(null,arguments)},_emscripten_current_thread_process_queued_calls=Module._emscripten_current_thread_process_queued_calls=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_current_thread_process_queued_calls.apply(null,arguments)},_emscripten_register_main_browser_thread_id=Module._emscripten_register_main_browser_thread_id=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_register_main_browser_thread_id.apply(null,arguments)},_emscripten_async_run_in_main_thread=Module._emscripten_async_run_in_main_thread=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_async_run_in_main_thread.apply(null,arguments)},_emscripten_sync_run_in_main_thread=Module._emscripten_sync_run_in_main_thread=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread.apply(null,arguments)},_emscripten_sync_run_in_main_thread_0=Module._emscripten_sync_run_in_main_thread_0=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_0.apply(null,arguments)},_emscripten_sync_run_in_main_thread_1=Module._emscripten_sync_run_in_main_thread_1=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_1.apply(null,arguments)},_emscripten_sync_run_in_main_thread_2=Module._emscripten_sync_run_in_main_thread_2=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_2.apply(null,arguments)},_emscripten_sync_run_in_main_thread_xprintf_varargs=Module._emscripten_sync_run_in_main_thread_xprintf_varargs=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_xprintf_varargs.apply(null,arguments)},_emscripten_sync_run_in_main_thread_3=Module._emscripten_sync_run_in_main_thread_3=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_3.apply(null,arguments)},_emscripten_sync_run_in_main_thread_4=Module._emscripten_sync_run_in_main_thread_4=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_4.apply(null,arguments)},_emscripten_sync_run_in_main_thread_5=Module._emscripten_sync_run_in_main_thread_5=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_5.apply(null,arguments)},_emscripten_sync_run_in_main_thread_6=Module._emscripten_sync_run_in_main_thread_6=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_6.apply(null,arguments)},_emscripten_sync_run_in_main_thread_7=Module._emscripten_sync_run_in_main_thread_7=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_sync_run_in_main_thread_7.apply(null,arguments)},_emscripten_run_in_main_runtime_thread_js=Module._emscripten_run_in_main_runtime_thread_js=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_run_in_main_runtime_thread_js.apply(null,arguments)},_emscripten_async_queue_on_thread_=Module._emscripten_async_queue_on_thread_=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_async_queue_on_thread_.apply(null,arguments)},_emscripten_tls_init=Module._emscripten_tls_init=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_tls_init.apply(null,arguments)},___set_stack_limit=Module.___set_stack_limit=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__set_stack_limit.apply(null,arguments)},stackSave=Module.stackSave=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.stackSave.apply(null,arguments)},_htons=Module._htons=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.htons.apply(null,arguments)},_llvm_bswap_i16=Module._llvm_bswap_i16=function(){return Module.asm._llvm_bswap_i16.apply(null,arguments)},_llvm_bswap_i32=Module._llvm_bswap_i32=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._llvm_bswap_i32.apply(null,arguments)},_llvm_rint_f64=Module._llvm_rint_f64=function(){return Module.asm._llvm_rint_f64.apply(null,arguments)},_llvm_round_f64=Module._llvm_round_f64=function(){return Module.asm._llvm_round_f64.apply(null,arguments)},_main=Module._main=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.main.apply(null,arguments)},__start=Module.__start=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._start.apply(null,arguments)},_setThrew=Module._setThrew=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.setThrew.apply(null,arguments)},_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.emscripten_main_thread_process_queued_calls.apply(null,arguments)},__ZSt18uncaught_exceptionv=Module.__ZSt18uncaught_exceptionv=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._ZSt18uncaught_exceptionv.apply(null,arguments)},___set_stack_limit=Module.___set_stack_limit=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__set_stack_limit.apply(null,arguments)},stackSave=Module.stackSave=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.stackSave.apply(null,arguments)},_memalign=Module._memalign=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._memalign.apply(null,arguments)},_memcpy=Module._memcpy=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._memcpy.apply(null,arguments)},_memmove=Module._memmove=function(){return Module.asm._memmove.apply(null,arguments)},_memset=Module._memset=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm._memset.apply(null,arguments)},_ntohs=Module._ntohs=function(){return Module.asm._ntohs.apply(null,arguments)},_pthread_cond_broadcast=Module._pthread_cond_broadcast=function(){return Module.asm._pthread_cond_broadcast.apply(null,arguments)},_sbrk=Module._sbrk=function(){return Module.asm._sbrk.apply(null,arguments)},establishStackSpace=Module.establishStackSpace=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.establishStackSpace.apply(null,arguments)},stackAlloc=Module.stackAlloc=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.stackAlloc.apply(null,arguments)},stackRestore=Module.stackRestore=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.stackRestore.apply(null,arguments)},__growWasmMemory=Module.__growWasmMemory=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.__growWasmMemory.apply(null,arguments)},dynCall_iidiiii=Module.dynCall_iidiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iidiiii.apply(null,arguments)},dynCall_iii=Module.dynCall_iii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iii.apply(null,arguments)},dynCall_ii=Module.dynCall_ii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ii.apply(null,arguments)},dynCall_v=Module.dynCall_v=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_v.apply(null,arguments)},dynCall_iiid=Module.dynCall_iiid=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiid.apply(null,arguments)},dynCall_iiii=Module.dynCall_iiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiii.apply(null,arguments)},dynCall_vi=Module.dynCall_vi=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vi.apply(null,arguments)},dynCall_viii=Module.dynCall_viii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viii.apply(null,arguments)},dynCall_iii=Module.dynCall_iii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iii.apply(null,arguments)},dynCall_vii=Module.dynCall_vii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vii.apply(null,arguments)},dynCall_viiif=Module.dynCall_viiif=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiif.apply(null,arguments)},dynCall_fiii=Module.dynCall_fiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_fiii.apply(null,arguments)},dynCall_diiii=Module.dynCall_diiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_diiii.apply(null,arguments)},dynCall_viiiiiii=Module.dynCall_viiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiii.apply(null,arguments)},dynCall_vii=Module.dynCall_vii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vii.apply(null,arguments)},dynCall_viij=Module.dynCall_viij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viij.apply(null,arguments)},dynCall_jii=Module.dynCall_jii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jii.apply(null,arguments)},dynCall_iijiii=Module.dynCall_iijiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iijiii.apply(null,arguments)},dynCall_iiij=Module.dynCall_iiij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiij.apply(null,arguments)},dynCall_viiii=Module.dynCall_viiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiii.apply(null,arguments)},dynCall_viiiii=Module.dynCall_viiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiii.apply(null,arguments)},dynCall_v=Module.dynCall_v=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_v.apply(null,arguments)},dynCall_iiiiiii=Module.dynCall_iiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiii.apply(null,arguments)},dynCall_iiijji=Module.dynCall_iiijji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiijji.apply(null,arguments)},dynCall_iiiiddi=Module.dynCall_iiiiddi=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiddi.apply(null,arguments)},dynCall_viiiiiiiii=Module.dynCall_viiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiiiii.apply(null,arguments)},dynCall_viiiiiiiiii=Module.dynCall_viiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiiiiii.apply(null,arguments)},dynCall_viiiiiiiiiiiiiii=Module.dynCall_viiiiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiiiiiiiiiii.apply(null,arguments)},dynCall_viijii=Module.dynCall_viijii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viijii.apply(null,arguments)},dynCall_i=Module.dynCall_i=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_i.apply(null,arguments)},dynCall_ii=Module.dynCall_ii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ii.apply(null,arguments)},dynCall_iii=Module.dynCall_iii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iii.apply(null,arguments)},dynCall_iiii=Module.dynCall_iiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiii.apply(null,arguments)},dynCall_iiiii=Module.dynCall_iiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiii.apply(null,arguments)},dynCall_iiiiiddii=Module.dynCall_iiiiiddii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiddii.apply(null,arguments)},dynCall_iiiiidi=Module.dynCall_iiiiidi=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiidi.apply(null,arguments)},dynCall_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii=Module.dynCall_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiidiiiiiiiiiiiiiiiiiiiiiiiiiii.apply(null,arguments)},dynCall_iiiiii=Module.dynCall_iiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiii.apply(null,arguments)},dynCall_iiiiiii=Module.dynCall_iiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiii.apply(null,arguments)},dynCall_iiiiiiii=Module.dynCall_iiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiii.apply(null,arguments)},dynCall_iiiiiiiii=Module.dynCall_iiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiii.apply(null,arguments)},dynCall_iiiiiiiiii=Module.dynCall_iiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiii.apply(null,arguments)},dynCall_ijii=Module.dynCall_ijii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ijii.apply(null,arguments)},dynCall_dii=Module.dynCall_dii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_dii.apply(null,arguments)},dynCall_diii=Module.dynCall_diii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_diii.apply(null,arguments)},dynCall_diiiddd=Module.dynCall_diiiddd=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_diiiddd.apply(null,arguments)},dynCall_iiiiiiiiiii=Module.dynCall_iiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiiii.apply(null,arguments)},dynCall_iiiiiiiiiiii=Module.dynCall_iiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiiiii.apply(null,arguments)},dynCall_iiiiiiiiiiiiii=Module.dynCall_iiiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiiiiiii.apply(null,arguments)},dynCall_iiiiiiiiiiiii=Module.dynCall_iiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiiiiii.apply(null,arguments)},dynCall_iiiiij=Module.dynCall_iiiiij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiij.apply(null,arguments)},dynCall_iiiiid=Module.dynCall_iiiiid=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiid.apply(null,arguments)},dynCall_iiiiiiiiiiiiiiiii=Module.dynCall_iiiiiiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiiiiiiiiii.apply(null,arguments)},dynCall_iiiij=Module.dynCall_iiiij=function(){return Module.asm.dynCall_iiiij.apply(null,arguments)},dynCall_iiiiiijj=Module.dynCall_iiiiiijj=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiijj.apply(null,arguments)},dynCall_iiiji=Module.dynCall_iiiji=function(){return Module.asm.dynCall_iiiji.apply(null,arguments)},dynCall_jiiii=Module.dynCall_jiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jiiii.apply(null,arguments)},dynCall_iij=Module.dynCall_iij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iij.apply(null,arguments)},dynCall_vii=Module.dynCall_vii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vii.apply(null,arguments)},dynCall_iii=Module.dynCall_iii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iii.apply(null,arguments)},dynCall_iiii=Module.dynCall_iiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiii.apply(null,arguments)},dynCall_ii=Module.dynCall_ii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ii.apply(null,arguments)},dynCall_iiji=Module.dynCall_iiji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiji.apply(null,arguments)},dynCall_iijii=Module.dynCall_iijii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iijii.apply(null,arguments)},dynCall_ij=Module.dynCall_ij=function(){return Module.asm.dynCall_ij.apply(null,arguments)},dynCall_ji=Module.dynCall_ji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ji.apply(null,arguments)},dynCall_jii=Module.dynCall_jii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jii.apply(null,arguments)},dynCall_jij=Module.dynCall_jij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jij.apply(null,arguments)},dynCall_jiji=Module.dynCall_jiji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jiji.apply(null,arguments)},dynCall_v=Module.dynCall_v=function(){return Module.asm.dynCall_v.apply(null,arguments)},dynCall_iidiiii=Module.dynCall_iidiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iidiiii.apply(null,arguments)},dynCall_iiiiii=Module.dynCall_iiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiii.apply(null,arguments)},dynCall_iiiii=Module.dynCall_iiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiii.apply(null,arguments)},dynCall_vii=Module.dynCall_vii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vii.apply(null,arguments)},dynCall_viii=Module.dynCall_viii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viii.apply(null,arguments)},dynCall_jiji=Module.dynCall_jiji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_jiji.apply(null,arguments)},dynCall_iidiiii=Module.dynCall_iidiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iidiiii.apply(null,arguments)},dynCall_viiii=Module.dynCall_viiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiii.apply(null,arguments)},dynCall_viiiiii=Module.dynCall_viiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiii.apply(null,arguments)},dynCall_viiiii=Module.dynCall_viiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiii.apply(null,arguments)},dynCall_viiii=Module.dynCall_viiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiii.apply(null,arguments)},dynCall_viiiiiiii=Module.dynCall_viiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiiii.apply(null,arguments)},dynCall_viiiii=Module.dynCall_viiiii=function(){return Module.asm.dynCall_viiiii.apply(null,arguments)},dynCall_viiiiiiiiiiiiiiii=Module.dynCall_viiiiiiiiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viiiiiiiiiiiiiiii.apply(null,arguments)},dynCall_viij=Module.dynCall_viij=function(){return Module.asm.dynCall_viij.apply(null,arguments)},dynCall_vij=Module.dynCall_vij=function(){return Module.asm.dynCall_vij.apply(null,arguments)},dynCall_viji=Module.dynCall_viji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_viji.apply(null,arguments)},dynCall_vijj=Module.dynCall_vijj=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vijj.apply(null,arguments)},dynCall_ij=Module.dynCall_ij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_ij.apply(null,arguments)},dynCall_iiiiiiiiii=Module.dynCall_iiiiiiiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiiiiiiii.apply(null,arguments)},dynCall_iiiji=Module.dynCall_iiiji=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiji.apply(null,arguments)},dynCall_iiiij=Module.dynCall_iiiij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iiiij.apply(null,arguments)},dynCall_vij=Module.dynCall_vij=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_vij.apply(null,arguments)},dynCall_iidiiii=Module.dynCall_iidiiii=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Module.asm.dynCall_iidiiii.apply(null,arguments)},calledRun;function invoke_iiii(e,t,r,i){var n=stackSave();try{return dynCall_iiii(e,t,r,i)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_ii(e,t){var r=stackSave();try{return dynCall_ii(e,t)}catch(e){if(stackRestore(r),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_vii(e,t,r){var i=stackSave();try{dynCall_vii(e,t,r)}catch(e){if(stackRestore(i),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_v(e){var t=stackSave();try{dynCall_v(e)}catch(e){if(stackRestore(t),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iii(e,t,r){var i=stackSave();try{return dynCall_iii(e,t,r)}catch(e){if(stackRestore(i),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_vi(e,t){var r=stackSave();try{dynCall_vi(e,t)}catch(e){if(stackRestore(r),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiii(e,t,r,i,n,o){var a=stackSave();try{dynCall_viiiii(e,t,r,i,n,o)}catch(e){if(stackRestore(a),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiii(e,t,r,i,n,o,a){var s=stackSave();try{return dynCall_iiiiiii(e,t,r,i,n,o,a)}catch(e){if(stackRestore(s),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiii(e,t,r,i,n,o){var a=stackSave();try{return dynCall_iiiiii(e,t,r,i,n,o)}catch(e){if(stackRestore(a),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiid(e,t,r,i,n,o){var a=stackSave();try{return dynCall_iiiiid(e,t,r,i,n,o)}catch(e){if(stackRestore(a),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiii(e,t,r,i,n,o,a,s){var u=stackSave();try{return dynCall_iiiiiiii(e,t,r,i,n,o,a,s)}catch(e){if(stackRestore(u),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f){var l=stackSave();try{return dynCall_iiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f)}catch(e){if(stackRestore(l),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(e,t,r,i,n,o,a,s,u,c){var f=stackSave();try{return dynCall_iiiiiiiiii(e,t,r,i,n,o,a,s,u,c)}catch(e){if(stackRestore(f),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiii(e,t,r,i,n,o){var a=stackSave();try{return dynCall_iiiiii(e,t,r,i,n,o)}catch(e){if(stackRestore(a),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiid(e,t,r,i,n,o){var a=stackSave();try{return dynCall_iiiiid(e,t,r,i,n,o)}catch(e){if(stackRestore(a),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_i(e){var t=stackSave();try{return dynCall_i(e)}catch(e){if(stackRestore(t),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(e,t,r,i,n,o,a,s,u){var c=stackSave();try{return dynCall_iiiiiiiii(e,t,r,i,n,o,a,s,u)}catch(e){if(stackRestore(c),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(e,t,r,i,n,o,a,s,u,c){var f=stackSave();try{dynCall_viiiiiiiii(e,t,r,i,n,o,a,s,u,c)}catch(e){if(stackRestore(f),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(e,t,r,i,n,o,a,s,u){var c=stackSave();try{dynCall_viiiiiiii(e,t,r,i,n,o,a,s,u)}catch(e){if(stackRestore(c),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiii(e,t,r,i,n){var o=stackSave();try{dynCall_viiii(e,t,r,i,n)}catch(e){if(stackRestore(o),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l,d){var h=stackSave();try{return dynCall_iiiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l,d)}catch(e){if(stackRestore(h),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_fiii(e,t,r,i){var n=stackSave();try{return dynCall_fiii(e,t,r,i)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiii(e,t,r,i,n){var o=stackSave();try{return dynCall_iiiii(e,t,r,i,n)}catch(e){if(stackRestore(o),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_fiii(e,t,r,i){var n=stackSave();try{return dynCall_fiii(e,t,r,i)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_diiiddd(e,t,r,i,n,o,a){var s=stackSave();try{return dynCall_diiiddd(e,t,r,i,n,o,a)}catch(e){if(stackRestore(s),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiii(e,t,r,i,n,o,a){var s=stackSave();try{dynCall_viiiiii(e,t,r,i,n,o,a)}catch(e){if(stackRestore(s),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l){var d=stackSave();try{return dynCall_iiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l)}catch(e){if(stackRestore(d),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f){var l=stackSave();try{dynCall_viiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f)}catch(e){if(stackRestore(l),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l,d,h,p,_){var m=stackSave();try{dynCall_viiiiiiiiiiiiiii(e,t,r,i,n,o,a,s,u,c,f,l,d,h,p,_)}catch(e){if(stackRestore(m),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viijii(e,t,r,i,n,o,a){var s=stackSave();try{dynCall_viijii(e,t,r,i,n,o,a)}catch(e){if(stackRestore(s),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_diii(e,t,r,i){var n=stackSave();try{return dynCall_diii(e,t,r,i)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viiiiiii(e,t,r,i,n,o,a,s){var u=stackSave();try{dynCall_viiiiiii(e,t,r,i,n,o,a,s)}catch(e){if(stackRestore(u),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_viii(e,t,r,i){var n=stackSave();try{dynCall_viii(e,t,r,i)}catch(e){if(stackRestore(n),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_iiiiij(e,t,r,i,n,o,a){var s=stackSave();try{return dynCall_iiiiij(e,t,r,i,n,o,a)}catch(e){if(stackRestore(s),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_jiiii(e,t,r,i,n){var o=stackSave();try{return dynCall_jiiii(e,t,r,i,n)}catch(e){if(stackRestore(o),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_dii(e,t,r){var i=stackSave();try{return dynCall_dii(e,t,r)}catch(e){if(stackRestore(i),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function invoke_ijii(e,t,r,i,n){var o=stackSave();try{return dynCall_ijii(e,t,r,i,n)}catch(e){if(stackRestore(o),e!==e+0&&"longjmp"!==e)throw e;_setThrew(1,0)}}function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Module.asm=asm,Object.getOwnPropertyDescriptor(Module,"intArrayFromString")||(Module.intArrayFromString=function(){abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"intArrayToString")||(Module.intArrayToString=function(){abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Module.ccall=ccall,Object.getOwnPropertyDescriptor(Module,"cwrap")||(Module.cwrap=function(){abort("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"setValue")||(Module.setValue=function(){abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getValue")||(Module.getValue=function(){abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"allocate")||(Module.allocate=function(){abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Module.getMemory=getMemory,Object.getOwnPropertyDescriptor(Module,"AsciiToString")||(Module.AsciiToString=function(){abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToAscii")||(Module.stringToAscii=function(){abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF8ArrayToString")||(Module.UTF8ArrayToString=function(){abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF8ToString")||(Module.UTF8ToString=function(){abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF8Array")||(Module.stringToUTF8Array=function(){abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF8")||(Module.stringToUTF8=function(){abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"lengthBytesUTF8")||(Module.lengthBytesUTF8=function(){abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF16ToString")||(Module.UTF16ToString=function(){abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF16")||(Module.stringToUTF16=function(){abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"lengthBytesUTF16")||(Module.lengthBytesUTF16=function(){abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF32ToString")||(Module.UTF32ToString=function(){abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF32")||(Module.stringToUTF32=function(){abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"lengthBytesUTF32")||(Module.lengthBytesUTF32=function(){abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"allocateUTF8")||(Module.allocateUTF8=function(){abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stackTrace")||(Module.stackTrace=function(){abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addOnPreRun")||(Module.addOnPreRun=function(){abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addOnInit")||(Module.addOnInit=function(){abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addOnPreMain")||(Module.addOnPreMain=function(){abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addOnExit")||(Module.addOnExit=function(){abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addOnPostRun")||(Module.addOnPostRun=function(){abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeStringToMemory")||(Module.writeStringToMemory=function(){abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeArrayToMemory")||(Module.writeArrayToMemory=function(){abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeAsciiToMemory")||(Module.writeAsciiToMemory=function(){abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.FS=FS,Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,Object.getOwnPropertyDescriptor(Module,"dynamicAlloc")||(Module.dynamicAlloc=function(){abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"loadDynamicLibrary")||(Module.loadDynamicLibrary=function(){abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"loadWebAssemblyModule")||(Module.loadWebAssemblyModule=function(){abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getLEB")||(Module.getLEB=function(){abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getFunctionTables")||(Module.getFunctionTables=function(){abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"alignFunctionTables")||(Module.alignFunctionTables=function(){abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"registerFunctions")||(Module.registerFunctions=function(){abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"addFunction")||(Module.addFunction=function(){abort("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"removeFunction")||(Module.removeFunction=function(){abort("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getFuncWrapper")||(Module.getFuncWrapper=function(){abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"prettyPrint")||(Module.prettyPrint=function(){abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"makeBigInt")||(Module.makeBigInt=function(){abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"dynCall")||(Module.dynCall=function(){abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getCompilerSetting")||(Module.getCompilerSetting=function(){abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"print")||(Module.print=function(){abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"printErr")||(Module.printErr=function(){abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getTempRet0")||(Module.getTempRet0=function(){abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"setTempRet0")||(Module.setTempRet0=function(){abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"callMain")||(Module.callMain=function(){abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"abort")||(Module.abort=function(){abort("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PROCINFO")||(Module.PROCINFO=function(){abort("'PROCINFO' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToNewUTF8")||(Module.stringToNewUTF8=function(){abort("'stringToNewUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"abortOnCannotGrowMemory")||(Module.abortOnCannotGrowMemory=function(){abort("'abortOnCannotGrowMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscripten_realloc_buffer")||(Module.emscripten_realloc_buffer=function(){abort("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"ENV")||(Module.ENV=function(){abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"setjmpId")||(Module.setjmpId=function(){abort("'setjmpId' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"ERRNO_CODES")||(Module.ERRNO_CODES=function(){abort("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"ERRNO_MESSAGES")||(Module.ERRNO_MESSAGES=function(){abort("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"DNS__deps")||(Module.DNS__deps=function(){abort("'DNS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"DNS")||(Module.DNS=function(){abort("'DNS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GAI_ERRNO_MESSAGES")||(Module.GAI_ERRNO_MESSAGES=function(){abort("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Protocols")||(Module.Protocols=function(){abort("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Sockets__deps")||(Module.Sockets__deps=function(){abort("'Sockets__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Sockets")||(Module.Sockets=function(){abort("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UNWIND_CACHE")||(Module.UNWIND_CACHE=function(){abort("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"readAsmConstArgs")||(Module.readAsmConstArgs=function(){abort("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PATH")||(Module.PATH=function(){abort("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PATH_FS__deps")||(Module.PATH_FS__deps=function(){abort("'PATH_FS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PATH_FS")||(Module.PATH_FS=function(){abort("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SYSCALLS__deps")||(Module.SYSCALLS__deps=function(){abort("'SYSCALLS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SYSCALLS")||(Module.SYSCALLS=function(){abort("'SYSCALLS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"JSEvents")||(Module.JSEvents=function(){abort("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"demangle__deps")||(Module.demangle__deps=function(){abort("'demangle__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"demangle")||(Module.demangle=function(){abort("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"demangleAll")||(Module.demangleAll=function(){abort("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"jsStackTrace")||(Module.jsStackTrace=function(){abort("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stackTrace")||(Module.stackTrace=function(){abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToI64__deps")||(Module.writeI53ToI64__deps=function(){abort("'writeI53ToI64__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToI64")||(Module.writeI53ToI64=function(){abort("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToI64Clamped")||(Module.writeI53ToI64Clamped=function(){abort("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToI64Signaling")||(Module.writeI53ToI64Signaling=function(){abort("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToU64Clamped")||(Module.writeI53ToU64Clamped=function(){abort("'writeI53ToU64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"writeI53ToU64Signaling")||(Module.writeI53ToU64Signaling=function(){abort("'writeI53ToU64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"readI53FromI64")||(Module.readI53FromI64=function(){abort("'readI53FromI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"readI53FromU64")||(Module.readI53FromU64=function(){abort("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"convertI32PairToI53")||(Module.convertI32PairToI53=function(){abort("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"convertU32PairToI53")||(Module.convertU32PairToI53=function(){abort("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Browser__deps")||(Module.Browser__deps=function(){abort("'Browser__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Browser__postset")||(Module.Browser__postset=function(){abort("'Browser__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Browser")||(Module.Browser=function(){abort("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"Browser__postset__deps")||(Module.Browser__postset__deps=function(){abort("'Browser__postset__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"FS__deps")||(Module.FS__deps=function(){abort("'FS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"FS__postset")||(Module.FS__postset=function(){abort("'FS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"FS")||(Module.FS=function(){abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"MEMFS__deps")||(Module.MEMFS__deps=function(){abort("'MEMFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"MEMFS")||(Module.MEMFS=function(){abort("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"TTY__deps")||(Module.TTY__deps=function(){abort("'TTY__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"TTY__postset")||(Module.TTY__postset=function(){abort("'TTY__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"TTY")||(Module.TTY=function(){abort("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PIPEFS__postset")||(Module.PIPEFS__postset=function(){abort("'PIPEFS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PIPEFS__deps")||(Module.PIPEFS__deps=function(){abort("'PIPEFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PIPEFS")||(Module.PIPEFS=function(){abort("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SOCKFS__postset")||(Module.SOCKFS__postset=function(){abort("'SOCKFS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SOCKFS__deps")||(Module.SOCKFS__deps=function(){abort("'SOCKFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SOCKFS")||(Module.SOCKFS=function(){abort("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GL__postset")||(Module.GL__postset=function(){abort("'GL__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GL__deps")||(Module.GL__deps=function(){abort("'GL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GL")||(Module.GL=function(){abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGet__deps")||(Module.emscriptenWebGLGet__deps=function(){abort("'emscriptenWebGLGet__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGet")||(Module.emscriptenWebGLGet=function(){abort("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetTexPixelData__deps")||(Module.emscriptenWebGLGetTexPixelData__deps=function(){abort("'emscriptenWebGLGetTexPixelData__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetTexPixelData")||(Module.emscriptenWebGLGetTexPixelData=function(){abort("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetUniform")||(Module.emscriptenWebGLGetUniform=function(){abort("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetVertexAttrib")||(Module.emscriptenWebGLGetVertexAttrib=function(){abort("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GL__postset__deps")||(Module.GL__postset__deps=function(){abort("'GL__postset__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetUniform__deps")||(Module.emscriptenWebGLGetUniform__deps=function(){abort("'emscriptenWebGLGetUniform__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"emscriptenWebGLGetVertexAttrib__deps")||(Module.emscriptenWebGLGetVertexAttrib__deps=function(){abort("'emscriptenWebGLGetVertexAttrib__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"AL__deps")||(Module.AL__deps=function(){abort("'AL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"AL")||(Module.AL=function(){abort("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"WebVR")||(Module.WebVR=function(){abort("'WebVR' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"WebVR__deps")||(Module.WebVR__deps=function(){abort("'WebVR__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SDL__deps")||(Module.SDL__deps=function(){abort("'SDL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SDL")||(Module.SDL=function(){abort("'SDL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SDL_gfx")||(Module.SDL_gfx=function(){abort("'SDL_gfx' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"SDL_gfx__deps")||(Module.SDL_gfx__deps=function(){abort("'SDL_gfx__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLUT__deps")||(Module.GLUT__deps=function(){abort("'GLUT__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLUT")||(Module.GLUT=function(){abort("'GLUT' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"EGL__deps")||(Module.EGL__deps=function(){abort("'EGL__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"EGL")||(Module.EGL=function(){abort("'EGL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLFW__deps")||(Module.GLFW__deps=function(){abort("'GLFW__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLFW")||(Module.GLFW=function(){abort("'GLFW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLEW__deps")||(Module.GLEW__deps=function(){abort("'GLEW__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"GLEW")||(Module.GLEW=function(){abort("'GLEW' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"IDBStore")||(Module.IDBStore=function(){abort("'IDBStore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"IDBStore__deps")||(Module.IDBStore__deps=function(){abort("'IDBStore__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"runAndAbortIfError")||(Module.runAndAbortIfError=function(){abort("'runAndAbortIfError' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PThread__postset")||(Module.PThread__postset=function(){abort("'PThread__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PThread__deps")||(Module.PThread__deps=function(){abort("'PThread__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Module.PThread=PThread,Object.getOwnPropertyDescriptor(Module,"establishStackSpaceInJsModule")||(Module.establishStackSpaceInJsModule=function(){abort("'establishStackSpaceInJsModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getNoExitRuntime")||(Module.getNoExitRuntime=function(){abort("'getNoExitRuntime' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"PThread__postset__deps")||(Module.PThread__postset__deps=function(){abort("'PThread__postset__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"establishStackSpaceInJsModule__deps")||(Module.establishStackSpaceInJsModule__deps=function(){abort("'establishStackSpaceInJsModule__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"getNoExitRuntime__deps")||(Module.getNoExitRuntime__deps=function(){abort("'getNoExitRuntime__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"IDBFS__deps")||(Module.IDBFS__deps=function(){abort("'IDBFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"IDBFS")||(Module.IDBFS=function(){abort("'IDBFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"NODEFS__deps")||(Module.NODEFS__deps=function(){abort("'NODEFS__deps' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"NODEFS__postset")||(Module.NODEFS__postset=function(){abort("'NODEFS__postset' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"NODEFS")||(Module.NODEFS=function(){abort("'NODEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"warnOnce")||(Module.warnOnce=function(){abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stackSave")||(Module.stackSave=function(){abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stackRestore")||(Module.stackRestore=function(){abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stackAlloc")||(Module.stackAlloc=function(){abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"AsciiToString")||(Module.AsciiToString=function(){abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToAscii")||(Module.stringToAscii=function(){abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF16ToString")||(Module.UTF16ToString=function(){abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF16")||(Module.stringToUTF16=function(){abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"lengthBytesUTF16")||(Module.lengthBytesUTF16=function(){abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"UTF32ToString")||(Module.UTF32ToString=function(){abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"stringToUTF32")||(Module.stringToUTF32=function(){abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"lengthBytesUTF32")||(Module.lengthBytesUTF32=function(){abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"allocateUTF8")||(Module.allocateUTF8=function(){abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(Module,"allocateUTF8OnStack")||(Module.allocateUTF8OnStack=function(){abort("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Module.establishStackSpace=establishStackSpace,Module.writeStackCookie=writeStackCookie,Module.checkStackCookie=checkStackCookie,Module.abortStackOverflow=abortStackOverflow,Module.PThread=PThread,Module.ExitStatus=ExitStatus,Module._pthread_self=_pthread_self,Object.getOwnPropertyDescriptor(Module,"ALLOC_NORMAL")||Object.defineProperty(Module,"ALLOC_NORMAL",{configurable:!0,get:function(){abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(Module,"ALLOC_STACK")||Object.defineProperty(Module,"ALLOC_STACK",{configurable:!0,get:function(){abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(Module,"ALLOC_DYNAMIC")||Object.defineProperty(Module,"ALLOC_DYNAMIC",{configurable:!0,get:function(){abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(Module,"ALLOC_NONE")||Object.defineProperty(Module,"ALLOC_NONE",{configurable:!0,get:function(){abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Module.calledRun=calledRun,Module.then=function(e){if(calledRun)e(Module);else{var t=Module.onRuntimeInitialized;Module.onRuntimeInitialized=function(){t&&t(),e(Module)}}return Module},ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var calledMain=!1;function callMain(e){assert(0==runDependencies,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),assert(0==__ATPRERUN__.length,"cannot call main when preRun functions remain to be called");var t=Module._main,r=(e=e||[]).length+1,i=stackAlloc(4*(r+1));HEAP32[i>>2]=allocateUTF8OnStack(thisProgram);for(var n=1;n<r;n++)HEAP32[(i>>2)+n]=allocateUTF8OnStack(e[n-1]);HEAP32[(i>>2)+r]=0;try{Module.___set_stack_limit(STACK_MAX),exit(t(r,i),!0)}catch(e){if(e instanceof ExitStatus)return;if("unwind"==e)return void(noExitRuntime=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),err("exception thrown: "+o),quit_(1,e)}finally{calledMain=!0}}function run(e){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}e=e||arguments_,runDependencies>0||(writeStackCookie(),preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t(),checkStackCookie()))}function exit(e,t){t&&noExitRuntime&&0===e||(noExitRuntime?t||err("program exited (with status: "+e+"), but noExitRuntime is set due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)"):(PThread.terminateAllThreads(),ABORT=!0,EXITSTATUS=e,exitRuntime(),Module.onExit&&Module.onExit(e)),quit_(e,new ExitStatus(e)))}if(dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.run=run,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),Module}}();__webpack_exports__.a=Module}).call(this,"/",__webpack_require__(3),__webpack_require__(2).Buffer)},function(e,t,r){e.exports=r(225)},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,i=c(e),a=i[0],s=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(f(e,s,s+a>u?u:s+a));1===n?(t=e[r-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)i[s]=a[s],n[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var n,o,a=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(i[(o=n)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?n-1:0,d=r?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=d,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=i;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),o-=c}return(h?-1:1)*a*Math.pow(2,o-i)},t.write=function(e,t,r,i,n,o){var a,s,u,c=8*o-n-1,f=(1<<c)-1,l=f>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,n),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,n),a=0));n>=8;e[r+h]=255&s,h+=p,s/=256,n-=8);for(a=a<<n|s,c+=n;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*_}},function(e,t,r){"use strict";(function(e){var i=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(124)),a=r(55),s=r(56),u=r(129),c=n(r(130));var f=r(55);t.registerSerializer=f.registerSerializer;var l=r(56);t.Transfer=l.Transfer;let d=!1;const h=e=>e&&e.type===u.MasterMessageType.run,p=e=>o.default(e)||function(e){return e&&"object"==typeof e&&"function"==typeof e.subscribe}(e);function _(e){return s.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function m(e,t){const{payload:r,transferables:i}=_(t),n={type:u.WorkerMessageType.error,uid:e,error:a.serialize(r)};c.default.postMessageToMaster(n,i)}function b(e,t,r){const{payload:i,transferables:n}=_(r),o={type:u.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:i};c.default.postMessageToMaster(o,n)}function y(e){const t={type:u.WorkerMessageType.uncaughtError,error:a.serialize(e)};c.default.postMessageToMaster(t)}function g(e,t,r){return i(this,void 0,void 0,(function*(){let i;try{i=t(...r)}catch(t){return m(e,t)}const n=p(i)?"observable":"promise";if(function(e,t){const r={type:u.WorkerMessageType.running,uid:e,resultType:t};c.default.postMessageToMaster(r)}(e,n),p(i))i.subscribe((t=>b(e,!1,a.serialize(t))),(t=>m(e,a.serialize(t))),(()=>b(e,!0)));else try{const t=yield i;b(e,!0,a.serialize(t))}catch(t){m(e,a.serialize(t))}}))}t.expose=function(e){if(!c.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(d)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(d=!0,"function"==typeof e)c.default.subscribeToMasterMessages((t=>{h(t)&&!t.method&&g(t.uid,e,t.args.map(a.deserialize))})),function(){const e={type:u.WorkerMessageType.init,exposed:{type:"function"}};c.default.postMessageToMaster(e)}();else{if("object"!=typeof e||!e)throw Error(`Invalid argument passed to expose(). Expected a function or an object, got: ${e}`);c.default.subscribeToMasterMessages((t=>{h(t)&&t.method&&g(t.uid,e[t.method],t.args.map(a.deserialize))}));!function(e){const t={type:u.WorkerMessageType.init,exposed:{type:"module",methods:e}};c.default.postMessageToMaster(t)}(Object.keys(e).filter((t=>"function"==typeof e[t])))}},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&c.default.isWorkerRuntime()&&(self.addEventListener("error",(e=>{setTimeout((()=>y(e.error||e)),250)})),self.addEventListener("unhandledrejection",(e=>{const t=e.reason;t&&"string"==typeof t.message&&setTimeout((()=>y(t)),250)}))),void 0!==e&&"function"==typeof e.on&&c.default.isWorkerRuntime()&&(e.on("uncaughtException",(e=>{setTimeout((()=>y(e)),250)})),e.on("unhandledRejection",(e=>{e&&"string"==typeof e.message&&setTimeout((()=>y(e)),250)})))}).call(this,r(3))},function(e,t,r){"use strict";const i=r(125).default;e.exports=e=>Boolean(e&&e[i]&&e===e[i]())},function(e,t,r){"use strict";r.r(t),function(e,i){var n,o=r(118);n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:i;var a=Object(o.a)(n);t.default=a}.call(this,r(5),r(126)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSerializer=function(e,t){const r=e.deserialize.bind(e),i=e.serialize.bind(e);return{deserialize:e=>t.deserialize(e,r),serialize:e=>t.serialize(e,i)}};const i={deserialize:e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),serialize:e=>({__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack})};t.DefaultSerializer={deserialize(e){return(t=e)&&"object"==typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?i.deserialize(e):e;var t},serialize:e=>e instanceof Error?i.serialize(e):e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$errors=Symbol("thread.errors"),t.$events=Symbol("thread.events"),t.$terminate=Symbol("thread.terminate"),t.$transferable=Symbol("thread.transferable"),t.$worker=Symbol("thread.worker")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.run="run"}(t.MasterMessageType||(t.MasterMessageType={})),function(e){e.error="error",e.init="init",e.result="result",e.running="running",e.uncaughtError="uncaughtError"}(t.WorkerMessageType||(t.WorkerMessageType={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={isWorkerRuntime:function(){return!("undefined"==typeof self||!self.postMessage)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){const t=t=>{e(t.data)};return self.addEventListener("message",t),()=>{self.removeEventListener("message",t)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(244);t.Observable=i.Observable;const n=Symbol("observers");class o extends i.Observable{constructor(){super((e=>{this[n]=[...this[n]||[],e];return()=>{this[n]=this[n].filter((t=>t!==e))}})),this[n]=[]}complete(){this[n].forEach((e=>e.complete()))}error(e){this[n].forEach((t=>t.error(e)))}next(e){this[n].forEach((t=>t.next(e)))}}t.Subject=o},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(15),t.createHash=t.Hash=r(22),t.createHmac=t.Hmac=r(70);var i=r(157),n=Object.keys(i),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);t.getHashes=function(){return o};var a=r(73);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(159);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r(174);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(179);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(220);var f=r(221);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var l=r(224);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){(t=e.exports=r(58)).Stream=t,t.Readable=t,t.Writable=r(62),t.Duplex=r(17),t.Transform=r(63),t.PassThrough=r(139),t.finished=r(34),t.pipeline=r(140)},function(e,t){},function(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=r(2).Buffer,s=r(136).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i,n=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=n,i=s,a.prototype.copy.call(t,r,i),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0==(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),c&&o(t,c),e}()},function(e,t){},function(e,t,r){"use strict";(function(t){var i;function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(34),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(h(r,!1)))}}function _(e){t.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(i={get stream(){return this[d]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise((function(r,i){t.nextTick((function(){e[u]?i(e[u]):r(h(void 0,!0))}))}));var i,n=this[f];if(n)i=new Promise(function(e,t){return function(r,i){e.then((function(){t[c]?r(h(void 0,!0)):t[l](r,i)}),i)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(h(o,!1));i=new Promise(this[l])}return this[f]=i,i}},Symbol.asyncIterator,(function(){return this})),n(i,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),i),m);e.exports=function(e){var t,r=Object.create(b,(n(t={},d,{value:e,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,c,{value:e._readableState.endEmitted,writable:!0}),n(t,l,{value:function(e,t){var i=r[d].read();i?(r[f]=null,r[a]=null,r[s]=null,e(h(i,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[s]=null,i(h(void 0,!0))),r[c]=!0})),e.on("readable",_.bind(null,r)),r}}).call(this,r(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){"use strict";e.exports=n;var i=r(63);function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}r(0)(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i;var n=r(16).codes,o=n.ERR_MISSING_ARGS,a=n.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,n,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===i&&(i=r(34)),i(e,{readable:t,writable:n},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,n=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){i||(i=e),e&&a.forEach(c),o||(a.forEach(c),n(i))}))}));return t.reduce(f)}},function(e,t,r){var i=r(0),n=r(18),o=r(1).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=i)<<5|t>>>27)+f(h,n,o,s)+u+r[d]+a[h];u=s,s=o,o=c(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var i=r(0),n=r(18),o=r(1).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function l(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),_=c(i)+l(p,n,o,s)+u+r[h]+a[p]|0;u=s,s=o,o=f(n),n=i,i=_}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var i=r(0),n=r(64),o=r(18),a=r(1).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var i=r(0),n=r(65),o=r(18),a=r(1).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t,r){e.exports=n;var i=r(12).EventEmitter;function n(){i.call(this)}r(0)(n,i),n.Readable=r(37),n.Writable=r(152),n.Duplex=r(153),n.Transform=r(154),n.PassThrough=r(155),n.Stream=n,n.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===i.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",n),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},function(e,t){},function(e,t,r){"use strict";var i=r(38).Buffer,n=r(148);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,t.copy(r,n),s+=a.data.length,a=a.next;return o},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(n.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(n.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(150),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var i,n,o,a,s,u=1,c={},f=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},i=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,i=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):i=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return c[u]=n,i(u),u++},d.clearImmediate=h}function h(e){delete c[e]}function p(e){if(f)setTimeout(p,0,e);else{var t=c[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{h(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(3))},function(e,t,r){"use strict";e.exports=o;var i=r(69),n=Object.create(r(23));function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n.inherits=r(0),n.inherits(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(39)},function(e,t,r){e.exports=r(14)},function(e,t,r){e.exports=r(37).Transform},function(e,t,r){e.exports=r(37).PassThrough},function(e,t,r){"use strict";var i=r(0),n=r(1).Buffer,o=r(11),a=n.alloc(128),s=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=n.concat([t,a],s));for(var r=this._ipad=n.allocUnsafe(s),i=this._opad=n.allocUnsafe(s),u=0;u<s;u++)r[u]=54^t[u],i[u]=92^t[u];this._hash=[r]}i(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},e.exports=u},function(e,t,r){e.exports=r(72)},function(e,t,r){(function(t,i){var n,o=r(1).Buffer,a=r(74),s=r(75),u=r(76),c=r(77),f=t.crypto&&t.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(e,t,r,i,n){return f.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return f.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,p,_,m,b){"function"==typeof m&&(b=m,m=void 0);var y=l[(m=m||"sha1").toLowerCase()];if(!y||"function"!=typeof t.Promise)return i.nextTick((function(){var t;try{t=u(e,r,p,_,m)}catch(e){return b(e)}b(null,t)}));if(a(p,_),e=c(e,s,"Password"),r=c(r,s,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var r=h(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=r,r}(y).then((function(t){return t?h(e,r,p,_,y):u(e,r,p,_,m)})),b)}}).call(this,r(5),r(3))},function(e,t,r){var i=r(160),n=r(41),o=r(42),a=r(173),s=r(29);function u(e,t,r){if(e=e.toLowerCase(),o[e])return n.createCipheriv(e,t,r);if(a[e])return new i({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return n.createDecipheriv(e,t,r);if(a[e])return new i({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,i=a[e].iv}var n=s(t,!1,r,i);return u(e,n.key,n.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,i;if(e=e.toLowerCase(),o[e])r=o[e].key,i=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,i=a[e].iv}var n=s(t,!1,r,i);return c(e,n.key,n.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(n.getCiphers())}},function(e,t,r){var i=r(11),n=r(161),o=r(0),a=r(1).Buffer,s={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function u(e){i.call(this);var t,r=e.mode.toLowerCase(),n=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var u=e.iv;a.isBuffer(u)||(u=a.from(u)),this._des=n.create({key:o,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,o(u,i),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(78),t.Cipher=r(40),t.DES=r(79),t.CBC=r(162),t.EDE=r(163)},function(e,t,r){"use strict";var i=r(7),n=r(0),o={};function a(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}n(t,e);for(var r=Object.keys(o),i=0;i<r.length;i++){var a=r[i];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,r,i){var n=this._cbcState,o=this.constructor.super_.prototype,a=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];o._update.call(this,a,0,r,i);for(s=0;s<this.blockSize;s++)a[s]=r[i+s]}else{o._update.call(this,e,t,r,i);for(s=0;s<this.blockSize;s++)r[i+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},function(e,t,r){"use strict";var i=r(7),n=r(0),o=r(40),a=r(79);function s(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:n}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}n(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},function(e,t,r){var i=r(42),n=r(83),o=r(1).Buffer,a=r(84),s=r(11),u=r(28),c=r(29);function f(e,t,r){s.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(0)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return o.concat(i)};var l=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function h(e,t,r){var s=i[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new n(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=o.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=h,t.createCipher=function(e,t){var r=i[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,r){var i=r(24);t.encrypt=function(e,t){var r=i(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return i(n,r)}},function(e,t,r){var i=r(1).Buffer,n=r(24);function o(e,t,r){var o=t.length,a=n(t,e._cache);return e._cache=e._cache.slice(o),e._prev=i.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var n,a=i.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),!(e._cache.length<=t.length)){a=i.concat([a,o(e,t,r)]);break}n=e._cache.length,a=i.concat([a,o(e,t.slice(0,n),r)]),t=t.slice(n)}return a}},function(e,t,r){var i=r(1).Buffer;function n(e,t,r){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=i.concat([e._prev.slice(1),i.from([r?t:n])]),n}t.encrypt=function(e,t,r){for(var o=t.length,a=i.allocUnsafe(o),s=-1;++s<o;)a[s]=n(e,t[s],r);return a}},function(e,t,r){var i=r(1).Buffer;function n(e,t,r){for(var i,n,a=-1,s=0;++a<8;)i=t&1<<7-a?128:0,s+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^i))>>a%8,e._prev=o(e._prev,r?i:n);return s}function o(e,t){var r=e.length,n=-1,o=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++n<r;)o[n]=e[n]<<1|e[n+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=i.allocUnsafe(o),s=-1;++s<o;)a[s]=n(e,t[s],r);return a}},function(e,t,r){(function(e){var i=r(24);function n(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,n(t)]);var o=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),i(r,o)}}).call(this,r(2).Buffer)},function(e,t,r){var i=r(1).Buffer,n=i.alloc(16,0);function o(e){var t=i.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,i=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],n=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(n[0]^=i[0],n[1]^=i[1],n[2]^=i[2],n[3]^=i[3]),r=0!=(1&i[3]),t=3;t>0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=o(n)},a.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,r){var i=r(83),n=r(1).Buffer,o=r(42),a=r(84),s=r(11),u=r(28),c=r(29);function f(e,t,r){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}function l(){this.cache=n.allocUnsafe(0)}function d(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=n.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new i(s.module,t,r,!0):new f(s.module,t,r)}r(0)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return n.concat(i)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=n.concat([this.cache,e])},l.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var i=r(85),n=r(177),o=r(178);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(n[t].prime,"hex"),i=new e(n[t].gen,"hex");return new o(r,i)},t.createDiffieHellman=t.DiffieHellman=function t(r,n,s,u){return e.isBuffer(n)||void 0===a[n]?t(r,"binary",n,s):(n=n||"binary",u=u||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,u)),"number"==typeof r?new o(i(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,n)),new o(r,s,!0)))}}).call(this,r(2).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){(function(t){var i=r(4),n=new(r(86)),o=new i(24),a=new i(11),s=new i(10),u=new i(3),c=new i(7),f=r(85),l=r(15);function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new i(e),this}function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new i(e),this}e.exports=_;var p={};function _(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function m(e,r){var i=new t(e.toArray());return r?i.toString(r):i}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in p)return p[i];var l,d=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!n.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[i]=d,d;switch(n.test(e.shrn(1))||(d+=2),r){case"02":e.mod(o).cmp(a)&&(d+=8);break;case"05":(l=e.mod(s)).cmp(u)&&l.cmp(c)&&(d+=8);break;default:d+=4}return p[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(e){var r=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new t(r.toArray()),o=this.getPrime();if(n.length<o.length){var a=new t(o.length-n.length);a.fill(0),n=t.concat([a,n])}return n},_.prototype.getPublicKey=function(e){return m(this._pub,e)},_.prototype.getPrivateKey=function(e){return m(this._priv,e)},_.prototype.getPrime=function(e){return m(this.__prime,e)},_.prototype.getGenerator=function(e){return m(this._gen,e)},_.prototype.setGenerator=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.__gen=e,this._gen=new i(e),this}}).call(this,r(2).Buffer)},function(e,t,r){var i=r(1).Buffer,n=r(22),o=r(180),a=r(0),s=r(188),u=r(219),c=r(72);function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new f(e)}function h(e){return new l(e)}Object.keys(c).forEach((function(e){c[e].id=i.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=s(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},a(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},l.prototype.verify=function(e,t,r){"string"==typeof t&&(t=i.from(t,r)),this.end();var n=this._hash.digest();return u(t,n,e,this._signType,this._tag)},e.exports={Sign:d,Verify:h,createSign:d,createVerify:h}},function(e,t,r){(t=e.exports=r(87)).Stream=t,t.Readable=t,t.Writable=r(91),t.Duplex=r(20),t.Transform=r(92),t.PassThrough=r(186),t.finished=r(45),t.pipeline=r(187)},function(e,t){},function(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=r(2).Buffer,s=r(183).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i,n=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=n,i=s,a.prototype.copy.call(t,r,i),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0==(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),c&&o(t,c),e}()},function(e,t){},function(e,t,r){"use strict";(function(t){var i;function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(45),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(h(r,!1)))}}function _(e){t.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(i={get stream(){return this[d]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise((function(r,i){t.nextTick((function(){e[u]?i(e[u]):r(h(void 0,!0))}))}));var i,n=this[f];if(n)i=new Promise(function(e,t){return function(r,i){e.then((function(){t[c]?r(h(void 0,!0)):t[l](r,i)}),i)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(h(o,!1));i=new Promise(this[l])}return this[f]=i,i}},Symbol.asyncIterator,(function(){return this})),n(i,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(h(void 0,!0))}))}))})),i),m);e.exports=function(e){var t,r=Object.create(b,(n(t={},d,{value:e,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,c,{value:e._readableState.endEmitted,writable:!0}),n(t,l,{value:function(e,t){var i=r[d].read();i?(r[f]=null,r[a]=null,r[s]=null,e(h(i,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[s]=null,i(h(void 0,!0))),r[c]=!0})),e.on("readable",_.bind(null,r)),r}}).call(this,r(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){"use strict";e.exports=n;var i=r(92);function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}r(0)(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i;var n=r(19).codes,o=n.ERR_MISSING_ARGS,a=n.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,n,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===i&&(i=r(45)),i(e,{readable:t,writable:n},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,n=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){i||(i=e),e&&a.forEach(c),o||(a.forEach(c),n(i))}))}));return t.reduce(f)}},function(e,t,r){var i=r(1).Buffer,n=r(70),o=r(46),a=r(47).ec,s=r(98),u=r(31),c=r(104);function f(e,t,r,o){if((e=i.from(e.toArray())).length<t.byteLength()){var a=i.alloc(t.byteLength()-e.length);e=i.concat([a,e])}var s=r.length,u=function(e,t){e=(e=l(e,t)).mod(t);var r=i.from(e.toArray());if(r.length<t.byteLength()){var n=i.alloc(t.byteLength()-r.length);r=i.concat([n,r])}return r}(r,t),c=i.alloc(s);c.fill(1);var f=i.alloc(s);return f=n(o,f).update(c).update(i.from([0])).update(e).update(u).digest(),c=n(o,f).update(c).digest(),{k:f=n(o,f).update(c).update(i.from([1])).update(e).update(u).digest(),v:c=n(o,f).update(c).digest()}}function l(e,t){var r=new s(e),i=(e.length<<3)-t.bitLength();return i>0&&r.ishrn(i),r}function d(e,t,r){var o,a;do{for(o=i.alloc(0);8*o.length<e.bitLength();)t.v=n(r,t.k).update(t.v).digest(),o=i.concat([o,t.v]);a=l(o,e),t.k=n(r,t.k).update(t.v).update(i.from([0])).digest(),t.v=n(r,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function h(e,t,r,i){return e.toRed(s.mont(r)).redPow(t).fromRed().mod(i)}e.exports=function(e,t,r,n,p){var _=u(t);if(_.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var n=new a(r).keyFromPrivate(t.privateKey).sign(e);return i.from(n.toDER())}(e,_)}if("dsa"===_.type){if("dsa"!==n)throw new Error("wrong private key type");return function(e,t,r){var n,o=t.params.priv_key,a=t.params.p,u=t.params.q,c=t.params.g,p=new s(0),_=l(e,u).mod(u),m=!1,b=f(o,u,e,r);for(;!1===m;)p=h(c,n=d(u,b,r),a,u),0===(m=n.invm(u).imul(_.add(o.mul(p))).mod(u)).cmpn(0)&&(m=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),i.from(r)}(p,m)}(e,_,r)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");e=i.concat([p,e]);for(var m=_.modulus.byteLength(),b=[0,1];e.length+b.length+1<m;)b.push(255);b.push(0);for(var y=-1;++y<e.length;)b.push(e[y]);return o(b,_)},e.exports.getKey=f,e.exports.makeKey=d},function(e,t,r){(function(e){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(190).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function u(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function c(e,t,r,n){for(var o=0,a=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;o*=n,a=c>=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&a<n,"Invalid character"),o+=a}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,a=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=u(e,t,i)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,a=o%i,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=i)u=c(e,f,f+i,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|o)).toString(16);r=0!==(o=s>>>24-n&16777215)||a!==this.length-1?d[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var _=l.modrn(f).toString(e);r=(l=l.idivn(f)).isZero()?_+r:d[c-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var f=u>>>26,l=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;f+=(a=(n=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|i;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r>=0)for(e[r--]=i;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},o.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,a=0;a<i.length;a++)o=(t=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var i,n,o,a=e.words,s=t.words,u=r.words,c=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,_=h>>>13,m=0|a[2],b=8191&m,y=m>>>13,g=0|a[3],v=8191&g,w=g>>>13,E=0|a[4],S=8191&E,M=E>>>13,T=0|a[5],A=8191&T,O=T>>>13,R=0|a[6],N=8191&R,I=R>>>13,x=0|a[7],P=8191&x,k=x>>>13,F=0|a[8],D=8191&F,B=F>>>13,C=0|a[9],L=8191&C,j=C>>>13,U=0|s[0],H=8191&U,z=U>>>13,X=0|s[1],q=8191&X,Y=X>>>13,W=0|s[2],$=8191&W,G=W>>>13,V=0|s[3],K=8191&V,J=V>>>13,Q=0|s[4],Z=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],oe=8191&ne,ae=ne>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],le=8191&fe,de=fe>>>13,he=0|s[9],pe=8191&he,_e=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(i=Math.imul(l,H))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(d,H)|0))<<13)|0;c=((o=Math.imul(d,z))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,H),n=(n=Math.imul(p,z))+Math.imul(_,H)|0,o=Math.imul(_,z);var be=(c+(i=i+Math.imul(l,q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,H),n=(n=Math.imul(b,z))+Math.imul(y,H)|0,o=Math.imul(y,z),i=i+Math.imul(p,q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,Y)|0;var ye=(c+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(v,H),n=(n=Math.imul(v,z))+Math.imul(w,H)|0,o=Math.imul(w,z),i=i+Math.imul(b,q)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,Y)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0;var ge=(c+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,J)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(S,H),n=(n=Math.imul(S,z))+Math.imul(M,H)|0,o=Math.imul(M,z),i=i+Math.imul(v,q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0;var ve=(c+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(A,H),n=(n=Math.imul(A,z))+Math.imul(O,H)|0,o=Math.imul(O,z),i=i+Math.imul(S,q)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Y)|0,i=i+Math.imul(v,$)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,i=i+Math.imul(b,K)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,J)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,ee)|0;var we=(c+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(N,H),n=(n=Math.imul(N,z))+Math.imul(I,H)|0,o=Math.imul(I,z),i=i+Math.imul(A,q)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,i=i+Math.imul(v,K)|0,n=(n=n+Math.imul(v,J)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,J)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0;var Ee=(c+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(P,H),n=(n=Math.imul(P,z))+Math.imul(k,H)|0,o=Math.imul(k,z),i=i+Math.imul(N,q)|0,n=(n=n+Math.imul(N,Y)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,Y)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,i=i+Math.imul(v,Z)|0,n=(n=n+Math.imul(v,ee)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,ee)|0,i=i+Math.imul(b,re)|0,n=(n=n+Math.imul(b,ie)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0;var Se=(c+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(D,H),n=(n=Math.imul(D,z))+Math.imul(B,H)|0,o=Math.imul(B,z),i=i+Math.imul(P,q)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,Y)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,J)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,i=i+Math.imul(v,re)|0,n=(n=n+Math.imul(v,ie)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ie)|0,i=i+Math.imul(b,oe)|0,n=(n=n+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0;var Me=(c+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(L,H),n=(n=Math.imul(L,z))+Math.imul(j,H)|0,o=Math.imul(j,z),i=i+Math.imul(D,q)|0,n=(n=n+Math.imul(D,Y)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,Y)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(N,K)|0,n=(n=n+Math.imul(N,J)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ie)|0,i=i+Math.imul(v,oe)|0,n=(n=n+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,i=i+Math.imul(b,ue)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Te=(c+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,_e)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,_e)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(L,q),n=(n=Math.imul(L,Y))+Math.imul(j,q)|0,o=Math.imul(j,Y),i=i+Math.imul(D,$)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,ee)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(A,re)|0,n=(n=n+Math.imul(A,ie)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,i=i+Math.imul(v,ue)|0,n=(n=n+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,i=i+Math.imul(b,le)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Ae=(c+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,_e)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,_e)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(L,$),n=(n=Math.imul(L,G))+Math.imul(j,$)|0,o=Math.imul(j,G),i=i+Math.imul(D,K)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(N,re)|0,n=(n=n+Math.imul(N,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,ce)|0,i=i+Math.imul(v,le)|0,n=(n=n+Math.imul(v,de)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,de)|0;var Oe=(c+(i=i+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,_e)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,_e)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(L,K),n=(n=Math.imul(L,J))+Math.imul(j,K)|0,o=Math.imul(j,J),i=i+Math.imul(D,Z)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(N,oe)|0,n=(n=n+Math.imul(N,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,i=i+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Re=(c+(i=i+Math.imul(v,pe)|0)|0)+((8191&(n=(n=n+Math.imul(v,_e)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,_e)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(L,Z),n=(n=Math.imul(L,ee))+Math.imul(j,Z)|0,o=Math.imul(j,ee),i=i+Math.imul(D,re)|0,n=(n=n+Math.imul(D,ie)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,i=i+Math.imul(N,ue)|0,n=(n=n+Math.imul(N,ce)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,ce)|0,i=i+Math.imul(A,le)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Ne=(c+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,_e)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,_e)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,i=Math.imul(L,re),n=(n=Math.imul(L,ie))+Math.imul(j,re)|0,o=Math.imul(j,ie),i=i+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,i=i+Math.imul(N,le)|0,n=(n=n+Math.imul(N,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Ie=(c+(i=i+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,_e)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,_e)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(L,oe),n=(n=Math.imul(L,ae))+Math.imul(j,oe)|0,o=Math.imul(j,ae),i=i+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var xe=(c+(i=i+Math.imul(N,pe)|0)|0)+((8191&(n=(n=n+Math.imul(N,_e)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,_e)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(L,ue),n=(n=Math.imul(L,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),i=i+Math.imul(D,le)|0,n=(n=n+Math.imul(D,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Pe=(c+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,_e)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,_e)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(L,le),n=(n=Math.imul(L,de))+Math.imul(j,le)|0,o=Math.imul(j,de);var ke=(c+(i=i+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,_e)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,_e)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Fe=(c+(i=Math.imul(L,pe))|0)+((8191&(n=(n=Math.imul(L,_e))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,_e))+(n>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,u[0]=me,u[1]=be,u[2]=ye,u[3]=ge,u[4]=ve,u[5]=we,u[6]=Ee,u[7]=Se,u[8]=Me,u[9]=Te,u[10]=Ae,u[11]=Oe,u[12]=Re,u[13]=Ne,u[14]=Ie,u[15]=xe,u[16]=Pe,u[17]=ke,u[18]=Fe,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var a=n;n=0;for(var s=67108863&i,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,l=(0|e.words[f])*(0|t.words[c]),d=67108863&l;s=67108863&(d=d+s|0),n+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(e,t,r){return b(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(m=_),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?_(this,e,t):r<1024?b(this,e,t):y(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},g.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a<o;a++)i[a]=t[e[a]],n[a]=r[e[a]]},g.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<n;f+=s)for(var l=u,d=c,h=0;h<a;h++){var p=r[f+h],_=i[f+h],m=r[f+h+a],b=i[f+h+a],y=l*m-d*b;b=l*b+d*m,m=y,r[f+h]=p+m,i[f+h]=_+b,r[f+h+a]=p-m,i[f+h+a]=_-b,h!==s&&(y=u*l-c*d,d=u*d+c*l,l=y)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},g.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<n;++a)r[a]=0;i(0===o),i(0==(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),a=new Array(i),s=new Array(i),u=new Array(i),c=new Array(i),f=new Array(i),l=new Array(i),d=r.words;d.length=i,this.convert13b(e.words,e.length,a,i),this.convert13b(t.words,t.length,c,i),this.transform(a,o,s,u,i,n),this.transform(c,o,f,l,i,n);for(var h=0;h<i;h++){var p=s[h]*f[h]-u[h]*l[h];u[h]=s[h]*l[h]+u[h]*f[h],s[h]=p}return this.conjugate(s,u,i),this.transform(s,u,d,o,i,n),this.conjugate(d,o,i),this.normalize13b(d,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),i("number"==typeof e),i(e<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=e.words[i]>>>n&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r;this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},o.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var n,o,a=e.length+r;this._expand(a);var s=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+s;var u=(0|e.words[n])*t;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)s=(o=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),n=e,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var f=i.clone()._ishlnsubmul(n,1,u);0===f.negative&&(i=f,s&&(s.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(n,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:n,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(l)),n.iushrn(1),a.iushrn(1);for(var p=0,_=1;0==(r.words[0]&_)&&p<26;++p,_<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),a.isub(u)):(r.isub(t),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(n=0===t.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(E,w),E.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,w),n(M,w),n(T,w),T.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new S;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return v[e]=t,t},A.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),d=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=a;0!==h.cmp(s);){for(var _=h,m=0;0!==_.cmp(s);m++)_=_.redSqr();i(m<p);var b=this.pow(l,new o(1).iushln(p-m-1));d=d.redMul(b),l=b.redSqr(),h=h.redMul(l),p=m}return d},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],a=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var c=t.words[i],f=u-1;f>=0;f--){var l=c>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},n(O,A),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(43)(e))},function(e,t){},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t,r){"use strict";var i=r(8),n=r(4),o=r(0),a=r(30),s=i.assert;function u(e){a.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,i){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,i){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(r,16),this.z=new n(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new n(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),r=new n(2).toRed(t).redInvm(),i=r.redNeg(),o=new n(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,i,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new n(1),_=new n(0),m=new n(0),b=new n(1),y=0;0!==d.cmpn(0);){var g=h.div(d);c=h.sub(g.mul(d)),f=m.sub(g.mul(p));var v=b.sub(g.mul(_));if(!i&&c.cmp(l)<0)t=u.neg(),r=p,i=c.neg(),o=f;else if(i&&2==++y)break;u=c,h=d,d=c,m=p,p=f,b=_,_=v}a=c.neg(),s=f;var w=i.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=n.mul(r.a),s=o.mul(i.a),u=n.mul(r.b),c=o.mul(i.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),i[2*o]=s,i[2*o+1]=u,n[2*o]=a.k1,n[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,i,n,2*o,r),f=0;f<2*o;f++)i[f]=null,n[f]=null;return c},o(c,a.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},c.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=i.redSub(n),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),l=i.redMul(c),d=u.redSqr().redIAdd(f).redISub(l).redISub(l),h=u.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(i),s=n.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),d=s.redMul(f.redISub(l)).redISub(n.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(l,d,h)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),l=c.redSqr(),d=l.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(u)),p=o.redMul(l),_=h.redSqr().redISub(p.redAdd(p)),m=p.redISub(_),b=h.redMul(m);b=b.redIAdd(b).redISub(d);var y=c.redMul(s);t+1<e&&(u=u.redMul(d)),o=_,s=y,c=b}return this.curve.jpoint(o,c.redMul(n),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(f).redISub(d);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),_=p.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=_.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),_=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(_),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),f=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(l).redISub(d),p=r.redAdd(r).redMul(i);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(i),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=i.redIAdd(i);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=n.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(s).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,d,h)},f.prototype.mul=function(e,t){return e=new n(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var i=r(4),n=r(0),o=r(30),a=r(8);function s(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},n(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=n.redMul(i),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var i=r(8),n=r(4),o=r(0),a=r(30),s=i.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,i,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=o&&new n(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},u.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,i){return new c(this,e,t,r,i)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),a=o.redSub(r),s=i.redSub(t),u=n.redMul(a),c=o.redMul(s),f=n.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var e,t,r,i,n,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(i=this.curve._mulA(s)).redAdd(u);this.zOne?(e=a.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(i.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(n=this.z.redSqr(),o=c.redSub(n).redISub(n),e=a.redSub(s).redISub(u).redMul(o),t=c.redMul(i.redSub(u)),r=c.redMul(o))}else i=s.redAdd(u),n=this.curve._mulC(this.z).redSqr(),o=i.redSub(n).redSub(n),e=this.curve._mulC(a.redISub(i)).redMul(o),t=this.curve._mulC(i).redMul(s.redISub(u)),r=i.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=n.redSub(i),s=n.redAdd(i),u=r.redAdd(t),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),d=a.redMul(s);return this.curve.point(c,f,d,l)},c.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=n.redSub(s),c=n.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=i.redMul(u).redMul(f);return this.curve.twisted?(t=i.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=i.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(196),t.sha224=r(197),t.sha256=r(96),t.sha384=r(198),t.sha512=r(97)},function(e,t,r){"use strict";var i=r(9),n=r(25),o=r(95),a=i.rotl32,s=i.sum32,u=i.sum32_5,c=o.ft_1,f=n.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,f),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=a(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],o=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),_=u(a(n,5),c(p,o,f,d),h,r[i],l[p]);h=d,d=f,f=a(o,30),o=n,n=_}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},function(e,t,r){"use strict";var i=r(9),n=r(96);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(o,n),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var i=r(9),n=r(97);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(o,n),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var i=r(9),n=r(25),o=i.rotl32,a=i.sum32,s=i.sum32_3,u=i.sum32_4,c=n.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}i.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],n=this.h[2],c=this.h[3],f=this.h[4],y=r,g=i,v=n,w=c,E=f,S=0;S<80;S++){var M=a(o(u(r,l(S,i,n,c),e[p[S]+t],d(S)),m[S]),f);r=f,f=c,c=o(n,10),n=i,i=M,M=a(o(u(y,l(79-S,g,v,w),e[_[S]+t],h(S)),b[S]),E),y=E,E=w,w=o(v,10),v=g,g=M}M=s(this.h[1],n,w),this.h[1]=s(this.h[2],c,E),this.h[2]=s(this.h[3],f,y),this.h[3]=s(this.h[4],r,g),this.h[4]=s(this.h[0],i,v),this.h[0]=M},f.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,r){"use strict";var i=r(9),n=r(7);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var i=r(4),n=r(203),o=r(8),a=r(48),s=r(44),u=o.assert,c=r(204),f=r(205);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function(e){return new c(this,e)},l.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new i(2));;){var a=new i(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),u=e.toArray("be",a),c=new n({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new i(1)),d=0;;d++){var h=o.k?o.k(d):new i(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var _=p.getX(),m=_.umod(this.n);if(0!==m.cmpn(0)){var b=h.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==_.cmp(m)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),y^=1),new f({r:m,s:b,recoveryParam:y})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new f(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,n);var o=this.n,a=new i(e),s=t.r,c=t.s,l=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),_=c.mul(h).umod(o);return this.g.mulAdd(p,s,_)},l.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new f(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch(e){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var i=r(49),n=r(93),o=r(7);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),r=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}e.exports=a,a.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=n.toArray(e,t),r=n.toArray(r,i),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,n.encode(a,t)}},function(e,t,r){"use strict";var i=r(4),n=r(8).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var i=r(4),n=r(8),o=n.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;for(var n=0,o=0,a=t.place;o<i;o++,a++)n<<=8,n|=e[a],n>>>=0;return!(n<=127)&&(t.place=a,n)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=n.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var l=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new i(c),this.s=new i(l),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,t.length),(i=i.concat(t)).push(2),f(i,r.length);var o=i.concat(r),a=[48];return f(a,o.length),a=a.concat(o),n.encode(a,e)}},function(e,t,r){"use strict";var i=r(49),n=r(48),o=r(8),a=o.assert,s=o.parseBytes,u=r(207),c=r(208);function f(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),o=this.encodePoint(n),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=i.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=0!=(128&e[t]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var i=r(8),n=i.assert,o=i.parseBytes,a=i.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},s.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var i=r(4),n=r(8),o=n.assert,a=n.cachedProperty,s=n.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},function(e,t){},function(e,t,r){"use strict";var i=r(99);t.certificate=r(216);var n=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=n;var o=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=i.define("DSAparam",(function(){this.int()}));var l=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=l;var d=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,r){"use strict";const i=r(100),n=r(102),o=r(0);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t,r){"use strict";const i=r(0),n=r(101);function o(e){n.call(this,e),this.enc="pem"}i(o,n),e.exports=o,o.prototype.encode=function(e,t){const r=n.prototype.encode.call(this,e).toString("base64"),i=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)i.push(r.slice(e,e+64));return i.push("-----END "+t.label+"-----"),i.join("\n")}},function(e,t,r){"use strict";const i=r(0),n=r(50).Buffer,o=r(103);function a(e){o.call(this,e),this.enc="pem"}i(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,u=-1;for(let e=0;e<r.length;e++){const t=r[e].match(a);if(null!==t&&t[2]===i){if(-1!==s){if("END"!==t[1])break;u=e;break}if("BEGIN"!==t[1])break;s=e}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+i);const c=r.slice(s+1,u).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const f=n.from(c,"base64");return o.prototype.decode.call(this,f,t)}},function(e,t,r){"use strict";const i=t;i.Reporter=r(52).Reporter,i.DecoderBuffer=r(26).DecoderBuffer,i.EncoderBuffer=r(26).EncoderBuffer,i.Node=r(51)},function(e,t,r){"use strict";const i=t;i._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const i=e[r];t[i]=r})),t},i.der=r(53)},function(e,t,r){"use strict";var i=r(99),n=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=i.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=i.define("RDNSequence",(function(){this.seqof(u)})),f=i.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),d=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,r){var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(29),s=r(41),u=r(1).Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(i);if(f){var l="aes"+f[1],d=u.from(f[2],"hex"),h=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(t,d.slice(0,8),parseInt(f[1],10)).key,_=[],m=s.createDecipheriv(l,p,d);_.push(m.update(h)),_.push(m.final()),r=u.concat(_)}else{var b=c.match(o);r=u.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(n)[1],data:r}}},function(e,t,r){var i=r(1).Buffer,n=r(98),o=r(47).ec,a=r(31),s=r(104);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,f){var l=a(r);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=s[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new o(i),a=r.data.subjectPrivateKey.data;return n.verify(t,e,a)}(e,t,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(e,"der"),l=f.s,d=f.r;u(l,o),u(d,o);var h=n.mont(i),p=l.invm(o);return 0===s.toRed(h).redPow(new n(t).mul(p).mod(o)).fromRed().mul(c.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(i).mod(o).cmp(d)}(e,t,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=i.concat([f,t]);for(var d=l.modulus.byteLength(),h=[1],p=0;t.length+h.length+2<d;)h.push(255),p++;h.push(0);for(var _=-1;++_<t.length;)h.push(t[_]);h=i.from(h);var m=n.mont(l.modulus);e=(e=new n(e).toRed(m)).redPow(new n(l.publicExponent)),e=i.from(e.fromRed().toArray());var b=p<8?1:0;for(d=Math.min(e.length,h.length),e.length!==h.length&&(b=1),_=-1;++_<d;)b|=e[_]^h[_];return 0===b}},function(e,t,r){(function(t){var i=r(47),n=r(4);e.exports=function(e){return new a(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function s(e,r,i){Array.isArray(e)||(e=e.toArray());var n=new t(e);if(i&&n.length<i){var o=new t(i-n.length);o.fill(0),n=t.concat([o,n])}return r?n.toString(r):n}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,r,i){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,e)},a.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,r){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var i=new n(e);return i=i.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(i),this}}).call(this,r(2).Buffer)},function(e,t,r){t.publicEncrypt=r(222),t.privateDecrypt=r(223),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},function(e,t,r){var i=r(31),n=r(15),o=r(22),a=r(105),s=r(106),u=r(4),c=r(107),f=r(46),l=r(1).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var h,p=i(e);if(4===d)h=function(e,t){var r=e.modulus.byteLength(),i=t.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,d=2*f;if(i>r-d-2)throw new Error("message too long");var h=l.alloc(r-i-d-2),p=r-f-1,_=n(f),m=s(l.concat([c,h,l.alloc(1,1),t],p),a(_,p)),b=s(_,a(m,f));return new u(l.concat([l.alloc(1),b,m],r))}(p,t);else if(1===d)h=function(e,t,r){var i,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");i=r?l.alloc(a-o-3,255):function(e){var t,r=l.allocUnsafe(e),i=0,o=n(2*e),a=0;for(;i<e;)a===o.length&&(o=n(2*e),a=0),(t=o[a++])&&(r[i++]=t);return r}(a-o-3);return new u(l.concat([l.from([0,r?1:2]),i,l.alloc(1),t],a))}(p,t,r);else{if(3!==d)throw new Error("unknown padding");if((h=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(h,p):c(h,p)}},function(e,t,r){var i=r(31),n=r(105),o=r(106),a=r(4),s=r(46),u=r(22),c=r(107),f=r(1).Buffer;e.exports=function(e,t,r){var l;l=e.padding?e.padding:r?1:4;var d,h=i(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?c(new a(t),h):s(t,h);var _=f.alloc(p-d.length);if(d=f.concat([_,d],p),4===l)return function(e,t){var r=e.modulus.byteLength(),i=u("sha1").update(f.alloc(0)).digest(),a=i.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),l=o(s,n(c,a)),d=o(c,n(l,r-a-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n<i;)r+=e[n]^t[n];return r}(i,d.slice(0,a)))throw new Error("decryption error");var h=a;for(;0===d[h];)h++;if(1!==d[h++])throw new Error("decryption error");return d.slice(h)}(h,d);if(1===l)return function(e,t,r){var i=t.slice(0,2),n=2,o=0;for(;0!==t[n++];)if(n>=t.length){o++;break}var a=t.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(n)}(0,d,r);if(3===l)return d;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(1),a=r(15),s=o.Buffer,u=o.kMaxLength,c=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function l(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function h(e,t,r,n){if(i.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),n?void i.nextTick((function(){n(null,e)})):e}if(!n)return a(r).copy(e,t),e;a(r,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}c&&c.getRandomValues||!i.browser?(t.randomFill=function(t,r,i,n){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)n=r,r=0,i=t.length;else if("function"==typeof i)n=i,i=t.length-r;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return l(r,t.length),d(i,r,t.length),h(t,r,i,n)},t.randomFillSync=function(t,r,i){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(r,t.length),void 0===i&&(i=t.length-r);return d(i,r,t.length),h(t,r,i)}):(t.randomFill=n,t.randomFillSync=n)}).call(this,r(5),r(3))},function(e,t,r){"use strict";var i=r(6),n=r(108),o=r(226),a=r(114);function s(e){var t=new o(e),r=n(o.prototype.request,t);return i.extend(r,o.prototype,t),i.extend(r,t),r}var u=s(r(111));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(115),u.CancelToken=r(239),u.isCancel=r(110),u.all=function(e){return Promise.all(e)},u.spread=r(240),u.isAxiosError=r(241),e.exports=u,e.exports.default=u},function(e,t,r){"use strict";var i=r(6),n=r(109),o=r(227),a=r(228),s=r(114);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},u.prototype.getUri=function(e){return e=s(this.defaults,e),n(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,i){return this.request(s(i||{},{method:e,url:t,data:r}))}})),e.exports=u},function(e,t,r){"use strict";var i=r(6);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},function(e,t,r){"use strict";var i=r(6),n=r(229),o=r(110),a=r(111);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=n(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var i=r(6);e.exports=function(e,t,r){return i.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){"use strict";var i=r(6);e.exports=function(e,t){i.forEach(e,(function(r,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[i])}))}},function(e,t,r){"use strict";var i=r(113);e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(i("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,i,n){return e.config=t,r&&(e.code=r),e.request=i,e.response=n,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,r){"use strict";var i=r(6);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,r,n,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),i.isString(n)&&s.push("path="+n),i.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var i=r(235),n=r(236);e.exports=function(e,t){return e&&!i(t)?n(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var i=r(6),n=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(i.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),r=i.trim(e.substr(o+1)),t){if(a[t]&&n.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var i=r(6);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var i=e;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=i.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var i=r(115);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new i(e),t(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n((function(t){e=t})),cancel:e}},e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t){function r(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}r.keys=function(){return[]},r.resolve=r,e.exports=r,r.id=242},function(e,t,r){"use strict";r.r(t);class i extends Error{constructor(e){super(""),this.chainedErrors=[],"string"==typeof e?this.message=e:e&&void 0!==e.message&&(this.message=e.message),this.name="BioLibError",this.date=new Date}static chainErrors(e,t){const r=new i(e);let n;if(t instanceof Error){n=(t.stack?t.stack.toString():"").includes(t.message)?t.stack:`${t.message}: ${t.stack}`}else n=t.toString();return r.message=`${r.message}\n\n${n}`,"string"==typeof e&&"object"==typeof t&&(r.name=t.name),r}toString(){let e=`${this.message}\n`;for(let t=this.chainedErrors.length-1;t>=0;t-=1)e=`${e}\n${this.chainedErrors[t].message}\n`;return e}}var n=r(10),o=r(116);class a{dummyMethod(){Object(o.a)({})}static checkAtomicsAndCreateSharedArray(){if("undefined"==typeof Atomics)throw new i("Synchronous module calls are only supported in browsers that support shared memory.\nConsider using Chrome.");return new WebAssembly.Memory({shared:!0,initial:1,maximum:3e4})}static writeToSharedMemoryBuffer(e,t){const r=e.length+4-t.buffer.byteLength;if(r>0){const e=Math.ceil(r/65536);t.grow(e)}const i=new Int32Array(t.buffer,0,1),n=new Uint8Array(t.buffer,4,e.length);return Atomics.store(i,0,e.length),n.set(e),Atomics.notify(i,0,1),n}static blockAndReadSharedArrayBuffer(e){const t=new Int32Array(e.buffer,0,1);Atomics.wait(t,0,0);const r=Atomics.load(t,0);return Atomics.store(t,0,0),new Uint8Array(e.buffer,4,r)}}var s=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};const u=e=>new Promise((t=>s(void 0,void 0,void 0,(function*(){return setTimeout(t,e)}))));function c(e){let t,r;if(e.endsWith("/"))t=e,r="";else{const i=e.split("/");r=i.pop()||"",t=i.join("/").concat("/")}return{name:r,pathWithoutFilename:t}}function f(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}const l=/\$(?<argIndex>\d+)/g;function d(e,t){if(!e.startsWith("/"))throw new i(`Attempted to copy ${t} path ${e}. But only absolute paths are supported`);if(e.includes("//"))throw new i(`Attempted to copy ${t} path ${e}. But encountered consecutive slashes in path`);if(e.includes("/.."))throw new i(`Attempted to copy ${t} path ${e}. But encountered unsupported /.. path`)}function h(e,t,r,n,o){const a={},s=(e=>(...t)=>{const{argIndex:r}=t[t.length-1];if(0===r)throw new i("Attempted to copy using argument reference $0 which is invalid");if(r>e.length)throw new i("Attempted to copy using argument reference out of bounds of arguments");return e[r-1]})(t);for(const t of e){const e=t.from_path.replace(l,s);d(e,"from");const u=t.to_path.replace(l,s);d(u,"to");const c=e.endsWith("/"),f=u.endsWith("/");if(c){if(!f)throw new i(`Attempted to copy directory "${e}" to file "${u}"`);for(const{path:t,file:r}of n(e)){a[o?u.concat(t.slice(e.length)):t]=r}}else{const t=r(e);if(t){let r=o?u:e;if(o&&f){const t=e.split("/").pop();t&&(r=r.concat(t))}a[r]=t}else{if(!n(e.concat("/")).next().done)throw new i(`Tried to copy the file ${e} but found directory ${e}/ instead.\nIf you are trying to copy the contents of a directory ensure the path ends with a trailing slash.`)}}}return a}class p extends DataView{getBigUint64(e,t){if("function"==typeof super.getBigUint64)return super.getBigUint64(e,t);const r=BigInt(32),i=BigInt(this.getUint32(0|e,!!t)>>>0),n=BigInt(this.getUint32(4+(0|e)|0,!!t)>>>0);return t?n<<r|i:i<<r|n}setBigUint64(e,t,r){if("function"==typeof super.setBigUint64)return super.setBigUint64(e,t,r);const i=this.bigIntTo64BitByteArray(t);for(let t=0;t<i.length;t+=1){const n=r?i[i.length-1-t]:i[t];this.setUint8(e+t,n)}}bigIntTo64BitByteArray(e){let t=BigInt(e).toString(16);for(t.length%2!=0&&(t="0".concat(t));t.length<16;)t="00".concat(t);const r=t.length/2;if(8!==r)throw new Error("BigInt does not fit in 64 bits");const i=new Uint8Array(r);for(let e=0,n=0;e<r;e+=1,n+=2)i[e]=parseInt(t.slice(n,n+2),16);return i}}class _ extends class{constructor(){this.VERSION=1}assertVersionAndType(e){const t=e.getUint8(0),r=e.getUint8(1);if(t!==this.VERSION)throw Error(`Unsupported BioLib Binary Format version: Got ${t} expected ${this.VERSION}`);if(r!==this.TYPE)throw Error(`Unsupported BioLib Binary Format type: Got ${r} expected ${this.TYPE}`)}}{constructor(){super(...arguments),this.textDecoder=new TextDecoder("utf-8",{fatal:!0}),this.textEncoder=new TextEncoder}applyFilesMappings(e,t){this.files=h(e,t,this.getSingleFile.bind(this),this.getFilesInDirectory.bind(this),!0)}filterOnFilesMappings(e,t){this.files=h(e,t,this.getSingleFile.bind(this),this.getFilesInDirectory.bind(this),!1)}*getFilesInDirectory(e){for(const t in this.files)t.startsWith(e)&&(yield{path:t,file:this.files[t]})}getSingleFile(e){return this.files[e]?this.files[e]:null}getFilesSerializedLength(e){let t=0;for(const r in e){const i=e[r];t+=12+this.textEncoder.encode(r).byteLength+i.data.byteLength}return t}serializeFilesIntoByteArray(e,t,r){let i=r;for(const r in e){const n=e[r],o=this.textEncoder.encode(r),a=new p(t.buffer,i,12);a.setUint32(0,o.byteLength),a.setBigUint64(4,BigInt(n.data.byteLength)),i+=12,t.set(o,i),i+=o.byteLength,t.set(n.data,i),i+=n.data.byteLength}}deserializeFiles(e,t,r){const i=new p(e.buffer,e.byteOffset,e.byteLength),n={};let o=t;const a=t+r;for(;o<a;){const t=i.getUint32(o);o+=4;const r=i.getBigUint64(o);o+=8;const a=Number(r),s=e.slice(o,o+t);o+=t;const u=this.textDecoder.decode(s),c=e.slice(o,o+a);n[u]={data:c},o+=a}return n}}class m extends _{constructor(e){super(),this.TYPE=2;const{exit_code:t,files:r,stdout:i,stderr:n}=e instanceof Uint8Array?this.deserialize(e):e;this.exit_code=t,this.files=r,this.stderr=n,this.stdout=i}getAttributes(){return{exit_code:this.exit_code,files:this.files,stderr:this.stderr,stdout:this.stdout}}filterOutUnchangedFiles(e){const t={};for(const r in this.files){const i=this.files[r];e[r]&&f(i.data,e[r].data)||(t[r]=i)}this.files=t}serialize(){const e=this.getFilesSerializedLength(this.files),t=28+this.stdout.length+this.stderr.length+e,r=new Uint8Array(t),i=new p(r.buffer);i.setUint8(0,this.VERSION),i.setUint8(1,this.TYPE),i.setBigUint64(2,BigInt(this.stdout.length)),i.setBigUint64(10,BigInt(this.stderr.length)),i.setBigUint64(18,BigInt(e)),i.setUint16(26,this.exit_code),r.set(this.stdout,28),r.set(this.stderr,28+this.stdout.length);const n=28+this.stdout.length+this.stderr.length;return this.serializeFilesIntoByteArray(this.files,r,n),r}deserialize(e){const t=new p(e.buffer,e.byteOffset,e.byteLength);this.assertVersionAndType(t);const r=Number(t.getBigUint64(2)),i=Number(t.getBigUint64(10)),n=Number(t.getBigUint64(18)),o=28+r+i;return{exit_code:t.getUint16(26),stdout:e.slice(28,28+r),stderr:e.slice(28+r,28+r+i),files:this.deserializeFiles(e,o,n)}}}var b=r(117);class y extends _{constructor(e){if(super(),this.TYPE=3,this.files={},e){const{files:t}=e instanceof Uint8Array?this.deserialize(e):e;this.files=t}}getAttributes(){return{files:this.files}}serialize(e="undefined"!=typeof SharedArrayBuffer){const t=this.getFilesSerializedLength(this.files),r=10+t,i=e?new SharedArrayBuffer(r):new ArrayBuffer(r),n=new Uint8Array(i),o=new p(n.buffer);return o.setUint8(0,this.VERSION),o.setUint8(1,this.TYPE),o.setBigUint64(2,BigInt(t)),this.serializeFilesIntoByteArray(this.files,n,10),n}deserialize(e){const t=new p(e.buffer,e.byteOffset,e.byteLength);this.assertVersionAndType(t);let r=2;const i=Number(t.getBigUint64(r));r+=8;return{files:this.deserializeFiles(e,r,i)}}}class g extends _{constructor(e){super(),this.TYPE=1;const{files:t,stdin:r,parameters:i}=e instanceof Uint8Array?this.deserialize(e):e;this.files=t,this.stdin=r,this.parameters=i}getAttributes(){return{files:this.files,parameters:this.parameters,stdin:this.stdin}}addSourceFiles(e,t){const r=new y(e);r.applyFilesMappings(t,this.parameters);for(const e in r.files)this.files[e]||(this.files[e]=r.files[e])}serialize(){const e=[];let t=0;for(const r of this.parameters){const i=this.textEncoder.encode(r),n=new Uint8Array(2+i.length);new p(n.buffer).setUint16(0,i.length),n.set(i,2),t+=n.length,e.push(n)}const r=this.getFilesSerializedLength(this.files),i=22+this.stdin.length+t+r,n=new Uint8Array(i),o=new p(n.buffer);o.setUint8(0,this.VERSION),o.setUint8(1,this.TYPE),o.setBigUint64(2,BigInt(this.stdin.length)),o.setUint32(10,t),o.setBigUint64(14,BigInt(r)),n.set(this.stdin,22);let a=22+this.stdin.length;for(const t of e)n.set(t,a),a+=t.length;const s=22+this.stdin.length+t;return this.serializeFilesIntoByteArray(this.files,n,s),n}deserialize(e){const t=new p(e.buffer,e.byteOffset,e.byteLength);this.assertVersionAndType(t);let r=2;const i=Number(t.getBigUint64(r));r+=8;const n=t.getUint32(r);r+=4;const o=Number(t.getBigUint64(r));r+=8;const a=e.slice(r,r+i);r+=i;const s=[],u=r+n;for(;r<u;){const i=t.getUint16(r);r+=2;const n=this.textDecoder.decode(e.slice(r,r+i));s.push(n),r+=i}return{stdin:a,parameters:s,files:this.deserializeFiles(e,r,o)}}}var v=r(119);class w{static copyFilesAndOverwrite(e,t){try{for(const r in t){const n=t[r],{pathWithoutFilename:o}=c(r),a=o.split("/");let s="/";for(const t of a){if(""===t)continue;let r=!1;const n=e.readdir(s);for(const e of n)if(t===e){r=!0;break}if(s=s.concat(t),r){const t=e.stat(s,!0);if(e.isFile(t.mode))throw new i("Attempted to place folder on top of existing file when copying files")}else e.mkdir(s);s=s.concat("/")}r.endsWith("/")||e.writeFile(r,n.data)}}catch(e){throw i.chainErrors("Failed to copy files to Emscripten FS",e)}}static getFilesFromFS(e,t,r=[],i){return h(t,i,(function(t){try{return{data:e.readFile(t)}}catch(e){if(2===e.errno)return null;throw e}}),(function*t(i){let n=[];try{n=e.readdir(i)}catch(e){if(2===e.errno)return;throw e}if(2===n.length&&n.includes(".")&&n.includes(".."))yield{path:i,file:{data:new Uint8Array(0)}};else for(const o of n){const n=i.concat(o);if(!r.some((e=>n.startsWith(e)))&&".."!==o&&"."!==o)try{const r=e.stat(n,!0);if(e.isFile(r.mode)){const t=e.readFile(n);yield{path:n,file:{data:t}}}else e.isDir(r.mode)&&(yield*t(n.concat("/")))}catch(e){console.debug(`Could not stat "${n}" skipping file`)}}}),!1)}}const E=new Function("try{return this===global;}catch(e){return false;}"),S=new Function("try{return typeof importScripts === 'function';}catch(e){return false;}"),M=(new Function("try{return typeof window !== 'undefined';}catch(e){return false;}"),"https://biolib-public-assets.s3-eu-west-1.amazonaws.com"),T="0.0.185-biolib",A="0.1.25",O="0.1.532",R="0.1.60";var N={isDev:!1,pythonExecutorVersion:T,biolibAnalyzerVersion:A,biolibRVersion:O,biolibTensorVersion:R,pythonExecutorUrl:`${M}/pyodide/0.0.185-biolib/`,wasmAnalyzerUrl:`${M}/wasm-analyzer/biolib_wasm_analyzer_v0.1.25.wasm`,wasmBioLibTensorUrl:`${M}/tensor-executor/biolib_tensor_v0.1.60.wasm`,wasmRExecutorUrl:`${M}/r-executor/r_executor_v0.1.532.wasm`},I=r(120),x=r.n(I),P=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};var k=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};class F{static analyzeWasm(e,t,r){return k(this,void 0,void 0,(function*(){const{module:n,job:o}=t,a=o.app_version.public_id;let s;const u=this.appVersionIdToModuleNameToWasmAnalysis[a];if(u&&u[n.name])s=u[n.name];else{let t;r("Analyzing Wasm binary");try{const r=yield this.biolibAnalyzerFileCache.getFileFromUrl(N.wasmAnalyzerUrl,"uint8array");yield this.rustWasm.init(r),t=yield this.rustWasm.analyze_wasm(e)}catch(e){throw i.chainErrors("Failed to analyze Wasm binary",e)}try{const e=this.textDecoder.decode(t);s=JSON.parse(e)}catch(e){throw i.chainErrors("Failed to parse result from Wasm analyzer",e)}u?this.appVersionIdToModuleNameToWasmAnalysis[a][n.name]=s:this.appVersionIdToModuleNameToWasmAnalysis[a]={[n.name]:s},r("Analysis of binary complete, executing compute job")}return s}))}}F.appVersionIdToModuleNameToWasmAnalysis={},F.biolibAnalyzerFileCache=new class{constructor(e,t){this.cache=void 0,this.isCacheUnavailable=!1,this.fetchRetryAttempts=3,this.cacheName=e,this.cacheId=`${e}-${t}`,"undefined"==typeof caches&&(this.isCacheUnavailable=!0)}getWithRetry(e,t){return new Promise(((r,i)=>P(this,void 0,void 0,(function*(){for(let n=0;n<this.fetchRetryAttempts;n+=1)try{const i=yield x.a.get(e,t);if(i&&200===i.status)return void r(i);throw`Failed to get file ${e} in ${this.fetchRetryAttempts} tries`}catch(e){n>=this.fetchRetryAttempts-1&&i(e)}}))))}getFileFromUrl(e,t="arraybuffer"){return new Promise(((r,i)=>P(this,void 0,void 0,(function*(){try{let i=yield this.tryGetFileFromCache(e,"arraybuffer");if(!i){i=(yield this.getWithRetry(e,{responseType:"arraybuffer"})).data,yield this.tryPutFileToCache(e,i,"arraybuffer")}return"uint8array"===t&&(i=new Uint8Array(i)),void r(i)}catch(e){i(e)}}))))}getFileFromUrlAsBlob(e,t){return new Promise(((r,i)=>P(this,void 0,void 0,(function*(){try{let i=yield this.tryGetFileFromCache(e,"blob");if(!i){const{data:r}=yield this.getWithRetry(e,{responseType:"blob"});i=new Blob([r],{type:t}),yield this.tryPutFileToCache(e,i,t)}r(i)}catch(e){i(e)}}))))}tryGetFileFromCache(e,t){return new Promise((r=>P(this,void 0,void 0,(function*(){try{let i;const n=yield this.getCache(),o=yield n.match(e);o&&("blob"===t?i=yield o.blob():"arraybuffer"===t&&(i=yield o.arrayBuffer())),r(i)}catch(e){r()}}))))}tryPutFileToCache(e,t,r){return new Promise((i=>P(this,void 0,void 0,(function*(){try{const n={"Content-Type":r};t instanceof ArrayBuffer?(n["Content-Length"]=t.byteLength.toString(),n["Response-Type"]="arraybuffer"):t instanceof Blob&&(n["Content-Length"]=t.size.toString(),n["Response-Type"]="blob");const o=yield this.getCache();yield o.put(e,new Response(t,{headers:n})),i()}catch(e){i()}}))))}getCache(){return new Promise(((e,t)=>P(this,void 0,void 0,(function*(){try{if(this.isCacheUnavailable)return t(new Error("Cache is marked unavailable"));if(!this.cache){const e=yield caches.keys();for(const t of e)t!==this.cacheId&&t.includes(this.cacheName)&&(yield caches.delete(t));this.cache=yield caches.open(this.cacheId)}e(this.cache)}catch(e){console.error("Failed to access cache: ",e),this.isCacheUnavailable=!0,t(e)}}))))}}("biolib-wasm-analyzer",N.biolibAnalyzerVersion),F.rustWasm=new class{constructor(e=(()=>{}),t=(()=>{}),r=(()=>{})){this.functionElemIndex=0,this.cachegetUint8Memory=null,this.cachegetUint32Memory=null,this.cachegetInt32Memory=null,this.WASM_VECTOR_LEN=0,this.cachedTextEncoder=new TextEncoder,this.cachedTextDecoder=new TextDecoder("utf-8"),this.callTask=e,this.notificationMessage=t,this.setProgress=r,this.heap=new Array(32),this.heap.fill(void 0),this.heap.push(void 0,null,!0,!1),this.heap_next=this.heap.length,"function"==typeof this.cachedTextEncoder.encodeInto?this.passStringToWasm=e=>{let t=e.length,r=this.wasm.__wbindgen_malloc(t),i=0;{const t=this.getUint8Memory();for(;i<e.length;i++){const n=e.charCodeAt(i);if(n>127)break;t[r+i]=n}}if(i!==e.length){e=e.slice(i),r=this.wasm.__wbindgen_realloc(r,t,t=i+3*e.length);const n=this.getUint8Memory().subarray(r+i,r+t);i+=this.cachedTextEncoder.encodeInto(e,n).written||0}return this.WASM_VECTOR_LEN=i,r}:this.passStringToWasm=e=>{let t=e.length,r=this.wasm.__wbindgen_malloc(t),i=0;{const t=this.getUint8Memory();for(;i<e.length;i++){const n=e.charCodeAt(i);if(n>127)break;t[r+i]=n}}if(i!==e.length){const n=this.cachedTextEncoder.encode(e.slice(i));r=this.wasm.__wbindgen_realloc(r,t,t=i+n.length),this.getUint8Memory().set(n,r+i),i+=n.length}return this.WASM_VECTOR_LEN=i,r}}addHeapObject(e){this.heap_next===this.heap.length&&this.heap.push(this.heap.length+1);const t=this.heap_next;return this.heap_next=this.heap[t],this.heap[t]=e,t}__wbg_elem_binding0(e,t,r){this.wasm.__wbg_function_table.get(this.functionElemIndex)(e,t,this.addHeapObject(r))}__wbg_elem_binding1(e,t,r,i){this.wasm.__wbg_function_table.get(this.functionElemIndex+19)(e,t,this.addHeapObject(r),this.addHeapObject(i))}getUint8Memory(){return null!==this.cachegetUint8Memory&&this.cachegetUint8Memory.buffer===this.wasm.memory.buffer||(this.cachegetUint8Memory=new Uint8Array(this.wasm.memory.buffer)),this.cachegetUint8Memory}getInt32Memory(){return null!==this.cachegetInt32Memory&&this.cachegetInt32Memory.buffer===this.wasm.memory.buffer||(this.cachegetInt32Memory=new Int32Array(this.wasm.memory.buffer)),this.cachegetInt32Memory}passArray8ToWasm(e){const t=this.wasm.__wbindgen_malloc(1*e.length);return this.getUint8Memory().set(e,t/1),this.WASM_VECTOR_LEN=e.length,t}getObject(e){return this.heap[e]}dropObject(e){e<36||(this.heap[e]=this.heap_next,this.heap_next=e)}takeObject(e){const t=this.getObject(e);return this.dropObject(e),t}compute(e,t){const r=this.wasm.compute(this.passArray8ToWasm(e),this.WASM_VECTOR_LEN,this.passStringToWasm(t),this.WASM_VECTOR_LEN);return this.takeObject(r)}analyze_wasm(e){this.wasm.analyze_wasm(8,this.passArray8ToWasm(e),this.WASM_VECTOR_LEN);const t=this.getInt32Memory(),r=this.getArrayU8FromWasm(t[2],t[3]).slice();return this.wasm.__wbindgen_free(t[2],1*t[3]),r}execute(e,t,r){this.wasm.execute(8,this.passArray8ToWasm(e),this.WASM_VECTOR_LEN,this.passArray8ToWasm(t),this.WASM_VECTOR_LEN,this.passArray8ToWasm(r),this.WASM_VECTOR_LEN);const i=this.getInt32Memory(),n=this.getArrayU8FromWasm(i[2],i[3]).slice();return this.wasm.__wbindgen_free(i[2],1*i[3]),n}execute_onnx(e,t){this.wasm.execute_onnx(8,this.passArray8ToWasm(e),this.WASM_VECTOR_LEN,this.passArray8ToWasm(t),this.WASM_VECTOR_LEN);const r=this.getInt32Memory(),i=this.getArrayU8FromWasm(r[2],r[3]).slice();return this.wasm.__wbindgen_free(r[2],1*r[3]),i}execute_tensorflow(e,t){this.wasm.execute_tensorflow(8,this.passArray8ToWasm(e),this.WASM_VECTOR_LEN,this.passArray8ToWasm(t),this.WASM_VECTOR_LEN);const r=this.getInt32Memory(),i=this.getArrayU8FromWasm(r[2],r[3]).slice();return this.wasm.__wbindgen_free(r[2],1*r[3]),i}test(){this.wasm.test()}getArrayU8FromWasm(e,t){return this.getUint8Memory().subarray(e/1,e/1+t)}getStringFromWasm(e,t){return this.cachedTextDecoder.decode(this.getUint8Memory().subarray(e,e+t))}handleError(e){this.wasm.__wbindgen_exn_store(this.addHeapObject(e))}getUint32Memory(){return null!==this.cachegetUint32Memory&&this.cachegetUint32Memory.buffer===this.wasm.memory.buffer||(this.cachegetUint32Memory=new Uint32Array(this.wasm.memory.buffer)),this.cachegetUint32Memory}init(e,t){let i;void 0!==t&&(this.functionElemIndex=t);const n={wbg:{}};return n.wbg.__wbindgen_object_drop_ref=e=>{this.takeObject(e)},n.wbg.__wbg_notificationMessage_571115224b83327b=(e,t)=>{const r=this.getStringFromWasm(e,t).slice();this.wasm.__wbindgen_free(e,1*t),this.notificationMessage(r)},n.wbg.__wbg_notificationMessage_be8ba3c344310db3=(e,t)=>{const r=this.getStringFromWasm(e,t).slice();this.wasm.__wbindgen_free(e,1*t),this.notificationMessage(r)},n.wbg.__wbindgen_string_new=(e,t)=>{const r=this.getStringFromWasm(e,t);return this.addHeapObject(r)},n.wbg.__wbg_callTask_3dfab99995d3bde8=(e,t,r,i,n,o,a)=>{try{var s=this.callTask(this.getStringFromWasm(t,r),this.getStringFromWasm(i,n),this.getStringFromWasm(o,a)),u=this.passStringToWasm(s,this.wasm.__wbindgen_malloc,this.wasm.__wbindgen_realloc),c=this.WASM_VECTOR_LEN;this.getInt32Memory()[e/4+1]=c,this.getInt32Memory()[e/4+0]=u}finally{this.wasm.__wbindgen_free(i,n),this.wasm.__wbindgen_free(o,a)}},n.wbg.__wbindgen_cb_drop=e=>{const t=this.takeObject(e).original;if(1==t.cnt--)return t.a=0,!0;return!1},n.wbg.__wbg_call_fdde574e8abf6327=(e,t,r)=>{try{const i=this.getObject(e).call(this.getObject(t),this.getObject(r));return this.addHeapObject(i)}catch(e){this.handleError(e)}},n.wbg.__wbg_new_1719c88e1a2035ea=(e,t)=>{const r={a:e,b:t},i=(e,t)=>{const i=r.a;r.a=0;try{return this.__wbg_elem_binding1(i,r.b,e,t)}finally{r.a=i}};try{const e=new Promise(i);return this.addHeapObject(e)}finally{r.a=r.b=0}},n.wbg.__wbg_resolve_bacd3bf49c19a0f8=e=>{const t=Promise.resolve(this.getObject(e));return this.addHeapObject(t)},n.wbg.__wbg_then_3d6c84182dd53850=(e,t)=>{const r=this.getObject(e).then(this.getObject(t));return this.addHeapObject(r)},n.wbg.__wbg_then_0fe88013efbd2711=(e,t,r)=>{const i=this.getObject(e).then(this.getObject(t),this.getObject(r));return this.addHeapObject(i)},n.wbg.__wbg_buffer_d31feadf69cb45fc=e=>{const t=this.getObject(e).buffer;return this.addHeapObject(t)},n.wbg.__wbg_newwithbyteoffsetandlength_bac57664fe087b80=(e,t,r)=>{const i=new Uint8Array(this.getObject(e),t>>>0,r>>>0);return this.addHeapObject(i)},n.wbg.__wbg_length_b6e0c5630f641946=e=>this.getObject(e).length,n.wbg.__wbg_new_ed7079cf157e44d5=e=>{const t=new Uint8Array(this.getObject(e));return this.addHeapObject(t)},n.wbg.__wbg_set_2aae8dbe165bf1a3=(e,t,r)=>{this.getObject(e).set(this.getObject(t),r>>>0)},n.wbg.__wbg_slice_a197b435b0f8d935=(e,t,r)=>{const i=this.getObject(e).slice(t>>>0,r>>>0);return this.addHeapObject(i)},n.wbg.__wbindgen_string_get=(e,t)=>{const r=this.getObject(e);if("string"!=typeof r)return 0;const i=this.passStringToWasm(r);this.getUint32Memory()[t/4]=this.WASM_VECTOR_LEN;return i},n.wbg.__widl_f_log_1_=e=>{console.log(this.getObject(e))},n.wbg.__wbindgen_throw=(e,t)=>{throw new Error(this.getStringFromWasm(e,t))},n.wbg.__wbindgen_memory=()=>{const e=this.wasm.memory;return this.addHeapObject(e)},n.wbg.__wbindgen_closure_wrapper71=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper73=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper75=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper66=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper44=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper45=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n.wbg.__wbindgen_closure_wrapper47=(e,t,r)=>{const i={a:e,b:t,cnt:1},n=e=>{i.cnt++;const t=i.a;i.a=0;try{return this.__wbg_elem_binding0(t,i.b,e)}finally{0==--i.cnt?this.wasm.__wbg_function_table.get(this.functionElemIndex+1)(t,i.b):i.a=t}};n.original=i;const o=n;return this.addHeapObject(o)},n["./snippets/rust-6826ff9a52c09b34/setProgress.js"]={setProgress:this.setProgress},n.wbg.__wbg_new_59cb74e423758ede=()=>{var e=new Error;return this.addHeapObject(e)},n.wbg.__wbg_stack_558ba5917b466edd=(e,t)=>{var r=this.getObject(t).stack,i=this.passStringToWasm(r,this.wasm.__wbindgen_malloc,this.wasm.__wbindgen_realloc),n=this.WASM_VECTOR_LEN;this.getInt32Memory()[e/4+1]=n,this.getInt32Memory()[e/4+0]=i},n.wbg.__wbg_error_4bb6c2a97407129a=(e,t)=>{try{console.error(this.getStringFromWasm(e,t))}finally{this.wasm.__wbindgen_free(e,t)}},n.wbg.__wbg_self_1b7a39e3a92c949c=()=>{try{const e=self.self;return this.addHeapObject(e)}catch(e){this.handleError(e)}},n.wbg.__wbg_require_604837428532a733=(e,t)=>{const i=r(242)(this.getStringFromWasm(e,t));return this.addHeapObject(i)},n.wbg.__wbg_crypto_968f1772287e2df0=e=>{const t=this.getObject(e).crypto;return this.addHeapObject(t)},n.wbg.__wbindgen_is_undefined=e=>void 0===this.getObject(e),n.wbg.__wbg_getRandomValues_a3d34b4fee3c2869=e=>{const t=this.getObject(e).getRandomValues;return this.addHeapObject(t)},n.wbg.__wbg_getRandomValues_f5e14ab7ac8e995d=(e,t,r)=>{this.getObject(e).getRandomValues(this.getArrayU8FromWasm(t,r))},n.wbg.__wbg_randomFillSync_d5bd2d655fdf256a=(e,t,r)=>{this.getObject(e).randomFillSync(this.getArrayU8FromWasm(t,r))},i=WebAssembly.instantiate(e,n).then((t=>t instanceof WebAssembly.Instance?{instance:t,module:e}:t)),i.then((({instance:e,module:t})=>(this.wasm=e.exports,this.wasm)))}},F.textDecoder=new TextDecoder("utf-8",{fatal:!0});var D=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};(new class extends class{constructor(){this.textDecoder=new TextDecoder("utf8",{fatal:!0}),this.callModuleSubject=new n.Subject,this.remoteRequestSubject=new n.Subject,this.statusUpdateSubject=new n.Subject,this.sleepSubject=new n.Subject,this.appVersionIdToModuleSourceRecord={},this.moduleMetadata=null,this.sharedInputMemory=null,this.sharedOutputMemory=null,this.callModuleAsyncResponseHandler=()=>{},this.baseMethodsToExpose={callModuleObservable:()=>n.Observable.from(this.callModuleSubject),remoteRequestObservable:()=>n.Observable.from(this.remoteRequestSubject),sleepObservable:()=>n.Observable.from(this.sleepSubject),statusUpdateObservable:()=>n.Observable.from(this.statusUpdateSubject),callModuleAsyncResponse:e=>this.callModuleAsyncResponseHandler(e)},this.logMessage=e=>this.statusUpdateSubject.next({message:e}),this.setProgressCompute=e=>this.statusUpdateSubject.next({progressCompute:e}),this.setProgressInitialization=e=>this.statusUpdateSubject.next({progressInitialization:e})}expose(){Object(b.expose)(Object.assign(Object.assign({},this.baseMethodsToExpose),this.methodsExposedToParent))}getSharedOutputMemory(){return this.sharedOutputMemory||(this.sharedOutputMemory=a.checkAtomicsAndCreateSharedArray()),this.sharedOutputMemory}getSharedInputMemory(){return this.sharedInputMemory||(this.sharedInputMemory=a.checkAtomicsAndCreateSharedArray()),this.sharedInputMemory}sleep(e){const t=this.getSharedOutputMemory();try{this.sleepSubject.next({period:e,sharedMemory:t})}catch(e){throw i.chainErrors("Sleep failed",e)}a.blockAndReadSharedArrayBuffer(t)}handleRemoteRequest(e,t,r){if(!e)throw new i("Fetch remote host failed: Url was undefined");if("GET"!==t&&"POST"!==t)throw new i("Fetch remote host failed: HTTP method not supported");this.assertUrlHostIsAllowed(e);try{const i=this.getSharedOutputMemory();this.remoteRequestSubject.next({url:e,method:t,body:r,sharedMemory:i});const n=a.blockAndReadSharedArrayBuffer(i),o=new DataView(n.buffer,n.byteOffset,n.byteLength).getUint16(0),s=new Uint8Array(n.buffer,n.byteOffset+2,n.byteLength-2).slice(),u=this.textDecoder.decode(s);return this.logMessage(`Got response from url ${e}`),{status:o,responseText:u}}catch(e){throw i.chainErrors("Fetch remote host failed",e)}}callModuleBlocking(e,t){try{const{calleeModule:r,callerModule:n}=this.getCalleeAndCallerModules(e),o=this.getSharedOutputMemory(),s=this.getSharedInputMemory(),u=new g(t);u.filterOnFilesMappings(r.input_files_mappings,u.parameters);const c=u.serialize(),f=a.writeToSharedMemoryBuffer(c,s);this.callModuleSubject.next({calleeModule:r,moduleInputDataSerialized:f,outputSharedMemory:o});const l=a.blockAndReadSharedArrayBuffer(o);if(!l)throw new i("No result found");return this.logMessage(`Module ${n.name} got response from module ${e}`),new m(l)}catch(e){throw i.chainErrors("Call module blocking failed",e)}}deserializeInputApplyMappingsAndGetExecutableFile(e,t){const r=new g(t);if(!this.moduleMetadata)throw new i("Module metadata was undefined");const{job:n}=this.moduleMetadata;if(!this.appVersionIdToModuleSourceRecord[n.app_version.public_id]){const{moduleSourceSerialized:e}=this.moduleMetadata;if(!e)throw new i("Module source was undefined");this.appVersionIdToModuleSourceRecord[n.app_version.public_id]=new y(e)}const o=this.appVersionIdToModuleSourceRecord[n.app_version.public_id];r.applyFilesMappings(e.input_files_mappings,r.parameters),r.addSourceFiles(o,e.source_files_mappings);const a=(e.command.startsWith("/")?"":"/").concat(e.command),s=r.files[a];if(!s)throw new Error("Could not find executable file");return r.parameters.length>0?this.logMessage(`Running module '${e.name}' with arguments: ${JSON.stringify(r.parameters)}. Got ${r.stdin.length} bytes of stdin data.`):this.logMessage(`Running module '${e.name}' without arguments. Got ${r.stdin.length} bytes of stdin data.`),r.parameters.unshift(e.name),{moduleInput:r,executableFile:s}}serializeAndHandleOutput(e,t,r){if(!this.moduleMetadata)throw new i("Failed to serializing module output: Module metadata was undefined");const{module:n}=this.moduleMetadata,o=new m(t);o.filterOutUnchangedFiles(e.files),o.applyFilesMappings(n.output_files_mappings,e.parameters);const s=o.serialize();if(!r)return s;a.writeToSharedMemoryBuffer(s,r)}getCalleeAndCallerModules(e){if(!e||"string"!=typeof e)throw new i("Module name was not a string");if(!this.moduleMetadata)throw new i("Module metadata was undefined");const{job:t}=this.moduleMetadata;if(!t.app_version.modules)throw new i("No modules found");const r=t.app_version.modules.find((({name:t})=>t===e));if(!r)throw new i(`Could not find module with name: ${e}`);return{calleeModule:r,callerModule:this.moduleMetadata.module}}assertUrlHostIsAllowed(e){if(!this.moduleMetadata)throw new i("Checking URL host failed: Module metadata was undefined");const t=this.moduleMetadata.job.app_version.remote_hosts.reduce(((e,{hostname:t})=>[...e,t]),[]);if("https://"!==e.substr(0,8))throw new i(`Request musts use HTTPS: '${e}'`);{const r=e.slice(-(e.length-8)).split("/")[0];if(!t.includes(r)){let e=`Post to external data source failed: Requested host (${r}) is not in 'allowed' list. Allowed hosts are:`;for(const r of t)e=`${e}\n'${r}'`;throw new i(e)}}}}{constructor(){super(...arguments),this.methodsExposedToParent={runCppModule:this.runCppModule.bind(this)}}runCppModule(e,t,r){return D(this,void 0,void 0,(function*(){this.moduleMetadata=e;const{module:n}=e;if(!n.command)throw new i(`Module ${n.name}: You must set command to the path of a Wasm binary file when using this Emscripten image`);if("/"!==n.working_directory)throw new i(`Module ${e.module.name}: This Emscripten image requires working_directory to be set to "/" - please set this under module settings`);const{moduleInput:o,executableFile:a}=this.deserializeInputApplyMappingsAndGetExecutableFile(n,t),s=yield F.analyzeWasm(a.data,e,this.logMessage.bind(this)),{stdin:u,files:c,parameters:f}=o,l=yield this.executeCpp(a.data,u,f,c,s,n);return this.serializeAndHandleOutput(o,l,r)}))}executeCpp(e,t,r,n,o,a){return new Promise(((c,f)=>D(this,void 0,void 0,(function*(){try{const{table:l,memory:d,emscripten_get_sbrk_ptr:h,globals:p}=o;if(null===l||null===d||null===h||null===p)return f(new i("Wasm binary analysis result was null"));const _=p[0],m=new TextEncoder;let b=0;const y=()=>{if(b<t.length){const e=t[b];return b+=1,e}return null},g=yield function(e,t){return s(this,void 0,void 0,(function*(){let r=null,i=0;for(;null===r;){i+=1;try{r=new WebAssembly.Memory(e)}catch(r){if(i>=3)throw r;const n=64*e.initial/1024;t(`Allocation of WebAssembly memory (${n} MiB) failed, retrying...`),yield u(5e3)}}return r}))}(d,this.logMessage);let E,S="",M="";const T={wasmMemory:g,wasmBinary:e,instantiateWasm(t,r){return D(this,void 0,void 0,(function*(){try{const i=yield WebAssembly.instantiate(e,t);r(i.instance,i.module)}catch(e){f(i.chainErrors("Module execution failed during startup",e))}return{}}))},bioLibEmscriptenGetSbrkPtr:h,bioLibStaticBump:_,tableSize:l,preRun:[function(){this.FS.init(y,null,null),w.copyFilesAndOverwrite(this.FS,n)}],postRun:[function(){return D(this,void 0,void 0,(function*(){const e=w.getFilesFromFS(this.FS,a.output_files_mappings,["/proc/"],r);c({exit_code:E,files:e,stderr:m.encode(M),stdout:m.encode(S)})}))}],onExit(e){0!==e&&console.warn("Module exited with non-zero status:",e),E=e},arguments:r.slice(1),thisProgram:r[0],print:e=>{S+=`${e}\n`},printErr:e=>{M+=`${e}\n`},rejectFunction:f};Object(v.a)(T)}catch(e){f(e)}}))))}}).expose()},function(e,t,r){"use strict";r.r(t),r.d(t,"filter",(function(){return T})),r.d(t,"flatMap",(function(){return R})),r.d(t,"interval",(function(){return N})),r.d(t,"map",(function(){return x})),r.d(t,"merge",(function(){return P})),r.d(t,"multicast",(function(){return F})),r.d(t,"Observable",(function(){return E})),r.d(t,"scan",(function(){return B})),r.d(t,"Subject",(function(){return k})),r.d(t,"unsubscribe",(function(){return S}));var i=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(a,s)}u((i=i.apply(e,t||[])).next())}))};class n{constructor(e){this._baseObserver=e,this._pendingPromises=new Set}complete(){Promise.all(this._pendingPromises).then((()=>this._baseObserver.complete())).catch((e=>this._baseObserver.error(e)))}error(e){this._baseObserver.error(e)}schedule(e){const t=Promise.all(this._pendingPromises),r=[],n=e=>r.push(e),o=Promise.resolve().then((()=>i(this,void 0,void 0,(function*(){yield t,yield e(n),this._pendingPromises.delete(o);for(const e of r)this._baseObserver.next(e)})))).catch((e=>{this._pendingPromises.delete(o),this._baseObserver.error(e)}));this._pendingPromises.add(o)}}const o=()=>"function"==typeof Symbol,a=e=>o()&&Boolean(Symbol[e]),s=e=>a(e)?Symbol[e]:"@@"+e;a("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));const u=s("iterator"),c=s("observable"),f=s("species");function l(e,t){const r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function d(e){let t=e.constructor;return void 0!==t&&(t=t[f],null===t&&(t=void 0)),void 0!==t?t:w}function h(e){h.log?h.log(e):setTimeout((()=>{throw e}),0)}function p(e){Promise.resolve().then((()=>{try{e()}catch(e){h(e)}}))}function _(e){const t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{const e=l(t,"unsubscribe");e&&e.call(t)}}catch(e){h(e)}}function m(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function b(e,t,r){e._state="running";const i=e._observer;try{const n=i?l(i,t):void 0;switch(t){case"next":n&&n.call(i,r);break;case"error":if(m(e),!n)throw r;n.call(i,r);break;case"complete":m(e),n&&n.call(i)}}catch(e){h(e)}"closed"===e._state?_(e):"running"===e._state&&(e._state="ready")}function y(e,t,r){if("closed"!==e._state)return"buffering"===e._state?(e._queue=e._queue||[],void e._queue.push({type:t,value:r})):"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void p((()=>function(e){const t=e._queue;if(t){e._queue=void 0,e._state="ready";for(const r of t)if(b(e,r.type,r.value),"closed"===e._state)break}}(e)))):void b(e,t,r)}class g{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";const r=new v(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(m(this),_(this))}}class v{constructor(e){this._subscription=e}get closed(){return"closed"===this._subscription._state}next(e){y(this._subscription,"next",e)}error(e){y(this._subscription,"error",e)}complete(){y(this._subscription,"complete")}}class w{constructor(e){if(!(this instanceof w))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e,t,r){return"object"==typeof e&&null!==e||(e={next:e,error:t,complete:r}),new g(e,this._subscriber)}pipe(e,...t){let r=this;for(const i of[e,...t])r=i(r);return r}tap(e,t,r){const i="object"!=typeof e||null===e?{next:e,error:t,complete:r}:e;return new w((e=>this.subscribe({next(t){i.next&&i.next(t),e.next(t)},error(t){i.error&&i.error(t),e.error(t)},complete(){i.complete&&i.complete(),e.complete()},start(e){i.start&&i.start(e)}})))}forEach(e){return new Promise(((t,r)=>{if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));function i(){n.unsubscribe(),t()}const n=this.subscribe({next(t){try{e(t,i)}catch(e){r(e),n.unsubscribe()}},error:r,complete:t})}))}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(d(this))((t=>this.subscribe({next(r){let i=r;try{i=e(r)}catch(e){return t.error(e)}t.next(i)},error(e){t.error(e)},complete(){t.complete()}})))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(d(this))((t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}})))}reduce(e,t){if("function"!=typeof e)throw new TypeError(e+" is not a function");const r=d(this),i=arguments.length>1;let n=!1,o=t;return new r((t=>this.subscribe({next(r){const a=!n;if(n=!0,!a||i)try{o=e(o,r)}catch(e){return t.error(e)}else o=r},error(e){t.error(e)},complete(){if(!n&&!i)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}})))}concat(...e){const t=d(this);return new t((r=>{let i,n=0;return function o(a){i=a.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){n===e.length?(i=void 0,r.complete()):o(t.from(e[n++]))}})}(this),()=>{i&&(i.unsubscribe(),i=void 0)}}))}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");const t=d(this);return new t((r=>{const i=[],n=this.subscribe({next(n){let a;if(e)try{a=e(n)}catch(e){return r.error(e)}else a=n;const s=t.from(a).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){const e=i.indexOf(s);e>=0&&i.splice(e,1),o()}});i.push(s)},error(e){r.error(e)},complete(){o()}});function o(){n.closed&&0===i.length&&r.complete()}return()=>{i.forEach((e=>e.unsubscribe())),n.unsubscribe()}}))}[c](){return this}static from(e){const t="function"==typeof this?this:w;if(null==e)throw new TypeError(e+" is not an object");const r=l(e,c);if(r){const i=r.call(e);if(Object(i)!==i)throw new TypeError(i+" is not an object");return function(e){return e instanceof w}(i)&&i.constructor===t?i:new t((e=>i.subscribe(e)))}if(a("iterator")){const r=l(e,u);if(r)return new t((t=>{p((()=>{if(!t.closed){for(const i of r.call(e))if(t.next(i),t.closed)return;t.complete()}}))}))}if(Array.isArray(e))return new t((t=>{p((()=>{if(!t.closed){for(const r of e)if(t.next(r),t.closed)return;t.complete()}}))}));throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:w)((t=>{p((()=>{if(!t.closed){for(const r of e)if(t.next(r),t.closed)return;t.complete()}}))}))}static get[f](){return this}}o()&&Object.defineProperty(w,Symbol("extensions"),{value:{symbol:c,hostReportError:h},configurable:!0});var E=w;var S=function(e){"function"==typeof e?e():e&&"function"==typeof e.unsubscribe&&e.unsubscribe()},M=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(a,s)}u((i=i.apply(e,t||[])).next())}))};var T=function(e){return t=>new E((r=>{const i=new n(r),o=t.subscribe({complete(){i.complete()},error(e){i.error(e)},next(t){i.schedule((r=>M(this,void 0,void 0,(function*(){(yield e(t))&&r(t)}))))}});return()=>S(o)}))};var A=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(a,s)}u((i=i.apply(e,t||[])).next())}))},O=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}};var R=function(e){return t=>new E((r=>{const i=new n(r),o=t.subscribe({complete(){i.complete()},error(e){i.error(e)},next(t){i.schedule((r=>A(this,void 0,void 0,(function*(){var i,n;const o=yield e(t);if((c=o)&&a("iterator")&&c[Symbol.iterator]||function(e){return e&&a("asyncIterator")&&e[Symbol.asyncIterator]}(o))try{for(var s,u=O(o);!(s=yield u.next()).done;){const e=s.value;r(e)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=u.return)&&(yield n.call(u))}finally{if(i)throw i.error}}else o.map((e=>r(e)));var c}))))}});return()=>S(o)}))};function N(e){return new w((t=>{let r=0;const i=setInterval((()=>{t.next(r++)}),e);return()=>clearInterval(i)}))}var I=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(a,s)}u((i=i.apply(e,t||[])).next())}))};var x=function(e){return t=>new E((r=>{const i=new n(r),o=t.subscribe({complete(){i.complete()},error(e){i.error(e)},next(t){i.schedule((r=>I(this,void 0,void 0,(function*(){const i=yield e(t);r(i)}))))}});return()=>S(o)}))};var P=function(...e){return 0===e.length?w.from([]):new w((t=>{let r=0;const i=e.map((i=>i.subscribe({error(e){t.error(e),n()},next(e){t.next(e)},complete(){++r===e.length&&(t.complete(),n())}}))),n=()=>{i.forEach((e=>S(e)))};return n}))};var k=class extends E{constructor(){super((e=>(this._observers.add(e),()=>this._observers.delete(e)))),this._observers=new Set}next(e){for(const t of this._observers)t.next(e)}error(e){for(const t of this._observers)t.error(e)}complete(){for(const e of this._observers)e.complete()}};var F=function(e){const t=new k;let r,i=0;return new E((n=>{r||(r=e.subscribe(t));const o=t.subscribe(n);return i++,()=>{i--,o.unsubscribe(),0===i&&(S(r),r=void 0)}}))},D=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(a,s)}u((i=i.apply(e,t||[])).next())}))};var B=function(e,t){return r=>new E((i=>{let o,a=0;const s=new n(i),u=r.subscribe({complete(){s.complete()},error(e){s.error(e)},next(r){s.schedule((i=>D(this,void 0,void 0,(function*(){const n=0===a?void 0===t?r:t:o;o=yield e(n,r,a++),i(o)}))))}});return()=>S(u)}))}}]);
|