@eluvio/elv-player-js 1.0.110 → 1.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -1
- package/package.json +1 -1
- package/src/index.js +9 -5
- package/src/static/stylesheets/player.scss +35 -7
- package/dist/0.bundle.js +0 -10
- package/dist/3.bundle.js +0 -18
- package/dist/4.bundle.js +0 -1
- package/dist/5.bundle.js +0 -1
- package/dist/6.bundle.js +0 -289
- package/dist/82039b3023d7b2c52c275b57ce7bbc42.png +0 -0
- package/dist/index.js +0 -1
- package/dist/vendors~main.bundle.js +0 -39
package/README.md
CHANGED
|
@@ -1 +1,177 @@
|
|
|
1
|
-
|
|
1
|
+
# Eluvio Player
|
|
2
|
+
|
|
3
|
+
A simple and robust way to play video content from the Eluvio Content Fabric.
|
|
4
|
+
|
|
5
|
+
## Quick Start:
|
|
6
|
+
|
|
7
|
+
Install from npm:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install --save @eluvio/elv-player-js
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Import the library and load the player:
|
|
14
|
+
```javascript
|
|
15
|
+
import EluvioPlayer, {EluvioPlayerParameters} from "@eluvio/elv-player-js";
|
|
16
|
+
|
|
17
|
+
const player = new EluvioPlayer(
|
|
18
|
+
targetContainerElement,
|
|
19
|
+
{
|
|
20
|
+
clientOptions: {
|
|
21
|
+
network: EluvioPlayerParameters.network.main,
|
|
22
|
+
},
|
|
23
|
+
sourceOptions: {
|
|
24
|
+
playoutParameters: {
|
|
25
|
+
versionHash: "hq__...."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
playerOptions: {
|
|
29
|
+
autoplay: EluvioPlayerParameters.autoplay.ON
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
The player library has a number of options to configure what content should be played and how it's authorized, display options for the player, and callbacks for events.
|
|
38
|
+
|
|
39
|
+
The library includes a helpful collection of configuration options in `EluvioPlayerParameters`.
|
|
40
|
+
|
|
41
|
+
### Client Options:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
clientOptions: {
|
|
45
|
+
network: EluvioPlayerParameters.networks.MAIN,
|
|
46
|
+
client: undefined,
|
|
47
|
+
staticToken: undefined
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
##### Values:
|
|
52
|
+
- `network` - Which Fabric network to use. Defaults to the main production network. `EluvioPlayerParameters.networks["MAIN" | "DEMO]`
|
|
53
|
+
- `client` - If you already have an instance of @eluvio/elv-client-js, you can provide it to the player to avoid initializing a new client. This will improve initial load performance. This will also handle any necessary authorization your client is already set up for.
|
|
54
|
+
- `staticToken` - If you have a static auth token to use, you can provide it
|
|
55
|
+
|
|
56
|
+
### Source Options:
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
sourceOptions: {
|
|
60
|
+
protocols: [
|
|
61
|
+
EluvioPlayerParameters.protocols.HLS,
|
|
62
|
+
EluvioPlayerParameters.protocols.DASH
|
|
63
|
+
],
|
|
64
|
+
drms: [
|
|
65
|
+
EluvioPlayerParameters.drms.FAIRPLAY,
|
|
66
|
+
EluvioPlayerParameters.drms.SAMPLE_AES,
|
|
67
|
+
EluvioPlayerParameters.drms.AES128,
|
|
68
|
+
EluvioPlayerParameters.drms.WIDEVINE,
|
|
69
|
+
EluvioPlayerParameters.drms.CLEAR,
|
|
70
|
+
],
|
|
71
|
+
playoutOptions: undefined,
|
|
72
|
+
playoutParameters: {
|
|
73
|
+
objectId: undefined,
|
|
74
|
+
versionHash: undefined,
|
|
75
|
+
writeToken: undefined,
|
|
76
|
+
linkPath: undefined,
|
|
77
|
+
signedLink: false,
|
|
78
|
+
handler: "playout",
|
|
79
|
+
offering: "default",
|
|
80
|
+
playoutType: undefined,
|
|
81
|
+
context: undefined,
|
|
82
|
+
hlsjsProfile: true,
|
|
83
|
+
authorizationToken: undefined,
|
|
84
|
+
clipStart: undefined,
|
|
85
|
+
clipEnd: undefined
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
##### Values:
|
|
91
|
+
- `protocols` - The ABR protocols you want the player to use
|
|
92
|
+
- `drms` - The DRMs options you want the player to use
|
|
93
|
+
- `playoutOptions` - If you already have the results of `client.PlayoutOptions`, you can provide it
|
|
94
|
+
- `playoutParameters` - These parameters directly correspond to what is provided to the [PlayoutOptions](https://eluv-io.github.io/elv-client-js/module-ElvClient_ContentAccess.html#.PlayoutOptions) method in @eluvio/elv-client-js. Typically you will only need to specify a versionHash or object ID
|
|
95
|
+
|
|
96
|
+
### Player Options
|
|
97
|
+
|
|
98
|
+
```javascript
|
|
99
|
+
playerOptions: {
|
|
100
|
+
controls: EluvioPlayerParameters.controls.AUTO_HIDE,
|
|
101
|
+
autoplay: EluvioPlayerParameters.autoplay.OFF,
|
|
102
|
+
muted: EluvioPlayerParameters.muted.OFF,
|
|
103
|
+
loop: EluvioPlayerParameters.loop.OFF,
|
|
104
|
+
watermark: EluvioPlayerParameters.watermark.ON,
|
|
105
|
+
capLevelToPlayerSize: EluvioPlayerParameters.capLevelToPlayerSize.OFF,
|
|
106
|
+
posterUrl: undefined,
|
|
107
|
+
className: undefined,
|
|
108
|
+
controlsClassName: undefined,
|
|
109
|
+
hlsjsOptions: undefined,
|
|
110
|
+
dashjsOptions: undefined,
|
|
111
|
+
playerCallback: ({player, videoElement, hlsPlayer, dashPlayer, posterUrl}) => {},
|
|
112
|
+
errorCallback: (error, player) => {},
|
|
113
|
+
restartCallback: async (error) => {}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
##### Values
|
|
118
|
+
* `controls` - How the controls should be displayed. Default AUTOHIDE
|
|
119
|
+
* `ON`: Player controls will be shown
|
|
120
|
+
* `AUTOHIDE`: Player controls will be shown. Will automatically hide when not in use
|
|
121
|
+
* `DEFAULT`: Default HTML video controls will be shown
|
|
122
|
+
* `OFF`: No controls will be shown
|
|
123
|
+
* `OFF_WITH_VOLUME_TOGGLE`: No controls will be shown except a volume on/off toggle
|
|
124
|
+
* `autoplay` - Whether or not the video should autoplay. Default OFF. NOTE: Browsers may block autoplay video with audio
|
|
125
|
+
* `ON`: Video will autoplay
|
|
126
|
+
* `OFF`: Video will not autoplay
|
|
127
|
+
* `WHEN_VISIBLE`: Video will autoplay only when the video element is visible, and will stop when the element is no longer visible
|
|
128
|
+
* `muted` - Whether or not the video will be muted. Default OFF
|
|
129
|
+
* `ON`: Video will be muted
|
|
130
|
+
* `OFF`: Video will not be muted
|
|
131
|
+
* `WHEN_NOT_VISIBLE`: Video will be muted when the video element is not visible
|
|
132
|
+
* `OFF_IF_POSSIBLE`: Video will not be muted unless playback is blocked due to audio (useful for autoplay)
|
|
133
|
+
* `loop` - Whether or not the video will loop. Default OFF
|
|
134
|
+
* `ON` - Video will loop
|
|
135
|
+
* `OFF` - Video will not loop
|
|
136
|
+
* `watermark`: Whether or not the Eluvio watermark will be shown. Default ON
|
|
137
|
+
* `ON` - Watermark will be shown
|
|
138
|
+
* `OFF` - Watermark will not be shown
|
|
139
|
+
* `capLevelToPlayerSize`: Whether or not the playback quality should be limited by the size of the video element. Useful for reducing bandwidth usage for smaller video elements where a higher quality would not be beneficial. Default OFF
|
|
140
|
+
* `ON` - Playback quality will be limited by the size of the video element
|
|
141
|
+
* `OFF` - Playback quality will not be affected by the size of the video element
|
|
142
|
+
* `posterUrl` - Specify a URL for the poster image for the player
|
|
143
|
+
* `className` - HTML class to be added to the player
|
|
144
|
+
* `controlsClassName` - HTML class to be added to the player controls container
|
|
145
|
+
* `hlsjsOptions` - Additional options to provide to hls.js on initialization
|
|
146
|
+
* `dashjsOptions` - Additional options to provide to dashjs on initialization
|
|
147
|
+
* `playerCallback` - Callback function invoked after initialization has completed. Returns references to the player, the html video element, the dashjs or hls.js player instance, and the URL of the poster image
|
|
148
|
+
* `errorCallback` - Callback function invoked when an error occurs. Includes the error as well as a reference to the player.
|
|
149
|
+
* `restartCallback` - Callback function invoked when the player has restarted to attempt to recover from an error. Includes the error.
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## Eluvio Embed Player
|
|
154
|
+
|
|
155
|
+
For an even simpler experience, you can use the [Eluvio Embed application](https://embed.v3.contentfabric.io/) to generate embeddable and sharable links to content on the fabric.
|
|
156
|
+
|
|
157
|
+
- Go to https://embed.v3.contentfabric.io/
|
|
158
|
+
- Specify your content and player configuration
|
|
159
|
+
- Generate the embed URL
|
|
160
|
+
- Embed the provided frame code in your webpage or share the embed link
|
|
161
|
+
|
|
162
|
+
### Example
|
|
163
|
+
|
|
164
|
+
Embeddable Frame:
|
|
165
|
+
|
|
166
|
+
```html
|
|
167
|
+
<iframe
|
|
168
|
+
width=854 height=480 scrolling="no" marginheight="0"
|
|
169
|
+
marginwidth="0" frameborder="0" type="text/html"
|
|
170
|
+
src="https://embed.v3.contentfabric.io/?net=main&p&ct=h&vid=hq__CcdV4wnCNq9wv6jXpYeCQ2GE4FLQBFtVSSSt2XKfBJMrH89DFDGsfkpWWvBy16QBGGYeF5mLGo&mt=v"
|
|
171
|
+
allowtransparency="true"
|
|
172
|
+
></iframe>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Link:
|
|
176
|
+
|
|
177
|
+
https://embed.v3.contentfabric.io/?net=main&p&ct=h&vid=hq__CcdV4wnCNq9wv6jXpYeCQ2GE4FLQBFtVSSSt2XKfBJMrH89DFDGsfkpWWvBy16QBGGYeF5mLGo&mt=v
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -55,10 +55,6 @@ export const EluvioPlayerParameters = {
|
|
|
55
55
|
OFF: false,
|
|
56
56
|
ON: true
|
|
57
57
|
},
|
|
58
|
-
settings: {
|
|
59
|
-
OFF: false,
|
|
60
|
-
ON: true
|
|
61
|
-
},
|
|
62
58
|
capLevelToPlayerSize: {
|
|
63
59
|
OFF: false,
|
|
64
60
|
ON: true
|
|
@@ -111,7 +107,7 @@ const DefaultParameters = {
|
|
|
111
107
|
muted: EluvioPlayerParameters.muted.OFF,
|
|
112
108
|
loop: EluvioPlayerParameters.loop.OFF,
|
|
113
109
|
watermark: EluvioPlayerParameters.watermark.ON,
|
|
114
|
-
|
|
110
|
+
capLevelToPlayerSize: EluvioPlayerParameters.capLevelToPlayerSize.OFF,
|
|
115
111
|
posterUrl: undefined,
|
|
116
112
|
className: undefined,
|
|
117
113
|
controlsClassName: undefined,
|
|
@@ -559,6 +555,14 @@ export class EluvioPlayer {
|
|
|
559
555
|
} else {
|
|
560
556
|
this.target.classList.add("eluvio-player-s");
|
|
561
557
|
}
|
|
558
|
+
|
|
559
|
+
if(dimensions.width > dimensions.height) {
|
|
560
|
+
this.target.classList.add("eluvio-player-landscape");
|
|
561
|
+
this.target.classList.remove("eluvio-player-portrait");
|
|
562
|
+
} else {
|
|
563
|
+
this.target.classList.add("eluvio-player-portrait");
|
|
564
|
+
this.target.classList.remove("eluvio-player-landscape");
|
|
565
|
+
}
|
|
562
566
|
});
|
|
563
567
|
this.resizeObserver.observe(this.target);
|
|
564
568
|
|
|
@@ -5,7 +5,7 @@ $gray: #717171;
|
|
|
5
5
|
$black: #000;
|
|
6
6
|
|
|
7
7
|
$background-color: $black;
|
|
8
|
-
$controls-color: rgba(0, 0, 0, 0.
|
|
8
|
+
$controls-color: rgba(0, 0, 0, 0.8);
|
|
9
9
|
$menu-color: rgba(0, 0, 0, 0.8);
|
|
10
10
|
$menu-active-color: rgba(255, 255, 255, 0.1);
|
|
11
11
|
$button-color: rgba($white, 0.8);
|
|
@@ -384,14 +384,14 @@ $button-height: 35px;
|
|
|
384
384
|
|
|
385
385
|
&__settings-menu {
|
|
386
386
|
background: $menu-color;
|
|
387
|
-
border-radius: 3px;
|
|
388
|
-
bottom:
|
|
387
|
+
border-radius: 3px 0 0;
|
|
388
|
+
bottom: CALC(5px + #{$button-height} + #{$controls-padding} + #{$controls-padding});
|
|
389
389
|
color: $button-color;
|
|
390
|
-
max-height:
|
|
390
|
+
max-height: MIN(90%, 100% - CALC(25px + #{$button-height} + #{$controls-padding} + #{$controls-padding}));
|
|
391
391
|
min-height: 20px;
|
|
392
392
|
overflow-y: auto;
|
|
393
393
|
position: absolute;
|
|
394
|
-
right:
|
|
394
|
+
right: 0;
|
|
395
395
|
width: 250px;
|
|
396
396
|
z-index: 100;
|
|
397
397
|
|
|
@@ -638,8 +638,7 @@ $button-height: 35px;
|
|
|
638
638
|
.eluvio-player__controls {
|
|
639
639
|
padding: CALC(#{$controls-padding} * 1.5);
|
|
640
640
|
|
|
641
|
-
&__tooltip
|
|
642
|
-
&__settings-menu {
|
|
641
|
+
&__tooltip {
|
|
643
642
|
bottom: 65px;
|
|
644
643
|
}
|
|
645
644
|
}
|
|
@@ -666,6 +665,12 @@ $button-height: 35px;
|
|
|
666
665
|
}
|
|
667
666
|
}
|
|
668
667
|
|
|
668
|
+
.eluvio-player__controls__settings-menu {
|
|
669
|
+
bottom: CALC(#{$button-height * 0.9} + #{$controls-padding});
|
|
670
|
+
max-height: MIN(90%, 100% - CALC(25px + #{$button-height * 0.9} + #{$controls-padding}));
|
|
671
|
+
right: 0;
|
|
672
|
+
}
|
|
673
|
+
|
|
669
674
|
.eluvio-player__controls__volume-container {
|
|
670
675
|
display: none;
|
|
671
676
|
}
|
|
@@ -730,6 +735,29 @@ $button-height: 35px;
|
|
|
730
735
|
|
|
731
736
|
&__close {
|
|
732
737
|
display: unset;
|
|
738
|
+
z-index: 100;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Small width, but landscape
|
|
743
|
+
&.eluvio-player-landscape {
|
|
744
|
+
.eluvio-player__controls__settings-menu {
|
|
745
|
+
padding: 20px 0 50px;
|
|
746
|
+
|
|
747
|
+
&__option {
|
|
748
|
+
font-size: 14px;
|
|
749
|
+
margin-bottom: 5px;
|
|
750
|
+
text-align: center;
|
|
751
|
+
|
|
752
|
+
&-back {
|
|
753
|
+
font-size: 24px;
|
|
754
|
+
margin-bottom: 20px;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
&__close {
|
|
759
|
+
display: unset;
|
|
760
|
+
}
|
|
733
761
|
}
|
|
734
762
|
}
|
|
735
763
|
|
package/dist/0.bundle.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{174:function(t,e,r){"use strict";(function(t){
|
|
2
|
-
/*!
|
|
3
|
-
* The buffer module from node.js, for the browser.
|
|
4
|
-
*
|
|
5
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/
|
|
8
|
-
var n=r(241),i=r(242),f=r(214);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(t,e){if(kMaxLength()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Buffer.prototype:(null===t&&(t=new Buffer(e)),t.length=e),t}function Buffer(t,e,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,t)}return from(this,t,e,r)}function from(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function fromArrayBuffer(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Buffer.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Buffer.prototype:t=fromArrayLike(t,e);return t}(t,e,r,n):"string"==typeof e?function fromString(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(e,r),i=(t=createBuffer(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function fromObject(t,e){if(Buffer.isBuffer(e)){var r=0|checked(e.length);return 0===(t=createBuffer(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function isnan(t){return t!=t}(e.length)?createBuffer(t,0):fromArrayLike(t,e);if("Buffer"===e.type&&f(e.data))return fromArrayLike(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function assertSize(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(t,e){if(assertSize(e),t=createBuffer(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function fromArrayLike(t,e){var r=e.length<0?0:0|checked(e.length);t=createBuffer(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"latin1":case"binary":return latin1Slice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function swap(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,i){if(0===t.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:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,i);if("number"==typeof e)return e&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,e,r,n,i){var f,o=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,u/=2,a/=2,r/=2}function read(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var s=-1;for(f=r;f<u;f++)if(read(t,f)===read(e,-1===s?0:f-s)){if(-1===s&&(s=f),f-s+1===a)return s*o}else-1!==s&&(f-=f-s),s=-1}else for(r+a>u&&(r=u-a),f=r;f>=0;f--){for(var h=!0,c=0;c<a;c++)if(read(t,f+c)!==read(e,c)){h=!1;break}if(h)return f}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var f=e.length;if(f%2!=0)throw new TypeError("Invalid hex string");n>f/2&&(n=f/2);for(var o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(isNaN(u))return o;t[r+o]=u}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(function asciiToBytes(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function latin1Write(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(function utf16leToBytes(t,e){for(var r,n,i,f=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,f.push(i),f.push(n);return f}(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var f,o,u,a,s=t[i],h=null,c=s>239?4:s>223?3:s>191?2:1;if(i+c<=r)switch(c){case 1:s<128&&(h=s);break;case 2:128==(192&(f=t[i+1]))&&(a=(31&s)<<6|63&f)>127&&(h=a);break;case 3:f=t[i+1],o=t[i+2],128==(192&f)&&128==(192&o)&&(a=(15&s)<<12|(63&f)<<6|63&o)>2047&&(a<55296||a>57343)&&(h=a);break;case 4:f=t[i+1],o=t[i+2],u=t[i+3],128==(192&f)&&128==(192&o)&&128==(192&u)&&(a=(15&s)<<18|(63&f)<<12|(63&o)<<6|63&u)>65535&&a<1114112&&(h=a)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function decodeCodePointsArray(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=Buffer,e.SlowBuffer=function SlowBuffer(t){+t!=t&&(t=0);return Buffer.alloc(+t)},e.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(t){return t.__proto__=Buffer.prototype,t},Buffer.from=function(t,e,r){return from(null,t,e,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(t,e,r){return function alloc(t,e,r,n){return assertSize(e),e<=0?createBuffer(t,e):void 0!==r?"string"==typeof n?createBuffer(t,e).fill(r,n):createBuffer(t,e).fill(r):createBuffer(t,e)}(null,t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(null,t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(null,t)},Buffer.isBuffer=function isBuffer(t){return!(null==t||!t._isBuffer)},Buffer.compare=function compare(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,f=Math.min(r,n);i<f;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(t,e){if(!f(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Buffer.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!Buffer.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function swap32(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function swap64(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function toString(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function equals(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function inspect(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function compare(t,e,r,n,i){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var f=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),u=Math.min(f,o),a=this.slice(n,i),s=t.slice(e,r),h=0;h<u;++h)if(a[h]!==s[h]){f=a[h],o=s[h];break}return f<o?-1:o<f?1:0},Buffer.prototype.includes=function includes(t,e,r){return-1!==this.indexOf(t,e,r)},Buffer.prototype.indexOf=function indexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function write(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"latin1":case"binary":return latin1Write(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function latin1Slice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function hexSlice(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",f=e;f<r;++f)i+=toHex(t[f]);return i}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),i="",f=0;f<n.length;f+=2)i+=String.fromCharCode(n[f]+256*n[f+1]);return i}function checkOffset(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,i,f){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<f)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,f=Math.min(t.length-r,2);i<f;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,f=Math.min(t.length-r,4);i<f;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function checkIEEE754(t,e,r,n,i,f){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(t,e,r,n,f){return f||checkIEEE754(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,f){return f||checkIEEE754(t,0,r,8),i.write(t,e,r,n,52,8),r+8}Buffer.prototype.slice=function slice(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=Buffer.prototype;else{var i=e-t;r=new Buffer(i,void 0);for(var f=0;f<i;++f)r[f]=this[f+t]}return r},Buffer.prototype.readUIntLE=function readUIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,f=0;++f<e&&(i*=256);)n+=this[t+f]*i;return n},Buffer.prototype.readUIntBE=function readUIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUInt8=function readUInt8(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function readUInt16LE(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function readIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,f=0;++f<e&&(i*=256);)n+=this[t+f]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function readIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,i=1,f=this[t+--n];n>0&&(i*=256);)f+=this[t+--n]*i;return f>=(i*=128)&&(f-=Math.pow(2,8*e)),f},Buffer.prototype.readInt8=function readInt8(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function readInt16LE(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function readFloatLE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,f=0;for(this[e]=255&t;++f<r&&(i*=256);)this[e+f]=t/i&255;return e+r},Buffer.prototype.writeUIntBE=function writeUIntBE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,f=1;for(this[e+i]=255&t;--i>=0&&(f*=256);)this[e+i]=t/f&255;return e+r},Buffer.prototype.writeUInt8=function writeUInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function writeIntLE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=0,o=1,u=0;for(this[e]=255&t;++f<r&&(o*=256);)t<0&&0===u&&0!==this[e+f-1]&&(u=1),this[e+f]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function writeIntBE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var f=r-1,o=1,u=0;for(this[e+f]=255&t;--f>=0&&(o*=256);)t<0&&0===u&&0!==this[e+f+1]&&(u=1),this[e+f]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function writeInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function writeInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function writeInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function writeInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function writeInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function writeFloatLE(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function copy(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<n-r&&(n=t.length-e+r);var i,f=n-r;if(this===t&&r<e&&e<n)for(i=f-1;i>=0;--i)t[i+e]=this[i+r];else if(f<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<f;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+f),e);return f},Buffer.prototype.fill=function fill(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var f;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(f=e;f<r;++f)this[f]=t;else{var o=Buffer.isBuffer(t)?t:utf8ToBytes(new Buffer(t,n).toString()),u=o.length;for(f=0;f<r-e;++f)this[f+e]=o[f%u]}return this};var o=/[^+\/0-9A-Za-z-_]/g;function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){var r;e=e||1/0;for(var n=t.length,i=null,f=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&f.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&f.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&f.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&f.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;f.push(r)}else if(r<2048){if((e-=2)<0)break;f.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;f.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;f.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return f}function base64ToBytes(t){return n.toByteArray(function base64clean(t){if((t=function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(o,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function blitBuffer(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(24))},175:function(t,e){var r,n,i=t.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(t){if(r===setTimeout)return setTimeout(t,0);if((r===defaultSetTimout||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(t){r=defaultSetTimout}try{n="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(t){n=defaultClearTimeout}}();var f,o=[],u=!1,a=-1;function cleanUpNextTick(){u&&f&&(u=!1,f.length?o=f.concat(o):a=-1,o.length&&drainQueue())}function drainQueue(){if(!u){var t=runTimeout(cleanUpNextTick);u=!0;for(var e=o.length;e;){for(f=o,o=[];++a<e;)f&&f[a].run();a=-1,e=o.length}f=null,u=!1,function runClearTimeout(t){if(n===clearTimeout)return clearTimeout(t);if((n===defaultClearTimeout||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function Item(t,e){this.fun=t,this.array=e}function noop(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];o.push(new Item(t,e)),1!==o.length||u||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=noop,i.addListener=noop,i.once=noop,i.off=noop,i.removeListener=noop,i.removeAllListeners=noop,i.emit=noop,i.prependListener=noop,i.prependOnceListener=noop,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},214:function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},241:function(t,e,r){"use strict";e.byteLength=function byteLength(t){var e=getLens(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function toByteArray(t){var e,r,n=getLens(t),o=n[0],u=n[1],a=new f(function _byteLength(t,e,r){return 3*(e+r)/4-r}(0,o,u)),s=0,h=u>0?o-4:o;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===u&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[s++]=255&e);1===u&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},e.fromByteArray=function fromByteArray(t){for(var e,r=t.length,i=r%3,f=[],o=0,u=r-i;o<u;o+=16383)f.push(encodeChunk(t,o,o+16383>u?u:o+16383));1===i?(e=t[r-1],f.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],f.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return f.join("")};for(var n=[],i=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=o.length;u<a;++u)n[u]=o[u],i[o.charCodeAt(u)]=u;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function encodeChunk(t,e,r){for(var i,f,o=[],u=e;u<r;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),o.push(n[(f=i)>>18&63]+n[f>>12&63]+n[f>>6&63]+n[63&f]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},242:function(t,e){
|
|
9
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
-
e.read=function(t,e,r,n,i){var f,o,u=8*i-n-1,a=(1<<u)-1,s=a>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,f=p&(1<<-h)-1,p>>=-h,h+=u;h>0;f=256*f+t[e+c],c+=l,h-=8);for(o=f&(1<<-h)-1,f>>=-h,h+=n;h>0;o=256*o+t[e+c],c+=l,h-=8);if(0===f)f=1-s;else{if(f===a)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),f-=s}return(p?-1:1)*o*Math.pow(2,f-n)},e.write=function(t,e,r,n,i,f){var o,u,a,s=8*f-i-1,h=(1<<s)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:f-1,g=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),(e+=o+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(o++,a/=2),o+c>=h?(u=0,o=h):o+c>=1?(u=(e*a-1)*Math.pow(2,i),o+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&u,p+=g,u/=256,i-=8);for(o=o<<i|u,s+=i;s>0;t[r+p]=255&o,p+=g,o/=256,s-=8);t[r+p-g]|=128*y}}}]);
|