From 5014a68f52ac50fc62db5d42d2b49abda28efaea Mon Sep 17 00:00:00 2001 From: MikeEllanKong Date: Tue, 5 May 2020 10:40:00 -0400 Subject: [PATCH] Migrating dimensions, latest SVG, stubbing sidebar --- .../insomnia-app/.storybook/preview-head.html | 732 ++++++++++++++++ .../app/ui/css/constants/dimensions.less | 35 +- .../insomnia-app/app/ui/css/layout/base.less | 42 +- .../insomnia-components/.storybook/main.js | 1 + .../.storybook/preview-head.html | 781 +++++++++++------- .../assets/icn-bitbucket-logo.svg | 4 + .../assets/icn-burger-menu.svg | 4 + .../assets/icn-checkmark.svg | 4 + .../insomnia-components/assets/icn-cookie.svg | 4 + .../assets/icn-drag-grip.svg | 4 + .../assets/icn-elevator.svg | 5 + .../assets/icn-ellipsis-circle.svg | 7 + .../insomnia-components/assets/icn-file.svg | 4 + .../assets/icn-folder-open.svg | 4 + .../insomnia-components/assets/icn-folder.svg | 4 + .../insomnia-components/assets/icn-gear.svg | 4 + .../assets/icn-gitlab-logo.svg | 4 + .../insomnia-components/assets/icn-gui.svg | 4 + .../assets/icn-indentation.svg | 4 + .../assets/icn-minus-circle-fill.svg | 4 + .../assets/icn-minus-circle.svg | 4 + .../assets/icn-placeholder.svg | 12 + .../insomnia-components/assets/icn-play.svg | 4 + .../insomnia-components/assets/icn-plus.svg | 4 + .../assets/icn-prohibited.svg | 4 + .../assets/icn-question-fill.svg | 4 + .../assets/icn-question.svg | 6 + .../assets/icn-sec-cert.svg | 4 + .../insomnia-components/assets/icn-sync.svg | 5 + .../assets/icn-trashcan.svg | 4 + .../assets/icn-triangle.svg | 4 + .../insomnia-components/assets/icn-user.svg | 4 + .../assets/icn-warning-circle.svg | 4 + packages/insomnia-components/assets/icn-x.svg | 4 + .../insomnia-components/components/sidebar.js | 407 +++++++++ .../components/sidebar.stories.js | 20 + .../components/svg-icon.js | 130 ++- packages/insomnia-components/dist/index.js | 18 +- .../insomnia-components/dist/index.js.map | 2 +- .../flow-typed/@storybook/framer-motion.js | 10 + packages/insomnia-components/index.js | 2 + .../insomnia-components/package-lock.json | 204 ++++- packages/insomnia-components/package.json | 2 + 43 files changed, 2178 insertions(+), 339 deletions(-) create mode 100644 packages/insomnia-components/assets/icn-bitbucket-logo.svg create mode 100644 packages/insomnia-components/assets/icn-burger-menu.svg create mode 100644 packages/insomnia-components/assets/icn-checkmark.svg create mode 100644 packages/insomnia-components/assets/icn-cookie.svg create mode 100644 packages/insomnia-components/assets/icn-drag-grip.svg create mode 100644 packages/insomnia-components/assets/icn-elevator.svg create mode 100644 packages/insomnia-components/assets/icn-ellipsis-circle.svg create mode 100644 packages/insomnia-components/assets/icn-file.svg create mode 100644 packages/insomnia-components/assets/icn-folder-open.svg create mode 100644 packages/insomnia-components/assets/icn-folder.svg create mode 100644 packages/insomnia-components/assets/icn-gear.svg create mode 100644 packages/insomnia-components/assets/icn-gitlab-logo.svg create mode 100644 packages/insomnia-components/assets/icn-gui.svg create mode 100644 packages/insomnia-components/assets/icn-indentation.svg create mode 100644 packages/insomnia-components/assets/icn-minus-circle-fill.svg create mode 100644 packages/insomnia-components/assets/icn-minus-circle.svg create mode 100644 packages/insomnia-components/assets/icn-placeholder.svg create mode 100644 packages/insomnia-components/assets/icn-play.svg create mode 100644 packages/insomnia-components/assets/icn-plus.svg create mode 100644 packages/insomnia-components/assets/icn-prohibited.svg create mode 100644 packages/insomnia-components/assets/icn-question-fill.svg create mode 100644 packages/insomnia-components/assets/icn-question.svg create mode 100644 packages/insomnia-components/assets/icn-sec-cert.svg create mode 100644 packages/insomnia-components/assets/icn-sync.svg create mode 100644 packages/insomnia-components/assets/icn-trashcan.svg create mode 100644 packages/insomnia-components/assets/icn-triangle.svg create mode 100644 packages/insomnia-components/assets/icn-user.svg create mode 100644 packages/insomnia-components/assets/icn-warning-circle.svg create mode 100644 packages/insomnia-components/assets/icn-x.svg create mode 100644 packages/insomnia-components/components/sidebar.js create mode 100644 packages/insomnia-components/components/sidebar.stories.js create mode 100644 packages/insomnia-components/flow-typed/@storybook/framer-motion.js diff --git a/packages/insomnia-app/.storybook/preview-head.html b/packages/insomnia-app/.storybook/preview-head.html index 2ec429a11..97d7de2f7 100644 --- a/packages/insomnia-app/.storybook/preview-head.html +++ b/packages/insomnia-app/.storybook/preview-head.html @@ -3,3 +3,735 @@ document.body.setAttribute('theme', 'default'); }; + + + + + + + + + diff --git a/packages/insomnia-app/app/ui/css/constants/dimensions.less b/packages/insomnia-app/app/ui/css/constants/dimensions.less index 2505f4ffa..a615b9ef0 100644 --- a/packages/insomnia-app/app/ui/css/constants/dimensions.less +++ b/packages/insomnia-app/app/ui/css/constants/dimensions.less @@ -1,15 +1,38 @@ html { /* Font Size */ - --font-size-xxs: 8px; - --font-size-xs: 10px; + --font-size-xxs: 10px; + --font-size-xs: 11px; --font-size-sm: 12px; --font-size-md: 13px; - --font-size-lg: 15px; - --font-size-xl: 19px; - --font-size-xxl: 21px; - --font-size-xxxl: 24px; + --font-size-lg: 14px; + --font-size-xl: 16px; + --font-size-xxl: 18px; + --font-size-xxxl: 22px; --font-size: var(--font-size-md); + /* Font Weight */ + --font-weight-regular: 400; + --font-weight-medium: 600; + --font-weight-bold: 700; + + /* Line Height */ + --font-line-height-sm: calc(var(--font-size) * 1); + --font-line-height-md: calc(var(--font-size) * 1.25); + --font-line-height-lg: calc(var(--font-size) * 1.4); + --font-line-height-xl: calc(var(--font-size) * 1.75); + --font-line-height-xxl: calc(var(--font-size) * 2); + --font-line-height-xxxl: calc(var(--font-size) * 2.25); + + /* Spacing */ + --spacing-xs: calc(var(--font-size) * 0.40); + --spacing-sm: calc(var(--font-size) * 0.60); + --spacing-md: calc(var(--font-size) * 1); + --spacing-lg: calc(var(--font-size) * 1.25); + --spacing-xl: calc(var(--font-size) * 1.5); + --spacing-xxl: calc(var(--font-size) * 2); + --spacing-xxxl: calc(var(--font-size) * 3); + --spacing-xxxxl: calc(var(--font-size) * 4); + /* Padding */ --padding-md: calc(var(--font-size) * 1.2); --padding-sm: calc(var(--font-size) * 0.6); diff --git a/packages/insomnia-app/app/ui/css/layout/base.less b/packages/insomnia-app/app/ui/css/layout/base.less index 958de7700..e6e016d37 100644 --- a/packages/insomnia-app/app/ui/css/layout/base.less +++ b/packages/insomnia-app/app/ui/css/layout/base.less @@ -27,16 +27,50 @@ body { padding: 0; } +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: var(--font-line-height-md); +} + h1 { - font-size: var(--font-size-xxl); + font-size: var(--font-size-xxxl); + font-weight: var(--font-weight-regular); } h2 { - font-size: var(--font-size-xl); + font-size: var(--font-size-xxl); + font-weight: var(--font-weight-regular); } h3 { + font-size: var(--font-size-xl); + font-weight: var(--font-weight-medium); +} + +h4 { font-size: var(--font-size-lg); + font-weight: var(--font-weight-medium); +} + +h5 { + font-size: var(--font-size-md); + font-weight: var(--font-weight-medium); +} + +h6 { + font-size: var(--font-size-xs); + font-weight: var(--font-weight-bold); + text-transform: uppercase; +} + +p { + font-size: var(--font-size-md); + font-weight: var(--font-weight-regular); + line-height: var(--font-line-height-lg); } p, @@ -68,10 +102,6 @@ label { padding-top: var(--padding-xs); } -p { - line-height: 1.7em; -} - ul.ul--pretty { list-style: disc; padding-left: var(--padding-lg); diff --git a/packages/insomnia-components/.storybook/main.js b/packages/insomnia-components/.storybook/main.js index 74322dc6c..41ccce915 100644 --- a/packages/insomnia-components/.storybook/main.js +++ b/packages/insomnia-components/.storybook/main.js @@ -2,5 +2,6 @@ module.exports = { addons: [ '@storybook/addon-knobs/register', '@storybook/addon-contexts/register', + 'storybook-addon-designs/register', ] }; diff --git a/packages/insomnia-components/.storybook/preview-head.html b/packages/insomnia-components/.storybook/preview-head.html index c13d6490f..97d7de2f7 100644 --- a/packages/insomnia-components/.storybook/preview-head.html +++ b/packages/insomnia-components/.storybook/preview-head.html @@ -132,9 +132,9 @@ - - - diff --git a/packages/insomnia-components/assets/icn-bitbucket-logo.svg b/packages/insomnia-components/assets/icn-bitbucket-logo.svg new file mode 100644 index 000000000..d9998c6f4 --- /dev/null +++ b/packages/insomnia-components/assets/icn-bitbucket-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-burger-menu.svg b/packages/insomnia-components/assets/icn-burger-menu.svg new file mode 100644 index 000000000..583af7a86 --- /dev/null +++ b/packages/insomnia-components/assets/icn-burger-menu.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-checkmark.svg b/packages/insomnia-components/assets/icn-checkmark.svg new file mode 100644 index 000000000..3fea7d39b --- /dev/null +++ b/packages/insomnia-components/assets/icn-checkmark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-cookie.svg b/packages/insomnia-components/assets/icn-cookie.svg new file mode 100644 index 000000000..b9c34863c --- /dev/null +++ b/packages/insomnia-components/assets/icn-cookie.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-drag-grip.svg b/packages/insomnia-components/assets/icn-drag-grip.svg new file mode 100644 index 000000000..5da53c9ba --- /dev/null +++ b/packages/insomnia-components/assets/icn-drag-grip.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-elevator.svg b/packages/insomnia-components/assets/icn-elevator.svg new file mode 100644 index 000000000..aa1a7d7c1 --- /dev/null +++ b/packages/insomnia-components/assets/icn-elevator.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/insomnia-components/assets/icn-ellipsis-circle.svg b/packages/insomnia-components/assets/icn-ellipsis-circle.svg new file mode 100644 index 000000000..b47111da2 --- /dev/null +++ b/packages/insomnia-components/assets/icn-ellipsis-circle.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/insomnia-components/assets/icn-file.svg b/packages/insomnia-components/assets/icn-file.svg new file mode 100644 index 000000000..1345e3e27 --- /dev/null +++ b/packages/insomnia-components/assets/icn-file.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-folder-open.svg b/packages/insomnia-components/assets/icn-folder-open.svg new file mode 100644 index 000000000..53e2c090b --- /dev/null +++ b/packages/insomnia-components/assets/icn-folder-open.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-folder.svg b/packages/insomnia-components/assets/icn-folder.svg new file mode 100644 index 000000000..9c331851a --- /dev/null +++ b/packages/insomnia-components/assets/icn-folder.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-gear.svg b/packages/insomnia-components/assets/icn-gear.svg new file mode 100644 index 000000000..07f783337 --- /dev/null +++ b/packages/insomnia-components/assets/icn-gear.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-gitlab-logo.svg b/packages/insomnia-components/assets/icn-gitlab-logo.svg new file mode 100644 index 000000000..fbaf3e2e1 --- /dev/null +++ b/packages/insomnia-components/assets/icn-gitlab-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-gui.svg b/packages/insomnia-components/assets/icn-gui.svg new file mode 100644 index 000000000..0ad7dfdf3 --- /dev/null +++ b/packages/insomnia-components/assets/icn-gui.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-indentation.svg b/packages/insomnia-components/assets/icn-indentation.svg new file mode 100644 index 000000000..463affc2e --- /dev/null +++ b/packages/insomnia-components/assets/icn-indentation.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-minus-circle-fill.svg b/packages/insomnia-components/assets/icn-minus-circle-fill.svg new file mode 100644 index 000000000..ec4e1ff37 --- /dev/null +++ b/packages/insomnia-components/assets/icn-minus-circle-fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-minus-circle.svg b/packages/insomnia-components/assets/icn-minus-circle.svg new file mode 100644 index 000000000..828cd8ff4 --- /dev/null +++ b/packages/insomnia-components/assets/icn-minus-circle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-placeholder.svg b/packages/insomnia-components/assets/icn-placeholder.svg new file mode 100644 index 000000000..e4b719f3d --- /dev/null +++ b/packages/insomnia-components/assets/icn-placeholder.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/insomnia-components/assets/icn-play.svg b/packages/insomnia-components/assets/icn-play.svg new file mode 100644 index 000000000..6361e3afe --- /dev/null +++ b/packages/insomnia-components/assets/icn-play.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-plus.svg b/packages/insomnia-components/assets/icn-plus.svg new file mode 100644 index 000000000..7c965470e --- /dev/null +++ b/packages/insomnia-components/assets/icn-plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-prohibited.svg b/packages/insomnia-components/assets/icn-prohibited.svg new file mode 100644 index 000000000..e870f28b6 --- /dev/null +++ b/packages/insomnia-components/assets/icn-prohibited.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-question-fill.svg b/packages/insomnia-components/assets/icn-question-fill.svg new file mode 100644 index 000000000..23d9857c2 --- /dev/null +++ b/packages/insomnia-components/assets/icn-question-fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-question.svg b/packages/insomnia-components/assets/icn-question.svg new file mode 100644 index 000000000..4bc68e227 --- /dev/null +++ b/packages/insomnia-components/assets/icn-question.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/insomnia-components/assets/icn-sec-cert.svg b/packages/insomnia-components/assets/icn-sec-cert.svg new file mode 100644 index 000000000..73e7b9be4 --- /dev/null +++ b/packages/insomnia-components/assets/icn-sec-cert.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-sync.svg b/packages/insomnia-components/assets/icn-sync.svg new file mode 100644 index 000000000..c49ff7fa5 --- /dev/null +++ b/packages/insomnia-components/assets/icn-sync.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/insomnia-components/assets/icn-trashcan.svg b/packages/insomnia-components/assets/icn-trashcan.svg new file mode 100644 index 000000000..9addd1d9c --- /dev/null +++ b/packages/insomnia-components/assets/icn-trashcan.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-triangle.svg b/packages/insomnia-components/assets/icn-triangle.svg new file mode 100644 index 000000000..0bcac6200 --- /dev/null +++ b/packages/insomnia-components/assets/icn-triangle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-user.svg b/packages/insomnia-components/assets/icn-user.svg new file mode 100644 index 000000000..3a382f9c8 --- /dev/null +++ b/packages/insomnia-components/assets/icn-user.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-warning-circle.svg b/packages/insomnia-components/assets/icn-warning-circle.svg new file mode 100644 index 000000000..a757d679f --- /dev/null +++ b/packages/insomnia-components/assets/icn-warning-circle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/assets/icn-x.svg b/packages/insomnia-components/assets/icn-x.svg new file mode 100644 index 000000000..67a04cf01 --- /dev/null +++ b/packages/insomnia-components/assets/icn-x.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/insomnia-components/components/sidebar.js b/packages/insomnia-components/components/sidebar.js new file mode 100644 index 000000000..79f0dafbc --- /dev/null +++ b/packages/insomnia-components/components/sidebar.js @@ -0,0 +1,407 @@ +// @flow +import * as React from 'react'; +import { useState } from 'react'; +import { motion } from 'framer-motion'; +import styled from 'styled-components'; +import SvgIcon, { IconEnum } from './svg-icon'; +import Dropdown from '../components/dropdown/dropdown'; +import DropdownItem from '../components/dropdown/dropdown-item'; + +type Props = {| + className?: string, +|}; + +const StyledSidebar: React.ComponentType<{}> = styled.div` + /* To constants */ + background-color: #fafafa; + border: 1px solid var(--color-border); + color: var(--color-text); + position: relative; + svg { + font-size: var(--font-size-xl); + fill: #737373; + } + .method { + h6 { + font-size: var(--font-size-xxs); + } + } + .method-post { + color: var(--color-success); + } + .method-get { + color: var(--color-surprise); + } + .method-del { + color: var(--color-danger); + } + .method-options-head, + .method-custom { + color: var(--color-info); + } + .method-patch { + color: var(--color-notice); + } + .method-put { + color: var(--color-warning); + } + + h6 { + font-size: var(--font-size-xs); + } + h5 { + font-size: var(--font-size-sm); + } + /* END To constants */ + width: 260px; + height: 100%; + min-height: 1100px; +`; + +const StyledSection: React.ComponentType<{}> = styled(motion.ul)` + overflow: hidden; + box-sizing: border-box; + border-bottom: 1px solid var(--color-border); + + /* Header */ + li:nth-child(1) { + display: flex; + justify-content: space-between; + align-items: center; + + & > * { + padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) var(--spacing-md); + font-size: var(--font-size-md); + + svg { + margin-left: var(--spacing-sm); + + &:hover { + fill:#000; + opacity: 1; + } + + } + } + } + + /* Footer */ + &:last-child { + border-top: 1px solid var(--color-border); + border-bottom: none; + position: absolute; + bottom: 0; + width: 100%; + + li { + justify-content: start; + line-height: var(--font-line-height-sm); + + & > * { + padding: var(--spacing-md) 0 var(--spacing-md) var(--spacing-sm); + margin-left: 0px; + font-weight: var(--font-weight-regular); + } + } + } + + } +`; + +const StyledItem: React.ComponentType<{}> = styled.li` + padding: var(--spacing-sm) 0 var(--spacing-sm) 0; + margin: 0px; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(var(--spacing-xxl), 1fr)); + column-gap: var(--spacing-sm); + grid-template-rows: 1fr; + align-items: start; + white-space: nowrap; + font-size: var(--font-size-md); + line-height: var(--font-line-height-md); + + .inline-icon { + svg { + font-size: var(--font-line-height-sm); + margin-left: var(--spacing-xs); + } + } + + a { + color: var(--hl-xl); + } + + div:nth-child(1) { + text-align: right; + } + + &:hover { + background-color: var(--hl-xxs); + cursor: default; + } + + &:last-child { + margin-bottom: var(--spacing-md); + } +`; + +const StyledFilter: React.ComponentType<{}> = styled(motion.div)` +text-align: left; +padding: 0; +width:100%; +display:block; +overflow:hidden; +input { + box-sizing:border-box; + font-size: var(--font-size-md); + min-width: 88%; + padding: var(--padding-sm); + margin: 0 var(--padding-md); + } +`; + +function Sidebar(props: Props) { + // Temp garbage for easing/transition/sequencing dial-in + const toggleVisible = () => setVisible(!visible); + const toggleVisible2 = () => setVisible2(!visible2); + const [visible, setVisible] = useState(false); + const [visible2, setVisible2] = useState(false); + + const [visible3, setVisible3] = useState(true); + const toggleVisible3 = () => setVisible3(!visible3); + + const [visible4, setVisible4] = useState(true); + const toggleVisible4 = () => setVisible4(!visible4); + + return ( + + {/* + +
  • +
    DOCUMENT
    +
  • + +
    + +
    +
    + No Environment + }> + Item 1 + Item 2 + Item 3 + +
    +
    + +
    + +
    +
    + No Cookies (Add) +
    +
    + +
    + +
    +
    + No Client Certificates (Add) +
    +
    +
    + */} + +
  • +
    INFO
    + +
  • +
    + + +
  • +
    SERVERS
    +
    + + + + + + + + + +
    +
  • + + + + + + +
    + +
    +
    development.konghq.com
    +
    + +
    + +
    +
    staging.konghq.com
    +
    + +
    + +
    +
    production.konghq.com
    +
    +
    + + +
  • +
    PATHS
    +
    + + + + + + + + + +
    +
  • + + + + +
    + +
    +
    pet
    +
    + +
    +
    POST
    +

    /store/inventory/(orderId)

    +
    + +
    +
    GET
    +

    /store/inventory/(orderId)

    +
    + +
    +
    PUT
    +

    /store/inventory/(orderId)

    +
    + +
    +
    DEL
    +

    /store/inventory/(orderId)

    +
    + +
    +
    POST
    +

    /store/inventory/(orderId)

    +
    + +
    +
    PUT
    +

    /store/inventory/(orderId)

    +
    + +
    + +
    +
    store
    +
    + +
    +
    PUT
    +

    /store/inventory/(orderId)

    +
    + +
    +
    DEL
    +

    /store/inventory/(orderId)

    +
    + +
    +
    POST
    +

    /store/inventory/(orderId)

    +
    + +
    +
    PUT
    +

    /store/inventory/(orderId)

    +
    + +
    + +
    +
    user
    +
    +
    + + +
  • +
    MODELS
    + +
  • +
    + + +
  • +
    SECURITY
    + +
  • +
    + + +
  • +
    + +
    +
    Settings
    +
  • +
    +
    + ); +} + +export default Sidebar; \ No newline at end of file diff --git a/packages/insomnia-components/components/sidebar.stories.js b/packages/insomnia-components/components/sidebar.stories.js new file mode 100644 index 000000000..c7302ea67 --- /dev/null +++ b/packages/insomnia-components/components/sidebar.stories.js @@ -0,0 +1,20 @@ +import React from 'react'; +import Sidebar from './sidebar'; +import { withKnobs } from '@storybook/addon-knobs'; +import { withDesign } from 'storybook-addon-designs'; + +export default { + title: 'Sidebar', + decorators: [withKnobs, withDesign], +}; + +export const _default = () => ; + +_default.story = { + parameters: { + design: { + type: 'figma', + url: 'https://www.figma.com/file/sS7oBbKmDvhtq5lXyTckVe/Style-Guide-Components?node-id=0%3A2', + }, + }, +}; diff --git a/packages/insomnia-components/components/svg-icon.js b/packages/insomnia-components/components/svg-icon.js index fc2738b45..9ccb5dfcc 100644 --- a/packages/insomnia-components/components/svg-icon.js +++ b/packages/insomnia-components/components/svg-icon.js @@ -5,14 +5,43 @@ import MemoSvgIcnArrowRight from '../assets/svgr/IcnArrowRight'; import MemoSvgIcnChevronDown from '../assets/svgr/IcnChevronDown'; import MemoSvgIcnChevronUp from '../assets/svgr/IcnChevronUp'; import MemoSvgIcnClock from '../assets/svgr/IcnClock'; -import MemoSvgIcnEllipsis from '../assets/svgr/IcnEllipsis'; import MemoSvgIcnEmpty from '../assets/svgr/IcnEmpty'; import MemoSvgIcnErrors from '../assets/svgr/IcnErrors'; import MemoSvgIcnGitBranch from '../assets/svgr/IcnGitBranch'; import MemoSvgIcnGithubLogo from '../assets/svgr/IcnGithubLogo'; -import MemoSvgIcnInfo from '../assets/svgr/IcnInfo'; -import MemoSvgIcnSearch from '../assets/svgr/IcnSearch'; +import MemoSvgIcnBitbucketLogo from '../assets/svgr/IcnBitbucketLogo'; import MemoSvgIcnWarning from '../assets/svgr/IcnWarning'; +import MemoSvgIcnEllipsis from '../assets/svgr/IcnEllipsis'; +import MemoSvgIcnBurgerMenu from '../assets/svgr/IcnBurgerMenu'; +import MemoSvgIcnCheckmark from '../assets/svgr/IcnCheckmark'; +import MemoSvgIcnCookie from '../assets/svgr/IcnCookie'; +import MemoSvgIcnDragGrip from '../assets/svgr/IcnDragGrip'; +import MemoSvgIcnElevator from '../assets/svgr/IcnElevator'; +import MemoSvgIcnEllipsisCircle from '../assets/svgr/IcnEllipsisCircle'; +import MemoSvgIcnFile from '../assets/svgr/IcnFile'; +import MemoSvgIcnFolderOpen from '../assets/svgr/IcnFolderOpen'; +import MemoSvgIcnFolder from '../assets/svgr/IcnFolder'; +import MemoSvgIcnGear from '../assets/svgr/IcnGear'; +import MemoSvgIcnGitlabLogo from '../assets/svgr/IcnGitlabLogo'; +import MemoSvgIcnGUI from '../assets/svgr/IcnGui'; +import MemoSvgIcnIndendation from '../assets/svgr/IcnIndentation'; +import MemoSvgIcnMinusCircleFill from '../assets/svgr/IcnMinusCircleFill'; +import MemoSvgIcnMinusCircle from '../assets/svgr/IcnMinusCircle'; +import MemoSvgIcnPlaceholder from '../assets/svgr/IcnPlaceholder'; +import MemoSvgIcnPlay from '../assets/svgr/IcnPlay'; +import MemoSvgIcnPlus from '../assets/svgr/IcnPlus'; +import MemoSvgIcnProhibited from '../assets/svgr/IcnProhibited'; +import MemoSvgIcnQuestionFill from '../assets/svgr/IcnQuestionFill'; +import MemoSvgIcnQuestion from '../assets/svgr/IcnQuestion'; +import MemoSvgIcnSearch from '../assets/svgr/IcnSearch'; +import MemoSvgIcnSecCert from '../assets/svgr/IcnSecCert'; +import MemoSvgIcnSync from '../assets/svgr/IcnSync'; +import MemoSvgIcnTrashcan from '../assets/svgr/IcnTrashcan'; +import MemoSvgIcnTriangle from '../assets/svgr/IcnTriangle'; +import MemoSvgIcnUser from '../assets/svgr/IcnUser'; +import MemoSvgIcnWarningCircle from '../assets/svgr/IcnWarningCircle'; +import MemoSvgIcnX from '../assets/svgr/IcnX'; +import MemoSvgIcnInfo from '../assets/svgr/IcnInfo'; export const ThemeEnum = { default: 'default', @@ -38,9 +67,38 @@ export const IconEnum = { error: 'error', gitBranch: 'git-branch', github: 'github', + bitbucket: 'bitbucket', info: 'info', search: 'search', warning: 'warning', + burgerMenu: 'burger-menu', + checkmark: 'checkmark', + cookie: 'cookie', + dragGrip: 'drag-grip', + elevator: 'elevator', + ellipsesCircle: 'ellipses-circle', + file: 'file', + folder: 'folder', + folderOpen: 'folder-open', + gear: 'gear', + gitlabLogo: 'gitlab-logo', + gui: 'gui', + indentation: 'indentation', + minusCircle: 'minus-circle', + minusCircleFill: 'minus-circle-fill', + placeholder: 'placeholder', + play: 'play', + plus: 'plus', + prohibited: 'prohibited', + questionFill: 'question-fill', + question: 'question', + secCert: 'sec-cert', + sync: 'sync', + trashcan: 'trashcan', + triangle: 'triangle', + user: 'user', + warningCircle: 'warning-circle', + x: 'x', // Blank icon empty: 'empty', @@ -49,7 +107,7 @@ export const IconEnum = { type IconKeys = $Values; type Props = { - icon: IconKeys; + icon: IconKeys, label?: React.Node, }; @@ -63,27 +121,27 @@ const SvgIconStyled: React.ComponentType<{ theme: ThemeKeys, hasLabel: boolean } user-select: none; ${({ hasLabel }) => (hasLabel ? 'margin-right: var(--padding-xs);' : null)} ${({ theme }) => { - switch (theme) { - case ThemeEnum.danger: - case ThemeEnum.info: - case ThemeEnum.notice: - case ThemeEnum.success: - case ThemeEnum.surprise: - case ThemeEnum.warning: - return `fill: var(--color-${theme}); color: var(--color-font-${theme});`; - case ThemeEnum.highlight: - return 'fill: var(--hl); color: var(--color-font-danger);'; - case ThemeEnum.default: - default: - return 'fill: var(--color-font); color: var(--color-font);'; - } -}} + switch (theme) { + case ThemeEnum.danger: + case ThemeEnum.info: + case ThemeEnum.notice: + case ThemeEnum.success: + case ThemeEnum.surprise: + case ThemeEnum.warning: + return `fill: var(--color-${theme}); color: var(--color-font-${theme});`; + case ThemeEnum.highlight: + return 'fill: var(--hl); color: var(--color-font-danger);'; + case ThemeEnum.default: + default: + return 'fill: var(--color-font); color: var(--color-font);'; + } + }} } `; type IconDictionary = { - [IconKeys]: [ThemeKeys, React.ComponentType]; -} + [IconKeys]: [ThemeKeys, React.ComponentType], +}; class SvgIcon extends React.Component { static icons: IconDictionary = { @@ -96,9 +154,39 @@ class SvgIcon extends React.Component { [IconEnum.error]: [ThemeEnum.danger, MemoSvgIcnErrors], [IconEnum.gitBranch]: [ThemeEnum.default, MemoSvgIcnGitBranch], [IconEnum.github]: [ThemeEnum.default, MemoSvgIcnGithubLogo], + [IconEnum.bitbucket]: [ThemeEnum.default, MemoSvgIcnBitbucketLogo], [IconEnum.info]: [ThemeEnum.highlight, MemoSvgIcnInfo], [IconEnum.search]: [ThemeEnum.default, MemoSvgIcnSearch], [IconEnum.warning]: [ThemeEnum.notice, MemoSvgIcnWarning], + [IconEnum.burgerMenu]: [ThemeEnum.default, MemoSvgIcnBurgerMenu], + [IconEnum.checkmark]: [ThemeEnum.default, MemoSvgIcnCheckmark], + [IconEnum.cookie]: [ThemeEnum.default, MemoSvgIcnCookie], + [IconEnum.dragGrip]: [ThemeEnum.default, MemoSvgIcnDragGrip], + [IconEnum.elevator]: [ThemeEnum.default, MemoSvgIcnElevator], + [IconEnum.ellipsesCircle]: [ThemeEnum.default, MemoSvgIcnEllipsisCircle], + [IconEnum.elevator]: [ThemeEnum.default, MemoSvgIcnElevator], + [IconEnum.file]: [ThemeEnum.default, MemoSvgIcnFile], + [IconEnum.folder]: [ThemeEnum.default, MemoSvgIcnFolder], + [IconEnum.folderOpen]: [ThemeEnum.default, MemoSvgIcnFolderOpen], + [IconEnum.gear]: [ThemeEnum.default, MemoSvgIcnGear], + [IconEnum.gitlabLogo]: [ThemeEnum.default, MemoSvgIcnGitlabLogo], + [IconEnum.gui]: [ThemeEnum.default, MemoSvgIcnGUI], + [IconEnum.indentation]: [ThemeEnum.default, MemoSvgIcnIndendation], + [IconEnum.minusCircle]: [ThemeEnum.default, MemoSvgIcnMinusCircle], + [IconEnum.minusCircleFill]: [ThemeEnum.default, MemoSvgIcnMinusCircleFill], + [IconEnum.placeholder]: [ThemeEnum.default, MemoSvgIcnPlaceholder], + [IconEnum.play]: [ThemeEnum.default, MemoSvgIcnPlay], + [IconEnum.plus]: [ThemeEnum.default, MemoSvgIcnPlus], + [IconEnum.prohibited]: [ThemeEnum.default, MemoSvgIcnProhibited], + [IconEnum.question]: [ThemeEnum.default, MemoSvgIcnQuestion], + [IconEnum.questionFill]: [ThemeEnum.default, MemoSvgIcnQuestionFill], + [IconEnum.secCert]: [ThemeEnum.default, MemoSvgIcnSecCert], + [IconEnum.sync]: [ThemeEnum.default, MemoSvgIcnSync], + [IconEnum.trashcan]: [ThemeEnum.default, MemoSvgIcnTrashcan], + [IconEnum.triangle]: [ThemeEnum.default, MemoSvgIcnTriangle], + [IconEnum.user]: [ThemeEnum.default, MemoSvgIcnUser], + [IconEnum.warningCircle]: [ThemeEnum.default, MemoSvgIcnWarningCircle], + [IconEnum.x]: [ThemeEnum.default, MemoSvgIcnX], }; render() { diff --git a/packages/insomnia-components/dist/index.js b/packages/insomnia-components/dist/index.js index fb4876e29..4f0af274f 100644 --- a/packages/insomnia-components/dist/index.js +++ b/packages/insomnia-components/dist/index.js @@ -1,21 +1,21 @@ -module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},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=179)}([function(e,t,r){"use strict";e.exports=r(93)},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return ge}));var n=r(44),i=r.n(n),o=r(86),a=r.n(o),s=r(0),c=r.n(s),f=r(87),u=r(45),l=r(46),d=(r(4),r(92)),h=r(91),p=function(e,t){for(var r=[e[0]],n=0,i=t.length;n=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},S=function(e){return"object"===(void 0===e?"undefined":b(e))&&e.constructor===Object},k=Object.freeze([]),x=Object.freeze({});function E(e){return"function"==typeof e}function C(e){return e.displayName||e.name||"Component"}function M(e){return e&&"string"==typeof e.styledComponentId}var T=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",A="undefined"!=typeof window&&"HTMLElement"in window,P="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1;var I=function(e){function t(r){m(this,t);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return _(a)}return g(t,e),t}(Error),O=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,R=function(e){var t=""+(e||""),r=[];return t.replace(O,(function(e,t,n){return r.push({componentId:t,matchIndex:n}),e})),r.map((function(e,n){var i=e.componentId,o=e.matchIndex,a=r[n+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}}))},j=/^\s*\/\/.*$/gm,B=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),N=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),z=[],L=function(e){if(-2===e){var t=z;return z=[],t}},D=a()((function(e){z.push(e)})),U=void 0,F=void 0,q=void 0,H=function(e,t,r){return t>0&&-1!==r.slice(0,t).indexOf(F)&&r.slice(t-F.length,t)!==F?"."+U:e};N.use([function(e,t,r){2===e&&r.length&&r[0].lastIndexOf(F)>0&&(r[0]=r[0].replace(q,H))},D,L]),B.use([D,L]);var W=function(e){return B("",e)};function K(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(j,""),o=t&&r?r+" "+t+" { "+i+" }":i;return U=n,F=t,q=new RegExp("\\"+F+"\\b","g"),N(r||!t?"":t,o)}var V=function(){return r.nc},$=function(e,t,r){r&&((e[t]||(e[t]=Object.create(null)))[r]=!0)},Y=function(e,t){e[t]=Object.create(null)},X=function(e){return function(t,r){return void 0!==e[t]&&e[t][r]}},G=function(e){var t="";for(var r in e)t+=Object.keys(e[r]).join(" ")+" ";return t.trim()},Q=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,r=0;r"+e()+""}},re=function(e,t){return function(){var r,n=((r={})[T]=G(t),r["data-styled-version"]="4.4.1",r),i=V();return i&&(n.nonce=i),c.a.createElement("style",v({},n,{dangerouslySetInnerHTML:{__html:e()}}))}},ne=function(e){return function(){return Object.keys(e)}},ie=function(e,t){return e.createTextNode(Z(t))},oe=function e(t,r){var n=void 0===t?Object.create(null):t,i=void 0===r?Object.create(null):r,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var r=i[t][0];r&&(e+=Z(t)+r)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var r in e)t[r]=v({},e[r]);return t}(n),r=Object.create(null);for(var o in i)r[o]=[i[o][0]];return e(t,r)},css:a,getIds:ne(i),hasNameForId:X(n),insertMarker:o,insertRules:function(e,t,r){o(e)[0]+=t.join(" "),$(n,e,r)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",Y(n,e))},sealed:!1,styleTag:null,toElement:re(a,n),toHTML:te(a,n)}},ae=function(e,t,r,n,i){if(A&&!r){var o=function(e,t,r){var n=document;e?n=e.ownerDocument:t&&(n=t.ownerDocument);var i=n.createElement("style");i.setAttribute(T,""),i.setAttribute("data-styled-version","4.4.1");var o=V();if(o&&i.setAttribute("nonce",o),i.appendChild(n.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new I(6);t.parentNode.insertBefore(i,r?t:t.nextSibling)}return i}(e,t,n);return P?function(e,t){var r=Object.create(null),n=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=n[t];return void 0!==i?i:(n[t]=ie(e.ownerDocument,t),e.appendChild(n[t]),r[t]=Object.create(null),n[t])},s=function(){var e="";for(var t in n)e+=n[t].data;return e};return{clone:function(){throw new I(5)},css:s,getIds:ne(n),hasNameForId:X(r),insertMarker:a,insertRules:function(e,n,s){for(var c=a(e),f=[],u=n.length,l=0;l0&&(o=!0,t().insertRules(e+"-import",f))},removeRules:function(a){var s=n[a];if(void 0!==s){var c=ie(e.ownerDocument,a);e.replaceChild(c,s),n[a]=c,Y(r,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:re(s,r),toHTML:te(s,r)}}(o,i):function(e,t){var r=Object.create(null),n=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=n[e];return void 0!==t?t:(n[e]=i.length,i.push(0),Y(r,e),n[e])},c=function(){var t=Q(e).cssRules,r="";for(var o in n){r+=Z(o);for(var a=n[o],s=ee(i,a),c=s-i[a];c0&&(a=!0,t().insertRules(n+"-import",p)),i[u]+=h,$(r,n,f)},removeRules:function(s){var c=n[s];if(void 0!==c&&!1!==e.isConnected){var f=i[c];!function(e,t,r){for(var n=t-r,i=t;i>n;i-=1)e.deleteRule(i)}(Q(e),ee(i,c)-1,f),i[c]=0,Y(r,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:re(c,r),toHTML:te(c,r)}}(o,i)}return oe()},se=/\s+/,ce=void 0;ce=A?P?40:1e3:-1;var fe=0,ue=void 0,le=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A?document.head:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var r=t.tags[0];return t.importRuleTag=ae(t.target,r?r.styleTag:null,t.forceServer,!0)},fe+=1,this.id=fe,this.forceServer=n,this.target=n?null:r,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!A||this.forceServer)return this;var e=[],t=[],r=!1,n=document.querySelectorAll("style["+T+'][data-styled-version="4.4.1"]'),i=n.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];ue=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var r=e.getIds(),n=e.clone(),i=0;i1?t-1:0),n=1;n=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++i;switch(r){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+((1540483477*(n>>>16)&65535)<<16)}return((n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16))^n>>>15)>>>0}var _e=52,Se=function(e){return String.fromCharCode(e+(e>25?39:97))};function ke(e){var t="",r=void 0;for(r=e;r>_e;r=Math.floor(r/_e))t=Se(r%_e)+t;return Se(r%_e)+t}function xe(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:x,n=!!r&&e.theme===r.theme,i=e.theme&&!n?e.theme:t||r.theme;return i},Ae=/[[\].#*$><+~=|^:(),"'`-]+/g,Pe=/(^-|-$)/g;function Ie(e){return e.replace(Ae,"-").replace(Pe,"")}function Oe(e){return"string"==typeof e&&!0}var Re={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},je={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Be=((Ee={})[u.ForwardRef]={$$typeof:!0,render:!0},Ee),Ne=Object.defineProperty,ze=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,De=void 0===Le?function(){return[]}:Le,Ue=Object.getOwnPropertyDescriptor,Fe=Object.getPrototypeOf,qe=Object.prototype,He=Array.prototype;function We(e,t,r){if("string"!=typeof t){var n=Fe(t);n&&n!==qe&&We(e,n,r);for(var i=He.concat(ze(t),De(t)),o=Be[e.$$typeof]||Re,a=Be[t.$$typeof]||Re,s=i.length,c=void 0,f=void 0;s--;)if(f=i[s],!(je[f]||r&&r[f]||a&&a[f]||o&&o[f])&&(c=Ue(t,f)))try{Ne(e,f,c)}catch(e){}return e}return e}var Ke=Object(s.createContext)(),Ve=Ke.Consumer,$e=(function(e){function t(r){m(this,t);var n=_(this,e.call(this,r));return n.getContext=Object(l.a)(n.getContext.bind(n)),n.renderInner=n.renderInner.bind(n),n}g(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(Ke.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(Ke.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(E(e))return e(t);if(null===e||Array.isArray(e)||"object"!==(void 0===e?"undefined":b(e)))throw new I(8);return v({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){m(this,e),this.masterSheet=le.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new I(2);return c.a.createElement(Xe,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new I(3)}}(),Object(s.createContext)()),Ye=$e.Consumer,Xe=function(e){function t(r){m(this,t);var n=_(this,e.call(this,r));return n.getContext=Object(l.a)(n.getContext),n}return g(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new le(t);throw new I(4)},t.prototype.render=function(){var e=this.props,t=e.children,r=e.sheet,n=e.target;return c.a.createElement($e.Provider,{value:this.getContext(r,n)},t)},t}(s.Component),Ge={};var Qe=function(e){function t(){m(this,t);var r=_(this,e.call(this));return r.attrs={},r.renderOuter=r.renderOuter.bind(r),r.renderInner=r.renderInner.bind(r),r}return g(t,e),t.prototype.render=function(){return c.a.createElement(Ye,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Ve,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,r=t.componentStyle,n=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,c=void 0;c=r.isStatic?this.generateAndInjectStyles(x,this.props):this.generateAndInjectStyles(Te(this.props,e,n)||x,this.props);var f=this.props.as||this.attrs.as||a,u=Oe(f),l={},h=v({},this.props,this.attrs),p=void 0;for(p in h)"forwardedComponent"!==p&&"as"!==p&&("forwardedRef"===p?l.ref=h[p]:"forwardedAs"===p?l.as=h[p]:u&&!Object(d.a)(p)||(l[p]=h[p]));return this.props.style&&this.attrs.style&&(l.style=v({},this.attrs.style,this.props.style)),l.className=Array.prototype.concat(i,o,c!==o?c:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(f,l)},t.prototype.buildExecutionContext=function(e,t,r){var n=this,i=v({},t,{theme:e});return r.length?(this.attrs={},r.forEach((function(e){var t,r=e,o=!1,a=void 0,s=void 0;for(s in E(r)&&(r=r(i),o=!0),r)a=r[s],o||!E(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||M(a)||(a=a(i)),n.attrs[s]=a,i[s]=a})),i):i},t.prototype.generateAndInjectStyles=function(e,t){var r=t.forwardedComponent,n=r.attrs,i=r.componentStyle;r.warnTooManyClasses;return i.isStatic&&!n.length?i.generateAndInjectStyles(x,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,n),this.styleSheet)},t}(s.Component);function Je(e,t,r){var n=M(e),i=!Oe(e),o=t.displayName,a=void 0===o?function(e){return Oe(e)?"styled."+e:"Styled("+C(e)+")"}(e):o,s=t.componentId,f=void 0===s?function(e,t,r){var n="string"!=typeof t?"sc":Ie(t),i=(Ge[n]||0)+1;Ge[n]=i;var o=n+"-"+e.generateName(n+i);return r?r+"-"+o:o}(Me,t.displayName,t.parentComponentId):s,u=t.ParentComponent,l=void 0===u?Qe:u,d=t.attrs,p=void 0===d?k:d,b=t.displayName&&t.componentId?Ie(t.displayName)+"-"+t.componentId:t.componentId||f,m=n&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,y=new Me(n?e.componentStyle.rules.concat(r):r,m,b),g=void 0,_=function(e,t){return c.a.createElement(l,v({},e,{forwardedComponent:g,forwardedRef:t}))};return _.displayName=a,(g=c.a.forwardRef(_)).displayName=a,g.attrs=m,g.componentStyle=y,g.foldedComponentIds=n?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):k,g.styledComponentId=b,g.target=n?e.target:e,g.withComponent=function(e){var n=t.componentId,i=w(t,["componentId"]),o=n&&n+"-"+(Oe(e)?e:Ie(C(e)));return Je(e,v({},i,{attrs:m,componentId:o,ParentComponent:l}),r)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?Object(h.a)(e.defaultProps,t):t}}),g.toString=function(){return"."+g.styledComponentId},i&&We(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var Ze=function(e){return function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;if(!Object(u.isValidElementType)(r))throw new I(1,String(r));var i=function(){return t(r,n,ge.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,r,v({},n,i))},i.attrs=function(i){return e(t,r,v({},n,{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i}(Je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ze[e]=Ze(e)}));!function(){function e(t,r){m(this,e),this.rules=t,this.componentId=r,this.isStatic=xe(t,k),le.master.hasId(r)||le.master.deferredInject(r,[])}e.prototype.createStyles=function(e,t){var r=K(ve(this.rules,e,t),"");t.inject(this.componentId,r)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();A&&(window.scCGSHMRCache={});t.b=Ze}).call(this,r(11))},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 n=r(6),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){e.exports=r(95)()},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(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=r(136).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}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),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"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):(n(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(n("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 i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,u=r;u1&&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?""};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"],u=[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],l=[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 d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var f=1;f>>26,l=67108863&c,d=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=d;h++){var p=f-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}r.words[f]=0|l,c=0|u}return 0!==c?r.words[f]=0|c: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 i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=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 d=u[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:f[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!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&&n(!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 n(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 i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,f=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[s]=a;for(;s=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;te.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;re.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 n=0;ne.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){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.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,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,g=0|a[3],w=8191&g,_=g>>>13,S=0|a[4],k=8191&S,x=S>>>13,E=0|a[5],C=8191&E,M=E>>>13,T=0|a[6],A=8191&T,P=T>>>13,I=0|a[7],O=8191&I,R=I>>>13,j=0|a[8],B=8191&j,N=j>>>13,z=0|a[9],L=8191&z,D=z>>>13,U=0|s[0],F=8191&U,q=U>>>13,H=0|s[1],W=8191&H,K=H>>>13,V=0|s[2],$=8191&V,Y=V>>>13,X=0|s[3],G=8191&X,Q=X>>>13,J=0|s[4],Z=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,fe=se>>>13,ue=0|s[8],le=8191&ue,de=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(f+(n=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(d,F)|0))<<13)|0;f=((o=Math.imul(d,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(b,F)|0,o=Math.imul(b,q);var ye=(f+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,W)|0))<<13)|0;f=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,F),i=(i=Math.imul(y,q))+Math.imul(v,F)|0,o=Math.imul(v,q),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,K)|0;var ve=(f+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0;var ge=(f+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,G)|0))<<13)|0;f=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(k,F),i=(i=Math.imul(k,q))+Math.imul(x,F)|0,o=Math.imul(x,q),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Q)|0;var we=(f+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;f=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,F),i=(i=Math.imul(C,q))+Math.imul(M,F)|0,o=Math.imul(M,q),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;f=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,q))+Math.imul(P,F)|0,o=Math.imul(P,q),n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(f+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;f=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var ke=(f+(n=n+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,ce)|0))<<13)|0;f=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(N,F)|0,o=Math.imul(N,q),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var xe=(f+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;f=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(D,F)|0,o=Math.imul(D,q),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,Q)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,fe)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,de)|0;var Ee=(f+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(d,pe)|0))<<13)|0;f=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,K))+Math.imul(D,W)|0,o=Math.imul(D,K),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Q)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0;var Ce=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,Y))+Math.imul(D,$)|0,o=Math.imul(D,Y),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Me=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(v,pe)|0))<<13)|0;f=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,Q))+Math.imul(D,G)|0,o=Math.imul(D,Q),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(C,ce)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Te=(f+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,ee))+Math.imul(D,Z)|0,o=Math.imul(D,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,fe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Ae=(f+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;f=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,fe)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,de)|0;var Pe=(f+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,be)|0)+Math.imul(M,pe)|0))<<13)|0;f=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),n=n+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,de)|0;var Ie=(f+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,be)|0)+Math.imul(P,pe)|0))<<13)|0;f=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,ce),i=(i=Math.imul(L,fe))+Math.imul(D,ce)|0,o=Math.imul(D,fe),n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Oe=(f+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(R,pe)|0))<<13)|0;f=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(D,le)|0,o=Math.imul(D,de);var Re=(f+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(N,pe)|0))<<13)|0;f=((o=o+Math.imul(N,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var je=(f+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(D,pe)|0))<<13)|0;return f=((o=Math.imul(D,be))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=ge,c[4]=we,c[5]=_e,c[6]=Se,c[7]=ke,c[8]=xe,c[9]=Ee,c[10]=Ce,c[11]=Me,c[12]=Te,c[13]=Ae,c[14]=Pe,c[15]=Ie,c[16]=Oe,c[17]=Re,c[18]=je,0!==f&&(c[19]=f,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/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>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,f=0;f=0&&(0!==u||f>=i);f--){var l=0|this.words[f];this.words[f]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(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){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(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 i=67108863^67108863>>>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(n("number"==typeof e),n(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>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var f=0;f=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!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&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,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 i,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,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var u=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;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),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(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},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 n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},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){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>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),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(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 n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(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 n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={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 v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){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 n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(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 n=t0?r.isub(this.p):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)},i(v,y),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return m[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(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(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var f=t.words[n],u=c-1;u>=0;u--){var l=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},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 k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(135)(e))},function(e,t,r){"use strict";(function(e){ +module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=179)}([function(e,t,n){"use strict";e.exports=n(93)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ge}));var r=n(44),i=n.n(r),o=n(86),a=n.n(o),s=n(0),c=n.n(s),f=n(87),u=n(45),l=n(46),d=(n(4),n(92)),h=n(91),p=function(e,t){for(var n=[e[0]],r=0,i=t.length;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},_=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},S=function(e){return"object"===(void 0===e?"undefined":b(e))&&e.constructor===Object},k=Object.freeze([]),x=Object.freeze({});function E(e){return"function"==typeof e}function M(e){return e.displayName||e.name||"Component"}function C(e){return e&&"string"==typeof e.styledComponentId}var A=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",T="undefined"!=typeof window&&"HTMLElement"in window,O="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1;var P=function(e){function t(n){m(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return _(a)}return g(t,e),t}(Error),I=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,R=function(e){var t=""+(e||""),n=[];return t.replace(I,(function(e,t,r){return n.push({componentId:t,matchIndex:r}),e})),n.map((function(e,r){var i=e.componentId,o=e.matchIndex,a=n[r+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}}))},j=/^\s*\/\/.*$/gm,B=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),N=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),z=[],L=function(e){if(-2===e){var t=z;return z=[],t}},D=a()((function(e){z.push(e)})),U=void 0,F=void 0,q=void 0,H=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(F)&&n.slice(t-F.length,t)!==F?"."+U:e};N.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(F)>0&&(n[0]=n[0].replace(q,H))},D,L]),B.use([D,L]);var V=function(e){return B("",e)};function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(j,""),o=t&&n?n+" "+t+" { "+i+" }":i;return U=r,F=t,q=new RegExp("\\"+F+"\\b","g"),N(n||!t?"":t,o)}var K=function(){return n.nc},$=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},Y=function(e,t){e[t]=Object.create(null)},X=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},G=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},Q=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[A]=G(t),n["data-styled-version"]="4.4.1",n),i=K();return i&&(r.nonce=i),c.a.createElement("style",v({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},ie=function(e,t){return e.createTextNode(Z(t))},oe=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=Z(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=v({},e[n]);return t}(r),n=Object.create(null);for(var o in i)n[o]=[i[o][0]];return e(t,n)},css:a,getIds:re(i),hasNameForId:X(r),insertMarker:o,insertRules:function(e,t,n){o(e)[0]+=t.join(" "),$(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",Y(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,i){if(T&&!n){var o=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var i=r.createElement("style");i.setAttribute(A,""),i.setAttribute("data-styled-version","4.4.1");var o=K();if(o&&i.setAttribute("nonce",o),i.appendChild(r.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new P(6);t.parentNode.insertBefore(i,n?t:t.nextSibling)}return i}(e,t,r);return O?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=r[t];return void 0!==i?i:(r[t]=ie(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new P(5)},css:s,getIds:re(r),hasNameForId:X(n),insertMarker:a,insertRules:function(e,r,s){for(var c=a(e),f=[],u=r.length,l=0;l0&&(o=!0,t().insertRules(e+"-import",f))},removeRules:function(a){var s=r[a];if(void 0!==s){var c=ie(e.ownerDocument,a);e.replaceChild(c,s),r[a]=c,Y(n,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(s,n),toHTML:te(s,n)}}(o,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),Y(n,e),r[e])},c=function(){var t=Q(e).cssRules,n="";for(var o in r){n+=Z(o);for(var a=r[o],s=ee(i,a),c=s-i[a];c0&&(a=!0,t().insertRules(r+"-import",p)),i[u]+=h,$(n,r,f)},removeRules:function(s){var c=r[s];if(void 0!==c&&!1!==e.isConnected){var f=i[c];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}(Q(e),ee(i,c)-1,f),i[c]=0,Y(n,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ne(c,n),toHTML:te(c,n)}}(o,i)}return oe()},se=/\s+/,ce=void 0;ce=T?O?40:1e3:-1;var fe=0,ue=void 0,le=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},fe+=1,this.id=fe,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!T||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+A+'][data-styled-version="4.4.1"]'),i=r.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];ue=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var n=e.getIds(),r=e.clone(),i=0;i1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var _e=52,Se=function(e){return String.fromCharCode(e+(e>25?39:97))};function ke(e){var t="",n=void 0;for(n=e;n>_e;n=Math.floor(n/_e))t=Se(n%_e)+t;return Se(n%_e)+t}function xe(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:x,r=!!n&&e.theme===n.theme,i=e.theme&&!r?e.theme:t||n.theme;return i},Te=/[[\].#*$><+~=|^:(),"'`-]+/g,Oe=/(^-|-$)/g;function Pe(e){return e.replace(Te,"-").replace(Oe,"")}function Ie(e){return"string"==typeof e&&!0}var Re={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},je={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Be=((Ee={})[u.ForwardRef]={$$typeof:!0,render:!0},Ee),Ne=Object.defineProperty,ze=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,De=void 0===Le?function(){return[]}:Le,Ue=Object.getOwnPropertyDescriptor,Fe=Object.getPrototypeOf,qe=Object.prototype,He=Array.prototype;function Ve(e,t,n){if("string"!=typeof t){var r=Fe(t);r&&r!==qe&&Ve(e,r,n);for(var i=He.concat(ze(t),De(t)),o=Be[e.$$typeof]||Re,a=Be[t.$$typeof]||Re,s=i.length,c=void 0,f=void 0;s--;)if(f=i[s],!(je[f]||n&&n[f]||a&&a[f]||o&&o[f])&&(c=Ue(t,f)))try{Ne(e,f,c)}catch(e){}return e}return e}var We=Object(s.createContext)(),Ke=We.Consumer,$e=(function(e){function t(n){m(this,t);var r=_(this,e.call(this,n));return r.getContext=Object(l.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}g(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(We.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(We.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(E(e))return e(t);if(null===e||Array.isArray(e)||"object"!==(void 0===e?"undefined":b(e)))throw new P(8);return v({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){m(this,e),this.masterSheet=le.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new P(2);return c.a.createElement(Xe,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new P(3)}}(),Object(s.createContext)()),Ye=$e.Consumer,Xe=function(e){function t(n){m(this,t);var r=_(this,e.call(this,n));return r.getContext=Object(l.a)(r.getContext),r}return g(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new le(t);throw new P(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return c.a.createElement($e.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Ge={};var Qe=function(e){function t(){m(this,t);var n=_(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return g(t,e),t.prototype.render=function(){return c.a.createElement(Ye,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Ke,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,c=void 0;c=n.isStatic?this.generateAndInjectStyles(x,this.props):this.generateAndInjectStyles(Ae(this.props,e,r)||x,this.props);var f=this.props.as||this.attrs.as||a,u=Ie(f),l={},h=v({},this.props,this.attrs),p=void 0;for(p in h)"forwardedComponent"!==p&&"as"!==p&&("forwardedRef"===p?l.ref=h[p]:"forwardedAs"===p?l.as=h[p]:u&&!Object(d.a)(p)||(l[p]=h[p]));return this.props.style&&this.attrs.style&&(l.style=v({},this.attrs.style,this.props.style)),l.className=Array.prototype.concat(i,o,c!==o?c:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(f,l)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=v({},t,{theme:e});return n.length?(this.attrs={},n.forEach((function(e){var t,n=e,o=!1,a=void 0,s=void 0;for(s in E(n)&&(n=n(i),o=!0),n)a=n[s],o||!E(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||C(a)||(a=a(i)),r.attrs[s]=a,i[s]=a})),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(x,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Je(e,t,n){var r=C(e),i=!Ie(e),o=t.displayName,a=void 0===o?function(e){return Ie(e)?"styled."+e:"Styled("+M(e)+")"}(e):o,s=t.componentId,f=void 0===s?function(e,t,n){var r="string"!=typeof t?"sc":Pe(t),i=(Ge[r]||0)+1;Ge[r]=i;var o=r+"-"+e.generateName(r+i);return n?n+"-"+o:o}(Ce,t.displayName,t.parentComponentId):s,u=t.ParentComponent,l=void 0===u?Qe:u,d=t.attrs,p=void 0===d?k:d,b=t.displayName&&t.componentId?Pe(t.displayName)+"-"+t.componentId:t.componentId||f,m=r&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,y=new Ce(r?e.componentStyle.rules.concat(n):n,m,b),g=void 0,_=function(e,t){return c.a.createElement(l,v({},e,{forwardedComponent:g,forwardedRef:t}))};return _.displayName=a,(g=c.a.forwardRef(_)).displayName=a,g.attrs=m,g.componentStyle=y,g.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):k,g.styledComponentId=b,g.target=r?e.target:e,g.withComponent=function(e){var r=t.componentId,i=w(t,["componentId"]),o=r&&r+"-"+(Ie(e)?e:Pe(M(e)));return Je(e,v({},i,{attrs:m,componentId:o,ParentComponent:l}),n)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(h.a)(e.defaultProps,t):t}}),g.toString=function(){return"."+g.styledComponentId},i&&Ve(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var Ze=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;if(!Object(u.isValidElementType)(n))throw new P(1,String(n));var i=function(){return t(n,r,ge.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,v({},r,i))},i.attrs=function(i){return e(t,n,v({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ze[e]=Ze(e)}));!function(){function e(t,n){m(this,e),this.rules=t,this.componentId=n,this.isStatic=xe(t,k),le.master.hasId(n)||le.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=W(ve(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();T&&(window.scCGSHMRCache={});t.b=Ze}).call(this,n(11))},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 n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){var r=n(6),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){e.exports=n(95)()},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(136).Buffer}catch(e){}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}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,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("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 i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,f=0,u=n;u1&&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?""};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"],u=[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],l=[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 d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var f=1;f>>26,l=67108863&c,d=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=d;h++){var p=f-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}n.words[f]=0|l,c=0|u}return 0!==c?n.words[f]=0|c:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],h=l[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?b+n:f[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,f=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},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;te.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 n=0;ne.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,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],y=8191&m,v=m>>>13,g=0|a[3],w=8191&g,_=g>>>13,S=0|a[4],k=8191&S,x=S>>>13,E=0|a[5],M=8191&E,C=E>>>13,A=0|a[6],T=8191&A,O=A>>>13,P=0|a[7],I=8191&P,R=P>>>13,j=0|a[8],B=8191&j,N=j>>>13,z=0|a[9],L=8191&z,D=z>>>13,U=0|s[0],F=8191&U,q=U>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],$=8191&K,Y=K>>>13,X=0|s[3],G=8191&X,Q=X>>>13,J=0|s[4],Z=8191&J,ee=J>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,fe=se>>>13,ue=0|s[8],le=8191&ue,de=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(f+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(d,F)|0))<<13)|0;f=((o=Math.imul(d,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(b,F)|0,o=Math.imul(b,q);var ye=(f+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,V)|0))<<13)|0;f=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,F),i=(i=Math.imul(y,q))+Math.imul(v,F)|0,o=Math.imul(v,q),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0;var ve=(f+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Y)|0;var ge=(f+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,G)|0))<<13)|0;f=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(k,F),i=(i=Math.imul(k,q))+Math.imul(x,F)|0,o=Math.imul(x,q),r=r+Math.imul(w,V)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,Y)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Q)|0;var we=(f+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;f=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(C,F)|0,o=Math.imul(C,q),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(r=r+Math.imul(l,ne)|0)|0)+((8191&(i=(i=i+Math.imul(l,re)|0)+Math.imul(d,ne)|0))<<13)|0;f=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(O,F)|0,o=Math.imul(O,q),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0;var Se=(f+(r=r+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;f=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(I,F),i=(i=Math.imul(I,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var ke=(f+(r=r+Math.imul(l,ce)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,ce)|0))<<13)|0;f=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(I,V)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Q)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var xe=(f+(r=r+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;f=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,fe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,de)|0;var Ee=(f+(r=r+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(d,pe)|0))<<13)|0;f=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(D,V)|0,o=Math.imul(D,W),r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,le)|0,o=o+Math.imul(v,de)|0;var Me=(f+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,$),i=(i=Math.imul(L,Y))+Math.imul(D,$)|0,o=Math.imul(D,Y),r=r+Math.imul(B,G)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,fe)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var Ce=(f+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(v,pe)|0))<<13)|0;f=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,G),i=(i=Math.imul(L,Q))+Math.imul(D,G)|0,o=Math.imul(D,Q),r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(C,ce)|0,o=o+Math.imul(C,fe)|0,r=r+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Ae=(f+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,ee))+Math.imul(D,Z)|0,o=Math.imul(D,ee),r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,fe)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,de)|0;var Te=(f+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;f=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(D,ne)|0,o=Math.imul(D,re),r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,r=r+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,fe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Oe=(f+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(C,pe)|0))<<13)|0;f=((o=o+Math.imul(C,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(D,oe)|0,o=Math.imul(D,ae),r=r+Math.imul(B,ce)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,fe)|0,r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,de)|0;var Pe=(f+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(O,pe)|0))<<13)|0;f=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,ce),i=(i=Math.imul(L,fe))+Math.imul(D,ce)|0,o=Math.imul(D,fe),r=r+Math.imul(B,le)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Ie=(f+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(R,pe)|0))<<13)|0;f=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(D,le)|0,o=Math.imul(D,de);var Re=(f+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(N,pe)|0))<<13)|0;f=((o=o+Math.imul(N,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var je=(f+(r=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(D,pe)|0))<<13)|0;return f=((o=Math.imul(D,be))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=ge,c[4]=we,c[5]=_e,c[6]=Se,c[7]=ke,c[8]=xe,c[9]=Ee,c[10]=Me,c[11]=Ce,c[12]=Ae,c[13]=Te,c[14]=Oe,c[15]=Pe,c[16]=Ie,c[17]=Re,c[18]=je,0!==f&&(c[19]=f,n.length++),n};function p(e,t,n){return(new b).mulp(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=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()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,f=0;f=0&&(0!==u||f>=i);f--){var l=0|this.words[f];this.words[f]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},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){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>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(r("number"==typeof e),r(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>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var f=0;f=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!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&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&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 i,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 n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),f=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++f;for(var u=n.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;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(c)):(n.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:n.iushln(f)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},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){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>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,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(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 r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={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 v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){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 r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(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,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):n.strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(v,y),v.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return m[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(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 n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},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(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();r(m=0;r--){for(var f=t.words[r],u=c-1;u>=0;u--){var l=f>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}c=26}return i},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 k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(135)(e))},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=r(101),i=r(102),o=r(49);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=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(c.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 n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!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 P(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var l=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(u=f);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&f)<<6|63&o)>127&&(u=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&f)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=l}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,i){if(!c.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===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),f=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}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},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=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 q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(9))},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 n=t,i=r(5),o=r(7),a=r(73);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s,c=e.andln(3)+n&3,f=t.andln(3)+i&3;if(3===c&&(c=-1),3===f&&(f=-1),0==(1&c))o=0;else o=3!==(s=e.andln(7)+n&7)&&5!==s||2!==f?c:-c;if(r[0].push(o),0==(1&f))a=0;else a=3!==(s=t.andln(7)+i&7)&&5!==s||2!==c?f:-f;r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},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 n=r(7),i=r(2);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 c(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=i,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),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return 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,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,f){var u=0,l=t;return u+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,f){return t+n+o+s+f>>>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){var r,n,i=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{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,f=[],u=!1,l=-1;function d(){u&&c&&(u=!1,c.length?f=c.concat(f):l=-1,f.length&&h())}function h(){if(!u){var e=s(d);u=!0;for(var t=f.length;t;){for(c=f,f=[];++l1)for(var r=1;ro)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c=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 n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){var n; +var r=n(101),i=n(102),o=n(49);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=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(c.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 n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-c),o=n;o>=0;o--){for(var l=!0,d=0;di&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+l<=n)switch(l){case 1:f<128&&(u=f);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&f)<<6|63&o)>127&&(u=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&f)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=l}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),f=this.slice(r,i),u=e.slice(t,n),l=0;li)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-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+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(9))},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,i=n(5),o=n(7),a=n(73);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o,a,s,c=e.andln(3)+r&3,f=t.andln(3)+i&3;if(3===c&&(c=-1),3===f&&(f=-1),0==(1&c))o=0;else o=3!==(s=e.andln(7)+r&7)&&5!==s||2!==f?c:-c;if(n[0].push(o),0==(1&f))a=0;else a=3!==(s=t.andln(7)+i&7)&&5!==s||2!==c?f:-f;n[1].push(a),2*r===o+1&&(r=1-r),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(7),i=n(2);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 c(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=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var c=0,f=t;return c+=(f=f+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,c,f){var u=0,l=t;return u+=(l=l+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,f){return t+r+o+s+f>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t){var n,r,i=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(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,f=[],u=!1,l=-1;function d(){u&&c&&(u=!1,c.length?f=c.concat(f):l=-1,f.length&&h())}function h(){if(!u){var e=s(d);u=!0;for(var t=f.length;t;){for(c=f,f=[];++l1)for(var n=1;no)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var c=0;c=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";var r=n(2),i=n(28),o=n(34),a=n(35),s=n(12);function c(e){s.call(this,"digest"),this._hash=e}r(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new c(a(e))}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(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]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(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,n(6).Buffer)},function(e,t,n){(function(t){e.exports=function(e,n){for(var r=Math.min(e.length,n.length),i=new t(r),o=0;o=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o>>24]^u[p>>>16&255]^l[b>>>8&255]^d[255&m]^t[y++],a=f[p>>>24]^u[b>>>16&255]^l[m>>>8&255]^d[255&h]^t[y++],s=f[b>>>24]^u[m>>>16&255]^l[h>>>8&255]^d[255&p]^t[y++],c=f[m>>>24]^u[h>>>16&255]^l[p>>>8&255]^d[255&b]^t[y++],h=o,p=a,b=s,m=c;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[b>>>8&255]<<8|r[255&m])^t[y++],a=(r[p>>>24]<<24|r[b>>>16&255]<<16|r[m>>>8&255]<<8|r[255&h])^t[y++],s=(r[b>>>24]<<24|r[m>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[y++],c=(r[m>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&b])^t[y++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,n[a]=f,r[f]=a;var u=e[a],l=e[u],d=e[l],h=257*e[f]^16843008*f;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*l^257*u^16843008*a,o[0][f]=h<<24|h>>>8,o[1][f]=h<<16|h>>>16,o[2][f]=h<<8|h>>>24,o[3][f]=h,0===a?a=s=1:(a=u^e[e[e[d^u]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function f(e){this._key=i(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var f=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},f.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=f},function(e,t,n){var r=n(3).Buffer,i=n(28);e.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),c=r.alloc(o||0),f=r.alloc(0);a>0||o>0;){var u=new i;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,f.length),f.copy(s,d,0,l),a-=l}if(l0){var h=c.length-o,p=Math.min(o,f.length-l);f.copy(c,h,l,l+p),o-=p}}return f.fill(0),{key:s,iv:c}}},function(e,t,n){"use strict";var r=n(5),i=n(8),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1,this._bitLength),i=(1<=c;t--)f=(f<<1)+r[t];a.push(f)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(c=0;c=0;f--){for(t=0;f>=0&&0===a[f];f--)t++;if(f>=0&&t++,c=c.dblp(t),f<0)break;var u=a[f];s(0!==u),c="affine"===e.type?u>0?c.mixedAdd(i[u-1>>1]):c.mixedAdd(i[-u-1>>1].neg()):u>0?c.add(i[u-1>>1]):c.add(i[-u-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,n,r,i){for(var s=this._wnafT1,c=this._wnafT2,f=this._wnafT3,u=0,l=0;l=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[h],n[p]);u=Math.max(y[0].length,u),f[h]=new Array(u),f[p]=new Array(u);for(var v=0;v=0;l--){for(var k=0;l>=0;){var x=!0;for(v=0;v=0&&k++,_=_.dblp(k),l<0)break;for(v=0;v0?E=c[v][M-1>>1]:M<0&&(E=c[v][-M-1>>1].neg()),_="affine"===E.type?_.mixedAdd(E):_.add(E))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i=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=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o>>24]^u[p>>>16&255]^l[b>>>8&255]^d[255&m]^t[y++],a=f[p>>>24]^u[b>>>16&255]^l[m>>>8&255]^d[255&h]^t[y++],s=f[b>>>24]^u[m>>>16&255]^l[h>>>8&255]^d[255&p]^t[y++],c=f[m>>>24]^u[h>>>16&255]^l[p>>>8&255]^d[255&b]^t[y++],h=o,p=a,b=s,m=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&m])^t[y++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[m>>>8&255]<<8|n[255&h])^t[y++],s=(n[b>>>24]<<24|n[m>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[y++],c=(n[m>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[y++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[a]=f,n[f]=a;var u=e[a],l=e[u],d=e[l],h=257*e[f]^16843008*f;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*l^257*u^16843008*a,o[0][f]=h<<24|h>>>8,o[1][f]=h<<16|h>>>16,o[2][f]=h<<8|h>>>24,o[3][f]=h,0===a?a=s=1:(a=u^e[e[e[d^u]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function f(e){this._key=i(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),i[o]=i[o-t]^a}for(var f=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},f.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=f},function(e,t,r){var n=r(3).Buffer,i=r(28);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),c=n.alloc(o||0),f=n.alloc(0);a>0||o>0;){var u=new i;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,f.length),f.copy(s,d,0,l),a-=l}if(l0){var h=c.length-o,p=Math.min(o,f.length-l);f.copy(c,h,l,l+p),o-=p}}return f.fill(0),{key:s,iv:c}}},function(e,t,r){"use strict";var n=r(5),i=r(8),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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 f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=c;t--)f=(f<<1)+n[t];a.push(f)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(c=0;c=0;f--){for(t=0;f>=0&&0===a[f];f--)t++;if(f>=0&&t++,c=c.dblp(t),f<0)break;var u=a[f];s(0!==u),c="affine"===e.type?u>0?c.mixedAdd(i[u-1>>1]):c.mixedAdd(i[-u-1>>1].neg()):u>0?c.add(i[u-1>>1]):c.add(i[-u-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,c=this._wnafT2,f=this._wnafT3,u=0,l=0;l=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=a(r[h],r[p]);u=Math.max(y[0].length,u),f[h]=new Array(u),f[p]=new Array(u);for(var v=0;v=0;l--){for(var k=0;l>=0;){var x=!0;for(v=0;v=0&&k++,_=_.dblp(k),l<0)break;for(v=0;v0?E=c[v][C-1>>1]:C<0&&(E=c[v][-C-1>>1].neg()),_="affine"===E.type?_.mixedAdd(E):_.add(E))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i>>32-t}function f(e,t,r,n,i,o,a){return c(e+(t&r|~t&n)+i+o|0,a)+t|0}function u(e,t,r,n,i,o,a){return c(e+(t&n|r&~n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return c(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return c(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,e[0],3614090360,7),o=f(o,r,n,i,e[1],3905402710,12),i=f(i,o,r,n,e[2],606105819,17),n=f(n,i,o,r,e[3],3250441966,22),r=f(r,n,i,o,e[4],4118548399,7),o=f(o,r,n,i,e[5],1200080426,12),i=f(i,o,r,n,e[6],2821735955,17),n=f(n,i,o,r,e[7],4249261313,22),r=f(r,n,i,o,e[8],1770035416,7),o=f(o,r,n,i,e[9],2336552879,12),i=f(i,o,r,n,e[10],4294925233,17),n=f(n,i,o,r,e[11],2304563134,22),r=f(r,n,i,o,e[12],1804603682,7),o=f(o,r,n,i,e[13],4254626195,12),i=f(i,o,r,n,e[14],2792965006,17),r=u(r,n=f(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,r,n,i,e[6],3225465664,9),i=u(i,o,r,n,e[11],643717713,14),n=u(n,i,o,r,e[0],3921069994,20),r=u(r,n,i,o,e[5],3593408605,5),o=u(o,r,n,i,e[10],38016083,9),i=u(i,o,r,n,e[15],3634488961,14),n=u(n,i,o,r,e[4],3889429448,20),r=u(r,n,i,o,e[9],568446438,5),o=u(o,r,n,i,e[14],3275163606,9),i=u(i,o,r,n,e[3],4107603335,14),n=u(n,i,o,r,e[8],1163531501,20),r=u(r,n,i,o,e[13],2850285829,5),o=u(o,r,n,i,e[2],4243563512,9),i=u(i,o,r,n,e[7],1735328473,14),r=l(r,n=u(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,r,n,i,e[8],2272392833,11),i=l(i,o,r,n,e[11],1839030562,16),n=l(n,i,o,r,e[14],4259657740,23),r=l(r,n,i,o,e[1],2763975236,4),o=l(o,r,n,i,e[4],1272893353,11),i=l(i,o,r,n,e[7],4139469664,16),n=l(n,i,o,r,e[10],3200236656,23),r=l(r,n,i,o,e[13],681279174,4),o=l(o,r,n,i,e[0],3936430074,11),i=l(i,o,r,n,e[3],3572445317,16),n=l(n,i,o,r,e[6],76029189,23),r=l(r,n,i,o,e[9],3654602809,4),o=l(o,r,n,i,e[12],3873151461,11),i=l(i,o,r,n,e[15],530742520,16),r=d(r,n=l(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|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){e.exports=i;var n=r(30).EventEmitter;function i(){n.call(this)}r(2)(i,n),i.Readable=r(31),i.Writable=r(108),i.Duplex=r(109),i.Transform=r(110),i.PassThrough=r(111),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",f),e.on("error",f),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.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,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(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]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var f=c.length,u=b(c,f);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){(t=e.exports=r(51)).Stream=t,t.Readable=t,t.Writable=r(32),t.Duplex=r(13),t.Transform=r(54),t.PassThrough=r(107)},function(e,t,r){"use strict";(function(t,n,i){var o=r(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;v.WritableState=y;var f=r(18);f.inherits=r(2);var u={deprecate:r(106)},l=r(52),d=r(3).Buffer,h=i.Uint8Array||function(){};var p,b=r(53);function m(){}function y(e,t){s=s||r(13),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,f=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:u,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,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),x(e,t))}(e,r,n,t,i);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?c(w,e,r,a,i):w(e,r,a,i)}}(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 v(e){if(s=s||r(13),!(p.call(v,this)||this instanceof s))return new v(e);this._writableState=new y(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,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)i[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;i.allBuffers=c,g(e,t,!0,t.length,i,"",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 f=r.chunk,u=r.encoding,l=r.callback;if(g(e,t,!1,t.objectMode?1:f.length,f,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}f.inherits(v,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.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(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof y)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n 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=i.defaultEncoding),"function"!=typeof r&&(r=m),i.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,n){var i=!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(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,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,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var n=this._writableState;"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||n.finished||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(11),r(48).setImmediate,r(9))},function(e,t,r){"use strict";var n=r(3).Buffer,i=n.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&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.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 c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 f(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 u(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=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},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 n=r(6).Buffer,i=r(2),o=r(50),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],c=[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],f=[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],u=[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<>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(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,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,x=0|this._e,E=0;E<80;E+=1){var C,M;E<16?(C=b(r,n,i,o,h,e[s[E]],l[0],f[E]),M=g(w,_,S,k,x,e[c[E]],d[0],u[E])):E<32?(C=m(r,n,i,o,h,e[s[E]],l[1],f[E]),M=v(w,_,S,k,x,e[c[E]],d[1],u[E])):E<48?(C=y(r,n,i,o,h,e[s[E]],l[2],f[E]),M=y(w,_,S,k,x,e[c[E]],d[2],u[E])):E<64?(C=v(r,n,i,o,h,e[s[E]],l[3],f[E]),M=m(w,_,S,k,x,e[c[E]],d[3],u[E])):(C=g(r,n,i,o,h,e[s[E]],l[4],f[E]),M=b(w,_,S,k,x,e[c[E]],d[4],u[E])),r=h,h=o,o=p(i,10),i=n,n=C,w=x,x=k,k=p(S,10),S=_,_=M}var T=this._b+i+k|0;this._b=this._c+o+x|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=T},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=n.alloc?n.alloc(20):new n(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(112),t.sha1=r(113),t.sha224=r(114),t.sha256=r(55),t.sha384=r(115),t.sha512=r(56)},function(e,t,r){"use strict";var n=r(7);function i(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=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.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},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=o,o.getr=a}).call(this,r(6).Buffer)},function(e,t,r){"use strict";var n=t;n.version=r(142).version,n.utils=r(8),n.rand=r(39),n.curve=r(74),n.curves=r(42),n.ec=r(153),n.eddsa=r(157)},function(e,t,r){"use strict";var n,i=t,o=r(43),a=r(74),s=r(8).assert;function c(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 f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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{n=r(152)}catch(e){n=void 0}f("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",n]})},function(e,t,r){var n=t;n.utils=r(10),n.common=r(20),n.sha=r(146),n.ripemd=r(150),n.hmac=r(151),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){e.exports=function e(t){"use strict";var r=/^\0+/g,n=/[\0\r\f]/g,i=/: */g,o=/zoo|gra/,a=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,f=/ *[\0] */g,u=/,\r+?/g,l=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,h=/\W+/g,p=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,m=/:(read-only)/g,y=/\s+(?=[{\];=:>])/g,v=/([[}=:>])\s+/g,g=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,_=/([^\(])(:+) */g,S=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,E=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,M=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,A="-webkit-",P="-moz-",I="-ms-",O=59,R=125,j=123,B=40,N=41,z=91,L=93,D=10,U=13,F=9,q=64,H=32,W=38,K=45,V=95,$=42,Y=44,X=58,G=39,Q=34,J=47,Z=62,ee=43,te=126,re=0,ne=12,ie=11,oe=107,ae=109,se=115,ce=112,fe=111,ue=105,le=99,de=100,he=112,pe=1,be=1,me=0,ye=1,ve=1,ge=1,we=0,_e=0,Se=0,ke=[],xe=[],Ee=0,Ce=null,Me=-2,Te=-1,Ae=0,Pe=1,Ie=2,Oe=3,Re=0,je=1,Be="",Ne="",ze="";function Le(e,t,i,o,a){for(var s,c,u=0,l=0,d=0,h=0,y=0,v=0,g=0,w=0,S=0,x=0,E=0,C=0,M=0,T=0,V=0,we=0,xe=0,Ce=0,Me=0,Te=i.length,Ue=Te-1,Ve="",$e="",Ye="",Xe="",Ge="",Qe="";V0&&($e=$e.replace(n,"")),$e.trim().length>0)){switch(g){case H:case F:case O:case U:case D:break;default:$e+=i.charAt(V)}g=O}if(1===xe)switch(g){case j:case R:case O:case Q:case G:case B:case N:case Y:xe=0;case F:case U:case D:case H:break;default:for(xe=0,Me=V,y=g,V--,g=O;Me0&&(++V,g=y);case j:Me=Te}}switch(g){case j:for(y=($e=$e.trim()).charCodeAt(0),E=1,Me=++V;V0&&($e=$e.replace(n,"")),v=$e.charCodeAt(1)){case de:case ae:case se:case K:s=t;break;default:s=ke}if(Me=(Ye=Le(t,s,Ye,v,a+1)).length,Se>0&&0===Me&&(Me=$e.length),Ee>0&&(s=De(ke,$e,Ce),c=We(Oe,Ye,s,t,be,pe,Me,v,a,o),$e=s.join(""),void 0!==c&&0===(Me=(Ye=c.trim()).length)&&(v=0,Ye="")),Me>0)switch(v){case se:$e=$e.replace(k,He);case de:case ae:case K:Ye=$e+"{"+Ye+"}";break;case oe:Ye=($e=$e.replace(p,"$1 $2"+(je>0?Be:"")))+"{"+Ye+"}",Ye=1===ve||2===ve&&qe("@"+Ye,3)?"@"+A+Ye+"@"+Ye:"@"+Ye;break;default:Ye=$e+Ye,o===he&&(Xe+=Ye,Ye="")}else Ye="";break;default:Ye=Le(t,De(t,$e,Ce),Ye,o,a+1)}Ge+=Ye,C=0,xe=0,T=0,we=0,Ce=0,M=0,$e="",Ye="",g=i.charCodeAt(++V);break;case R:case O:if((Me=($e=(we>0?$e.replace(n,""):$e).trim()).length)>1)switch(0===T&&((y=$e.charCodeAt(0))===K||y>96&&y<123)&&(Me=($e=$e.replace(" ",":")).length),Ee>0&&void 0!==(c=We(Pe,$e,t,e,be,pe,Xe.length,o,a,o))&&0===(Me=($e=c.trim()).length)&&($e="\0\0"),y=$e.charCodeAt(0),v=$e.charCodeAt(1),y){case re:break;case q:if(v===ue||v===le){Qe+=$e+i.charAt(V);break}default:if($e.charCodeAt(Me-1)===X)break;Xe+=Fe($e,y,v,$e.charCodeAt(2))}C=0,xe=0,T=0,we=0,Ce=0,$e="",g=i.charCodeAt(++V)}}switch(g){case U:case D:if(l+h+d+u+_e===0)switch(x){case N:case G:case Q:case q:case te:case Z:case $:case ee:case J:case K:case X:case Y:case O:case j:case R:break;default:T>0&&(xe=1)}l===J?l=0:ye+C===0&&o!==oe&&$e.length>0&&(we=1,$e+="\0"),Ee*Re>0&&We(Ae,$e,t,e,be,pe,Xe.length,o,a,o),pe=1,be++;break;case O:case R:if(l+h+d+u===0){pe++;break}default:switch(pe++,Ve=i.charAt(V),g){case F:case H:if(h+u+l===0)switch(w){case Y:case X:case F:case H:Ve="";break;default:g!==H&&(Ve=" ")}break;case re:Ve="\\0";break;case ne:Ve="\\f";break;case ie:Ve="\\v";break;case W:h+l+u===0&&ye>0&&(Ce=1,we=1,Ve="\f"+Ve);break;case 108:if(h+l+u+me===0&&T>0)switch(V-T){case 2:w===ce&&i.charCodeAt(V-3)===X&&(me=w);case 8:S===fe&&(me=S)}break;case X:h+l+u===0&&(T=V);break;case Y:l+d+h+u===0&&(we=1,Ve+="\r");break;case Q:case G:0===l&&(h=h===g?0:0===h?g:h);break;case z:h+l+d===0&&u++;break;case L:h+l+d===0&&u--;break;case N:h+l+u===0&&d--;break;case B:if(h+l+u===0){if(0===C)switch(2*w+3*S){case 533:break;default:E=0,C=1}d++}break;case q:l+d+h+u+T+M===0&&(M=1);break;case $:case J:if(h+u+d>0)break;switch(l){case 0:switch(2*g+3*i.charCodeAt(V+1)){case 235:l=J;break;case 220:Me=V,l=$}break;case $:g===J&&w===$&&Me+2!==V&&(33===i.charCodeAt(Me+2)&&(Xe+=i.substring(Me,V+1)),Ve="",l=0)}}if(0===l){if(ye+h+u+M===0&&o!==oe&&g!==O)switch(g){case Y:case te:case Z:case ee:case N:case B:if(0===C){switch(w){case F:case H:case D:case U:Ve+="\0";break;default:Ve="\0"+Ve+(g===Y?"":"\0")}we=1}else switch(g){case B:T+7===V&&108===w&&(T=0),C=++E;break;case N:0==(C=--E)&&(we=1,Ve+="\0")}break;case F:case H:switch(w){case re:case j:case R:case O:case Y:case ne:case F:case H:case D:case U:break;default:0===C&&(we=1,Ve+="\0")}}$e+=Ve,g!==H&&g!==F&&(x=g)}}S=w,w=g,V++}if(Me=Xe.length,Se>0&&0===Me&&0===Ge.length&&0===t[0].length==0&&(o!==ae||1===t.length&&(ye>0?Ne:ze)===t[0])&&(Me=t.join(",").length+2),Me>0){if(s=0===ye&&o!==oe?function(e){for(var t,r,i=0,o=e.length,a=Array(o);i1)){if(d=c.charCodeAt(c.length-1),h=r.charCodeAt(0),t="",0!==u)switch(d){case $:case te:case Z:case ee:case H:case B:break;default:t=" "}switch(h){case W:r=t+Ne;case te:case Z:case ee:case H:case N:case B:break;case z:r=t+r+Ne;break;case X:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(ge>0){r=t+r.substring(8,l-1);break}default:(u<1||s[u-1].length<1)&&(r=t+Ne+r)}break;case Y:t="";default:r=l>1&&r.indexOf(":")>0?t+r.replace(_,"$1"+Ne+"$2"):t+r+Ne}c+=r}a[i]=c.replace(n,"").trim()}return a}(t):t,Ee>0&&void 0!==(c=We(Ie,Xe,s,e,be,pe,Me,o,a,o))&&0===(Xe=c).length)return Qe+Xe+Ge;if(Xe=s.join(",")+"{"+Xe+"}",ve*me!=0){switch(2!==ve||qe(Xe,2)||(me=0),me){case fe:Xe=Xe.replace(m,":"+P+"$1")+Xe;break;case ce:Xe=Xe.replace(b,"::"+A+"input-$1")+Xe.replace(b,"::"+P+"$1")+Xe.replace(b,":"+I+"input-$1")+Xe}me=0}}return Qe+Xe+Ge}function De(e,t,r){var n=t.trim().split(u),i=n,o=n.length,a=e.length;switch(a){case 0:case 1:for(var s=0,c=0===a?"":e[0]+" ";s0&&ye>0)return i.replace(d,"$1").replace(l,"$1"+ze);break;default:return e.trim()+i.replace(l,"$1"+e.trim())}default:if(r*ye>0&&i.indexOf("\f")>0)return i.replace(l,(e.charCodeAt(0)===X?"":"$1")+e.trim())}return e+i}function Fe(e,t,r,n){var f,u=0,l=e+";",d=2*t+3*r+4*n;if(944===d)return function(e){var t=e.length,r=e.indexOf(":",9)+1,n=e.substring(0,r).trim(),i=e.substring(r,t-1).trim();switch(e.charCodeAt(9)*je){case 0:break;case K:if(110!==e.charCodeAt(10))break;default:var o=i.split((i="",s)),a=0;for(r=0,t=o.length;aq&&l<90||l>96&&l<123||l===V||l===K&&f.charCodeAt(1)!==K))switch(isNaN(parseFloat(f))+(-1!==f.indexOf("("))){case 1:switch(f){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:f+=Be}}u[r++]=f}i+=(0===a?"":",")+u.join(" ")}}return i=n+i+";",1===ve||2===ve&&qe(i,1)?A+i+i:i}(l);if(0===ve||2===ve&&!qe(l,1))return l;switch(d){case 1015:return 97===l.charCodeAt(10)?A+l+l:l;case 951:return 116===l.charCodeAt(3)?A+l+l:l;case 963:return 110===l.charCodeAt(5)?A+l+l:l;case 1009:if(100!==l.charCodeAt(4))break;case 969:case 942:return A+l+l;case 978:return A+l+P+l+l;case 1019:case 983:return A+l+P+l+I+l+l;case 883:return l.charCodeAt(8)===K?A+l+l:l.indexOf("image-set(",11)>0?l.replace(T,"$1"+A+"$2")+l:l;case 932:if(l.charCodeAt(4)===K)switch(l.charCodeAt(5)){case 103:return A+"box-"+l.replace("-grow","")+A+l+I+l.replace("grow","positive")+l;case 115:return A+l+I+l.replace("shrink","negative")+l;case 98:return A+l+I+l.replace("basis","preferred-size")+l}return A+l+I+l+l;case 964:return A+l+I+"flex-"+l+l;case 1023:if(99!==l.charCodeAt(8))break;return f=l.substring(l.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),A+"box-pack"+f+A+l+I+"flex-pack"+f+l;case 1005:return o.test(l)?l.replace(i,":"+A)+l.replace(i,":"+P)+l:l;case 1e3:switch(u=(f=l.substring(13).trim()).indexOf("-")+1,f.charCodeAt(0)+f.charCodeAt(u)){case 226:f=l.replace(S,"tb");break;case 232:f=l.replace(S,"tb-rl");break;case 220:f=l.replace(S,"lr");break;default:return l}return A+l+I+f+l;case 1017:if(-1===l.indexOf("sticky",9))return l;case 975:switch(u=(l=e).length-10,d=(f=(33===l.charCodeAt(u)?l.substring(0,u):l).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|f.charCodeAt(7))){case 203:if(f.charCodeAt(8)<111)break;case 115:l=l.replace(f,A+f)+";"+l;break;case 207:case 102:l=l.replace(f,A+(d>102?"inline-":"")+"box")+";"+l.replace(f,A+f)+";"+l.replace(f,I+f+"box")+";"+l}return l+";";case 938:if(l.charCodeAt(5)===K)switch(l.charCodeAt(6)){case 105:return f=l.replace("-items",""),A+l+A+"box-"+f+I+"flex-"+f+l;case 115:return A+l+I+"flex-item-"+l.replace(E,"")+l;default:return A+l+I+"flex-line-pack"+l.replace("align-content","").replace(E,"")+l}break;case 973:case 989:if(l.charCodeAt(3)!==K||122===l.charCodeAt(4))break;case 931:case 953:if(!0===M.test(e))return 115===(f=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Fe(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):l.replace(f,A+f)+l.replace(f,P+f.replace("fill-",""))+l;break;case 962:if(l=A+l+(102===l.charCodeAt(5)?I+l:"")+l,r+n===211&&105===l.charCodeAt(13)&&l.indexOf("transform",10)>0)return l.substring(0,l.indexOf(";",27)+1).replace(a,"$1"+A+"$2")+l}return l}function qe(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10),i=e.substring(r+1,e.length-1);return Ce(2!==t?n:n.replace(C,"$1"),i,t)}function He(e,t){var r=Fe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(x," or ($1)").substring(4):"("+t+")"}function We(e,t,r,n,i,o,a,s,c,f){for(var u,l=0,d=t;l0&&(Be=i.replace(h,o===z?"":"-")),o=1,1===ye?ze=i:Ne=i;var a,s=[ze];Ee>0&&void 0!==(a=We(Te,r,s,s,be,pe,0,0,0,0))&&"string"==typeof a&&(r=a);var c=Le(ke,s,r,0,0);return Ee>0&&void 0!==(a=We(Me,c,s,s,be,pe,c.length,0,0,0))&&"string"!=typeof(c=a)&&(o=0),Be="",ze="",Ne="",me=0,be=1,pe=1,we*o==0?c:c.replace(n,"").replace(y,"").replace(v,"$1").replace(g,"$1").replace(w," ")}return $e.use=function e(t){switch(t){case void 0:case null:Ee=xe.length=0;break;default:if("function"==typeof t)xe[Ee++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r>>32-t}function f(e,t,n,r,i,o,a){return c(e+(t&n|~t&r)+i+o|0,a)+t|0}function u(e,t,n,r,i,o,a){return c(e+(t&r|n&~r)+i+o|0,a)+t|0}function l(e,t,n,r,i,o,a){return c(e+(t^n^r)+i+o|0,a)+t|0}function d(e,t,n,r,i,o,a){return c(e+(n^(t|~r))+i+o|0,a)+t|0}r(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=f(n,r,i,o,e[0],3614090360,7),o=f(o,n,r,i,e[1],3905402710,12),i=f(i,o,n,r,e[2],606105819,17),r=f(r,i,o,n,e[3],3250441966,22),n=f(n,r,i,o,e[4],4118548399,7),o=f(o,n,r,i,e[5],1200080426,12),i=f(i,o,n,r,e[6],2821735955,17),r=f(r,i,o,n,e[7],4249261313,22),n=f(n,r,i,o,e[8],1770035416,7),o=f(o,n,r,i,e[9],2336552879,12),i=f(i,o,n,r,e[10],4294925233,17),r=f(r,i,o,n,e[11],2304563134,22),n=f(n,r,i,o,e[12],1804603682,7),o=f(o,n,r,i,e[13],4254626195,12),i=f(i,o,n,r,e[14],2792965006,17),n=u(n,r=f(r,i,o,n,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,n,r,i,e[6],3225465664,9),i=u(i,o,n,r,e[11],643717713,14),r=u(r,i,o,n,e[0],3921069994,20),n=u(n,r,i,o,e[5],3593408605,5),o=u(o,n,r,i,e[10],38016083,9),i=u(i,o,n,r,e[15],3634488961,14),r=u(r,i,o,n,e[4],3889429448,20),n=u(n,r,i,o,e[9],568446438,5),o=u(o,n,r,i,e[14],3275163606,9),i=u(i,o,n,r,e[3],4107603335,14),r=u(r,i,o,n,e[8],1163531501,20),n=u(n,r,i,o,e[13],2850285829,5),o=u(o,n,r,i,e[2],4243563512,9),i=u(i,o,n,r,e[7],1735328473,14),n=l(n,r=u(r,i,o,n,e[12],2368359562,20),i,o,e[5],4294588738,4),o=l(o,n,r,i,e[8],2272392833,11),i=l(i,o,n,r,e[11],1839030562,16),r=l(r,i,o,n,e[14],4259657740,23),n=l(n,r,i,o,e[1],2763975236,4),o=l(o,n,r,i,e[4],1272893353,11),i=l(i,o,n,r,e[7],4139469664,16),r=l(r,i,o,n,e[10],3200236656,23),n=l(n,r,i,o,e[13],681279174,4),o=l(o,n,r,i,e[0],3936430074,11),i=l(i,o,n,r,e[3],3572445317,16),r=l(r,i,o,n,e[6],76029189,23),n=l(n,r,i,o,e[9],3654602809,4),o=l(o,n,r,i,e[12],3873151461,11),i=l(i,o,n,r,e[15],530742520,16),n=d(n,r=l(r,i,o,n,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,n,r,i,e[7],1126891415,10),i=d(i,o,n,r,e[14],2878612391,15),r=d(r,i,o,n,e[5],4237533241,21),n=d(n,r,i,o,e[12],1700485571,6),o=d(o,n,r,i,e[3],2399980690,10),i=d(i,o,n,r,e[10],4293915773,15),r=d(r,i,o,n,e[1],2240044497,21),n=d(n,r,i,o,e[8],1873313359,6),o=d(o,n,r,i,e[15],4264355552,10),i=d(i,o,n,r,e[6],2734768916,15),r=d(r,i,o,n,e[13],1309151649,21),n=d(n,r,i,o,e[4],4149444226,6),o=d(o,n,r,i,e[11],3174756917,10),i=d(i,o,n,r,e[2],718787259,15),r=d(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|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,n){e.exports=i;var r=n(30).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(31),i.Writable=n(108),i.Duplex=n(109),i.Transform=n(110),i.PassThrough=n(111),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,e.end())}function c(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",f),e.on("error",f),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.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,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function f(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function l(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var f=c.length,u=b(c,f);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(51)).Stream=t,t.Readable=t,t.Writable=n(32),t.Duplex=n(13),t.Transform=n(54),t.PassThrough=n(107)},function(e,t,n){"use strict";(function(t,r,i){var o=n(22);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;v.WritableState=y;var f=n(17);f.inherits=n(2);var u={deprecate:n(106)},l=n(52),d=n(3).Buffer,h=i.Uint8Array||function(){};var p,b=n(53);function m(){}function y(e,t){s=s||n(13),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,f=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(f||0===f)?f:u,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 n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),x(e,t))}(e,n,r,t,i);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),r?c(w,e,n,a,i):w(e,n,a,i)}}(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 v(e){if(s=s||n(13),!(p.call(v,this)||this instanceof s))return new v(e);this._writableState=new y(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,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,g(e,t,!0,t.length,i,"",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(;n;){var f=n.chunk,u=n.encoding,l=n.callback;if(g(e,t,!1,t.objectMode?1:f.length,f,u,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}f.inherits(v,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.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(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof y)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,d.isBuffer(r)||r instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(11),n(48).setImmediate,n(9))},function(e,t,n){"use strict";var r=n(3).Buffer,i=r.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&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.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,n=function(e,t,n){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!==n?n: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 c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?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-n))}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,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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,n){"use strict";var r=n(6).Buffer,i=n(2),o=n(50),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],c=[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],f=[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],u=[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<>>32-t}function b(e,t,n,r,i,o,a,s){return p(e+(t^n^r)+o+a|0,s)+i|0}function m(e,t,n,r,i,o,a,s){return p(e+(t&n|~t&r)+o+a|0,s)+i|0}function y(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function v(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~r)+o+a|0,s)+i|0}function g(e,t,n,r,i,o,a,s){return p(e+(t^(n|~r))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,x=0|this._e,E=0;E<80;E+=1){var M,C;E<16?(M=b(n,r,i,o,h,e[s[E]],l[0],f[E]),C=g(w,_,S,k,x,e[c[E]],d[0],u[E])):E<32?(M=m(n,r,i,o,h,e[s[E]],l[1],f[E]),C=v(w,_,S,k,x,e[c[E]],d[1],u[E])):E<48?(M=y(n,r,i,o,h,e[s[E]],l[2],f[E]),C=y(w,_,S,k,x,e[c[E]],d[2],u[E])):E<64?(M=v(n,r,i,o,h,e[s[E]],l[3],f[E]),C=m(w,_,S,k,x,e[c[E]],d[3],u[E])):(M=g(n,r,i,o,h,e[s[E]],l[4],f[E]),C=b(w,_,S,k,x,e[c[E]],d[4],u[E])),n=h,h=o,o=p(i,10),i=r,r=M,w=x,x=k,k=p(S,10),S=_,_=C}var A=this._b+i+k|0;this._b=this._c+o+x|0,this._c=this._d+h+w|0,this._d=this._e+n+_|0,this._e=this._a+r+S|0,this._a=A},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=r.alloc?r.alloc(20):new r(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,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(112),t.sha1=n(113),t.sha224=n(114),t.sha256=n(55),t.sha384=n(115),t.sha512=n(56)},function(e,t,n){"use strict";var r=n(7);function i(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=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new r(i(t));return n}e.exports=o,o.getr=a}).call(this,n(6).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(142).version,r.utils=n(8),r.rand=n(39),r.curve=n(74),r.curves=n(42),r.ec=n(153),r.eddsa=n(157)},function(e,t,n){"use strict";var r,i=t,o=n(43),a=n(74),s=n(8).assert;function c(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 f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=c,f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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{r=n(152)}catch(e){r=void 0}f("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",r]})},function(e,t,n){var r=t;r.utils=n(10),r.common=n(19),r.sha=n(146),r.ripemd=n(150),r.hmac=n(151),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,i=/: */g,o=/zoo|gra/,a=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,f=/ *[\0] */g,u=/,\r+?/g,l=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,h=/\W+/g,p=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,m=/:(read-only)/g,y=/\s+(?=[{\];=:>])/g,v=/([[}=:>])\s+/g,g=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,_=/([^\(])(:+) */g,S=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,E=/-self|flex-/g,M=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,T="-webkit-",O="-moz-",P="-ms-",I=59,R=125,j=123,B=40,N=41,z=91,L=93,D=10,U=13,F=9,q=64,H=32,V=38,W=45,K=95,$=42,Y=44,X=58,G=39,Q=34,J=47,Z=62,ee=43,te=126,ne=0,re=12,ie=11,oe=107,ae=109,se=115,ce=112,fe=111,ue=105,le=99,de=100,he=112,pe=1,be=1,me=0,ye=1,ve=1,ge=1,we=0,_e=0,Se=0,ke=[],xe=[],Ee=0,Me=null,Ce=-2,Ae=-1,Te=0,Oe=1,Pe=2,Ie=3,Re=0,je=1,Be="",Ne="",ze="";function Le(e,t,i,o,a){for(var s,c,u=0,l=0,d=0,h=0,y=0,v=0,g=0,w=0,S=0,x=0,E=0,M=0,C=0,A=0,K=0,we=0,xe=0,Me=0,Ce=0,Ae=i.length,Ue=Ae-1,Ke="",$e="",Ye="",Xe="",Ge="",Qe="";K0&&($e=$e.replace(r,"")),$e.trim().length>0)){switch(g){case H:case F:case I:case U:case D:break;default:$e+=i.charAt(K)}g=I}if(1===xe)switch(g){case j:case R:case I:case Q:case G:case B:case N:case Y:xe=0;case F:case U:case D:case H:break;default:for(xe=0,Ce=K,y=g,K--,g=I;Ce0&&(++K,g=y);case j:Ce=Ae}}switch(g){case j:for(y=($e=$e.trim()).charCodeAt(0),E=1,Ce=++K;K0&&($e=$e.replace(r,"")),v=$e.charCodeAt(1)){case de:case ae:case se:case W:s=t;break;default:s=ke}if(Ce=(Ye=Le(t,s,Ye,v,a+1)).length,Se>0&&0===Ce&&(Ce=$e.length),Ee>0&&(s=De(ke,$e,Me),c=Ve(Ie,Ye,s,t,be,pe,Ce,v,a,o),$e=s.join(""),void 0!==c&&0===(Ce=(Ye=c.trim()).length)&&(v=0,Ye="")),Ce>0)switch(v){case se:$e=$e.replace(k,He);case de:case ae:case W:Ye=$e+"{"+Ye+"}";break;case oe:Ye=($e=$e.replace(p,"$1 $2"+(je>0?Be:"")))+"{"+Ye+"}",Ye=1===ve||2===ve&&qe("@"+Ye,3)?"@"+T+Ye+"@"+Ye:"@"+Ye;break;default:Ye=$e+Ye,o===he&&(Xe+=Ye,Ye="")}else Ye="";break;default:Ye=Le(t,De(t,$e,Me),Ye,o,a+1)}Ge+=Ye,M=0,xe=0,A=0,we=0,Me=0,C=0,$e="",Ye="",g=i.charCodeAt(++K);break;case R:case I:if((Ce=($e=(we>0?$e.replace(r,""):$e).trim()).length)>1)switch(0===A&&((y=$e.charCodeAt(0))===W||y>96&&y<123)&&(Ce=($e=$e.replace(" ",":")).length),Ee>0&&void 0!==(c=Ve(Oe,$e,t,e,be,pe,Xe.length,o,a,o))&&0===(Ce=($e=c.trim()).length)&&($e="\0\0"),y=$e.charCodeAt(0),v=$e.charCodeAt(1),y){case ne:break;case q:if(v===ue||v===le){Qe+=$e+i.charAt(K);break}default:if($e.charCodeAt(Ce-1)===X)break;Xe+=Fe($e,y,v,$e.charCodeAt(2))}M=0,xe=0,A=0,we=0,Me=0,$e="",g=i.charCodeAt(++K)}}switch(g){case U:case D:if(l+h+d+u+_e===0)switch(x){case N:case G:case Q:case q:case te:case Z:case $:case ee:case J:case W:case X:case Y:case I:case j:case R:break;default:A>0&&(xe=1)}l===J?l=0:ye+M===0&&o!==oe&&$e.length>0&&(we=1,$e+="\0"),Ee*Re>0&&Ve(Te,$e,t,e,be,pe,Xe.length,o,a,o),pe=1,be++;break;case I:case R:if(l+h+d+u===0){pe++;break}default:switch(pe++,Ke=i.charAt(K),g){case F:case H:if(h+u+l===0)switch(w){case Y:case X:case F:case H:Ke="";break;default:g!==H&&(Ke=" ")}break;case ne:Ke="\\0";break;case re:Ke="\\f";break;case ie:Ke="\\v";break;case V:h+l+u===0&&ye>0&&(Me=1,we=1,Ke="\f"+Ke);break;case 108:if(h+l+u+me===0&&A>0)switch(K-A){case 2:w===ce&&i.charCodeAt(K-3)===X&&(me=w);case 8:S===fe&&(me=S)}break;case X:h+l+u===0&&(A=K);break;case Y:l+d+h+u===0&&(we=1,Ke+="\r");break;case Q:case G:0===l&&(h=h===g?0:0===h?g:h);break;case z:h+l+d===0&&u++;break;case L:h+l+d===0&&u--;break;case N:h+l+u===0&&d--;break;case B:if(h+l+u===0){if(0===M)switch(2*w+3*S){case 533:break;default:E=0,M=1}d++}break;case q:l+d+h+u+A+C===0&&(C=1);break;case $:case J:if(h+u+d>0)break;switch(l){case 0:switch(2*g+3*i.charCodeAt(K+1)){case 235:l=J;break;case 220:Ce=K,l=$}break;case $:g===J&&w===$&&Ce+2!==K&&(33===i.charCodeAt(Ce+2)&&(Xe+=i.substring(Ce,K+1)),Ke="",l=0)}}if(0===l){if(ye+h+u+C===0&&o!==oe&&g!==I)switch(g){case Y:case te:case Z:case ee:case N:case B:if(0===M){switch(w){case F:case H:case D:case U:Ke+="\0";break;default:Ke="\0"+Ke+(g===Y?"":"\0")}we=1}else switch(g){case B:A+7===K&&108===w&&(A=0),M=++E;break;case N:0==(M=--E)&&(we=1,Ke+="\0")}break;case F:case H:switch(w){case ne:case j:case R:case I:case Y:case re:case F:case H:case D:case U:break;default:0===M&&(we=1,Ke+="\0")}}$e+=Ke,g!==H&&g!==F&&(x=g)}}S=w,w=g,K++}if(Ce=Xe.length,Se>0&&0===Ce&&0===Ge.length&&0===t[0].length==0&&(o!==ae||1===t.length&&(ye>0?Ne:ze)===t[0])&&(Ce=t.join(",").length+2),Ce>0){if(s=0===ye&&o!==oe?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(d=c.charCodeAt(c.length-1),h=n.charCodeAt(0),t="",0!==u)switch(d){case $:case te:case Z:case ee:case H:case B:break;default:t=" "}switch(h){case V:n=t+Ne;case te:case Z:case ee:case H:case N:case B:break;case z:n=t+n+Ne;break;case X:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(ge>0){n=t+n.substring(8,l-1);break}default:(u<1||s[u-1].length<1)&&(n=t+Ne+n)}break;case Y:t="";default:n=l>1&&n.indexOf(":")>0?t+n.replace(_,"$1"+Ne+"$2"):t+n+Ne}c+=n}a[i]=c.replace(r,"").trim()}return a}(t):t,Ee>0&&void 0!==(c=Ve(Pe,Xe,s,e,be,pe,Ce,o,a,o))&&0===(Xe=c).length)return Qe+Xe+Ge;if(Xe=s.join(",")+"{"+Xe+"}",ve*me!=0){switch(2!==ve||qe(Xe,2)||(me=0),me){case fe:Xe=Xe.replace(m,":"+O+"$1")+Xe;break;case ce:Xe=Xe.replace(b,"::"+T+"input-$1")+Xe.replace(b,"::"+O+"$1")+Xe.replace(b,":"+P+"input-$1")+Xe}me=0}}return Qe+Xe+Ge}function De(e,t,n){var r=t.trim().split(u),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,c=0===a?"":e[0]+" ";s0&&ye>0)return i.replace(d,"$1").replace(l,"$1"+ze);break;default:return e.trim()+i.replace(l,"$1"+e.trim())}default:if(n*ye>0&&i.indexOf("\f")>0)return i.replace(l,(e.charCodeAt(0)===X?"":"$1")+e.trim())}return e+i}function Fe(e,t,n,r){var f,u=0,l=e+";",d=2*t+3*n+4*r;if(944===d)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*je){case 0:break;case W:if(110!==e.charCodeAt(10))break;default:var o=i.split((i="",s)),a=0;for(n=0,t=o.length;aq&&l<90||l>96&&l<123||l===K||l===W&&f.charCodeAt(1)!==W))switch(isNaN(parseFloat(f))+(-1!==f.indexOf("("))){case 1:switch(f){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:f+=Be}}u[n++]=f}i+=(0===a?"":",")+u.join(" ")}}return i=r+i+";",1===ve||2===ve&&qe(i,1)?T+i+i:i}(l);if(0===ve||2===ve&&!qe(l,1))return l;switch(d){case 1015:return 97===l.charCodeAt(10)?T+l+l:l;case 951:return 116===l.charCodeAt(3)?T+l+l:l;case 963:return 110===l.charCodeAt(5)?T+l+l:l;case 1009:if(100!==l.charCodeAt(4))break;case 969:case 942:return T+l+l;case 978:return T+l+O+l+l;case 1019:case 983:return T+l+O+l+P+l+l;case 883:return l.charCodeAt(8)===W?T+l+l:l.indexOf("image-set(",11)>0?l.replace(A,"$1"+T+"$2")+l:l;case 932:if(l.charCodeAt(4)===W)switch(l.charCodeAt(5)){case 103:return T+"box-"+l.replace("-grow","")+T+l+P+l.replace("grow","positive")+l;case 115:return T+l+P+l.replace("shrink","negative")+l;case 98:return T+l+P+l.replace("basis","preferred-size")+l}return T+l+P+l+l;case 964:return T+l+P+"flex-"+l+l;case 1023:if(99!==l.charCodeAt(8))break;return f=l.substring(l.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),T+"box-pack"+f+T+l+P+"flex-pack"+f+l;case 1005:return o.test(l)?l.replace(i,":"+T)+l.replace(i,":"+O)+l:l;case 1e3:switch(u=(f=l.substring(13).trim()).indexOf("-")+1,f.charCodeAt(0)+f.charCodeAt(u)){case 226:f=l.replace(S,"tb");break;case 232:f=l.replace(S,"tb-rl");break;case 220:f=l.replace(S,"lr");break;default:return l}return T+l+P+f+l;case 1017:if(-1===l.indexOf("sticky",9))return l;case 975:switch(u=(l=e).length-10,d=(f=(33===l.charCodeAt(u)?l.substring(0,u):l).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|f.charCodeAt(7))){case 203:if(f.charCodeAt(8)<111)break;case 115:l=l.replace(f,T+f)+";"+l;break;case 207:case 102:l=l.replace(f,T+(d>102?"inline-":"")+"box")+";"+l.replace(f,T+f)+";"+l.replace(f,P+f+"box")+";"+l}return l+";";case 938:if(l.charCodeAt(5)===W)switch(l.charCodeAt(6)){case 105:return f=l.replace("-items",""),T+l+T+"box-"+f+P+"flex-"+f+l;case 115:return T+l+P+"flex-item-"+l.replace(E,"")+l;default:return T+l+P+"flex-line-pack"+l.replace("align-content","").replace(E,"")+l}break;case 973:case 989:if(l.charCodeAt(3)!==W||122===l.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(f=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Fe(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):l.replace(f,T+f)+l.replace(f,O+f.replace("fill-",""))+l;break;case 962:if(l=T+l+(102===l.charCodeAt(5)?P+l:"")+l,n+r===211&&105===l.charCodeAt(13)&&l.indexOf("transform",10)>0)return l.substring(0,l.indexOf(";",27)+1).replace(a,"$1"+T+"$2")+l}return l}function qe(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return Me(2!==t?r:r.replace(M,"$1"),i,t)}function He(e,t){var n=Fe(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function Ve(e,t,n,r,i,o,a,s,c,f){for(var u,l=0,d=t;l0&&(Be=i.replace(h,o===z?"":"-")),o=1,1===ye?ze=i:Ne=i;var a,s=[ze];Ee>0&&void 0!==(a=Ve(Ae,n,s,s,be,pe,0,0,0,0))&&"string"==typeof a&&(n=a);var c=Le(ke,s,n,0,0);return Ee>0&&void 0!==(a=Ve(Ce,c,s,s,be,pe,c.length,0,0,0))&&"string"!=typeof(c=a)&&(o=0),Be="",ze="",Ne="",me=0,be=1,pe=1,we*o==0?c:c.replace(r,"").replace(y,"").replace(v,"$1").replace(g,"$1").replace(w," ")}return $e.use=function e(t){switch(t){case void 0:case null:Ee=xe.length=0;break;default:if("function"==typeof t)xe[Ee++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(100),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(9))},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";var n=r(3).Buffer,i=r(29).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(2)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},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(!n.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");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++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,n){var i=r(23);e.exports=g;var o,a=r(49);g.ReadableState=v;r(30).EventEmitter;var s=function(e,t){return e.listeners(t).length},c=r(52),f=r(3).Buffer,u=t.Uint8Array||function(){};var l=r(18);l.inherits=r(2);var d=r(103),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,b=r(104),m=r(53);l.inherits(g,c);var y=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var n=t instanceof(o=o||r(13));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,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(33).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||r(13),!(this instanceof g))return new g(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){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,x(e)}(e,a)):(i||(o=function(e,t){var r;n=t,f.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(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?_(e,a,t,!1):C(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(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 x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),P(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(M,e,t))}function M(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=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 n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=f.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},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 c=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:g;function f(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",b),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",f);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,P(e))}}(r);e.on("drain",l);var d=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==j(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 y(){e.removeListener("finish",v),g()}function v(){h("onfinish"),e.removeListener("close",y),g()}function g(){h("unpipe"),r.unpipe(e)}return r.on("data",b),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",y),e.once("finish",v),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?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o>>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}n(c,i),c.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},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+h(r[y-15])+r[y-16];for(var v=0;v<64;++v){var g=m+d(c)+f(c,p,b)+a[v]+r[v]|0,w=l(n)+u(n,i,o)|0;m=b,b=p,p=c,c=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},c.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=c},function(e,t,r){var n=r(2),i=r(15),o=r(3).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 c(){this.init(),this._w=s,i.call(this,128,112)}function f(e,t,r){return r^e&(t^r)}function u(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 b(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 y(e,t){return e>>>0>>0?1:0}n(c,i),c.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},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,E=0|this._fl,C=0|this._gl,M=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var A=t[T-30],P=t[T-30+1],I=h(A,P),O=p(P,A),R=b(A=t[T-4],P=t[T-4+1]),j=m(P,A),B=t[T-14],N=t[T-14+1],z=t[T-32],L=t[T-32+1],D=O+N|0,U=I+B+y(D,O)|0;U=(U=U+R+y(D=D+j|0,j)|0)+z+y(D=D+L|0,L)|0,t[T]=U,t[T+1]=D}for(var F=0;F<160;F+=2){U=t[F],D=t[F+1];var q=u(r,n,i),H=u(w,_,S),W=l(r,w),K=l(w,r),V=d(s,x),$=d(x,s),Y=a[F],X=a[F+1],G=f(s,c,v),Q=f(x,E,C),J=M+$|0,Z=g+V+y(J,M)|0;Z=(Z=(Z=Z+G+y(J=J+Q|0,Q)|0)+Y+y(J=J+X|0,X)|0)+U+y(J=J+D|0,D)|0;var ee=K+H|0,te=W+q+y(ee,K)|0;g=v,M=C,v=c,C=E,c=s,E=x,s=o+Z+y(x=k+J|0,k)|0,o=i,k=S,i=n,S=_,n=r,_=w,r=Z+te+y(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+E|0,this._gl=this._gl+C|0,this._hl=this._hl+M|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,S)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+s+y(this._el,x)|0,this._fh=this._fh+c+y(this._fl,E)|0,this._gh=this._gh+v+y(this._gl,C)|0,this._hh=this._hh+g+y(this._hl,M)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+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=c},function(e,t,r){"use strict";var n=r(2),i=r(116),o=r(12),a=r(3).Buffer,s=r(58),c=r(34),f=r(35),u=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 c:f(e)).update(t).digest():t.lengthr||o!=o)throw new TypeError("Bad key length")}}).call(this,r(6).Buffer)},function(e,t,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,r(11))},function(e,t,r){var n=r(58),i=r(34),o=r(35),a=r(61),s=r(62),c=r(3).Buffer,f=c.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length>>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,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=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[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=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[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=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[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[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,i){for(var o=0,a=0,s=n.length>>>1,c=0;c>>n[c]&1;for(c=s;c>>n[c]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[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,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&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[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},c.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=d}o.rip(s,a,n,i)},c.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,c=e.keys.length-2;c>=0;c-=2){var f=e.keys[c],u=e.keys[c+1];o.expand(a,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var l=o.substitute(f,u),d=a;a=(s^o.permute(l))>>>0,s=d}o.rip(a,s,n,i)}},function(e,t,r){var n=r(19),i=r(3).Buffer,o=r(67);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=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;se;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(f))for(;r.mod(u).cmp(l);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(m(p=r.shrn(1))&&m(r)&&y(p)&&y(r)&&a.test(p)&&a.test(r))return r}}},function(e,t,r){var n=r(5),i=r(39);function o(e){this.rand=e||new i.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 i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},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 i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var f=e.shrn(c),u=s.toRed(o);t>0;t--){var l=this._randrange(new n(2),s);r&&r(l);var d=l.toRed(o).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(u)){for(var h=1;h0;t--){var u=this._randrange(new n(2),a),l=e.gcd(u);if(0!==l.cmpn(1))return l;var d=u.toRed(i).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var h=1;h>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(26),n.short=r(143),n.mont=r(144),n.edwards=r(145)},function(e,t,r){"use strict";var n=r(10).rotr32;function i(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,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(10),i=r(20),o=r(75),a=r(7),s=n.sum32,c=n.sum32_4,f=n.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,m=i.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var c=1,f=n.length;f>=256;f>>=8)c++;(o=new i(2+c))[0]=a,o[1]=128|c;f=1+c;for(var u=n.length;u>0;f--,u>>=8)o[f]=255&u;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),c=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[c--]=127&a;(a>>=7)>0;)s[c--]=128|127&a}return this._createEncoderBuffer(s)},f.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.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&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var 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=0;--r){var n=e[r];if(null!==n){var i=n.score;i>t&&(t=i)}}return-9007199254740991===t?null:t}function f(e,t){var r=e[t];if(void 0!==r)return r;var n=t;Array.isArray(t)||(n=t.split("."));for(var i=n.length,o=-1;e&&++o>1]=e[r],i=1+(r<<1)}for(var a=r-1>>1;r>0&&n.score>1)e[r]=e[a];e[r]=n}return r.add=function(r){var n=t;e[t++]=r;for(var i=n-1>>1;n>0&&r.score>1)e[n]=e[i];e[n]=r},r.poll=function(){if(0!==t){var r=e[0];return e[0]=e[--t],n(),r}},r.peek=function(r){if(0!==t)return e[0]},r.replaceTop=function(t){e[0]=t,n()},r},d=l();return function h(p){var b={single:function(e,t,r){return e?(u(e)||(e=b.getPreparedSearch(e)),t?(u(t)||(t=b.getPrepared(t)),((r&&void 0!==r.allowTypo?r.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo)(e,t,e[0])):null):null},go:function(e,t,r){if(!e)return i;var n=(e=b.prepareSearch(e))[0],o=r&&r.threshold||p&&p.threshold||-9007199254740991,a=r&&r.limit||p&&p.limit||9007199254740991,s=(r&&void 0!==r.allowTypo?r.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo,l=0,h=0,m=t.length;if(r&&r.keys)for(var y=r.scoreFn||c,v=r.keys,g=v.length,w=m-1;w>=0;--w){for(var _=t[w],S=new Array(g),k=g-1;k>=0;--k)(C=f(_,E=v[k]))?(u(C)||(C=b.getPrepared(C)),S[k]=s(e,C,n)):S[k]=null;S.obj=_;var x=y(S);null!==x&&(xd.peek().score&&d.replaceTop(S))))}else if(r&&r.key){var E=r.key;for(w=m-1;w>=0;--w)(C=f(_=t[w],E))&&(u(C)||(C=b.getPrepared(C)),null!==(M=s(e,C,n))&&(M.scored.peek().score&&d.replaceTop(M)))))}else for(w=m-1;w>=0;--w){var C,M;(C=t[w])&&(u(C)||(C=b.getPrepared(C)),null!==(M=s(e,C,n))&&(M.scored.peek().score&&d.replaceTop(M)))))}if(0===l)return i;var T=new Array(l);for(w=l-1;w>=0;--w)T[w]=d.poll();return T.total=l+h,T},goAsync:function(t,n,o){var a=!1,s=new Promise((function(s,d){if(!t)return s(i);var h=(t=b.prepareSearch(t))[0],m=l(),y=n.length-1,v=o&&o.threshold||p&&p.threshold||-9007199254740991,g=o&&o.limit||p&&p.limit||9007199254740991,w=(o&&void 0!==o.allowTypo?o.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo,_=0,S=0;function k(){if(a)return d("canceled");var l=Date.now();if(o&&o.keys)for(var p=o.scoreFn||c,x=o.keys,E=x.length;y>=0;--y){for(var C=n[y],M=new Array(E),T=E-1;T>=0;--T)(I=f(C,P=x[T]))?(u(I)||(I=b.getPrepared(I)),M[T]=w(t,I,h)):M[T]=null;M.obj=C;var A=p(M);if(null!==A&&!(Am.peek().score&&m.replaceTop(M)),y%1e3==0&&Date.now()-l>=10))return void(e?r(k):setTimeout(k))}else if(o&&o.key){for(var P=o.key;y>=0;--y)if((I=f(C=n[y],P))&&(u(I)||(I=b.getPrepared(I)),null!==(O=w(t,I,h))&&!(O.scorem.peek().score&&m.replaceTop(O)),y%1e3==0&&Date.now()-l>=10)))return void(e?r(k):setTimeout(k))}else for(;y>=0;--y){var I,O;if((I=n[y])&&(u(I)||(I=b.getPrepared(I)),null!==(O=w(t,I,h))&&!(O.scorem.peek().score&&m.replaceTop(O)),y%1e3==0&&Date.now()-l>=10)))return void(e?r(k):setTimeout(k))}if(0===_)return s(i);for(var R=new Array(_),j=_-1;j>=0;--j)R[j]=m.poll();R.total=_+S,s(R)}e?r(k):k()}));return s.cancel=function(){a=!0},s},highlight:function(e,t,r){if(null===e)return null;void 0===t&&(t=""),void 0===r&&(r="");for(var n="",i=0,o=!1,a=e.target,s=a.length,c=e.indexes,f=0;f999)return b.prepare(e);var r=t.get(e);return void 0!==r?r:(r=b.prepare(e),t.set(e,r),r)},getPreparedSearch:function(e){if(e.length>999)return b.prepareSearch(e);var t=n.get(e);return void 0!==t?t:(t=b.prepareSearch(e),n.set(e,t),t)},algorithm:function(e,t,r){for(var n=t._targetLowerCodes,i=e.length,s=n.length,c=0,f=0,u=0,l=0;;){if(r===n[f]){if(o[l++]=f,++c===i)break;r=e[0===u?c:u===c?c+1:u===c-1?c-1:c]}if(++f>=s)for(;;){if(c<=1)return null;if(0===u){if(r===e[--c])continue;u=c}else{if(1===u)return null;if((r=e[1+(c=--u)])===e[c])continue}f=o[(l=c)-1]+1;break}}c=0;var d=0,h=!1,p=0,m=t._nextBeginningIndexes;null===m&&(m=t._nextBeginningIndexes=b.prepareNextBeginningIndexes(t.target));var y=f=0===o[0]?0:m[o[0]-1];if(f!==s)for(;;)if(f>=s){if(c<=0){if(++d>i-2)break;if(e[d]===e[d+1])continue;f=y;continue}--c,f=m[a[--p]]}else if(e[0===d?c:d===c?c+1:d===c-1?c-1:c]===n[f]){if(a[p++]=f,++c===i){h=!0;break}++f}else f=m[f];if(h)var v=a,g=p;else v=o,g=l;for(var w=0,_=-1,S=0;S=0;--S)t.indexes[S]=v[S];return t},algorithmNoTypo:function(e,t,r){for(var n=t._targetLowerCodes,i=e.length,s=n.length,c=0,f=0,u=0;;){if(r===n[f]){if(o[u++]=f,++c===i)break;r=e[c]}if(++f>=s)return null}c=0;var l=!1,d=0,h=t._nextBeginningIndexes;if(null===h&&(h=t._nextBeginningIndexes=b.prepareNextBeginningIndexes(t.target)),(f=0===o[0]?0:h[o[0]-1])!==s)for(;;)if(f>=s){if(c<=0)break;--c,f=h[a[--d]]}else if(e[c]===n[f]){if(a[d++]=f,++c===i){l=!0;break}++f}else f=h[f];if(l)var p=a,m=d;else p=o,m=u;for(var y=0,v=-1,g=0;g=0;--g)t.indexes[g]=p[g];return t},prepareLowerCodes:function(e){for(var t=e.length,r=[],n=e.toLowerCase(),i=0;i=65&&s<=90,f=c||s>=97&&s<=122||s>=48&&s<=57,u=c&&!i||!o||!f;i=c,o=f,u&&(r[n++]=a)}return r},prepareNextBeginningIndexes:function(e){for(var t=e.length,r=b.prepareBeginningIndexes(e),n=[],i=r[0],o=0,a=0;aa?n[a]=i:(i=r[++o],n[a]=void 0===i?t:i);return n},cleanup:s,new:h};return b}()})?n.apply(t,i):n)||(e.exports=o)}).call(this,r(48).setImmediate)},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(14),t.createHash=t.Hash=r(17),t.createHmac=t.Hmac=r(57);var n=r(117),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(60);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(119);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 c=r(134);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var f=r(140);t.createSign=f.createSign,t.Sign=f.Sign,t.createVerify=f.createVerify,t.Verify=f.Verify,t.createECDH=r(174);var u=r(175);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var l=r(178);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){"use strict";function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===n(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function o(e){return"Array"===n(e)}function a(e){return"Symbol"===n(e)} +*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),f=1;f=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(100),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,n(9))},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(3).Buffer,i=n(29).Transform;function o(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(2)(o,i),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},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(!r.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");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++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 n=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,n){"use strict";(function(t,r){var i=n(22);e.exports=g;var o,a=n(49);g.ReadableState=v;n(30).EventEmitter;var s=function(e,t){return e.listeners(t).length},c=n(52),f=n(3).Buffer,u=t.Uint8Array||function(){};var l=n(17);l.inherits=n(2);var d=n(103),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,b=n(104),m=n(53);l.inherits(g,c);var y=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var r=t instanceof(o=o||n(13));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,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=n(33).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||n(13),!(this instanceof g))return new g(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,x(e)}(e,a)):(i||(o=function(e,t){var n;r=t,f.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):M(e,a)):_(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(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 x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),O(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=f.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),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);return r}(e,t.buffer,t.decoder),n);var n}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?P(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var n=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 c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:g;function f(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",f),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",b),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){h("onend"),e.end()}o.endEmitted?i.nextTick(c):n.once("end",c),e.on("unpipe",f);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,O(e))}}(n);e.on("drain",l);var d=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==j(o.pipes,e))&&!d&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){h("onerror",t),g(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),g()}function v(){h("onfinish"),e.removeListener("close",y),g()}function g(){h("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",y),e.once("finish",v),e.emit("pipe",n),o.flowing||(h("pipe resume"),n.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o>>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}r(c,i),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,y=0;y<16;++y)n[y]=e.readInt32BE(4*y);for(;y<64;++y)n[y]=0|(((t=n[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[y-7]+h(n[y-15])+n[y-16];for(var v=0;v<64;++v){var g=m+d(c)+f(c,p,b)+a[v]+n[v]|0,w=l(r)+u(r,i,o)|0;m=b,b=p,p=c,c=s+g|0,s=o,o=i,i=r,r=g+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},c.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=c},function(e,t,n){var r=n(2),i=n(15),o=n(3).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 c(){this.init(),this._w=s,i.call(this,128,112)}function f(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(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 b(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 y(e,t){return e>>>0>>0?1:0}r(c,i),c.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},c.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,E=0|this._fl,M=0|this._gl,C=0|this._hl,A=0;A<32;A+=2)t[A]=e.readInt32BE(4*A),t[A+1]=e.readInt32BE(4*A+4);for(;A<160;A+=2){var T=t[A-30],O=t[A-30+1],P=h(T,O),I=p(O,T),R=b(T=t[A-4],O=t[A-4+1]),j=m(O,T),B=t[A-14],N=t[A-14+1],z=t[A-32],L=t[A-32+1],D=I+N|0,U=P+B+y(D,I)|0;U=(U=U+R+y(D=D+j|0,j)|0)+z+y(D=D+L|0,L)|0,t[A]=U,t[A+1]=D}for(var F=0;F<160;F+=2){U=t[F],D=t[F+1];var q=u(n,r,i),H=u(w,_,S),V=l(n,w),W=l(w,n),K=d(s,x),$=d(x,s),Y=a[F],X=a[F+1],G=f(s,c,v),Q=f(x,E,M),J=C+$|0,Z=g+K+y(J,C)|0;Z=(Z=(Z=Z+G+y(J=J+Q|0,Q)|0)+Y+y(J=J+X|0,X)|0)+U+y(J=J+D|0,D)|0;var ee=W+H|0,te=V+q+y(ee,W)|0;g=v,C=M,v=c,M=E,c=s,E=x,s=o+Z+y(x=k+J|0,k)|0,o=i,k=S,i=r,S=_,r=n,_=w,n=Z+te+y(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+E|0,this._gl=this._gl+M|0,this._hl=this._hl+C|0,this._ah=this._ah+n+y(this._al,w)|0,this._bh=this._bh+r+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,S)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+s+y(this._el,x)|0,this._fh=this._fh+c+y(this._fl,E)|0,this._gh=this._gh+v+y(this._gl,M)|0,this._hh=this._hh+g+y(this._hl,C)|0},c.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+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=c},function(e,t,n){"use strict";var r=n(2),i=n(116),o=n(12),a=n(3).Buffer,s=n(58),c=n(34),f=n(35),u=a.alloc(128);function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new c:f(e)).update(t).digest():t.lengthn||o!=o)throw new TypeError("Bad key length")}}).call(this,n(6).Buffer)},function(e,t,n){(function(t){var n;t.browser?n="utf-8":n=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=n}).call(this,n(11))},function(e,t,n){var r=n(58),i=n(34),o=n(35),a=n(61),s=n(62),c=n(3).Buffer,f=c.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,n){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?r:function(t){return o(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=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}n[r+0]=i>>>0,n[r+1]=o>>>0},t.rip=function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=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;n[r+0]=i>>>0,n[r+1]=o>>>0},t.pc1=function(e,t,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=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;n[r+0]=i>>>0,n[r+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[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,n,i){for(var o=0,a=0,s=r.length>>>1,c=0;c>>r[c]&1;for(c=s;c>>r[c]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[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 n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>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,n=0;n>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length>>1];n=o.r28shl(n,s),i=o.r28shl(i,s),o.pc2(n,i,e.keys,a)}},c.prototype._update=function(e,t,n,r){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},c.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r>>0,a=d}o.rip(s,a,r,i)},c.prototype._decrypt=function(e,t,n,r,i){for(var a=n,s=t,c=e.keys.length-2;c>=0;c-=2){var f=e.keys[c],u=e.keys[c+1];o.expand(a,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var l=o.substitute(f,u),d=a;a=(s^o.permute(l))>>>0,s=d}o.rip(a,s,r,i)}},function(e,t,n){var r=n(18),i=n(3).Buffer,o=n(67);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;se;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),t.cmp(c)){if(!t.cmp(f))for(;n.mod(u).cmp(l);)n.iadd(h)}else for(;n.mod(o).cmp(d);)n.iadd(h);if(m(p=n.shrn(1))&&m(n)&&y(p)&&y(n)&&a.test(p)&&a.test(n))return n}}},function(e,t,n){var r=n(5),i=n(39);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var f=e.shrn(c),u=s.toRed(o);t>0;t--){var l=this._randrange(new r(2),s);n&&n(l);var d=l.toRed(o).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(u)){for(var h=1;h0;t--){var u=this._randrange(new r(2),a),l=e.gcd(u);if(0!==l.cmpn(1))return l;var d=u.toRed(i).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var h=1;h>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(25),r.short=n(143),r.mont=n(144),r.edwards=n(145)},function(e,t,n){"use strict";var r=n(10).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(10),i=n(19),o=n(75),a=n(7),s=r.sum32,c=r.sum32_4,f=r.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,m=i.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function l(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(var o=0;o=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128)return(o=new i(2))[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r]);for(var c=1,f=r.length;f>=256;f>>=8)c++;(o=new i(2+c))[0]=a,o[1]=128|c;f=1+c;for(var u=r.length;u>0;f--,u>>=8)o[f]=255&u;return this._createEncoderBuffer([o,r])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new i(2*e.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(r=0;r=128;a>>=7)o++}var s=new i(o),c=s.length-1;for(r=e.length-1;r>=0;r--){a=e[r];for(s[c--]=127&a;(a>>=7)>0;)s[c--]=128|127&a}return this._createEncoderBuffer(s)},f.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[u(r.getFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[u(r.getFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.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&&!i.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new i(n)}if(i.isBuffer(e)){var r=e.length;0===e.length&&r++;var o=new i(r);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);r=1;for(var a=e;a>=256;a>>=8)r++;for(a=(o=new Array(r)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r=0;--n){var r=e[n];if(null!==r){var i=r.score;i>t&&(t=i)}}return-9007199254740991===t?null:t}function f(e,t){var n=e[t];if(void 0!==n)return n;var r=t;Array.isArray(t)||(r=t.split("."));for(var i=r.length,o=-1;e&&++o>1]=e[n],i=1+(n<<1)}for(var a=n-1>>1;n>0&&r.score>1)e[n]=e[a];e[n]=r}return n.add=function(n){var r=t;e[t++]=n;for(var i=r-1>>1;r>0&&n.score>1)e[r]=e[i];e[r]=n},n.poll=function(){if(0!==t){var n=e[0];return e[0]=e[--t],r(),n}},n.peek=function(n){if(0!==t)return e[0]},n.replaceTop=function(t){e[0]=t,r()},n},d=l();return function h(p){var b={single:function(e,t,n){return e?(u(e)||(e=b.getPreparedSearch(e)),t?(u(t)||(t=b.getPrepared(t)),((n&&void 0!==n.allowTypo?n.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo)(e,t,e[0])):null):null},go:function(e,t,n){if(!e)return i;var r=(e=b.prepareSearch(e))[0],o=n&&n.threshold||p&&p.threshold||-9007199254740991,a=n&&n.limit||p&&p.limit||9007199254740991,s=(n&&void 0!==n.allowTypo?n.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo,l=0,h=0,m=t.length;if(n&&n.keys)for(var y=n.scoreFn||c,v=n.keys,g=v.length,w=m-1;w>=0;--w){for(var _=t[w],S=new Array(g),k=g-1;k>=0;--k)(M=f(_,E=v[k]))?(u(M)||(M=b.getPrepared(M)),S[k]=s(e,M,r)):S[k]=null;S.obj=_;var x=y(S);null!==x&&(xd.peek().score&&d.replaceTop(S))))}else if(n&&n.key){var E=n.key;for(w=m-1;w>=0;--w)(M=f(_=t[w],E))&&(u(M)||(M=b.getPrepared(M)),null!==(C=s(e,M,r))&&(C.scored.peek().score&&d.replaceTop(C)))))}else for(w=m-1;w>=0;--w){var M,C;(M=t[w])&&(u(M)||(M=b.getPrepared(M)),null!==(C=s(e,M,r))&&(C.scored.peek().score&&d.replaceTop(C)))))}if(0===l)return i;var A=new Array(l);for(w=l-1;w>=0;--w)A[w]=d.poll();return A.total=l+h,A},goAsync:function(t,r,o){var a=!1,s=new Promise((function(s,d){if(!t)return s(i);var h=(t=b.prepareSearch(t))[0],m=l(),y=r.length-1,v=o&&o.threshold||p&&p.threshold||-9007199254740991,g=o&&o.limit||p&&p.limit||9007199254740991,w=(o&&void 0!==o.allowTypo?o.allowTypo:!p||void 0===p.allowTypo||p.allowTypo)?b.algorithm:b.algorithmNoTypo,_=0,S=0;function k(){if(a)return d("canceled");var l=Date.now();if(o&&o.keys)for(var p=o.scoreFn||c,x=o.keys,E=x.length;y>=0;--y){for(var M=r[y],C=new Array(E),A=E-1;A>=0;--A)(P=f(M,O=x[A]))?(u(P)||(P=b.getPrepared(P)),C[A]=w(t,P,h)):C[A]=null;C.obj=M;var T=p(C);if(null!==T&&!(Tm.peek().score&&m.replaceTop(C)),y%1e3==0&&Date.now()-l>=10))return void(e?n(k):setTimeout(k))}else if(o&&o.key){for(var O=o.key;y>=0;--y)if((P=f(M=r[y],O))&&(u(P)||(P=b.getPrepared(P)),null!==(I=w(t,P,h))&&!(I.scorem.peek().score&&m.replaceTop(I)),y%1e3==0&&Date.now()-l>=10)))return void(e?n(k):setTimeout(k))}else for(;y>=0;--y){var P,I;if((P=r[y])&&(u(P)||(P=b.getPrepared(P)),null!==(I=w(t,P,h))&&!(I.scorem.peek().score&&m.replaceTop(I)),y%1e3==0&&Date.now()-l>=10)))return void(e?n(k):setTimeout(k))}if(0===_)return s(i);for(var R=new Array(_),j=_-1;j>=0;--j)R[j]=m.poll();R.total=_+S,s(R)}e?n(k):k()}));return s.cancel=function(){a=!0},s},highlight:function(e,t,n){if(null===e)return null;void 0===t&&(t=""),void 0===n&&(n="");for(var r="",i=0,o=!1,a=e.target,s=a.length,c=e.indexes,f=0;f999)return b.prepare(e);var n=t.get(e);return void 0!==n?n:(n=b.prepare(e),t.set(e,n),n)},getPreparedSearch:function(e){if(e.length>999)return b.prepareSearch(e);var t=r.get(e);return void 0!==t?t:(t=b.prepareSearch(e),r.set(e,t),t)},algorithm:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,s=r.length,c=0,f=0,u=0,l=0;;){if(n===r[f]){if(o[l++]=f,++c===i)break;n=e[0===u?c:u===c?c+1:u===c-1?c-1:c]}if(++f>=s)for(;;){if(c<=1)return null;if(0===u){if(n===e[--c])continue;u=c}else{if(1===u)return null;if((n=e[1+(c=--u)])===e[c])continue}f=o[(l=c)-1]+1;break}}c=0;var d=0,h=!1,p=0,m=t._nextBeginningIndexes;null===m&&(m=t._nextBeginningIndexes=b.prepareNextBeginningIndexes(t.target));var y=f=0===o[0]?0:m[o[0]-1];if(f!==s)for(;;)if(f>=s){if(c<=0){if(++d>i-2)break;if(e[d]===e[d+1])continue;f=y;continue}--c,f=m[a[--p]]}else if(e[0===d?c:d===c?c+1:d===c-1?c-1:c]===r[f]){if(a[p++]=f,++c===i){h=!0;break}++f}else f=m[f];if(h)var v=a,g=p;else v=o,g=l;for(var w=0,_=-1,S=0;S=0;--S)t.indexes[S]=v[S];return t},algorithmNoTypo:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,s=r.length,c=0,f=0,u=0;;){if(n===r[f]){if(o[u++]=f,++c===i)break;n=e[c]}if(++f>=s)return null}c=0;var l=!1,d=0,h=t._nextBeginningIndexes;if(null===h&&(h=t._nextBeginningIndexes=b.prepareNextBeginningIndexes(t.target)),(f=0===o[0]?0:h[o[0]-1])!==s)for(;;)if(f>=s){if(c<=0)break;--c,f=h[a[--d]]}else if(e[c]===r[f]){if(a[d++]=f,++c===i){l=!0;break}++f}else f=h[f];if(l)var p=a,m=d;else p=o,m=u;for(var y=0,v=-1,g=0;g=0;--g)t.indexes[g]=p[g];return t},prepareLowerCodes:function(e){for(var t=e.length,n=[],r=e.toLowerCase(),i=0;i=65&&s<=90,f=c||s>=97&&s<=122||s>=48&&s<=57,u=c&&!i||!o||!f;i=c,o=f,u&&(n[r++]=a)}return n},prepareNextBeginningIndexes:function(e){for(var t=e.length,n=b.prepareBeginningIndexes(e),r=[],i=n[0],o=0,a=0;aa?r[a]=i:(i=n[++o],r[a]=void 0===i?t:i);return r},cleanup:s,new:h};return b}()})?r.apply(t,i):r)||(e.exports=o)}).call(this,n(48).setImmediate)},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(14),t.createHash=t.Hash=n(16),t.createHmac=t.Hmac=n(57);var r=n(117),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=n(60);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=n(119);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 c=n(134);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var f=n(140);t.createSign=f.createSign,t.Sign=f.Sign,t.createVerify=f.createVerify,t.Verify=f.Verify,t.createECDH=n(174);var u=n(175);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var l=n(178);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,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===r(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function o(e){return"Array"===r(e)}function a(e){return"Symbol"===r(e)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use @@ -30,7 +30,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -function s(){for(var e=0,t=0,r=arguments.length;tO.length&&O.push(e)}function B(e,t,r){return null==e?0:function e(t,r,n,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return n(i,t,""===r?"."+N(t,0):r),1;if(c=0,r=""===r?".":r+":",Array.isArray(t))for(var f=0;fI.length&&I.push(e)}function B(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var c=!1;if(null===t)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case a:c=!0}}if(c)return r(i,t,""===n?"."+N(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var f=0;fthis.eventPool.length&&this.eventPool.push(e)}function de(e){e.eventPool=[],e.getPooled=ue,e.release=le}i(fe.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=se)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=se)},persist:function(){this.isPersistent=se},isPersistent:ce,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce,this._dispatchInstances=this._dispatchListeners=null}}),fe.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},fe.extend=function(e){function t(){}function r(){return n.apply(this,arguments)}var n=this;t.prototype=n.prototype;var o=new t;return i(o,r.prototype),r.prototype=o,r.prototype.constructor=r,r.Interface=i({},n.Interface,e),r.extend=n.extend,de(r),r},de(fe);var he=fe.extend({data:null}),pe=fe.extend({data:null}),be=[9,13,27,32],me=V&&"CompositionEvent"in window,ye=null;V&&"documentMode"in document&&(ye=document.documentMode);var ve=V&&"TextEvent"in window&&!ye,ge=V&&(!me||ye&&8=ye),we=String.fromCharCode(32),_e={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Se=!1;function ke(e,t){switch(e){case"keyup":return-1!==be.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function xe(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ee=!1;var Ce={eventTypes:_e,extractEvents:function(e,t,r,n){var i=void 0,o=void 0;if(me)e:{switch(e){case"compositionstart":i=_e.compositionStart;break e;case"compositionend":i=_e.compositionEnd;break e;case"compositionupdate":i=_e.compositionUpdate;break e}i=void 0}else Ee?ke(e,r)&&(i=_e.compositionEnd):"keydown"===e&&229===r.keyCode&&(i=_e.compositionStart);return i?(ge&&"ko"!==r.locale&&(Ee||i!==_e.compositionStart?i===_e.compositionEnd&&Ee&&(o=ae()):(ie="value"in(ne=n)?ne.value:ne.textContent,Ee=!0)),i=he.getPooled(i,t,r,n),o?i.data=o:null!==(o=xe(r))&&(i.data=o),K(i),o=i):o=null,(e=ve?function(e,t){switch(e){case"compositionend":return xe(t);case"keypress":return 32!==t.which?null:(Se=!0,we);case"textInput":return(e=t.data)===we&&Se?null:e;default:return null}}(e,r):function(e,t){if(Ee)return"compositionend"===e||!me&&ke(e,t)?(e=ae(),oe=ie=ne=null,Ee=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1