├── pages ├── index │ ├── index.json │ ├── index.wxss │ ├── index.wxml │ └── index.js └── chat │ ├── index.json │ ├── index.wxml │ ├── index.wxss │ └── index.js ├── package.json ├── screenshots_1.png ├── sitemap.json ├── app.json ├── README.md ├── utils ├── util.js ├── weapp.socket.io.js └── lib │ └── weapp.socket.io.js ├── yarn.lock ├── app.wxss ├── project.config.json ├── app.js └── styles └── weui.wxss /pages/index/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "debug": "^4.1.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /screenshots_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weapp-socketio/socket.io-weapp-demo/HEAD/screenshots_1.png -------------------------------------------------------------------------------- /pages/chat/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "backgroundTextStyle": "light", 3 | "navigationBarBackgroundColor": "#fff", 4 | "navigationBarTitleText": "在线聊天室", 5 | "navigationBarTextStyle": "black" 6 | } 7 | -------------------------------------------------------------------------------- /sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | .chat-btn { 2 | background-color: white; 3 | width: 80%; 4 | margin: auto; 5 | height: 80rpx; 6 | border-radius: 10rpx; 7 | text-align: center; 8 | line-height: 80rpx; 9 | } 10 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": ["pages/index/index", "pages/chat/index"], 3 | "window": { 4 | "backgroundTextStyle": "light", 5 | "navigationBarBackgroundColor": "#fff", 6 | "navigationBarTitleText": "weapp.socket.io chat demo", 7 | "navigationBarTextStyle": "black" 8 | }, 9 | "sitemapLocation": "sitemap.json" 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weapp.socket.io demo 2 | 3 | 本项目基于聊天室的案例演示了 [weapp.socket.io](https://github.com/wxsocketio/weapp.socket.io) 的基本用法. 4 | 5 | Server 端使用的是 [socket.io](https://socket.io) 官方的 [chat demo](https://socket.io/demos/chat/), 你可以同时使用两者进行聊天测试。 6 | 7 | > 默认使用了 Socket.io 官网版本 8 | 9 | > 注意: 10 | > 因为 Server 的地址是 `HTTPS` 的, 由于小程序开发版本对域名的限制, 11 | > 请在 `微信开发者工具` -> `详情` 菜单中勾选 `不校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书` 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | module.exports = { 18 | formatTime: formatTime 19 | } 20 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | debug@^4.1.1: 6 | version "4.1.1" 7 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" 8 | integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== 9 | dependencies: 10 | ms "^2.1.1" 11 | 12 | ms@^2.1.1: 13 | version "2.1.2" 14 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 15 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 16 | -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | @import './styles/weui.wxss'; 2 | 3 | page { 4 | background-color: #f8f8f8; 5 | font-size: 16px; 6 | font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif; 7 | } 8 | .page__hd { 9 | padding: 40px; 10 | } 11 | .page__bd { 12 | padding-bottom: 40px; 13 | } 14 | .page__bd_spacing { 15 | padding-left: 15px; 16 | padding-right: 15px; 17 | } 18 | 19 | .page__ft { 20 | padding-bottom: 10px; 21 | text-align: center; 22 | } 23 | 24 | .page__title { 25 | text-align: left; 26 | font-size: 20px; 27 | font-weight: 400; 28 | } 29 | 30 | .page__desc { 31 | margin-top: 5px; 32 | color: #888888; 33 | text-align: left; 34 | font-size: 14px; 35 | } 36 | -------------------------------------------------------------------------------- /pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 聊天室 Demo 4 | 本 Demo 主要为开发者演示 weapp.socket.io 的基本用法 5 | 6 | 7 | 8 | 9 | 10 | 11 | 进入聊天室 12 | 13 | 14 | Test Buffer 15 | 16 | -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件。", 3 | "packOptions": { 4 | "ignore": [] 5 | }, 6 | "setting": { 7 | "urlCheck": false, 8 | "es6": true, 9 | "postcss": true, 10 | "minified": true, 11 | "newFeature": true 12 | }, 13 | "compileType": "miniprogram", 14 | "libVersion": "2.10.2", 15 | "appid": "wx3a918974b28755e0", 16 | "projectname": "socket.io-weapp-demo", 17 | "isGameTourist": false, 18 | "simulatorType": "wechat", 19 | "simulatorPluginLibVersion": {}, 20 | "condition": { 21 | "search": { 22 | "current": -1, 23 | "list": [] 24 | }, 25 | "conversation": { 26 | "current": -1, 27 | "list": [] 28 | }, 29 | "plugin": { 30 | "current": -1, 31 | "list": [] 32 | }, 33 | "game": { 34 | "currentL": -1, 35 | "list": [] 36 | }, 37 | "miniprogram": { 38 | "current": -1, 39 | "list": [ 40 | { 41 | "id": -1, 42 | "name": "chat", 43 | "pathName": "pages/chat/index", 44 | "query": "" 45 | } 46 | ] 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | // 展示本地存储能力 5 | var logs = wx.getStorageSync('logs') || [] 6 | logs.unshift(Date.now()) 7 | wx.setStorageSync('logs', logs) 8 | 9 | // 登录 10 | wx.login({ 11 | success: res => { 12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 13 | } 14 | }) 15 | // 获取用户信息 16 | wx.getSetting({ 17 | success: res => { 18 | if (res.authSetting['scope.userInfo']) { 19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 20 | wx.getUserInfo({ 21 | success: res => { 22 | // 可以将 res 发送给后台解码出 unionId 23 | this.globalData.userInfo = res.userInfo 24 | 25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 26 | // 所以此处加入 callback 以防止这种情况 27 | if (this.userInfoReadyCallback) { 28 | this.userInfoReadyCallback(res) 29 | } 30 | } 31 | }) 32 | } 33 | } 34 | }) 35 | }, 36 | globalData: { 37 | userInfo: null 38 | } 39 | }) -------------------------------------------------------------------------------- /pages/chat/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{message.user}} 7 | {{message.content}} 8 | 9 | 10 | 11 | {{message.content}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /pages/index/index.js: -------------------------------------------------------------------------------- 1 | // const io = require('../../utils/weapp.socket.io.dev.js'); 2 | 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: {}, 8 | 9 | /** 10 | * 生命周期函数--监听页面加载 11 | */ 12 | onLoad: function(options) { 13 | // const socket = (this.socket = io('http://localhost:3000/', { 14 | // path: '/test', 15 | // query: { 16 | // token: 'cde', 17 | // }, 18 | // })); 19 | }, 20 | 21 | /** 22 | * 生命周期函数--监听页面初次渲染完成 23 | */ 24 | onReady: function() {}, 25 | 26 | /** 27 | * 生命周期函数--监听页面显示 28 | */ 29 | onShow: function() {}, 30 | 31 | /** 32 | * 生命周期函数--监听页面隐藏 33 | */ 34 | onHide: function() {}, 35 | 36 | /** 37 | * 生命周期函数--监听页面卸载 38 | */ 39 | onUnload: function() {}, 40 | 41 | /** 42 | * 页面相关事件处理函数--监听用户下拉动作 43 | */ 44 | onPullDownRefresh: function() {}, 45 | 46 | /** 47 | * 页面上拉触底事件的处理函数 48 | */ 49 | onReachBottom: function() {}, 50 | 51 | /** 52 | * 用户点击右上角分享 53 | */ 54 | onShareAppMessage: function() {}, 55 | 56 | getuserinfo: function(res) { 57 | console.log('getuserinfo: ', res); 58 | }, 59 | }); 60 | -------------------------------------------------------------------------------- /pages/chat/index.wxss: -------------------------------------------------------------------------------- 1 | .page-wrap { 2 | display: flex; 3 | flex-direction: column; 4 | background: #ebebeb; 5 | position: absolute; 6 | top: 0; 7 | bottom: 0; 8 | left: 0; 9 | right: 0; 10 | overflow: hidden; 11 | } 12 | 13 | .chat-container { 14 | flex: 1; 15 | text-align: center; 16 | overflow-y: auto; 17 | } 18 | 19 | .system-message { 20 | font-size: 24rpx; 21 | color: #cecece; 22 | display: inline-block; 23 | } 24 | 25 | .user-message { 26 | margin: 0 20rpx; 27 | text-align: left; 28 | font-size: 0; 29 | display: flex; 30 | } 31 | 32 | .avatar { 33 | width: 84rpx; 34 | height: 84rpx; 35 | border: #a5a5a7 1rpx solid; 36 | display: inline-block; 37 | vertical-align: top; 38 | } 39 | 40 | .text { 41 | display: inline-block; 42 | vertical-align: top; 43 | } 44 | 45 | .user-message.other .text { 46 | margin-left: 19rpx; 47 | } 48 | 49 | .user-message.other .text view { 50 | display: inline-block; 51 | } 52 | 53 | .text .nickname { 54 | color: #737373; 55 | } 56 | 57 | .text .content { 58 | font-size: 34rpx; 59 | padding-left: 10rpx; 60 | position: relative; 61 | } 62 | 63 | .text .nickname { 64 | font-size: 34rpx; 65 | } 66 | 67 | .user-message.other .text .content::after, 68 | .user-message.other .text .content::before { 69 | right: 100%; 70 | border-right-style: solid; 71 | } 72 | 73 | .input-panel { 74 | height: 100rpx; 75 | box-sizing: border-box; 76 | padding: 13rpx 20rpx 0; 77 | background: #f5f5f7; 78 | border-top: #d7d7d9 1rpx solid; 79 | box-sizing: border-box; 80 | display: flex; 81 | } 82 | 83 | .send-input { 84 | flex: 1; 85 | height: 72rpx; 86 | background: #fff; 87 | border: #ddd 1rpx solid; 88 | border-radius: 3px; 89 | /* margin-right: 20rpx; */ 90 | box-sizing: border-box; 91 | /* padding: 0 10rpx; */ 92 | } 93 | 94 | .me .nickname { 95 | display: none; 96 | } 97 | 98 | @media (max-width: 360px) { 99 | .avatar { 100 | width: 100rpx; 101 | height: 100rpx; 102 | } 103 | 104 | .text .content { 105 | font-size: 36rpx; 106 | line-height: 44rpx; 107 | padding: 20rpx; 108 | position: relative; 109 | } 110 | 111 | .text .nickname { 112 | font-size: 42rpx; 113 | } 114 | 115 | .user-message.other .text .content::before { 116 | top: 22rpx; 117 | border-right-color: #ccc; 118 | } 119 | 120 | .user-message.other .text .content::after { 121 | border: 14rpx solid transparent; 122 | top: 23rpx; 123 | border-right-color: #fff; 124 | } 125 | 126 | .input-panel { 127 | height: 120rpx; 128 | box-sizing: border-box; 129 | padding: 13rpx 20rpx 0; 130 | background: #f5f5f7; 131 | border-top: #d7d7d9 1rpx solid; 132 | box-sizing: border-box; 133 | display: flex; 134 | } 135 | 136 | .send-input { 137 | flex: 1; 138 | height: 92rpx; 139 | background: #fff; 140 | border: #ddd 1rpx solid; 141 | border-radius: 3px; 142 | /* margin-right: 20rpx; */ 143 | box-sizing: border-box; 144 | /* padding: 0 10rpx; */ 145 | } 146 | } -------------------------------------------------------------------------------- /pages/chat/index.js: -------------------------------------------------------------------------------- 1 | const io = require('../../utils/weapp.socket.io.js') 2 | 3 | //index.js 4 | //获取应用实例 5 | const app = getApp() 6 | 7 | console.log('wx: ', wx) 8 | 9 | /** 10 | * 生成一条聊天室的消息的唯一 ID 11 | */ 12 | function msgUuid() { 13 | if (!msgUuid.next) { 14 | msgUuid.next = 0 15 | } 16 | return 'msg-' + ++msgUuid.next 17 | } 18 | 19 | /** 20 | * 生成聊天室的系统消息 21 | */ 22 | function createSystemMessage(content) { 23 | return { 24 | id: msgUuid(), 25 | type: 'system', 26 | content 27 | } 28 | } 29 | 30 | /** 31 | * 生成聊天室的聊天消息 32 | */ 33 | function createUserMessage(content, user, isMe) { 34 | const color = getUsernameColor(user) 35 | return { 36 | id: msgUuid(), 37 | type: 'speak', 38 | content, 39 | user, 40 | isMe, 41 | color 42 | } 43 | } 44 | 45 | var COLORS = [ 46 | '#e21400', 47 | '#91580f', 48 | '#f8a700', 49 | '#f78b00', 50 | '#58dc00', 51 | '#287b00', 52 | '#a8f07a', 53 | '#4ae8c4', 54 | '#3b88eb', 55 | '#3824aa', 56 | '#a700ff', 57 | '#d300e7' 58 | ] 59 | 60 | // Gets the color of a username through our hash function 61 | function getUsernameColor(username) { 62 | // Compute hash code 63 | var hash = 7 64 | for (var i = 0; i < username.length; i++) { 65 | hash = username.charCodeAt(i) + (hash << 5) - hash 66 | } 67 | // Calculate color 68 | var index = Math.abs(hash % COLORS.length) 69 | return COLORS[index] 70 | } 71 | 72 | Page({ 73 | data: { 74 | inputContent: 'Hi guys, Im testing weapp socket.io', 75 | messages: [], 76 | lastMessageId: 'none' 77 | }, 78 | 79 | onLoad: function () {}, 80 | 81 | /** 82 | * 页面渲染完成后,启动聊天室 83 | * */ 84 | onReady() { 85 | wx.setNavigationBarTitle({ 86 | title: '在线聊天室' 87 | }) 88 | if (!this.pageReady) { 89 | this.pageReady = true 90 | this.enter() 91 | } 92 | }, 93 | 94 | /** 95 | * 后续后台切换回前台的时候,也要重新启动聊天室 96 | */ 97 | onShow() { 98 | if (this.pageReady && !this.socket) { 99 | this.enter() 100 | } 101 | }, 102 | 103 | onUnload() { 104 | this.quit() 105 | }, 106 | 107 | quit() { 108 | if (this.socket) { 109 | this.socket.close() 110 | this.socket = null 111 | } 112 | 113 | if (this.osocket) { 114 | this.osocket.close() 115 | this.osocket = null 116 | } 117 | }, 118 | 119 | /** 120 | * 启动聊天室 121 | */ 122 | enter() { 123 | this.pushMessage(createSystemMessage('正在登录...')) 124 | // 如果登录过,会记录当前用户在 this.me 上 125 | if (!this.me) { 126 | wx.getUserInfo({ 127 | success: (res) => { 128 | this.me = res.userInfo 129 | this.createConnect() 130 | } 131 | }) 132 | } else { 133 | this.createConnect() 134 | } 135 | }, 136 | 137 | /** 138 | * 通用更新当前消息集合的方法 139 | */ 140 | updateMessages(updater) { 141 | var messages = this.data.messages 142 | updater(messages) 143 | 144 | this.setData({ 145 | messages 146 | }) 147 | 148 | // 需要先更新 messagess 数据后再设置滚动位置,否则不能生效 149 | var lastMessageId = messages.length 150 | ? messages[messages.length - 1].id 151 | : 'none' 152 | this.setData({ 153 | lastMessageId 154 | }) 155 | }, 156 | 157 | /** 158 | * 追加一条消息 159 | */ 160 | pushMessage(message) { 161 | this.updateMessages((messages) => messages.push(message)) 162 | }, 163 | 164 | /** 165 | * 替换上一条消息 166 | */ 167 | amendMessage(message) { 168 | this.updateMessages((messages) => messages.splice(-1, 1, message)) 169 | }, 170 | 171 | /** 172 | * 删除上一条消息 173 | */ 174 | popMessage() { 175 | this.updateMessages((messages) => messages.pop()) 176 | }, 177 | 178 | changeInputContent: function (e) { 179 | this.setData({ 180 | inputContent: e.detail.value 181 | }) 182 | }, 183 | 184 | sendMessage: function (e) { 185 | const msg = e.detail.value 186 | if (!msg) { 187 | return 188 | } 189 | this.socket.emit('new message', msg) 190 | this.pushMessage(createUserMessage(msg, this.me.nickName)) 191 | this.setData({ 192 | inputContent: null 193 | }) 194 | }, 195 | 196 | createConnect: function (e) { 197 | this.amendMessage(createSystemMessage('正在加入群聊...')) 198 | 199 | const socket = (this.socket = io( 200 | 'https://socketio-chat-h9jt.herokuapp.com/' 201 | )) 202 | console.log('socket: ', socket) 203 | 204 | /** 205 | * Aboud connection 206 | */ 207 | socket.on('connect', () => { 208 | this.popMessage() 209 | this.pushMessage(createSystemMessage('连接成功')) 210 | }) 211 | 212 | socket.on('connect_error', (d) => { 213 | this.pushMessage(createSystemMessage(`connect_error: ${d}`)) 214 | }) 215 | 216 | socket.on('connect_timeout', (d) => { 217 | this.pushMessage(createSystemMessage(`connect_timeout: ${d}`)) 218 | }) 219 | 220 | socket.on('disconnect', (reason) => { 221 | this.pushMessage(createSystemMessage(`disconnect: ${reason}`)) 222 | }) 223 | 224 | socket.on('reconnect', (attemptNumber) => { 225 | this.pushMessage( 226 | createSystemMessage(`reconnect success: ${attemptNumber}`) 227 | ) 228 | }) 229 | 230 | socket.on('reconnect_failed', () => { 231 | this.pushMessage(createSystemMessage('reconnect_failed')) 232 | }) 233 | 234 | socket.on('reconnect_attempt', () => { 235 | this.pushMessage(createSystemMessage('正在尝试重连')) 236 | }) 237 | 238 | socket.on('error', (err) => { 239 | this.pushMessage(createSystemMessage(`error: ${err}`)) 240 | }) 241 | 242 | /** 243 | * About chat 244 | */ 245 | socket.on('login', (d) => { 246 | this.pushMessage( 247 | createSystemMessage(`您已加入聊天室,当前共有 ${d.numUsers} 人`) 248 | ) 249 | }) 250 | 251 | socket.on('new message', (d) => { 252 | const { username, message } = d 253 | this.pushMessage(createUserMessage(message, username)) 254 | }) 255 | 256 | socket.on('user joined', (d) => { 257 | this.pushMessage( 258 | createSystemMessage(`${d.username} 来了,当前共有 ${d.numUsers} 人`) 259 | ) 260 | }) 261 | 262 | socket.on('user left', (d) => { 263 | this.pushMessage( 264 | createSystemMessage(`${d.username} 离开了,当前共有 ${d.numUsers} 人`) 265 | ) 266 | }) 267 | 268 | socket.on('typing', (d) => { 269 | wx.setNavigationBarTitle({ 270 | title: `${d.username} is typing...` 271 | }) 272 | }) 273 | 274 | socket.on('stop typing', (d) => { 275 | wx.setNavigationBarTitle({ 276 | title: '在线聊天室' 277 | }) 278 | }) 279 | 280 | socket.emit('add user', this.me.nickName) 281 | } 282 | }) 283 | -------------------------------------------------------------------------------- /styles/weui.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | line-height: 1.6; 3 | font-family: -apple-system-font, 'Helvetica Neue', sans-serif; 4 | } 5 | icon { 6 | vertical-align: middle; 7 | } 8 | .weui-cells { 9 | position: relative; 10 | margin-top: 1.17647059em; 11 | background-color: #ffffff; 12 | line-height: 1.41176471; 13 | font-size: 17px; 14 | } 15 | .weui-cells:before { 16 | content: ' '; 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | right: 0; 21 | height: 1px; 22 | border-top: 1rpx solid #d9d9d9; 23 | color: #d9d9d9; 24 | } 25 | .weui-cells:after { 26 | content: ' '; 27 | position: absolute; 28 | left: 0; 29 | bottom: 0; 30 | right: 0; 31 | height: 1px; 32 | border-bottom: 1rpx solid #d9d9d9; 33 | color: #d9d9d9; 34 | } 35 | .weui-cells__title { 36 | margin-top: 0.77em; 37 | margin-bottom: 0.3em; 38 | padding-left: 15px; 39 | padding-right: 15px; 40 | color: #999999; 41 | font-size: 14px; 42 | } 43 | .weui-cells_after-title { 44 | margin-top: 0; 45 | } 46 | .weui-cells__tips { 47 | margin-top: 0.3em; 48 | color: #999999; 49 | padding-left: 15px; 50 | padding-right: 15px; 51 | font-size: 14px; 52 | } 53 | .weui-cell { 54 | padding: 10px 15px; 55 | position: relative; 56 | display: -webkit-box; 57 | display: -webkit-flex; 58 | display: flex; 59 | -webkit-box-align: center; 60 | -webkit-align-items: center; 61 | align-items: center; 62 | } 63 | .weui-cell:before { 64 | content: ' '; 65 | position: absolute; 66 | left: 0; 67 | top: 0; 68 | right: 0; 69 | height: 1px; 70 | border-top: 1rpx solid #d9d9d9; 71 | color: #d9d9d9; 72 | left: 15px; 73 | } 74 | .weui-cell:first-child:before { 75 | display: none; 76 | } 77 | .weui-cell_active { 78 | background-color: #ececec; 79 | } 80 | .weui-cell_primary { 81 | -webkit-box-align: start; 82 | -webkit-align-items: flex-start; 83 | align-items: flex-start; 84 | } 85 | .weui-cell__bd { 86 | -webkit-box-flex: 1; 87 | -webkit-flex: 1; 88 | flex: 1; 89 | } 90 | .weui-cell__ft { 91 | text-align: right; 92 | color: #999999; 93 | } 94 | .weui-cell_access { 95 | color: inherit; 96 | } 97 | .weui-cell__ft_in-access { 98 | padding-right: 13px; 99 | position: relative; 100 | } 101 | .weui-cell__ft_in-access:after { 102 | content: ' '; 103 | display: inline-block; 104 | height: 6px; 105 | width: 6px; 106 | border-width: 2px 2px 0 0; 107 | border-color: #c8c8cd; 108 | border-style: solid; 109 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 110 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 111 | position: relative; 112 | top: -2px; 113 | position: absolute; 114 | top: 50%; 115 | margin-top: -4px; 116 | right: 2px; 117 | } 118 | .weui-cell_link { 119 | color: #586c94; 120 | font-size: 14px; 121 | } 122 | .weui-cell_link:active { 123 | background-color: #ececec; 124 | } 125 | .weui-cell_link:first-child:before { 126 | display: block; 127 | } 128 | .weui-icon-radio { 129 | margin-left: 3.2px; 130 | margin-right: 3.2px; 131 | } 132 | .weui-icon-checkbox_circle, 133 | .weui-icon-checkbox_success { 134 | margin-left: 4.6px; 135 | margin-right: 4.6px; 136 | } 137 | .weui-check__label:active { 138 | background-color: #ececec; 139 | } 140 | .weui-check { 141 | position: absolute; 142 | left: -9999px; 143 | } 144 | .weui-check__hd_in-checkbox { 145 | padding-right: 0.35em; 146 | } 147 | .weui-cell__ft_in-radio { 148 | padding-left: 0.35em; 149 | } 150 | .weui-cell_input { 151 | padding-top: 0; 152 | padding-bottom: 0; 153 | } 154 | .weui-label { 155 | width: 105px; 156 | word-wrap: break-word; 157 | word-break: break-all; 158 | } 159 | .weui-input { 160 | height: 2.58823529em; 161 | min-height: 2.58823529em; 162 | line-height: 2.58823529em; 163 | } 164 | .weui-toptips { 165 | position: fixed; 166 | -webkit-transform: translateZ(0); 167 | transform: translateZ(0); 168 | top: 0; 169 | left: 0; 170 | right: 0; 171 | padding: 5px; 172 | font-size: 14px; 173 | text-align: center; 174 | color: #ffffff; 175 | z-index: 5000; 176 | word-wrap: break-word; 177 | word-break: break-all; 178 | } 179 | .weui-toptips_warn { 180 | background-color: #e64340; 181 | } 182 | .weui-textarea { 183 | display: block; 184 | width: 100%; 185 | } 186 | .weui-textarea-counter { 187 | color: #b2b2b2; 188 | text-align: right; 189 | } 190 | .weui-textarea-counter_warn { 191 | color: #e64340; 192 | } 193 | .weui-cell_warn { 194 | color: #e64340; 195 | } 196 | .weui-form-preview { 197 | position: relative; 198 | background-color: #ffffff; 199 | } 200 | .weui-form-preview:before { 201 | content: ' '; 202 | position: absolute; 203 | left: 0; 204 | top: 0; 205 | right: 0; 206 | height: 1px; 207 | border-top: 1rpx solid #d9d9d9; 208 | color: #d9d9d9; 209 | } 210 | .weui-form-preview:after { 211 | content: ' '; 212 | position: absolute; 213 | left: 0; 214 | bottom: 0; 215 | right: 0; 216 | height: 1px; 217 | border-bottom: 1rpx solid #d9d9d9; 218 | color: #d9d9d9; 219 | } 220 | .weui-form-preview__value { 221 | font-size: 14px; 222 | } 223 | .weui-form-preview__value_in-hd { 224 | font-size: 26px; 225 | } 226 | .weui-form-preview__hd { 227 | position: relative; 228 | padding: 10px 15px; 229 | text-align: right; 230 | line-height: 2.5em; 231 | } 232 | .weui-form-preview__hd:after { 233 | content: ' '; 234 | position: absolute; 235 | left: 0; 236 | bottom: 0; 237 | right: 0; 238 | height: 1px; 239 | border-bottom: 1rpx solid #d9d9d9; 240 | color: #d9d9d9; 241 | left: 15px; 242 | } 243 | .weui-form-preview__bd { 244 | padding: 10px 15px; 245 | font-size: 0.9em; 246 | text-align: right; 247 | color: #999999; 248 | line-height: 2; 249 | } 250 | .weui-form-preview__ft { 251 | position: relative; 252 | line-height: 50px; 253 | display: -webkit-box; 254 | display: -webkit-flex; 255 | display: flex; 256 | } 257 | .weui-form-preview__ft:after { 258 | content: ' '; 259 | position: absolute; 260 | left: 0; 261 | top: 0; 262 | right: 0; 263 | height: 1px; 264 | border-top: 1rpx solid #d5d5d6; 265 | color: #d5d5d6; 266 | } 267 | .weui-form-preview__item { 268 | overflow: hidden; 269 | } 270 | .weui-form-preview__label { 271 | float: left; 272 | margin-right: 1em; 273 | min-width: 4em; 274 | color: #999999; 275 | text-align: justify; 276 | text-align-last: justify; 277 | } 278 | .weui-form-preview__value { 279 | display: block; 280 | overflow: hidden; 281 | word-break: normal; 282 | word-wrap: break-word; 283 | } 284 | .weui-form-preview__btn { 285 | position: relative; 286 | display: block; 287 | -webkit-box-flex: 1; 288 | -webkit-flex: 1; 289 | flex: 1; 290 | color: #3cc51f; 291 | text-align: center; 292 | } 293 | .weui-form-preview__btn:after { 294 | content: ' '; 295 | position: absolute; 296 | left: 0; 297 | top: 0; 298 | width: 1px; 299 | bottom: 0; 300 | border-left: 1rpx solid #d5d5d6; 301 | color: #d5d5d6; 302 | } 303 | .weui-form-preview__btn:first-child:after { 304 | display: none; 305 | } 306 | .weui-form-preview__btn_active { 307 | background-color: #eeeeee; 308 | } 309 | .weui-form-preview__btn_default { 310 | color: #999999; 311 | } 312 | .weui-form-preview__btn_primary { 313 | color: #0bb20c; 314 | } 315 | .weui-cell_select { 316 | padding: 0; 317 | } 318 | .weui-select { 319 | position: relative; 320 | padding-left: 15px; 321 | padding-right: 30px; 322 | height: 2.58823529em; 323 | min-height: 2.58823529em; 324 | line-height: 2.58823529em; 325 | border-right: 1rpx solid #d9d9d9; 326 | } 327 | .weui-select:before { 328 | content: ' '; 329 | display: inline-block; 330 | height: 6px; 331 | width: 6px; 332 | border-width: 2px 2px 0 0; 333 | border-color: #c8c8cd; 334 | border-style: solid; 335 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 336 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 337 | position: relative; 338 | top: -2px; 339 | position: absolute; 340 | top: 50%; 341 | right: 15px; 342 | margin-top: -4px; 343 | } 344 | .weui-select_in-select-after { 345 | padding-left: 0; 346 | } 347 | .weui-cell__hd_in-select-after, 348 | .weui-cell__bd_in-select-before { 349 | padding-left: 15px; 350 | } 351 | .weui-cell_vcode { 352 | padding-right: 0; 353 | } 354 | .weui-vcode-img { 355 | margin-left: 5px; 356 | height: 2.58823529em; 357 | vertical-align: middle; 358 | } 359 | .weui-vcode-btn { 360 | display: inline-block; 361 | height: 2.58823529em; 362 | margin-left: 5px; 363 | padding: 0 0.6em 0 0.7em; 364 | border-left: 1px solid #e5e5e5; 365 | line-height: 2.58823529em; 366 | vertical-align: middle; 367 | font-size: 17px; 368 | color: #3cc51f; 369 | white-space: nowrap; 370 | } 371 | .weui-vcode-btn:active { 372 | color: #52a341; 373 | } 374 | .weui-cell_switch { 375 | padding-top: 6px; 376 | padding-bottom: 6px; 377 | } 378 | .weui-uploader__hd { 379 | display: -webkit-box; 380 | display: -webkit-flex; 381 | display: flex; 382 | padding-bottom: 10px; 383 | -webkit-box-align: center; 384 | -webkit-align-items: center; 385 | align-items: center; 386 | } 387 | .weui-uploader__title { 388 | -webkit-box-flex: 1; 389 | -webkit-flex: 1; 390 | flex: 1; 391 | } 392 | .weui-uploader__info { 393 | color: #b2b2b2; 394 | } 395 | .weui-uploader__bd { 396 | margin-bottom: -4px; 397 | margin-right: -9px; 398 | overflow: hidden; 399 | } 400 | .weui-uploader__file { 401 | float: left; 402 | margin-right: 9px; 403 | margin-bottom: 9px; 404 | } 405 | .weui-uploader__img { 406 | display: block; 407 | width: 79px; 408 | height: 79px; 409 | } 410 | .weui-uploader__file_status { 411 | position: relative; 412 | } 413 | .weui-uploader__file_status:before { 414 | content: ' '; 415 | position: absolute; 416 | top: 0; 417 | right: 0; 418 | bottom: 0; 419 | left: 0; 420 | background-color: rgba(0, 0, 0, 0.5); 421 | } 422 | .weui-uploader__file-content { 423 | position: absolute; 424 | top: 50%; 425 | left: 50%; 426 | -webkit-transform: translate(-50%, -50%); 427 | transform: translate(-50%, -50%); 428 | color: #ffffff; 429 | } 430 | .weui-uploader__input-box { 431 | float: left; 432 | position: relative; 433 | margin-right: 9px; 434 | margin-bottom: 9px; 435 | width: 77px; 436 | height: 77px; 437 | border: 1px solid #d9d9d9; 438 | } 439 | .weui-uploader__input-box:before, 440 | .weui-uploader__input-box:after { 441 | content: ' '; 442 | position: absolute; 443 | top: 50%; 444 | left: 50%; 445 | -webkit-transform: translate(-50%, -50%); 446 | transform: translate(-50%, -50%); 447 | background-color: #d9d9d9; 448 | } 449 | .weui-uploader__input-box:before { 450 | width: 2px; 451 | height: 39.5px; 452 | } 453 | .weui-uploader__input-box:after { 454 | width: 39.5px; 455 | height: 2px; 456 | } 457 | .weui-uploader__input-box:active { 458 | border-color: #999999; 459 | } 460 | .weui-uploader__input-box:active:before, 461 | .weui-uploader__input-box:active:after { 462 | background-color: #999999; 463 | } 464 | .weui-uploader__input { 465 | position: absolute; 466 | z-index: 1; 467 | top: 0; 468 | left: 0; 469 | width: 100%; 470 | height: 100%; 471 | opacity: 0; 472 | } 473 | .weui-article { 474 | padding: 20px 15px; 475 | font-size: 15px; 476 | } 477 | .weui-article__section { 478 | margin-bottom: 1.5em; 479 | } 480 | .weui-article__h1 { 481 | font-size: 18px; 482 | font-weight: 400; 483 | margin-bottom: 0.9em; 484 | } 485 | .weui-article__h2 { 486 | font-size: 16px; 487 | font-weight: 400; 488 | margin-bottom: 0.34em; 489 | } 490 | .weui-article__h3 { 491 | font-weight: 400; 492 | font-size: 15px; 493 | margin-bottom: 0.34em; 494 | } 495 | .weui-article__p { 496 | margin: 0 0 0.8em; 497 | } 498 | .weui-msg { 499 | padding-top: 36px; 500 | text-align: center; 501 | } 502 | .weui-msg__link { 503 | display: inline; 504 | color: #586c94; 505 | } 506 | .weui-msg__icon-area { 507 | margin-bottom: 30px; 508 | } 509 | .weui-msg__text-area { 510 | margin-bottom: 25px; 511 | padding: 0 20px; 512 | } 513 | .weui-msg__title { 514 | margin-bottom: 5px; 515 | font-weight: 400; 516 | font-size: 20px; 517 | } 518 | .weui-msg__desc { 519 | font-size: 14px; 520 | color: #999999; 521 | } 522 | .weui-msg__opr-area { 523 | margin-bottom: 25px; 524 | } 525 | .weui-msg__extra-area { 526 | margin-bottom: 15px; 527 | font-size: 14px; 528 | color: #999999; 529 | } 530 | @media screen and (min-height: 438px) { 531 | .weui-msg__extra-area { 532 | position: fixed; 533 | left: 0; 534 | bottom: 0; 535 | width: 100%; 536 | text-align: center; 537 | } 538 | } 539 | .weui-flex { 540 | display: -webkit-box; 541 | display: -webkit-flex; 542 | display: flex; 543 | } 544 | .weui-flex__item { 545 | -webkit-box-flex: 1; 546 | -webkit-flex: 1; 547 | flex: 1; 548 | } 549 | .weui-btn { 550 | margin-top: 15px; 551 | } 552 | .weui-btn:first-child { 553 | margin-top: 0; 554 | } 555 | .weui-btn-area { 556 | margin: 1.17647059em 15px 0.3em; 557 | } 558 | .weui-agree { 559 | display: block; 560 | padding: 0.5em 15px; 561 | font-size: 13px; 562 | } 563 | .weui-agree__text { 564 | color: #999999; 565 | } 566 | .weui-agree__link { 567 | display: inline; 568 | color: #586c94; 569 | } 570 | .weui-agree__checkbox { 571 | position: absolute; 572 | left: -9999px; 573 | } 574 | .weui-agree__checkbox-icon { 575 | position: relative; 576 | top: 2px; 577 | display: inline-block; 578 | border: 1px solid #d1d1d1; 579 | background-color: #ffffff; 580 | border-radius: 3px; 581 | width: 11px; 582 | height: 11px; 583 | } 584 | .weui-agree__checkbox-icon-check { 585 | position: absolute; 586 | top: 1px; 587 | left: 1px; 588 | } 589 | .weui-footer { 590 | color: #999999; 591 | font-size: 14px; 592 | text-align: center; 593 | } 594 | .weui-footer_fixed-bottom { 595 | position: fixed; 596 | bottom: 0.52em; 597 | left: 0; 598 | right: 0; 599 | } 600 | .weui-footer__links { 601 | font-size: 0; 602 | } 603 | .weui-footer__link { 604 | display: inline-block; 605 | vertical-align: top; 606 | margin: 0 0.62em; 607 | position: relative; 608 | font-size: 14px; 609 | color: #586c94; 610 | } 611 | .weui-footer__link:before { 612 | content: ' '; 613 | position: absolute; 614 | left: 0; 615 | top: 0; 616 | width: 1px; 617 | bottom: 0; 618 | border-left: 1rpx solid #c7c7c7; 619 | color: #c7c7c7; 620 | left: -0.65em; 621 | top: 0.36em; 622 | bottom: 0.36em; 623 | } 624 | .weui-footer__link:first-child:before { 625 | display: none; 626 | } 627 | .weui-footer__text { 628 | padding: 0 0.34em; 629 | font-size: 12px; 630 | } 631 | .weui-grids { 632 | border-top: 1rpx solid #d9d9d9; 633 | border-left: 1rpx solid #d9d9d9; 634 | overflow: hidden; 635 | } 636 | .weui-grid { 637 | position: relative; 638 | float: left; 639 | padding: 20px 10px; 640 | width: 33.33333333%; 641 | box-sizing: border-box; 642 | border-right: 1rpx solid #d9d9d9; 643 | border-bottom: 1rpx solid #d9d9d9; 644 | } 645 | .weui-grid_active { 646 | background-color: #ececec; 647 | } 648 | .weui-grid__icon { 649 | display: block; 650 | width: 28px; 651 | height: 28px; 652 | margin: 0 auto; 653 | } 654 | .weui-grid__label { 655 | margin-top: 5px; 656 | display: block; 657 | text-align: center; 658 | color: #000000; 659 | font-size: 14px; 660 | white-space: nowrap; 661 | text-overflow: ellipsis; 662 | overflow: hidden; 663 | } 664 | .weui-loading { 665 | margin: 0 5px; 666 | width: 20px; 667 | height: 20px; 668 | display: inline-block; 669 | vertical-align: middle; 670 | -webkit-animation: weuiLoading 1s steps(12, end) infinite; 671 | animation: weuiLoading 1s steps(12, end) infinite; 672 | background: transparent 673 | url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) 674 | no-repeat; 675 | background-size: 100%; 676 | } 677 | .weui-loading.weui-loading_transparent { 678 | background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E"); 679 | } 680 | @-webkit-keyframes weuiLoading { 681 | 0% { 682 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 683 | transform: rotate3d(0, 0, 1, 0deg); 684 | } 685 | 100% { 686 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 687 | transform: rotate3d(0, 0, 1, 360deg); 688 | } 689 | } 690 | @keyframes weuiLoading { 691 | 0% { 692 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 693 | transform: rotate3d(0, 0, 1, 0deg); 694 | } 695 | 100% { 696 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 697 | transform: rotate3d(0, 0, 1, 360deg); 698 | } 699 | } 700 | .weui-badge { 701 | display: inline-block; 702 | padding: 0.15em 0.4em; 703 | min-width: 8px; 704 | border-radius: 18px; 705 | background-color: #e64340; 706 | color: #ffffff; 707 | line-height: 1.2; 708 | text-align: center; 709 | font-size: 12px; 710 | vertical-align: middle; 711 | } 712 | .weui-badge_dot { 713 | padding: 0.4em; 714 | min-width: 0; 715 | } 716 | .weui-loadmore { 717 | width: 65%; 718 | margin: 1.5em auto; 719 | line-height: 1.6em; 720 | font-size: 14px; 721 | text-align: center; 722 | } 723 | .weui-loadmore__tips { 724 | display: inline-block; 725 | vertical-align: middle; 726 | } 727 | .weui-loadmore_line { 728 | border-top: 1px solid #e5e5e5; 729 | margin-top: 2.4em; 730 | } 731 | .weui-loadmore__tips_in-line { 732 | position: relative; 733 | top: -0.9em; 734 | padding: 0 0.55em; 735 | background-color: #ffffff; 736 | color: #999999; 737 | } 738 | .weui-loadmore__tips_in-dot { 739 | position: relative; 740 | padding: 0 0.16em; 741 | width: 4px; 742 | height: 1.6em; 743 | } 744 | .weui-loadmore__tips_in-dot:before { 745 | content: ' '; 746 | position: absolute; 747 | top: 50%; 748 | left: 50%; 749 | margin-top: -1px; 750 | margin-left: -2px; 751 | width: 4px; 752 | height: 4px; 753 | border-radius: 50%; 754 | background-color: #e5e5e5; 755 | } 756 | .weui-panel { 757 | background-color: #ffffff; 758 | margin-top: 10px; 759 | position: relative; 760 | overflow: hidden; 761 | } 762 | .weui-panel:first-child { 763 | margin-top: 0; 764 | } 765 | .weui-panel:before { 766 | content: ' '; 767 | position: absolute; 768 | left: 0; 769 | top: 0; 770 | right: 0; 771 | height: 1px; 772 | border-top: 1rpx solid #e5e5e5; 773 | color: #e5e5e5; 774 | } 775 | .weui-panel:after { 776 | content: ' '; 777 | position: absolute; 778 | left: 0; 779 | bottom: 0; 780 | right: 0; 781 | height: 1px; 782 | border-bottom: 1rpx solid #e5e5e5; 783 | color: #e5e5e5; 784 | } 785 | .weui-panel__hd { 786 | padding: 14px 15px 10px; 787 | color: #999999; 788 | font-size: 13px; 789 | position: relative; 790 | } 791 | .weui-panel__hd:after { 792 | content: ' '; 793 | position: absolute; 794 | left: 0; 795 | bottom: 0; 796 | right: 0; 797 | height: 1px; 798 | border-bottom: 1rpx solid #e5e5e5; 799 | color: #e5e5e5; 800 | left: 15px; 801 | } 802 | .weui-media-box { 803 | padding: 15px; 804 | position: relative; 805 | } 806 | .weui-media-box:before { 807 | content: ' '; 808 | position: absolute; 809 | left: 0; 810 | top: 0; 811 | right: 0; 812 | height: 1px; 813 | border-top: 1rpx solid #e5e5e5; 814 | color: #e5e5e5; 815 | left: 15px; 816 | } 817 | .weui-media-box:first-child:before { 818 | display: none; 819 | } 820 | .weui-media-box__title { 821 | font-weight: 400; 822 | font-size: 17px; 823 | width: auto; 824 | overflow: hidden; 825 | text-overflow: ellipsis; 826 | white-space: nowrap; 827 | word-wrap: normal; 828 | word-wrap: break-word; 829 | word-break: break-all; 830 | } 831 | .weui-media-box__desc { 832 | color: #999999; 833 | font-size: 13px; 834 | line-height: 1.2; 835 | overflow: hidden; 836 | text-overflow: ellipsis; 837 | display: -webkit-box; 838 | -webkit-box-orient: vertical; 839 | -webkit-line-clamp: 2; 840 | } 841 | .weui-media-box__info { 842 | margin-top: 15px; 843 | padding-bottom: 5px; 844 | font-size: 13px; 845 | color: #cecece; 846 | line-height: 1em; 847 | list-style: none; 848 | overflow: hidden; 849 | } 850 | .weui-media-box__info__meta { 851 | float: left; 852 | padding-right: 1em; 853 | } 854 | .weui-media-box__info__meta_extra { 855 | padding-left: 1em; 856 | border-left: 1px solid #cecece; 857 | } 858 | .weui-media-box__title_in-text { 859 | margin-bottom: 8px; 860 | } 861 | .weui-media-box_appmsg { 862 | display: -webkit-box; 863 | display: -webkit-flex; 864 | display: flex; 865 | -webkit-box-align: center; 866 | -webkit-align-items: center; 867 | align-items: center; 868 | } 869 | .weui-media-box__thumb { 870 | width: 100%; 871 | height: 100%; 872 | vertical-align: top; 873 | } 874 | .weui-media-box__hd_in-appmsg { 875 | margin-right: 0.8em; 876 | width: 60px; 877 | height: 60px; 878 | line-height: 60px; 879 | text-align: center; 880 | } 881 | .weui-media-box__bd_in-appmsg { 882 | -webkit-box-flex: 1; 883 | -webkit-flex: 1; 884 | flex: 1; 885 | min-width: 0; 886 | } 887 | .weui-media-box_small-appmsg { 888 | padding: 0; 889 | } 890 | .weui-cells_in-small-appmsg { 891 | margin-top: 0; 892 | } 893 | .weui-cells_in-small-appmsg:before { 894 | display: none; 895 | } 896 | .weui-progress { 897 | display: -webkit-box; 898 | display: -webkit-flex; 899 | display: flex; 900 | -webkit-box-align: center; 901 | -webkit-align-items: center; 902 | align-items: center; 903 | } 904 | .weui-progress__bar { 905 | -webkit-box-flex: 1; 906 | -webkit-flex: 1; 907 | flex: 1; 908 | } 909 | .weui-progress__opr { 910 | margin-left: 15px; 911 | font-size: 0; 912 | } 913 | .weui-navbar { 914 | display: -webkit-box; 915 | display: -webkit-flex; 916 | display: flex; 917 | position: absolute; 918 | z-index: 500; 919 | top: 0; 920 | width: 100%; 921 | border-bottom: 1rpx solid #cccccc; 922 | } 923 | .weui-navbar__item { 924 | position: relative; 925 | display: block; 926 | -webkit-box-flex: 1; 927 | -webkit-flex: 1; 928 | flex: 1; 929 | padding: 13px 0; 930 | text-align: center; 931 | font-size: 0; 932 | } 933 | .weui-navbar__item.weui-bar__item_on { 934 | color: #1aad19; 935 | } 936 | .weui-navbar__slider { 937 | position: absolute; 938 | content: ' '; 939 | left: 0; 940 | bottom: 0; 941 | width: 6em; 942 | height: 3px; 943 | background-color: #1aad19; 944 | -webkit-transition: -webkit-transform 0.3s; 945 | transition: -webkit-transform 0.3s; 946 | transition: transform 0.3s; 947 | transition: transform 0.3s, -webkit-transform 0.3s; 948 | } 949 | .weui-navbar__title { 950 | display: inline-block; 951 | font-size: 15px; 952 | max-width: 8em; 953 | width: auto; 954 | overflow: hidden; 955 | text-overflow: ellipsis; 956 | white-space: nowrap; 957 | word-wrap: normal; 958 | } 959 | .weui-tab { 960 | position: relative; 961 | height: 100%; 962 | } 963 | .weui-tab__panel { 964 | box-sizing: border-box; 965 | height: 100%; 966 | padding-top: 50px; 967 | overflow: auto; 968 | -webkit-overflow-scrolling: touch; 969 | } 970 | .weui-search-bar { 971 | position: relative; 972 | padding: 8px 10px; 973 | display: -webkit-box; 974 | display: -webkit-flex; 975 | display: flex; 976 | box-sizing: border-box; 977 | background-color: #efeff4; 978 | border-top: 1rpx solid #d7d6dc; 979 | border-bottom: 1rpx solid #d7d6dc; 980 | } 981 | .weui-icon-search { 982 | margin-right: 8px; 983 | font-size: inherit; 984 | } 985 | .weui-icon-search_in-box { 986 | position: absolute; 987 | left: 10px; 988 | top: 7px; 989 | } 990 | .weui-search-bar__text { 991 | display: inline-block; 992 | font-size: 14px; 993 | vertical-align: middle; 994 | } 995 | .weui-search-bar__form { 996 | position: relative; 997 | -webkit-box-flex: 1; 998 | -webkit-flex: auto; 999 | flex: auto; 1000 | border-radius: 5px; 1001 | background: #ffffff; 1002 | border: 1rpx solid #e6e6ea; 1003 | } 1004 | .weui-search-bar__box { 1005 | position: relative; 1006 | padding-left: 30px; 1007 | padding-right: 30px; 1008 | width: 100%; 1009 | box-sizing: border-box; 1010 | z-index: 1; 1011 | } 1012 | .weui-search-bar__input { 1013 | height: 28px; 1014 | line-height: 28px; 1015 | font-size: 14px; 1016 | } 1017 | .weui-icon-clear { 1018 | position: absolute; 1019 | top: 0; 1020 | right: 0; 1021 | padding: 7px 8px; 1022 | font-size: 0; 1023 | } 1024 | .weui-search-bar__label { 1025 | position: absolute; 1026 | top: 0; 1027 | right: 0; 1028 | bottom: 0; 1029 | left: 0; 1030 | z-index: 2; 1031 | border-radius: 3px; 1032 | text-align: center; 1033 | color: #9b9b9b; 1034 | background: #ffffff; 1035 | line-height: 28px; 1036 | } 1037 | .weui-search-bar__cancel-btn { 1038 | margin-left: 10px; 1039 | line-height: 28px; 1040 | color: #09bb07; 1041 | white-space: nowrap; 1042 | } 1043 | -------------------------------------------------------------------------------- /utils/weapp.socket.io.js: -------------------------------------------------------------------------------- 1 | !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e){t.exports=function(){return function(){}}},function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o1?{type:l[o],data:t.substring(1)}:{type:l[o]}:d}o=new Uint8Array(t)[0];var i=s(t,1);return y&&"blob"===r&&(i=new y([i])),{type:l[o],data:i}},e.decodeBase64Packet=function(t,e){var r=l[t.charAt(0)];if(!n)return{type:r,data:{base64:!0,data:t.substr(1)}};var o=n.decode(t.substr(1));return"blob"===e&&y&&(o=new y([o])),{type:r,data:o}},e.encodePayload=function(t,r,n){"function"==typeof r&&(n=r,r=null);var o=i(t);if(r&&o)return y&&!f?e.encodePayloadAsBlob(t,n):e.encodePayloadAsArrayBuffer(t,n);if(!t.length)return n("0:");g(t,(function(t,n){e.encodePacket(t,!!o&&r,!1,(function(t){n(null,function(t){return t.length+":"+t}(t))}))}),(function(t,e){return n(e.join(""))}))},e.decodePayload=function(t,r,n){if("string"!=typeof t)return e.decodePayloadAsBinary(t,r,n);var o;if("function"==typeof r&&(n=r,r=null),""===t)return n(d,0,1);for(var i,s,a="",c=0,h=t.length;c0;){for(var a=new Uint8Array(o),c=0===a[0],h="",u=1;255!==a[u];u++){if(h.length>310)return n(d,0,1);h+=a[u]}o=s(o,2+h.length),h=parseInt(h);var f=s(o,0,h);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(t){var p=new Uint8Array(f);f="";for(u=0;u 6 | * @license MIT 7 | */ 8 | var n=r(22),o=r(23),i=r(24);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(c.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 q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return q(t).length;e=(""+e).toLowerCase(),n=!0}}function y(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 O(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){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=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,s=1,a=t.length,c=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;s=2,a/=2,c/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:h>223?3:h>191?2:1;if(o+f<=r)switch(f){case 1:h<128&&(u=h);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&h)<<6|63&i)>127&&(u=c);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(c=(15&h)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&h)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},c.prototype.compare=function(t,e,r,n,o){if(!c.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===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),h=this.slice(n,o),u=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function j(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return i||j(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||j(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(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),e0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.copy=function(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=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=0;--o)t[o+e]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(9))},function(t,e){e.encode=function(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e},e.decode=function(t){for(var e={},r=t.split("&"),n=0,o=r.length;n0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},l.prototype.cleanup=function(){h("cleanup");for(var t=this.subs.length,e=0;e=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();h("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var r=setTimeout((function(){t.skipReconnect||(h("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open((function(e){e?(h("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(h("reconnect success"),t.onreconnect())})))}),e);this.subs.push({destroy:function(){clearTimeout(r)}})}},l.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,r){const n=r(27);e.websocket=n},function(t,e,r){var n=r(2),o=r(1);function i(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=i,o(i.prototype),i.prototype.onError=function(t,e){var r=new Error(t);return r.type="TransportError",r.description=e,this.emit("error",r),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(t){var e=n.decodePacket(t,this.socket.binaryType);this.onPacket(e)},i.prototype.onPacket=function(t){this.emit("packet",t)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,r){(function(e){var n=r(29),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.exports=function t(r){if(!r||"object"!=typeof r)return!1;if(n(r)){for(var o=0,a=r.length;o0?s-4:s;for(r=0;r>16&255,c[u++]=e>>8&255,c[u++]=255&e;2===a&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,c[u++]=255&e);1===a&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)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 u(t,e,r){for(var o,i,s=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,c=(1<>1,u=-7,f=r?o-1:0,p=r?-1:1,l=t[e+f];for(f+=p,i=l&(1<<-u)-1,l>>=-u,u+=a;u>0;i=256*i+t[e+f],f+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+t[e+f],f+=p,u-=8);if(0===i)i=1-h;else{if(i===c)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),i-=h}return(l?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,c,h=8*i-o-1,u=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+l]=255&a,l+=d,a/=256,o-=8);for(s=s<0;t[r+l]=255&s,l+=d,s/=256,h-=8);t[r+l-d]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){t.exports=r(26),t.exports.parser=r(2)},function(t,e,r){var n=r(11),o=r(1),i=r(0)("engine.io-client:socket"),s=r(14),a=r(2),c=r(6),h=r(5);function u(t,e){if(!(this instanceof u))return new u(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=h.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=u,u.priorWebsocketSuccess=!1,o(u.prototype),u.protocol=a.protocol,u.Socket=u,u.Transport=r(12),u.transports=r(11),u.parser=r(2),u.prototype.createTransport=function(t){i('creating transport "%s"',t);var e=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}(this.query);e.EIO=a.protocol,e.transport=t;var r=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new n[t]({query:e,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative})},u.prototype.open=function(){var t;if(this.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout((function(){e.emit("error","No transports available")}),0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},u.prototype.setTransport=function(t){i("setting transport %s",t.name);var e=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",(function(){e.onDrain()})).on("packet",(function(t){e.onPacket(t)})).on("error",(function(t){e.onError(t)})).on("close",(function(){e.onClose("transport close")}))},u.prototype.probe=function(t){i('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),r=!1,n=this;function o(){if(n.onlyBinaryUpgrades){var o=!this.supportsBinary&&n.transport.supportsBinary;r=r||o}r||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(o){if(!r)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',t),n.upgrading=!0,n.emit("upgrading",e),!e)return;u.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',n.transport.name),n.transport.pause((function(){r||"closed"!==n.readyState&&(i("changing transport and sending upgrade packet"),p(),n.setTransport(e),e.send([{type:"upgrade"}]),n.emit("upgrade",e),e=null,n.upgrading=!1,n.flush())}))}else{i('probe transport "%s" failed',t);var s=new Error("probe error");s.transport=e.name,n.emit("upgradeError",s)}})))}function s(){r||(r=!0,p(),e.close(),e=null)}function a(r){var o=new Error("probe error: "+r);o.transport=e.name,s(),i('probe transport "%s" failed because of error: %s',t,r),n.emit("upgradeError",o)}function c(){a("transport closed")}function h(){a("socket closed")}function f(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),s())}function p(){e.removeListener("open",o),e.removeListener("error",a),e.removeListener("close",c),n.removeListener("close",h),n.removeListener("upgrading",f)}u.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",a),e.once("close",c),this.once("close",h),this.once("upgrading",f),e.open()},u.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var t=0,e=this.upgrades.length;tn&&(r=n),e>=n||e>=r||0===n)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(r-e),s=e,a=0;s=55296&&e<=56319&&o=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(t,e){return i(t>>e&63|128)}function h(t,e){if(0==(4294967168&t))return i(t);var r="";return 0==(4294965248&t)?r=i(t>>6&31|192):0==(4294901760&t)?(a(t,e)||(t=65533),r=i(t>>12&15|224),r+=c(t,6)):0==(4292870144&t)&&(r=i(t>>18&7|240),r+=c(t,12),r+=c(t,6)),r+=i(63&t|128)}function u(){if(o>=n)throw Error("Invalid byte index");var t=255&r[o];if(o++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(t){var e,i;if(o>n)throw Error("Invalid byte index");if(o==n)return!1;if(e=255&r[o],o++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|u())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|u()<<6|u())>=2048)return a(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var r=!1!==(e=e||{}).strict,n=s(t),o=n.length,i=-1,a="";++i65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(h)}}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256),n=0;n>2],i+=t[(3&n[r])<<4|n[r+1]>>4],i+=t[(15&n[r+1])<<2|n[r+2]>>6],i+=t[63&n[r+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,n,o,i,s,a=.75*t.length,c=t.length,h=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),f=new Uint8Array(u);for(e=0;e>4,f[h++]=(15&o)<<4|i>>2,f[h++]=(3&i)<<6|63&s;return u}}()},function(t,e){var r=void 0!==r?r:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),o=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),i=r&&r.prototype.append&&r.prototype.getBlob;function s(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t}))}function a(t,e){e=e||{};var n=new r;return s(t).forEach((function(t){n.append(t)})),e.type?n.getBlob(e.type):n.getBlob()}function c(t,e){return new Blob(s(t),e||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=n?o?Blob:c:i?a:void 0},function(t,e){t.exports=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function h(){var t=c(+new Date);return t!==n?(s=0,n=t):t+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;h.encode=c,h.decode=function(t){var e=0;for(a=0;a{c("socket onopen: ",t),this.readyState=f.OPEN,this.emit("open",t)}),this._socket.onClose(t=>{c("socket onclose: ",t),this._closeCode=t.code,this._closeMessage=t.reason,this.emitClose()}),this._socket.onError(t=>{c("socket onerror: ",t),this.emit("error",t)}),this._socket.onMessage(t=>{c("socket onmessage: ",t,this),this.emit("message",t.data)})}emitClose(){this.readyState=f.CLOSED,this.removeEventListener(),this.emit("close",this._closeCode,this._closeMessage)}send(t,e,r){if(c("socket send msg: ",t,this.readyState,", sender: ",this._sender),this.readyState===f.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("number"==typeof t&&(t=t.toString()),this.readyState===f.OPEN)this._sender.send(t,e,r);else if(r){r(new Error(`WebSocket is not open: readyState ${this.readyState} `+`(${u[this.readyState]})`))}}close(t,e){if(c("closing connection: ",this.readyState),this.readyState!==f.CLOSED){if(this.readyState===f.CONNECTING){throw new Error("WebSocket was closed before the connection was established")}this.readyState!==f.CLOSING&&(this.readyState=f.CLOSING,this._socket.close({code:t,reason:e,success:()=>{c("connection closed..."),this.readyState=f.CLOSED,this._socket=null}}))}}}u.forEach((t,e)=>{f[t]=e}),["open","error","close","message"].forEach(t=>{Object.defineProperty(f.prototype,`on${t}`,{get(){const e=this.listeners(t);for(let t=0;t0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=p.bind(n);return o.listener=r,n.wrapFn=o,o}function d(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var h=c.length,u=g(c,h);for(r=0;r=0;i--)if(r[i]===e||r[i].listener===e){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){"use strict";var n=r(40),o=r(42);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){o.isString(t)&&(t=b(t));return t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(h),f=["%","/","?",";","#"].concat(u),p=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(43);function b(t,e,r){if(t&&o.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?N+="x":N+=T[L];if(!N.match(l)){var I=x.slice(0,C),U=x.slice(C+1),M=T.match(d);M&&(I.push(M[1]),U.unshift(M[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=I.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!y[k])for(C=0,P=u.length;C0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=_.slice(-1)[0],S=(r.host||t.host||_.length>1)&&("."===B||".."===B)||""===B,C=0,R=_.length;R>=0;R--)"."===(B=_[R])?_.splice(R,1):".."===B?(_.splice(R,1),C++):C&&(_.splice(R,1),C--);if(!A&&!k)for(;C--;C)_.unshift("..");!A||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var O,x=""===_[0]||_[0]&&"/"===_[0].charAt(0);E&&(r.hostname=r.host=x?"":_.length?_.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(A=A||r.host&&_.length)&&!x&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){(function(t,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,h=/^xn--/,u=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,d=String.fromCharCode;function y(t){throw new RangeError(p[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(f,".")).split("."),e).join(".")}function m(t){for(var e,r,n=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=d((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=d(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,r){var n=0;for(t=r?l(t/700):t>>1,t+=l(t/e);t>455;n+=36)t=l(t/35);return l(n+36*t/(t+38))}function k(t){var e,r,n,o,i,s,a,h,u,f,p,d=[],g=t.length,v=0,m=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),d.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=g&&y("invalid-input"),((h=(p=t.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||h>l((c-v)/s))&&y("overflow"),v+=h*s,!(h<(u=a<=w?1:a>=w+26?26:a-w));a+=36)s>l(c/(f=36-u))&&y("overflow"),s*=f;w=A(v-i,e=d.length+1,0==i),l(v/e)>c-m&&y("overflow"),m+=l(v/e),v%=e,d.splice(v++,0,m)}return b(d)}function _(t){var e,r,n,o,i,s,a,h,u,f,p,g,v,b,k,_=[];for(g=(t=m(t)).length,e=128,r=0,i=72,s=0;s=e&&pl((c-r)/(v=n+1))&&y("overflow"),r+=(a-e)*v,e=a,s=0;sc&&y("overflow"),p==e){for(h=r,u=36;!(h<(f=u<=i?1:u>=i+26?26:u-i));u+=36)k=h-f,b=36-f,_.push(d(w(f+k%b,0))),h=l(k/b);_.push(d(w(h,0))),i=A(r,v,n==o),r=0,++n}++r,++e}return _.join("")}a={version:"1.4.1",ucs2:{decode:m,encode:b},decode:k,encode:_,toASCII:function(t){return v(t,(function(t){return u.test(t)?"xn--"+_(t):t}))},toUnicode:function(t){return v(t,(function(t){return h.test(t)?k(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,r,e,t))||(t.exports=o)}()}).call(this,r(41)(t),r(9))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(44),e.encode=e.stringify=r(45)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var h=t.length;c>0&&h>c&&(h=c);for(var u=0;u=0?(f=y.substr(0,g),p=y.substr(g+1)):(f=y,p=""),l=decodeURIComponent(f),d=decodeURIComponent(p),n(s,l)?o(s[l])?s[l].push(d):s[l]=[s[l],d]:s[l]=d}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return o(t[s])?i(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr&&r(null,t),fail:t=>r&&r(t)}),this.dequeue()}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[1].length,Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[1].length,this._queue.push(t)}}},function(t,e){t.exports=function(t,e){for(var r=[],n=(e=e||0)||0;n0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=r,r.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}return 0|Math.min(t,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(t){this.ms=t},r.prototype.setMax=function(t){this.max=t},r.prototype.setJitter=function(t){this.jitter=t}}])})); -------------------------------------------------------------------------------- /utils/lib/weapp.socket.io.js: -------------------------------------------------------------------------------- 1 | !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e){t.exports=function(){return function(){}}},function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o1?{type:l[o],data:t.substring(1)}:{type:l[o]}:d}o=new Uint8Array(t)[0];var i=s(t,1);return y&&"blob"===r&&(i=new y([i])),{type:l[o],data:i}},e.decodeBase64Packet=function(t,e){var r=l[t.charAt(0)];if(!n)return{type:r,data:{base64:!0,data:t.substr(1)}};var o=n.decode(t.substr(1));return"blob"===e&&y&&(o=new y([o])),{type:r,data:o}},e.encodePayload=function(t,r,n){"function"==typeof r&&(n=r,r=null);var o=i(t);if(r&&o)return y&&!f?e.encodePayloadAsBlob(t,n):e.encodePayloadAsArrayBuffer(t,n);if(!t.length)return n("0:");g(t,(function(t,n){e.encodePacket(t,!!o&&r,!1,(function(t){n(null,function(t){return t.length+":"+t}(t))}))}),(function(t,e){return n(e.join(""))}))},e.decodePayload=function(t,r,n){if("string"!=typeof t)return e.decodePayloadAsBinary(t,r,n);var o;if("function"==typeof r&&(n=r,r=null),""===t)return n(d,0,1);for(var i,s,a="",c=0,u=t.length;c0;){for(var a=new Uint8Array(o),c=0===a[0],u="",h=1;255!==a[h];h++){if(u.length>310)return n(d,0,1);u+=a[h]}o=s(o,2+u.length),u=parseInt(u);var f=s(o,0,u);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(t){var p=new Uint8Array(f);f="";for(h=0;h 6 | * @license MIT 7 | */ 8 | var n=r(26),o=r(27),i=r(28);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(c.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 q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return q(t).length;e=(""+e).toLowerCase(),n=!0}}function y(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 C(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){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=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,s=1,a=t.length,c=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;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var h=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+f<=r)switch(f){case 1:u<128&&(h=u);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&u)<<6|63&i)>127&&(h=c);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(h=c)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},c.prototype.compare=function(t,e,r,n,o){if(!c.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===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(n,o),h=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function L(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||L(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,i){return i||L(t,0,r,8),o.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(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),e0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},c.prototype.copy=function(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=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=0;--o)t[o+e]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(9))},function(t,e){e.encode=function(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e},e.decode=function(t){for(var e={},r=t.split("&"),n=0,o=r.length;n0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},l.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var r=setTimeout((function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open((function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())})))}),e);this.subs.push({destroy:function(){clearTimeout(r)}})}},l.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,r){const n=r(31);e.websocket=n},function(t,e,r){var n=r(2),o=r(1);function i(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=i,o(i.prototype),i.prototype.onError=function(t,e){var r=new Error(t);return r.type="TransportError",r.description=e,this.emit("error",r),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(t){var e=n.decodePacket(t,this.socket.binaryType);this.onPacket(e)},i.prototype.onPacket=function(t){this.emit("packet",t)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,r){(function(e){var n=r(33),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.exports=function t(r){if(!r||"object"!=typeof r)return!1;if(n(r)){for(var o=0,a=r.length;o=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),c=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,t,n.depth)}function c(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function u(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return v(o)||(o=h(t,o,n)),o}var i=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,r);if(i)return i;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(r);if(0===s.length){if(E(r)){var c=r.name?": "+r.name:"";return t.stylize("[Function"+c+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return f(r)}var u,w="",_=!1,S=["{","}"];(l(r)&&(_=!0,S=["[","]"]),E(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(w=" "+RegExp.prototype.toString.call(r)),A(r)&&(w=" "+Date.prototype.toUTCString.call(r)),k(r)&&(w=" "+f(r)),0!==s.length||_&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=_?function(t,e,r,n,o){for(var i=[],s=0,a=e.length;s=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,w,S)):S[0]+w+S[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),x(n,o)||(s="["+o+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(r)?h(t,c.value,null):h(t,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function l(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===_(t)}function w(t){return"object"==typeof t&&null!==t}function A(t){return w(t)&&"[object Date]"===_(t)}function k(t){return w(t)&&("[object Error]"===_(t)||t instanceof Error)}function E(t){return"function"==typeof t}function _(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(m(i)&&(i=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=t.pid;s[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else s[r]=function(){};return s[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=l,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=b,e.isObject=w,e.isDate=A,e.isError=k,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(21);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),O[t.getMonth()],e].join(" ")}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",B(),e.format.apply(e,arguments))},e.inherits=r(22),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(C&&t[C]){var e;if("function"!=typeof(e=t[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,C,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i1)for(var r=1;r0?s-4:s;for(r=0;r>16&255,c[h++]=e>>8&255,c[h++]=255&e;2===a&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,c[h++]=255&e);1===a&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,c[h++]=e>>8&255,c[h++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)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 h(t,e,r){for(var o,i,s=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,c=(1<>1,h=-7,f=r?o-1:0,p=r?-1:1,l=t[e+f];for(f+=p,i=l&(1<<-h)-1,l>>=-h,h+=a;h>0;i=256*i+t[e+f],f+=p,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=p,h-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),i-=u}return(l?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,c,u=8*i-o-1,h=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+l]=255&a,l+=d,a/=256,o-=8);for(s=s<0;t[r+l]=255&s,l+=d,s/=256,u-=8);t[r+l-d]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){t.exports=r(30),t.exports.parser=r(2)},function(t,e,r){var n=r(11),o=r(1),i=r(0)("engine.io-client:socket"),s=r(14),a=r(2),c=r(6),u=r(5);function h(t,e){if(!(this instanceof h))return new h(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=h,h.priorWebsocketSuccess=!1,o(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=r(12),h.transports=r(11),h.parser=r(2),h.prototype.createTransport=function(t){i('creating transport "%s"',t);var e=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}(this.query);e.EIO=a.protocol,e.transport=t;var r=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new n[t]({query:e,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative})},h.prototype.open=function(){var t;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout((function(){e.emit("error","No transports available")}),0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},h.prototype.setTransport=function(t){i("setting transport %s",t.name);var e=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",(function(){e.onDrain()})).on("packet",(function(t){e.onPacket(t)})).on("error",(function(t){e.onError(t)})).on("close",(function(){e.onClose("transport close")}))},h.prototype.probe=function(t){i('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),r=!1,n=this;function o(){if(n.onlyBinaryUpgrades){var o=!this.supportsBinary&&n.transport.supportsBinary;r=r||o}r||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(function(o){if(!r)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',t),n.upgrading=!0,n.emit("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',n.transport.name),n.transport.pause((function(){r||"closed"!==n.readyState&&(i("changing transport and sending upgrade packet"),p(),n.setTransport(e),e.send([{type:"upgrade"}]),n.emit("upgrade",e),e=null,n.upgrading=!1,n.flush())}))}else{i('probe transport "%s" failed',t);var s=new Error("probe error");s.transport=e.name,n.emit("upgradeError",s)}})))}function s(){r||(r=!0,p(),e.close(),e=null)}function a(r){var o=new Error("probe error: "+r);o.transport=e.name,s(),i('probe transport "%s" failed because of error: %s',t,r),n.emit("upgradeError",o)}function c(){a("transport closed")}function u(){a("socket closed")}function f(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),s())}function p(){e.removeListener("open",o),e.removeListener("error",a),e.removeListener("close",c),n.removeListener("close",u),n.removeListener("upgrading",f)}h.priorWebsocketSuccess=!1,e.once("open",o),e.once("error",a),e.once("close",c),this.once("close",u),this.once("upgrading",f),e.open()},h.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var t=0,e=this.upgrades.length;tn&&(r=n),e>=n||e>=r||0===n)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(r-e),s=e,a=0;s=55296&&e<=56319&&o=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(t,e){return i(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return i(t);var r="";return 0==(4294965248&t)?r=i(t>>6&31|192):0==(4294901760&t)?(a(t,e)||(t=65533),r=i(t>>12&15|224),r+=c(t,6)):0==(4292870144&t)&&(r=i(t>>18&7|240),r+=c(t,12),r+=c(t,6)),r+=i(63&t|128)}function h(){if(o>=n)throw Error("Invalid byte index");var t=255&r[o];if(o++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(t){var e,i;if(o>n)throw Error("Invalid byte index");if(o==n)return!1;if(e=255&r[o],o++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|h())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|h()<<6|h())>=2048)return a(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|h()<<12|h()<<6|h())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var r=!1!==(e=e||{}).strict,n=s(t),o=n.length,i=-1,a="";++i65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(u)}}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256),n=0;n>2],i+=t[(3&n[r])<<4|n[r+1]>>4],i+=t[(15&n[r+1])<<2|n[r+2]>>6],i+=t[63&n[r+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,n,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),f=new Uint8Array(h);for(e=0;e>4,f[u++]=(15&o)<<4|i>>2,f[u++]=(3&i)<<6|63&s;return h}}()},function(t,e){var r=void 0!==r?r:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),o=n&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),i=r&&r.prototype.append&&r.prototype.getBlob;function s(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t}))}function a(t,e){e=e||{};var n=new r;return s(t).forEach((function(t){n.append(t)})),e.type?n.getBlob(e.type):n.getBlob()}function c(t,e){return new Blob(s(t),e||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=n?o?Blob:c:i?a:void 0},function(t,e){t.exports=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function u(){var t=c(+new Date);return t!==n?(s=0,n=t):t+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;u.encode=c,u.decode=function(t){var e=0;for(a=0;a{c("socket onopen: ",t),this.readyState=f.OPEN,this.emit("open",t)}),t.onClose(t=>{c("socket onclose: ",t),this._closeCode=t.code,this._closeMessage=t.reason,this.emitClose()}),t.onError(t=>{c("socket onerror: ",t),this.emit("error",t)}),t.onMessage(t=>{c("socket onmessage: ",t,this),this.emit("message",t.data)})}emitClose(){this.readyState=f.CLOSED,this.removeEventListener(),this.emit("close",this._closeCode,this._closeMessage)}send(t,e,r){if(c("socket send msg: ",t,this.readyState,", sender: ",this._sender),this.readyState===f.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("number"==typeof t&&(t=t.toString()),this.readyState===f.OPEN)this._sender.send(t,e,r);else if(r){r(new Error(`WebSocket is not open: readyState ${this.readyState} `+`(${h[this.readyState]})`))}}close(t,e){if(c("closing connection: ",this.readyState),this.readyState!==f.CLOSED){if(this.readyState===f.CONNECTING){throw new Error("WebSocket was closed before the connection was established")}this.readyState!==f.CLOSING&&(this.readyState=f.CLOSING,setTimeout(this._socket.close({code:t,reason:e,success:()=>{this.readyState=f.CLOSEDt,this._socket=null}}),3e4))}}}h.forEach((t,e)=>{f[t]=e}),["open","error","close","message"].forEach(t=>{Object.defineProperty(f.prototype,`on${t}`,{get(){const e=this.listeners(t);for(let t=0;t0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=p.bind(n);return o.listener=r,n.wrapFn=o,o}function d(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var u=c.length,h=g(c,u);for(r=0;r=0;i--)if(r[i]===e||r[i].listener===e){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){"use strict";var n=r(44),o=r(46);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){o.isString(t)&&(t=b(t));return t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),f=["%","/","?",";","#"].concat(h),p=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(47);function b(t,e,r){if(t&&o.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?j+="x":j+=T[N];if(!j.match(l)){var U=R.slice(0,B),I=R.slice(B+1),D=T.match(d);D&&(U.push(D[1]),I.unshift(D[2])),I.length&&(b="/"+I.join(".")+b),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=n.toASCII(this.hostname));var M=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+M,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!y[k])for(B=0,P=h.length;B0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift());return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=E.slice(-1)[0],O=(r.host||t.host||E.length>1)&&("."===S||".."===S)||""===S,B=0,x=E.length;x>=0;x--)"."===(S=E[x])?E.splice(x,1):".."===S?(E.splice(x,1),B++):B&&(E.splice(x,1),B--);if(!A&&!k)for(;B--;B)E.unshift("..");!A||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),O&&"/"!==E.join("/").substr(-1)&&E.push("");var C,R=""===E[0]||E[0]&&"/"===E[0].charAt(0);_&&(r.hostname=r.host=R?"":E.length?E.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift()));return(A=A||r.host&&E.length)&&!R&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){(function(t,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,d=String.fromCharCode;function y(t){throw new RangeError(p[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(f,".")).split("."),e).join(".")}function m(t){for(var e,r,n=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=d((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=d(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,r){var n=0;for(t=r?l(t/700):t>>1,t+=l(t/e);t>455;n+=36)t=l(t/35);return l(n+36*t/(t+38))}function k(t){var e,r,n,o,i,s,a,u,h,f,p,d=[],g=t.length,v=0,m=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&y("not-basic"),d.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=g&&y("invalid-input"),((u=(p=t.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>l((c-v)/s))&&y("overflow"),v+=u*s,!(u<(h=a<=w?1:a>=w+26?26:a-w));a+=36)s>l(c/(f=36-h))&&y("overflow"),s*=f;w=A(v-i,e=d.length+1,0==i),l(v/e)>c-m&&y("overflow"),m+=l(v/e),v%=e,d.splice(v++,0,m)}return b(d)}function E(t){var e,r,n,o,i,s,a,u,h,f,p,g,v,b,k,E=[];for(g=(t=m(t)).length,e=128,r=0,i=72,s=0;s=e&&pl((c-r)/(v=n+1))&&y("overflow"),r+=(a-e)*v,e=a,s=0;sc&&y("overflow"),p==e){for(u=r,h=36;!(u<(f=h<=i?1:h>=i+26?26:h-i));h+=36)k=u-f,b=36-f,E.push(d(w(f+k%b,0))),u=l(k/b);E.push(d(w(u,0))),i=A(r,v,n==o),r=0,++n}++r,++e}return E.join("")}a={version:"1.4.1",ucs2:{decode:m,encode:b},decode:k,encode:E,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?k(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,r,e,t))||(t.exports=o)}()}).call(this,r(45)(t),r(9))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(48),e.encode=e.stringify=r(49)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var h=0;h=0?(f=y.substr(0,g),p=y.substr(g+1)):(f=y,p=""),l=decodeURIComponent(f),d=decodeURIComponent(p),n(s,l)?o(s[l])?s[l].push(d):s[l]=[s[l],d]:s[l]=d}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return o(t[s])?i(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;nr&&r(null,t),fail:t=>r&&r(t)}),this.dequeue()}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[1].length,Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[1].length,this._queue.push(t)}}},function(t,e){t.exports=function(t,e){for(var r=[],n=(e=e||0)||0;n0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=r,r.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}return 0|Math.min(t,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(t){this.ms=t},r.prototype.setMax=function(t){this.max=t},r.prototype.setJitter=function(t){this.jitter=t}}])})); --------------------------------------------------------------------------------