diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..08281f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,141 @@ +# ---> Go +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# ---> Node +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env.production + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +*yarn.lock +*package-lock.json +*log/ +*downloadFiles/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ffb06bd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,65 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "启动 API", + "program": "${workspaceRoot}/api/server.js", + "env": { + "NODE_ENV": "development" + }, + "args": [ + "-p 4700", + // "-f http://localhost:4700", + // 研发 + "-g postgres://postgres:123@10.8.30.166:5432/hr-dev", + "--redisHost localhost", + "--redisPort 6379", + // "--apiEmisUrl http://10.8.30.112:14000", + // 测试 + "--apiEmisUrl http://10.8.30.161:1111", + "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", + "--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa", + "--qnbkt dev-hr", + // "--qndmn http://resources.anxinyun.cn", + "--qndmn http://rjkwed13l.hn-bkt.clouddn.com", + + // 似乎不能传空 先注释 * 2 + // "--clickHouseUser ", + // "--clickHousePassword ", + + "--clickHousePort 30123", + + // 开发 + // "--clickHouseUrl http://10.8.30.71", + // "--clickHousePepEmis pepca_dev", + // "--clickHouseCamworkflow camworkflow", + // "--clickHouseHr hr_dev", + + // 测试 + "--clickHouseUrl http://10.8.30.161", + "--clickHousePepEmis pg_pepca", + ] + }, + { + "type": "node", + "request": "launch", + "name": "run mocha", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "stopOnEntry": false, + "args": [ + "app/test/*.test.js", + "--no-timeouts" + ], + "cwd": "${workspaceRoot}", + "runtimeExecutable": null, + "env": { + "NODE_ENV": "development" + } + } + ] +} \ No newline at end of file diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..74ac3c3 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,36 @@ +# FROM repository.anxinyun.cn/devops/node:12-dev as builder + +# COPY . /var/app + +# WORKDIR /var/app + +# EXPOSE 8080 + +# RUN npm config set registry=http://10.8.30.22:7000 +# RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json +# RUN npm cache clean -f +# RUN rm -rf package-lock.json +# RUN npm install --registry http://10.8.30.22:7000 + +# FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12 + +# COPY --from=builder --chown=node /var/app /home/node/app + +# WORKDIR /home/node/app + +# CMD ["node", "server.js"] + + +# 旧版本构建方式 + +FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 + +COPY . /var/app + +WORKDIR /var/app + +EXPOSE 8080 + +CMD ["-u", "http://localhost:8088"] + +ENTRYPOINT [ "node", "server.js" ] \ No newline at end of file diff --git a/api/app/index.js b/api/app/index.js new file mode 100644 index 0000000..e1436de --- /dev/null +++ b/api/app/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib'); \ No newline at end of file diff --git a/api/app/lib/controllers/auth/index.js b/api/app/lib/controllers/auth/index.js new file mode 100644 index 0000000..7c23a36 --- /dev/null +++ b/api/app/lib/controllers/auth/index.js @@ -0,0 +1,72 @@ +'use strict'; +const Hex = require('crypto-js/enc-hex'); +const MD5 = require('crypto-js/md5'); +const moment = require('moment'); +const uuid = require('uuid'); + +async function login (ctx, next) { + // const transaction = await ctx.fs.dc.orm.transaction(); + try { + const params = ctx.request.body; + + const emisLoginRes = await ctx.app.fs.emisRequest.post('login', { + data: params + }) + + if (!emisLoginRes) { + throw "无此用户,请使用正确的登录信息" + } else { + + emisLoginRes.authorized = true + emisLoginRes.expired = moment().add(1, 'day') + emisLoginRes.hrUserInfo = undefined + + await ctx.redis.hmset(emisLoginRes.token, { + expired: moment().add(1, 'day'), + userInfo: JSON.stringify(emisLoginRes) + }); + + ctx.status = 200; + ctx.body = emisLoginRes; + } + // await transaction.commit(); + } catch (error) { + // await transaction.rollback(); + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + let message = typeof error == 'string' ? error + : error.response.body.message || "登录失败" + if (message == '账号或密码错误') { + message = '无此用户,请使用正确的登录信息' + } + + ctx.body = { + message: message + } + } +} + +async function logout (ctx) { + try { + const models = ctx.fs.dc.models; + const params = ctx.request.body; + + await ctx.app.fs.emisRequest.put('logout', { + data: params + }) + await ctx.redisTools.hdelall(token); + + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + + } + } +} + +module.exports = { + login, + logout, +}; \ No newline at end of file diff --git a/api/app/lib/index.js b/api/app/lib/index.js new file mode 100644 index 0000000..9b996bf --- /dev/null +++ b/api/app/lib/index.js @@ -0,0 +1,56 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const utils = require('./utils') +const routes = require('./routes'); +const redisConnect = require('./service/redis') +const socketConect = require('./service/socket') +const paasRequest = require('./service/paasRequest'); +const authenticator = require('./middlewares/authenticator'); +const clickHouseClient = require('./service/clickHouseClient') +// const schedule = require('./schedule') +// const apiLog = require('./middlewares/api-log'); + +module.exports.entry = function (app, router, opts) { + app.fs.logger.log('info', '[FS-AUTH]', 'Inject auth and api mv into router.'); + + app.fs.api = app.fs.api || {}; + app.fs.opts = opts || {}; + app.fs.utils = app.fs.utils || {}; + app.fs.api.authAttr = app.fs.api.authAttr || {}; + app.fs.api.logAttr = app.fs.api.logAttr || {}; + + // 顺序固定 ↓ + redisConnect(app, opts) + socketConect(app, opts) + + // 实例其他平台请求方法 + paasRequest(app, opts) + + // clickHouse 数据库 client + clickHouseClient(app, opts) + + // 工具类函数 + utils(app, opts) + + // // 定时任务 + // schedule(app, opts) + + // 鉴权中间件 + router.use(authenticator(app, opts)); + + // 日志记录 + // router.use(apiLog(app, opts)); + + router = routes(app, router, opts); +}; + +module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} } + + // 模型关系摘出来 初始化之后再定义关系才行 + fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => { + require(`./models/${filename}`)(dc) + }); + +}; diff --git a/api/app/lib/middlewares/api-log.js b/api/app/lib/middlewares/api-log.js new file mode 100644 index 0000000..fb17f66 --- /dev/null +++ b/api/app/lib/middlewares/api-log.js @@ -0,0 +1,83 @@ +/** + * Created by PengPeng on 2017/4/26. + */ +'use strict'; + +const moment = require('moment'); +const pathToRegexp = require('path-to-regexp'); + +function factory(app, opts) { + async function sendToEsAsync(producer, payloads) { + return new Promise((resolve, reject) => { + producer.send(payloads, function (err) { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }) + } + + async function logger(ctx, next) { + const { path, method } = ctx; + const start = Date.now(); + + // 等待路由处理 + await next(); + + try { + let logAttr = null; + for (let prop in app.fs.api.logAttr) { + let keys = []; + let re = pathToRegexp(prop.replace(/\:[A-Za-z_\-]+\b/g, '(\\d+)'), keys); + if (re.test(`${method}${path}`)) { + logAttr = app.fs.api.logAttr[prop]; + break; + } + } + let parameter = null, parameterShow = null, user_id, _token, app_key; + if (ctx.fs.api) { + const { actionParameter, actionParameterShow, userId, token, appKey } = ctx.fs.api; + parameter = actionParameter; + parameterShow = actionParameterShow; + user_id = userId; + _token = token; + app_key = appKey; + } + const producer = ctx.fs.kafka.producer; + + const message = { + log_time: moment().toISOString(), + method: method, + content: logAttr ? logAttr.content : '', + parameter: JSON.stringify(parameter) || JSON.stringify(ctx.request.body), + parameter_show: parameterShow, + visible: logAttr ? logAttr.visible : true, + cost: Date.now() - start, + status_code: ctx.status, + url: ctx.request.url, + user_agent: ctx.request.headers["user-agent"], + user_id: user_id, + session: _token, + app_key: app_key, + header: JSON.stringify(ctx.request.headers), + ip: ctx.request.headers["x-real-ip"] || ctx.ip + }; + + const payloads = [{ + topic: `${opts.kafka.topicPrefix}`, + messages: [JSON.stringify(message)], + partition: 0 + }]; + + // await sendToEsAsync(producer, payloads); + + } catch (e) { + ctx.fs.logger.error(`日志记录失败: ${e}`); + } + } + return logger; +} + +module.exports = factory; diff --git a/api/app/lib/middlewares/authenticator.js b/api/app/lib/middlewares/authenticator.js new file mode 100644 index 0000000..90000bf --- /dev/null +++ b/api/app/lib/middlewares/authenticator.js @@ -0,0 +1,162 @@ +/** + * Created by PengLing on 2017/3/27. + */ +'use strict'; + +const pathToRegexp = require('path-to-regexp'); +const util = require('util'); +const moment = require('moment'); + +class ExcludesUrls { + constructor(opts) { + this.allUrls = undefined; + this.reload(opts); + } + + sanitizePath (path) { + if (!path) return '/'; + const p = '/' + path.replace(/^\/+/i, '').replace(/\/+$/, '').replace(/\/{2,}/, '/'); + return p; + } + + reload (opts) { + // load all url + if (!this.allUrls) { + this.allUrls = opts; + let that = this; + this.allUrls.forEach(function (url, i, arr) { + if (typeof url === "string") { + url = { p: url, o: '*' }; + arr[i] = url; + } + const keys = []; + let eachPath = url.p; + url.p = (!eachPath || eachPath === '(.*)' || util.isRegExp(eachPath)) ? eachPath : that.sanitizePath(eachPath); + url.pregexp = pathToRegexp(eachPath, keys); + }); + } + } + + isExcluded (path, method) { + return this.allUrls.some(function (url) { + return !url.auth + && url.pregexp.test(path) + && (url.o === '*' || url.o.indexOf(method) !== -1); + }); + } +} + +/** + * 判断Url是否不鉴权 + * @param {*} opts {exclude: [*] or []},'*'或['*']:跳过所有路由; []:所有路由都要验证 + * @param {*} path 当前request的path + * @param {*} method 当前request的method + */ +let isPathExcluded = function (opts, path, method) { + let excludeAll = Boolean(opts.exclude && opts.exclude.length && opts.exclude[0] == '*'); + let excludes = null; + if (!excludeAll) { + let excludeOpts = opts.exclude || []; + excludeOpts.push({ p: '/login', o: 'POST' }); + excludeOpts.push({ p: '/logout', o: 'PUT' }); + excludes = new ExcludesUrls(excludeOpts); + } + let excluded = excludeAll || excludes.isExcluded(path, method); + return excluded; +}; + +let authorizeToken = async function (ctx, token) { + let startTime = moment() + let rslt = null; + const tokenFormatRegexp = /^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$/g; + if (token && tokenFormatRegexp.test(token)) { + try { + const expired = await ctx.redis.hget(token, 'expired'); + + // const authorizeRes = await ctx.app.fs.emisRequest.get('authorize', { + // query: { token } + // }) + // const { userInfo, expired } = authorizeRes; + + + // TODO 从项企 clickhouse 数据库中查 token 并更新 + if (expired && moment().valueOf() <= moment(expired).valueOf()) { + const userInfo = JSON.parse(await ctx.redis.hmget(token, 'userInfo')); + const { pomsUserInfo: pomsUser } = userInfo + + // const pomsUser = await ctx.app.fs.dc.models.User.findOne({ + // where: { + // pepUserId: userInfo.id + // } + // }) || {} + + rslt = { + 'authorized': userInfo.authorized, + 'resources': (userInfo || {}).resources || [], + }; + ctx.fs.api.userId = pomsUser.id; + ctx.fs.api.userInfo = pomsUser; + ctx.fs.api.pepUserId = userInfo.id; + ctx.fs.api.pepUserInfo = userInfo; + ctx.fs.api.token = token; + } + } catch (err) { + const { error } = err.response || {}; + ctx.fs.logger.log('[anxinyun]', '[AUTH] failed', (error || {}).message || `cannot GET /users/${token}`); + } + } + return rslt; +}; + +let isResourceAvailable = function (resources, options) { + let authCode = null; + // authorize user by authorization attribute + const { authAttr, method, path } = options; + for (let prop in authAttr) { + let keys = []; + let re = pathToRegexp(prop.replace(/\:[A-Za-z_\-]+\b/g, '(\\d+)'), keys); + if (re.test(`${method}${path}`)) { + authCode = authAttr[prop]; + break; + } + } + return !authCode || (resources || []).some(code => code === authCode); +}; + +function factory (app, opts) { + return async function auth (ctx, next) { + const { path, method, header, query } = ctx; + ctx.fs.logger.log('[AUTH] start', path, method); + ctx.fs.api = ctx.fs.api || {}; + ctx.fs.port = opts.port; + ctx.redis = app.redis; + ctx.redisTools = app.redisTools; + let error = null; + if (path) { + if (!isPathExcluded(opts, path, method)) { + const user = await authorizeToken(ctx, header.token || query.token); + if (user && user.authorized) { + // if (!isResourceAvailable(user.resources, { authAttr: app.fs.auth.authAttr, path, method })) { + // error = { status: 403, name: 'Forbidden' } + // } else { + // error = { status: 401, name: 'Unauthorized' } + // } + } else { + error = { status: 401, name: 'Unauthorized' } + } + } + } else { + error = { status: 401, name: 'Unauthorized' }; + } + if (error) { + ctx.fs.logger.log('[AUTH] failed', path, method); + ctx.status = error.status; + ctx.body = error.name; + } else { + ctx.fs.logger.log('[AUTH] passed', path, method); + await next(); + } + } +} + +module.exports = factory; diff --git a/api/app/lib/models/holiday.js b/api/app/lib/models/holiday.js new file mode 100644 index 0000000..1521b96 --- /dev/null +++ b/api/app/lib/models/holiday.js @@ -0,0 +1,43 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Holiday = sequelize.define("holiday", { + day: { + type: DataTypes.DATEONLY, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "day", + autoIncrement: false, + unique: "holiday_day_uindex" + }, + holiday: { + type: DataTypes.JSONB, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "holiday", + autoIncrement: false + }, + type: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "workday 工作日 / dayoff 休息日 / festivals 节假日", + primaryKey: false, + field: "type", + autoIncrement: false + } + }, { + tableName: "holiday", + comment: "", + indexes: [] + }); + dc.models.Holiday = Holiday; + return Holiday; +}; \ No newline at end of file diff --git a/api/app/lib/routes/auth/index.js b/api/app/lib/routes/auth/index.js new file mode 100644 index 0000000..c4df619 --- /dev/null +++ b/api/app/lib/routes/auth/index.js @@ -0,0 +1,11 @@ +'use strict'; + +const auth = require('../../controllers/auth'); + +module.exports = function (app, router, opts) { + app.fs.api.logAttr['POST/login'] = { content: '登录', visible: true }; + router.post('/login', auth.login); + + app.fs.api.logAttr['PUT/logout'] = { content: '登出', visible: false }; + router.put('/logout', auth.logout); +}; \ No newline at end of file diff --git a/api/app/lib/routes/index.js b/api/app/lib/routes/index.js new file mode 100644 index 0000000..39cbc75 --- /dev/null +++ b/api/app/lib/routes/index.js @@ -0,0 +1,17 @@ +'use strict'; + +const path = require('path'); +const fs = require('fs'); + +module.exports = function (app, router, opts) { + fs.readdirSync(__dirname).forEach((filename) => { + if (filename.indexOf('.') !== 0 && fs.lstatSync(path.join(__dirname, filename)).isDirectory()) { + fs.readdirSync(path.join(__dirname, filename)).forEach((api) => { + if (api.indexOf('.') == 0 || api.indexOf('.js') == -1) return; + require(`./${filename}/${api}`)(app, router, opts); + }); + } + }); + + return router; +}; diff --git a/api/app/lib/service/clickHouseClient.js b/api/app/lib/service/clickHouseClient.js new file mode 100644 index 0000000..f688681 --- /dev/null +++ b/api/app/lib/service/clickHouseClient.js @@ -0,0 +1,36 @@ +'use strict'; +const { ClickHouse } = require('clickhouse'); + +function factory (app, opts) { + if (opts.clickHouse) { + try { + app.fs.clickHouse = {} + const { url, port, user, password, db = [] } = opts.clickHouse + for (let d of db) { + if (d.name && d.db) { + app.fs.clickHouse[d.name] = new ClickHouse({ + url: url, + port: port, + debug: opts.dev, + format: "json", + basicAuth: user && password ? { + username: user, + password: password, + } : null, + config: { + database: d.db, + }, + }) + console.info(`ClickHouse ${d.name} 初始化完成`); + } else { + throw 'opts.clickHouse 参数错误!' + } + } + } catch (error) { + console.error(error) + process.exit(-1); + } + } +} + +module.exports = factory; \ No newline at end of file diff --git a/api/app/lib/service/paasRequest.js b/api/app/lib/service/paasRequest.js new file mode 100644 index 0000000..1cfa081 --- /dev/null +++ b/api/app/lib/service/paasRequest.js @@ -0,0 +1,67 @@ +'use strict'; +const request = require('superagent') + +class paasRequest { + constructor(root, { query = {} } = {}, option) { + this.root = root; + this.query = query + this.option = option + } + + #buildUrl = (url) => { + return `${this.root}/${url}`; + } + + #resultHandler = (resolve, reject) => { + return (err, res) => { + if (err) { + reject(err); + } else { + resolve(res[this.option.dataWord]); + } + }; + } + + get = (url, { query = {}, header = {} } = {}) => { + return new Promise((resolve, reject) => { + request.get(this.#buildUrl(url)).set(header).query(Object.assign(query, this.query)).end(this.#resultHandler(resolve, reject)); + }) + } + + post = (url, { data = {}, query = {}, header = {} } = {}) => { + return new Promise((resolve, reject) => { + request.post(this.#buildUrl(url)).set(header).query(Object.assign(query, this.query)).send(data).end(this.#resultHandler(resolve, reject)); + }) + } + + put = (url, { data = {}, header = {}, query = {}, } = {}) => { + return new Promise((resolve, reject) => { + request.put(this.#buildUrl(url)).set(header).query(Object.assign(query, this.query)).send(data).end(this.#resultHandler(resolve, reject)); + }) + } + + delete = (url, { header = {}, query = {} } = {}) => { + return new Promise((resolve, reject) => { + request.delete(this.#buildUrl(url)).set(header).query(Object.assign(query, this.query)).end(this.#resultHandler(resolve, reject)); + }) + } +} + +function factory (app, opts) { + if (opts.pssaRequest) { + try { + for (let r of opts.pssaRequest) { + if (r.name && r.root) { + app.fs[r.name] = new paasRequest(r.root, { ...(r.params || {}) }, { dataWord: r.dataWord || 'body' }) + } else { + throw 'opts.pssaRequest 参数错误!' + } + } + } catch (error) { + console.error(error) + process.exit(-1); + } + } +} + +module.exports = factory; diff --git a/api/app/lib/service/redis.js b/api/app/lib/service/redis.js new file mode 100644 index 0000000..92a4745 --- /dev/null +++ b/api/app/lib/service/redis.js @@ -0,0 +1,41 @@ +'use strict'; +// https://github.com/luin/ioredis +const redis = require("ioredis") + +module.exports = async function factory (app, opts) { + let client = opts.redis.pwd ? + new redis.Cluster([ + { + host: opts.redis.host, + port: opts.redis.port + } + ], { + redisOptions: { + password: opts.redis.pwd, + }, + }) + : new redis(opts.redis.port, opts.redis.host, { + password: opts.redis.pwd, + }); + + client.on("error", function (err) { + app.fs.logger.error('info', '[FS-AUTH-REDIS]', `redis connect error. ${opts.redis.host + ':' + opts.redis.port}`); + // console.error("Error :", err); + // process.exit(-1); + }); + + client.on('connect', function () { + console.info(`redis connect success ${opts.redis.host + ':' + opts.redis.port}`); + }) + + // 自定义方法 + async function hdelall (key) { + const obj = await client.hgetall(key); + await client.hdel(key, Object.keys(obj)) + } + + app.redis = client + app.redisTools = { + hdelall, + } +} diff --git a/api/app/lib/service/socket.js b/api/app/lib/service/socket.js new file mode 100644 index 0000000..eb666ba --- /dev/null +++ b/api/app/lib/service/socket.js @@ -0,0 +1,15 @@ +'use strict'; +const moment = require('moment') + +module.exports = async function factory (app, opts) { + + app.socket.on('connection', async (socket) => { + console.info('WEB_SOCKET token:' + socket.handshake.query.token + ' 已连接:id ' + socket.id + ' 时间:' + moment(socket.handshake.time).format()); + + socket.on('disconnecting', async (reason) => { + const connectSeconds = moment().diff(moment(socket.handshake.time), 'seconds') + + console.info('WEB_SOCKET token:' + socket.handshake.query.token + ' 已断开连接:' + reason + ' 连接时长:' + connectSeconds + 's'); + }) + }) +} diff --git a/api/app/lib/utils/constant.js b/api/app/lib/utils/constant.js new file mode 100644 index 0000000..8012eca --- /dev/null +++ b/api/app/lib/utils/constant.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = function (app, opts) { + + const dayType = { + dayoff: '普假', + workday: '工作日', + festivals: '法定假', + } + + const overtimeType = { + '发放加班补偿': '折算', + '调休': '调休' + } + + return { + dayType, + overtimeType, + } +} \ No newline at end of file diff --git a/api/app/lib/utils/index.js b/api/app/lib/utils/index.js new file mode 100644 index 0000000..19d9745 --- /dev/null +++ b/api/app/lib/utils/index.js @@ -0,0 +1,17 @@ +'use strict'; + +const path = require('path'); +const fs = require('fs'); + +module.exports = async function (app, opts) { + fs.readdirSync(__dirname).forEach((filename) => { + if (!['index.js'].some(f => filename == f)) { + const utils = require(`./${filename}`)(app, opts) + console.log(`载入 ${filename} 工具集成功`); + app.fs.utils = { + ...app.fs.utils, + ...utils, + } + } + }); +}; diff --git a/api/app/lib/utils/xlsxDownload.js b/api/app/lib/utils/xlsxDownload.js new file mode 100644 index 0000000..bcd060a --- /dev/null +++ b/api/app/lib/utils/xlsxDownload.js @@ -0,0 +1,82 @@ +'use strict'; +const fs = require('fs'); +const xlsx = require('better-xlsx'); +const path = require('path') +const moment = require('moment') + + +module.exports = function (app, opts) { + + //递归创建目录 同步方法 + async function makeDir (dir) { + if (!fs.existsSync(dir)) { + makeDir(path.dirname(dir)) + fs.mkdirSync(dir, function (err) { + if (err) { + throw err + } + }); + } + } + + async function simpleExcelDown ({ data = [], header = [], fileName = moment().format('YYYY-MM-DD HH:mm:ss') } = {}) { + const fileDirPath = path.join(__dirname, `../../downloadFiles`) + makeDir(fileDirPath) + const file = new xlsx.File(); + const sheet_1 = file.addSheet('sheet_1'); + + // header + const headerStyle = new xlsx.Style(); + headerStyle.align.h = 'center'; + headerStyle.align.v = 'center'; + headerStyle.border.right = 'thin'; + headerStyle.border.rightColor = '#000000'; + headerStyle.border.bottom = 'thin'; + headerStyle.border.bottomColor = '#000000'; + + const headerRow = sheet_1.addRow(); + const indexCell = headerRow.addCell(); + indexCell.value = '序号' + indexCell.style = headerStyle + for (let h of header) { + const cell = headerRow.addCell(); + cell.value = h.title; + cell.style = headerStyle + } + + // data + const style = new xlsx.Style(); + style.align.h = 'left'; + style.align.v = 'center'; + style.border.right = 'thin'; + style.border.rightColor = '#000000'; + style.border.bottom = 'thin'; + style.border.bottomColor = '#000000'; + for (let i = 0; i < data.length; i++) { + const row = sheet_1.addRow(); + const indexCell = row.addCell(); + indexCell.value = i + 1 + indexCell.style = headerStyle + for (let h of header) { + const cell = row.addCell(); + cell.value = data[i][h.key] || h.defaultValue || ''; + cell.style = style + } + } + + const savePath = path.join(fileDirPath, fileName) + await new Promise(function (resolve, reject) { + file.saveAs() + .pipe(fs.createWriteStream(savePath)) + .on('finish', () => { + resolve() + }); + }) + return savePath + } + + return { + simpleExcelDown, + makeDir + } +} \ No newline at end of file diff --git a/api/config.js b/api/config.js new file mode 100644 index 0000000..c20c7b2 --- /dev/null +++ b/api/config.js @@ -0,0 +1,182 @@ +'use strict'; +/*jslint node:true*/ +const path = require('path'); +const os = require('os'); +const moment = require('moment'); +const args = require('args'); + +const dev = process.env.NODE_ENV == 'development'; + +// 启动参数 +args.option(['p', 'port'], '启动端口'); +args.option(['g', 'pg'], 'postgre 服务 URL'); + +args.option('redisHost', 'redisHost'); +args.option('redisPort', 'redisPort'); +// args.option('redisPswd', 'redisPassword'); + +args.option('apiEmisUrl', '企业管理 api'); + +// 七牛云存储参数 +args.option('qnak', 'qiniuAccessKey'); +args.option('qnsk', 'qiniuSecretKey'); +args.option('qnbkt', 'qiniuBucket'); +args.option('qndmn', 'qiniuDomain'); + +// clickHouse +args.option('clickHouseUrl', 'clickHouse Url'); +args.option('clickHousePort', 'clickHouse Port'); +args.option('clickHousePepEmis', 'clickHouse 项企数据库名称'); + +const flags = args.parse(process.argv); + +const RC_DB = process.env.RC_DB || flags.pg; + +// Redis 参数 +const IOTA_REDIS_SERVER_HOST = process.env.IOTA_REDIS_SERVER_HOST || flags.redisHost || "localhost";//redis IP +const IOTA_REDIS_SERVER_PORT = process.env.IOTA_REDIS_SERVER_PORT || flags.redisPort || "6379";//redis 端口 +const IOTA_REDIS_SERVER_PWD = process.env.IOTA_REDIS_SERVER_PWD || flags.redisPswd || "";//redis 密码 + +// 企业管理 api +const API_EMIS_URL = process.env.API_EMIS_URL || flags.apiEmisUrl; + +// 七牛云存储参数 +const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn; +const QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt; +const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak; +const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk; + +// clickHouse +const CLICKHOUST_URL = process.env.CLICKHOUST_URL || flags.clickHouseUrl +const CLICKHOUST_PORT = process.env.CLICKHOUST_PORT || flags.clickHousePort +const CLICKHOUST_USER = process.env.CLICKHOUST_USER || flags.clickHouseUser +const CLICKHOUST_PASSWORD = process.env.CLICKHOUST_PASSWORD || flags.clickHousePassword +const CLICKHOUST_PEP_EMIS = process.env.CLICKHOUST_PEP_EMIS || flags.clickHousePepEmis + +if ( + !RC_DB + || !IOTA_REDIS_SERVER_HOST || !IOTA_REDIS_SERVER_PORT + || !API_EMIS_URL + || !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK + || !CLICKHOUST_URL || !CLICKHOUST_PORT + || !CLICKHOUST_PEP_EMIS +) { + console.log('缺少启动参数,异常退出'); + args.showHelp(); + process.exit(-1); +} + +const product = { + port: flags.port || 8080, + staticDirs: ['static'], + mws: [ + { + entry: require('@fs/attachment').entry, + opts: { + qiniu: { + domain: QINIU_DOMAIN_QNDMN_RESOURCE, + bucket: QINIU_BUCKET_RESOURCE, + accessKey: QINIU_AK, + secretKey: QINIU_SK + }, + maxSize: 104857600, // 100M + } + }, { + entry: require('./app').entry, + opts: { + dev, + exclude: [ + + ], // 不做认证的路由,也可以使用 exclude: ["*"] 跳过所有路由 + qiniu: { + domain: QINIU_DOMAIN_QNDMN_RESOURCE, + bucket: QINIU_BUCKET_RESOURCE, + accessKey: QINIU_AK, + secretKey: QINIU_SK + }, + redis: { + host: IOTA_REDIS_SERVER_HOST, + port: IOTA_REDIS_SERVER_PORT, + pwd: IOTA_REDIS_SERVER_PWD + }, + sms: { + ///阿里云-安心云 + accessKey: 'LTAI5tAFdjz7j38aNF2C9Qe8', + accessSecret: '1trYkmiqfBtvZL6BxkNH2uQcQQPs0S' + }, + pssaRequest: [{ + name: 'emisRequest', + root: API_EMIS_URL + },], + clickHouse: { + url: CLICKHOUST_URL, + port: CLICKHOUST_PORT, + user: CLICKHOUST_USER, + password: CLICKHOUST_PASSWORD, + db: [ + { + name: 'pepEmis', + db: CLICKHOUST_PEP_EMIS + } + ] + } + } + } + ], + dc: { + url: RC_DB, + opts: { + pool: { + max: 80, + min: 10, + idle: 10000 + }, + define: { + freezeTableName: true, // 固定表名 + timestamps: false // 不含列 "createAt"/"updateAt"/"DeleteAt" + }, + timezone: '+08:00', + logging: false + }, + models: [require('./app').models] + }, + logger: { + level: 'info', + json: false, + filename: path.join(__dirname, 'log', 'runtime.log'), + colorize: false, + maxsize: 1024 * 1024 * 5, + rotationFormat: false, + zippedArchive: true, + maxFiles: 10, + prettyPrint: true, + label: '', + timestamp: () => moment().format('YYYY-MM-DD HH:mm:ss.SSS'), + eol: os.EOL, + tailable: true, + depth: null, + showLevel: true, + maxRetries: 1 + } +}; + +const development = { + port: product.port, + staticDirs: product.staticDirs, + mws: product.mws, + dc: product.dc, + logger: product.logger +}; + +if (dev) { + // mws + for (let mw of development.mws) { + // if (mw.opts.exclude) mw.opts.exclude = ['*']; // 使用 ['*'] 跳过所有路由 + } + // logger + development.logger.filename = path.join(__dirname, 'log', 'development.log'); + development.logger.level = 'debug'; + development.dc.opts.logging = console.log; +} + +module.exports = dev ? development : product; diff --git a/api/package.json b/api/package.json new file mode 100644 index 0000000..5ed11ec --- /dev/null +++ b/api/package.json @@ -0,0 +1,42 @@ +{ + "name": "smart-emergency", + "version": "1.0.0", + "description": "fs smart emergency api", + "main": "server.js", + "scripts": { + "test": "set DEBUG=true&&\"node_modules/.bin/mocha\" --harmony --reporter spec app/test/*.test.js", + "start": "set NODE_ENV=development&&node server -p 4000 -g postgres://postgres:123@10.8.30.32:5432/video_access -f http://localhost:4000", + "start:linux": "export NODE_ENV=development&&node server -p 4000 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1", + "automate": "sequelize-automate -c sequelize-automate.config.js" + }, + "author": "", + "license": "MIT", + "repository": {}, + "dependencies": { + "@fs/attachment": "^1.0.0", + "args": "^3.0.7", + "better-xlsx": "^0.7.6", + "clickhouse": "^2.6.0", + "crypto-js": "^4.0.0", + "file-saver": "^2.0.2", + "fs-web-server-scaffold": "^2.0.2", + "ioredis": "^5.0.4", + "kafka-node": "^2.2.3", + "koa-convert": "^1.2.0", + "koa-proxy": "^0.9.0", + "moment": "^2.24.0", + "mqtt": "^4.3.7", + "node-schedule": "^2.1.0", + "nodemailer": "^6.7.7", + "path": "^0.12.7", + "path-to-regexp": "^3.0.0", + "pg": "^7.9.0", + "redis": "^3.1.2", + "request": "^2.88.2", + "superagent": "^3.5.2", + "uuid": "^3.3.2" + }, + "devDependencies": { + "mocha": "^6.0.2" + } +} diff --git a/api/sequelize-automate.config.js b/api/sequelize-automate.config.js new file mode 100644 index 0000000..6a31e50 --- /dev/null +++ b/api/sequelize-automate.config.js @@ -0,0 +1,35 @@ +module.exports = { + // 数据库配置 与 sequelize 相同 + dbOptions: { + database: 'hr-dev', + username: 'postgres', + password: '123', + dialect: 'postgres', + host: '10.8.30.166', + port: 5432, + define: { + underscored: false, + freezeTableName: false, + charset: 'utf8mb4', + timezone: '+00: 00', + dialectOptions: { + collate: 'utf8_general_ci', + }, + timestamps: false, + }, + }, + options: { + type: 'freesun', // 指定 models 代码风格 + camelCase: true, // Models 文件中代码是否使用驼峰命名 + modalNameSuffix: false, // 模型名称是否带 ‘Model’ 后缀 + fileNameCamelCase: false, // Model 文件名是否使用驼峰法命名,默认文件名会使用表名,如 `user_post.js`;如果为 true,则文件名为 `userPost.js` + dir: './app/lib/models', // 指定输出 models 文件的目录 + typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义 + emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` + tables: ['overtime_day','vacate_day'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 + skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 + tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中 + ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面 + attrLength: false, // 在生成模型的字段中 是否生成 如 var(128)这种格式,公司一般使用 String ,则配置为 false + }, +} \ No newline at end of file diff --git a/api/server.js b/api/server.js new file mode 100644 index 0000000..9d1454d --- /dev/null +++ b/api/server.js @@ -0,0 +1,12 @@ +/** + * Created by rain on 2016/1/25. + */ + +'use strict'; +/*jslint node:true*/ +//from koa + +const scaffold = require('fs-web-server-scaffold'); +const config = require('./config'); + +module.exports = scaffold(config); \ No newline at end of file diff --git a/jenkinsfile_poms_api b/jenkinsfile_poms_api new file mode 100644 index 0000000..c3e7a7d --- /dev/null +++ b/jenkinsfile_poms_api @@ -0,0 +1,19 @@ +pipeline { + agent { + node{ + label 'jnlp-slave' + } + } + + stages { + stage('Testing pep-report-api ......') { + steps { + sh 'switch-auth.sh anxinyun' + buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}" + buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}" + sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./api' + sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}' + } + } + } +} \ No newline at end of file diff --git a/jenkinsfile_poms_web b/jenkinsfile_poms_web new file mode 100644 index 0000000..cf1543b --- /dev/null +++ b/jenkinsfile_poms_web @@ -0,0 +1,19 @@ +pipeline { + agent { + node{ + label 'jnlp-slave' + } + } + + stages { + stage('Testing pep-report-web ......') { + steps { + sh 'switch-auth.sh anxinyun' + buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}" + buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}" + sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./web' + sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}' + } + } + } +} \ No newline at end of file diff --git a/web/.babelrc b/web/.babelrc new file mode 100644 index 0000000..6c96eb8 --- /dev/null +++ b/web/.babelrc @@ -0,0 +1,17 @@ +{ + "presets": [ + "@babel/preset-react", + "@babel/preset-env" + ], + "plugins": [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-object-rest-spread", + // ["import", { + // // "libraryName": "antd", + // "libraryDirectory": "es" + // }] + ], + "env": { + "development": {} + } +} diff --git a/web/.vscode/extensions.json b/web/.vscode/extensions.json new file mode 100644 index 0000000..0925499 --- /dev/null +++ b/web/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "formulahendry.code-runner" + ] +} \ No newline at end of file diff --git a/web/.vscode/launch.json b/web/.vscode/launch.json new file mode 100644 index 0000000..d4d2f5b --- /dev/null +++ b/web/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Server", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/server.js", + "args": [ + "-p 5700", + "-u http://127.0.0.1:4000", + "--apiHrUrl http://localhost:4700", + "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", + "--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa", + "--qnbkt dev-hr", + "--qndmn http://rjkwed13l.hn-bkt.clouddn.com", + // "-v 0.2.0", + // "-h 22" + ], + "outputCapture": "std", + "env": { + "NODE_ENV": "development" + } + } + ] +} \ No newline at end of file diff --git a/web/.vscode/settings.json b/web/.vscode/settings.json new file mode 100644 index 0000000..f5f67f5 --- /dev/null +++ b/web/.vscode/settings.json @@ -0,0 +1,4 @@ +// 将设置放入此文件中以覆盖默认值和用户设置。 +{ + "editor.fontSize": 16, +} \ No newline at end of file diff --git a/web/Dockerfile b/web/Dockerfile new file mode 100644 index 0000000..3991885 --- /dev/null +++ b/web/Dockerfile @@ -0,0 +1,40 @@ +# FROM repository.anxinyun.cn/devops/node:12-dev as builder + +# COPY . /var/app + +# WORKDIR /var/app + +# EXPOSE 8080 + +# RUN npm config set registry=http://10.8.30.22:7000 +# RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json +# RUN npm cache clean -f +# RUN npm install --registry http://10.8.30.22:7000 +# RUN npm run build +# RUN rm -rf client/src +# RUN rm -rf node_modules +# RUN npm install --production --registry http://10.8.30.22:7000 + +# FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node-16:7.22-06-20 + +# COPY --from=builder --chown=node /var/app /home/node/app + +# WORKDIR /home/node/app + +# CMD ["node", "server.js"] + + +# 旧版本构建方式 + + +FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 + +COPY . /var/app + +WORKDIR /var/app + +EXPOSE 8080 + +CMD ["-u", "http://localhost:8088"] + +ENTRYPOINT [ "node", "server.js" ] \ No newline at end of file diff --git a/web/client/assets/fonts/DINExp.ttf b/web/client/assets/fonts/DINExp.ttf new file mode 100644 index 0000000..0a83634 Binary files /dev/null and b/web/client/assets/fonts/DINExp.ttf differ diff --git a/web/client/assets/fonts/YouSheBiaoTiHei-2.ttf b/web/client/assets/fonts/YouSheBiaoTiHei-2.ttf new file mode 100644 index 0000000..3729151 Binary files /dev/null and b/web/client/assets/fonts/YouSheBiaoTiHei-2.ttf differ diff --git a/web/client/assets/images/background/console.png b/web/client/assets/images/background/console.png new file mode 100644 index 0000000..02add22 Binary files /dev/null and b/web/client/assets/images/background/console.png differ diff --git a/web/client/assets/images/background/header.png b/web/client/assets/images/background/header.png new file mode 100644 index 0000000..59900ca Binary files /dev/null and b/web/client/assets/images/background/header.png differ diff --git a/web/client/assets/images/background/loginBackground.gif b/web/client/assets/images/background/loginBackground.gif new file mode 100644 index 0000000..46f9f99 Binary files /dev/null and b/web/client/assets/images/background/loginBackground.gif differ diff --git a/web/client/assets/images/background/loginBackgroundimg.png b/web/client/assets/images/background/loginBackgroundimg.png new file mode 100644 index 0000000..ed709cd Binary files /dev/null and b/web/client/assets/images/background/loginBackgroundimg.png differ diff --git a/web/client/assets/images/background/loginText.png b/web/client/assets/images/background/loginText.png new file mode 100644 index 0000000..21fb0fe Binary files /dev/null and b/web/client/assets/images/background/loginText.png differ diff --git a/web/client/assets/images/background/loginbg.png b/web/client/assets/images/background/loginbg.png new file mode 100644 index 0000000..4713d09 Binary files /dev/null and b/web/client/assets/images/background/loginbg.png differ diff --git a/web/client/assets/images/background/logo.png b/web/client/assets/images/background/logo.png new file mode 100644 index 0000000..a81edce Binary files /dev/null and b/web/client/assets/images/background/logo.png differ diff --git a/web/client/assets/images/background/notice.png b/web/client/assets/images/background/notice.png new file mode 100644 index 0000000..e00a54f Binary files /dev/null and b/web/client/assets/images/background/notice.png differ diff --git a/web/client/assets/images/background/topchoose.png b/web/client/assets/images/background/topchoose.png new file mode 100644 index 0000000..44c8165 Binary files /dev/null and b/web/client/assets/images/background/topchoose.png differ diff --git a/web/client/assets/images/background/user_login.png b/web/client/assets/images/background/user_login.png new file mode 100644 index 0000000..7681ad4 Binary files /dev/null and b/web/client/assets/images/background/user_login.png differ diff --git a/web/client/assets/images/background/username.png b/web/client/assets/images/background/username.png new file mode 100644 index 0000000..d29c1c2 Binary files /dev/null and b/web/client/assets/images/background/username.png differ diff --git a/web/client/assets/images/background/videoPlayBg.png b/web/client/assets/images/background/videoPlayBg.png new file mode 100644 index 0000000..fa4e863 Binary files /dev/null and b/web/client/assets/images/background/videoPlayBg.png differ diff --git a/web/client/assets/images/background/xiangqi.png b/web/client/assets/images/background/xiangqi.png new file mode 100644 index 0000000..9742f78 Binary files /dev/null and b/web/client/assets/images/background/xiangqi.png differ diff --git a/web/client/assets/images/console/suo.png b/web/client/assets/images/console/suo.png new file mode 100644 index 0000000..92e3599 Binary files /dev/null and b/web/client/assets/images/console/suo.png differ diff --git a/web/client/assets/images/console/yonghu.png b/web/client/assets/images/console/yonghu.png new file mode 100644 index 0000000..e67e296 Binary files /dev/null and b/web/client/assets/images/console/yonghu.png differ diff --git a/web/client/assets/images/hrImg/!.png b/web/client/assets/images/hrImg/!.png new file mode 100644 index 0000000..f9c334f Binary files /dev/null and b/web/client/assets/images/hrImg/!.png differ diff --git a/web/client/assets/images/hrImg/V.png b/web/client/assets/images/hrImg/V.png new file mode 100644 index 0000000..fd5a097 Binary files /dev/null and b/web/client/assets/images/hrImg/V.png differ diff --git a/web/client/assets/images/hrImg/back.png b/web/client/assets/images/hrImg/back.png new file mode 100644 index 0000000..6914924 Binary files /dev/null and b/web/client/assets/images/hrImg/back.png differ diff --git a/web/client/assets/images/hrImg/defaultAvatar.png b/web/client/assets/images/hrImg/defaultAvatar.png new file mode 100644 index 0000000..ebf478e Binary files /dev/null and b/web/client/assets/images/hrImg/defaultAvatar.png differ diff --git a/web/client/assets/images/hrImg/department.png b/web/client/assets/images/hrImg/department.png new file mode 100644 index 0000000..34957a8 Binary files /dev/null and b/web/client/assets/images/hrImg/department.png differ diff --git a/web/client/assets/images/hrImg/detailBgc.png b/web/client/assets/images/hrImg/detailBgc.png new file mode 100644 index 0000000..713bfc1 Binary files /dev/null and b/web/client/assets/images/hrImg/detailBgc.png differ diff --git a/web/client/assets/images/hrImg/export.png b/web/client/assets/images/hrImg/export.png new file mode 100644 index 0000000..2227ba8 Binary files /dev/null and b/web/client/assets/images/hrImg/export.png differ diff --git a/web/client/assets/images/hrImg/information.png b/web/client/assets/images/hrImg/information.png new file mode 100644 index 0000000..28add9d Binary files /dev/null and b/web/client/assets/images/hrImg/information.png differ diff --git a/web/client/assets/images/hrImg/man.png b/web/client/assets/images/hrImg/man.png new file mode 100644 index 0000000..791bab2 Binary files /dev/null and b/web/client/assets/images/hrImg/man.png differ diff --git a/web/client/assets/images/hrImg/mc.png b/web/client/assets/images/hrImg/mc.png new file mode 100644 index 0000000..e26217e Binary files /dev/null and b/web/client/assets/images/hrImg/mc.png differ diff --git a/web/client/assets/images/hrImg/name.png b/web/client/assets/images/hrImg/name.png new file mode 100644 index 0000000..98532da Binary files /dev/null and b/web/client/assets/images/hrImg/name.png differ diff --git a/web/client/assets/images/hrImg/newsetup.png b/web/client/assets/images/hrImg/newsetup.png new file mode 100644 index 0000000..ebbf5de Binary files /dev/null and b/web/client/assets/images/hrImg/newsetup.png differ diff --git a/web/client/assets/images/hrImg/number.png b/web/client/assets/images/hrImg/number.png new file mode 100644 index 0000000..edea2b9 Binary files /dev/null and b/web/client/assets/images/hrImg/number.png differ diff --git a/web/client/assets/images/hrImg/position.png b/web/client/assets/images/hrImg/position.png new file mode 100644 index 0000000..a93fc5f Binary files /dev/null and b/web/client/assets/images/hrImg/position.png differ diff --git a/web/client/assets/images/hrImg/post.png b/web/client/assets/images/hrImg/post.png new file mode 100644 index 0000000..fd0e1f8 Binary files /dev/null and b/web/client/assets/images/hrImg/post.png differ diff --git a/web/client/assets/images/hrImg/resume.png b/web/client/assets/images/hrImg/resume.png new file mode 100644 index 0000000..974058b Binary files /dev/null and b/web/client/assets/images/hrImg/resume.png differ diff --git a/web/client/assets/images/hrImg/upload.png b/web/client/assets/images/hrImg/upload.png new file mode 100644 index 0000000..058bcc0 Binary files /dev/null and b/web/client/assets/images/hrImg/upload.png differ diff --git a/web/client/assets/images/hrImg/woman.png b/web/client/assets/images/hrImg/woman.png new file mode 100644 index 0000000..08bb1cf Binary files /dev/null and b/web/client/assets/images/hrImg/woman.png differ diff --git a/web/client/assets/images/hrImg/year.png b/web/client/assets/images/hrImg/year.png new file mode 100644 index 0000000..50db588 Binary files /dev/null and b/web/client/assets/images/hrImg/year.png differ diff --git a/web/client/assets/js/jessibuca/decoder.js b/web/client/assets/js/jessibuca/decoder.js new file mode 100644 index 0000000..b4dbfae --- /dev/null +++ b/web/client/assets/js/jessibuca/decoder.js @@ -0,0 +1 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,(function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),i=n(r),a=n(t);var s=function(e,r){return e(r={exports:{}},r.exports),r.exports}((function(e){var r,t=void 0!==t?t:{},n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);var s,u,c,f,l,d="./this.program",p="object"==typeof window,h="function"==typeof importScripts,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";m?(v=h?o.default.dirname(v)+"/":__dirname+"/",s=function(e,r){return f||(f=i.default),l||(l=o.default),e=l.normalize(e),f.readFileSync(e,r?null:"utf8")},c=function(e){var r=s(e,!0);return r.buffer||(r=new Uint8Array(r)),k(r.buffer),r},u=function(e,r,t){f||(f=i.default),l||(l=o.default),e=l.normalize(e),f.readFile(e,(function(e,n){e?t(e):r(n.buffer)}))},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.exports=t,process.on("uncaughtException",(function(e){if(!(e instanceof Zr))throw e})),process.on("unhandledRejection",ee),t.inspect=function(){return"[Emscripten Module object]"}):(p||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),v=0!==v.indexOf("blob:")?v.substr(0,v.lastIndexOf("/")+1):"",s=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},h&&(c=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),u=function(e,r,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var y,g,w=t.print||console.log.bind(console),E=t.printErr||console.warn.bind(console);for(r in n)n.hasOwnProperty(r)&&(t[r]=n[r]);function b(e){b.shown||(b.shown={}),b.shown[e]||(b.shown[e]=1,E(e))}n=null,t.arguments,t.thisProgram&&(d=t.thisProgram),t.quit,t.wasmBinary&&(y=t.wasmBinary),t.noExitRuntime,"object"!=typeof WebAssembly&&ee("no native wasm support detected");var _=!1;function k(e,r){e||ee("Assertion failed: "+r)}var T="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.subarray&&T)return T.decode(e.subarray(r,o));for(var i="";r>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function C(e,r){return e?P($,e,r):""}function A(e,r,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(t>=i)break;r[t++]=s}else if(s<=2047){if(t+1>=i)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=i)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function D(e,r,t){return A(e,$,r,t)}function S(e){for(var r=0,t=0;t=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}var F,x,$,R,M,O,I,j,U,N,B="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function L(e,r){for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&M[n];)++n;if((t=n<<1)-e>32&&B)return B.decode($.subarray(e,t));for(var i="",a=0;!(a>=r/2);++a){var s=R[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function W(e,r,t){if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,i=0;i>1]=a,r+=2}return R[r>>1]=0,r-n}function z(e){return 2*e.length}function H(e,r){for(var t=0,n="";!(t>=r/4);){var o=O[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function V(e,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,i=0;i=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(O[r>>2]=a,(r+=4)+4>o)break}return O[r>>2]=0,r-n}function X(e){for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r}t.INITIAL_MEMORY;var G=[],q=[],Y=[];var K=0,J=null;function Q(e){K++,t.monitorRunDependencies&&t.monitorRunDependencies(K)}function Z(e){if(K--,t.monitorRunDependencies&&t.monitorRunDependencies(K),0==K&&J){var r=J;J=null,r()}}function ee(e){throw t.onAbort&&t.onAbort(e),E(e+=""),_=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}t.preloadedImages={},t.preloadedAudios={};var re,te,ne;function oe(e){return e.startsWith("data:application/octet-stream;base64,")}function ie(e){return e.startsWith("file://")}function ae(e){try{if(e==re&&y)return new Uint8Array(y);if(c)return c(e);throw"both async and sync fetching of the wasm failed"}catch(e){ee(e)}}function se(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?N.get(n)():N.get(n)(r.arg):n(void 0===r.arg?null:r.arg)}else r(t)}}function ue(){var e=new Error;if(!e.stack){try{throw new Error}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}oe(re="decoder.wasm")||(re=function(e){return t.locateFile?t.locateFile(e,v):v+e}(re));var ce={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,r){for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:function(e){var r="/"===e.charAt(0),t="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((function(e){return!!e})),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:function(e){var r=ce.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(e){if("/"===e)return"/";var r=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},extname:function(e){return ce.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ce.normalize(e.join("/"))},join2:function(e,r){return ce.normalize(e+"/"+r)}};var fe={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:he.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r="/"===n.charAt(0)}return(r?"/":"")+(e=ce.normalizeArray(e.split("/").filter((function(e){return!!e})),!r).join("/"))||"."},relative:function(e,r){function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=fe.resolve(e).substr(1),r=fe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n");if(!r)return null;e.input=Hr(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(w(P(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(w(P(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(E(P(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(E(P(e.output,0)),e.output=[])}}};function de(e){e=function(e,r){return Math.ceil(e/r)*r}(e,65536);var r=Qr(65536,e);return r?(function(e,r){$.fill(0,e,e+r)}(r,e),r):0}var pe={ops_table:null,mount:function(e){return pe.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(he.isBlkdev(t)||he.isFIFO(t))throw new he.ErrnoError(63);pe.ops_table||(pe.ops_table={dir:{node:{getattr:pe.node_ops.getattr,setattr:pe.node_ops.setattr,lookup:pe.node_ops.lookup,mknod:pe.node_ops.mknod,rename:pe.node_ops.rename,unlink:pe.node_ops.unlink,rmdir:pe.node_ops.rmdir,readdir:pe.node_ops.readdir,symlink:pe.node_ops.symlink},stream:{llseek:pe.stream_ops.llseek}},file:{node:{getattr:pe.node_ops.getattr,setattr:pe.node_ops.setattr},stream:{llseek:pe.stream_ops.llseek,read:pe.stream_ops.read,write:pe.stream_ops.write,allocate:pe.stream_ops.allocate,mmap:pe.stream_ops.mmap,msync:pe.stream_ops.msync}},link:{node:{getattr:pe.node_ops.getattr,setattr:pe.node_ops.setattr,readlink:pe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:pe.node_ops.getattr,setattr:pe.node_ops.setattr},stream:he.chrdev_stream_ops}});var o=he.createNode(e,r,t,n);return he.isDir(o.mode)?(o.node_ops=pe.ops_table.dir.node,o.stream_ops=pe.ops_table.dir.stream,o.contents={}):he.isFile(o.mode)?(o.node_ops=pe.ops_table.file.node,o.stream_ops=pe.ops_table.file.stream,o.usedBytes=0,o.contents=null):he.isLink(o.mode)?(o.node_ops=pe.ops_table.link.node,o.stream_ops=pe.ops_table.link.stream):he.isChrdev(o.mode)&&(o.node_ops=pe.ops_table.chrdev.node,o.stream_ops=pe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=he.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,he.isDir(e.mode)?r.size=4096:he.isFile(e.mode)?r.size=e.usedBytes:he.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&pe.resizeFileStorage(e,r.size)},lookup:function(e,r){throw he.genericErrors[44]},mknod:function(e,r,t,n){return pe.createNode(e,r,t,n)},rename:function(e,r,t){if(he.isDir(e.mode)){var n;try{n=he.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new he.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=he.lookupNode(e,r);for(var n in t.contents)throw new he.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=pe.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!he.isLink(e.mode))throw new he.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)r.set(i.subarray(o,o+a),t);else for(var s=0;s0||n+t8)throw new he.ErrnoError(32);for(var o=ce.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),i=he.root,a="/",s=0;s40)throw new he.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var r;;){if(he.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:function(e,r){for(var t=0,n=0;n>>0)%he.nameTable.length},hashAddNode:function(e){var r=he.hashName(e.parent.id,e.name);e.name_next=he.nameTable[r],he.nameTable[r]=e},hashRemoveNode:function(e){var r=he.hashName(e.parent.id,e.name);if(he.nameTable[r]===e)he.nameTable[r]=e.name_next;else for(var t=he.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:function(e,r){var t=he.mayLookup(e);if(t)throw new he.ErrnoError(t,e);for(var n=he.hashName(e.id,r),o=he.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===r)return o}return he.lookup(e,r)},createNode:function(e,r,t,n){var o=new he.FSNode(e,r,t,n);return he.hashAddNode(o),o},destroyNode:function(e){he.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var r=he.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:function(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:function(e,r){return he.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2},mayLookup:function(e){var r=he.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:function(e,r){try{he.lookupNode(e,r);return 20}catch(e){}return he.nodePermissions(e,"wx")},mayDelete:function(e,r,t){var n;try{n=he.lookupNode(e,r)}catch(e){return e.errno}var o=he.nodePermissions(e,"wx");if(o)return o;if(t){if(!he.isDir(n.mode))return 54;if(he.isRoot(n)||he.getPath(n)===he.cwd())return 10}else if(he.isDir(n.mode))return 31;return 0},mayOpen:function(e,r){return e?he.isLink(e.mode)?32:he.isDir(e.mode)&&("r"!==he.flagsToPermissionString(r)||512&r)?31:he.nodePermissions(e,he.flagsToPermissionString(r)):44},MAX_OPEN_FDS:4096,nextfd:function(e,r){e=e||0,r=r||he.MAX_OPEN_FDS;for(var t=e;t<=r;t++)if(!he.streams[t])return t;throw new he.ErrnoError(33)},getStream:function(e){return he.streams[e]},createStream:function(e,r,t){he.FSStream||(he.FSStream=function(){},he.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new he.FSStream;for(var o in e)n[o]=e[o];e=n;var i=he.nextfd(r,t);return e.fd=i,he.streams[i]=e,e},closeStream:function(e){he.streams[e]=null},chrdev_stream_ops:{open:function(e){var r=he.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new he.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,r){return e<<8|r},registerDevice:function(e,r){he.devices[e]={stream_ops:r}},getDevice:function(e){return he.devices[e]},getMounts:function(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:function(e,r){"function"==typeof e&&(r=e,e=!1),he.syncFSRequests++,he.syncFSRequests>1&&E("warning: "+he.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=he.getMounts(he.root.mount),n=0;function o(e){return he.syncFSRequests--,r(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((function(r){if(!r.type.syncfs)return i(null);r.type.syncfs(r,e,i)}))},mount:function(e,r,t){var n,o="/"===t,i=!t;if(o&&he.root)throw new he.ErrnoError(10);if(!o&&!i){var a=he.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,he.isMountpoint(n))throw new he.ErrnoError(10);if(!he.isDir(n.mode))throw new he.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?he.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var r=he.lookupPath(e,{follow_mount:!1});if(!he.isMountpoint(r.node))throw new he.ErrnoError(28);var t=r.node,n=t.mounted,o=he.getMounts(n);Object.keys(he.nameTable).forEach((function(e){for(var r=he.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&he.destroyNode(r),r=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:function(e,r){return e.node_ops.lookup(e,r)},mknod:function(e,r,t){var n=he.lookupPath(e,{parent:!0}).node,o=ce.basename(e);if(!o||"."===o||".."===o)throw new he.ErrnoError(28);var i=he.mayCreate(n,o);if(i)throw new he.ErrnoError(i);if(!n.node_ops.mknod)throw new he.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:function(e,r){return r=void 0!==r?r:438,r&=4095,r|=32768,he.mknod(e,r,0)},mkdir:function(e,r){return r=void 0!==r?r:511,r&=1023,r|=16384,he.mknod(e,r,0)},mkdirTree:function(e,r){for(var t=e.split("/"),n="",o=0;othis.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var r=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,r){if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+r),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Hr(o.responseText||"",!0)}(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=he.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(u.stream_ops).forEach((function(e){var r=u.stream_ops[e];c[e]=function(){return he.forceLoadFile(u),r.apply(null,arguments)}})),c.read=function(e,r,t,n,o){he.forceLoadFile(u);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s>2]=n.dev,O[t+4>>2]=0,O[t+8>>2]=n.ino,O[t+12>>2]=n.mode,O[t+16>>2]=n.nlink,O[t+20>>2]=n.uid,O[t+24>>2]=n.gid,O[t+28>>2]=n.rdev,O[t+32>>2]=0,ne=[n.size>>>0,(te=n.size,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],O[t+40>>2]=ne[0],O[t+44>>2]=ne[1],O[t+48>>2]=4096,O[t+52>>2]=n.blocks,O[t+56>>2]=n.atime.getTime()/1e3|0,O[t+60>>2]=0,O[t+64>>2]=n.mtime.getTime()/1e3|0,O[t+68>>2]=0,O[t+72>>2]=n.ctime.getTime()/1e3|0,O[t+76>>2]=0,ne=[n.ino>>>0,(te=n.ino,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],O[t+80>>2]=ne[0],O[t+84>>2]=ne[1],0},doMsync:function(e,r,t,n,o){var i=$.slice(e,e+t);he.msync(r,i,o,t,n)},doMkdir:function(e,r){return"/"===(e=ce.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),he.mkdir(e,r,0),0},doMknod:function(e,r,t){switch(61440&r){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return he.mknod(e,r,t),0},doReadlink:function(e,r,t){if(t<=0)return-28;var n=he.readlink(e),o=Math.min(t,S(n)),i=x[r+o];return D(n,r,t+1),x[r+o]=i,o},doAccess:function(e,r){if(-8&r)return-28;var t;if(!(t=he.lookupPath(e,{follow:!0}).node))return-44;var n="";return 4&r&&(n+="r"),2&r&&(n+="w"),1&r&&(n+="x"),n&&he.nodePermissions(t,n)?-2:0},doDup:function(e,r,t){var n=he.getStream(t);return n&&he.close(n),he.open(e,r,0,t,t).fd},doReadv:function(e,r,t,n){for(var o=0,i=0;i>2],s=O[r+(8*i+4)>>2],u=he.read(e,x,a,s,n);if(u<0)return-1;if(o+=u,u>2],s=O[r+(8*i+4)>>2],u=he.write(e,x,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return me.varargs+=4,O[me.varargs-4>>2]},getStr:function(e){return C(e)},getStreamFromFD:function(e){var r=he.getStream(e);if(!r)throw new he.ErrnoError(8);return r},get64:function(e,r){return e}};function ve(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ye=void 0;function ge(e){for(var r="",t=e;$[t];)r+=ye[$[t++]];return r}var we={},Ee={},be={};function _e(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?"_"+e:e}function ke(e,r){return e=_e(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function Te(e,r){var t=ke(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var Pe=void 0;function Ce(e){throw new Pe(e)}var Ae=void 0;function De(e){throw new Ae(e)}function Se(e,r,t){function n(r){var n=t(r);n.length!==e.length&&De("Mismatched type converter count");for(var o=0;o>2])}function Ze(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function er(e){this.rawDestructor&&this.rawDestructor(e)}function rr(e){null!==e&&e.delete()}function tr(e,r,t){if(r===t)return e;if(void 0===t.baseClass)return null;var n=tr(e,r,t.baseClass);return null===n?null:t.downcast(n)}function nr(){return Object.keys(ar).length}function or(){var e=[];for(var r in ar)ar.hasOwnProperty(r)&&e.push(ar[r]);return e}function ir(e){Be=e,Le.length&&Be&&Be(We)}var ar={};function sr(e,r){return r=function(e,r){for(void 0===r&&Ce("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r}(e,r),ar[r]}function ur(e,r){return r.ptrType&&r.ptr||De("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&De("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Ie(Object.create(e,{$$:{value:r}}))}function cr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=sr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?ur(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):ur(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(r),s=Ve[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=tr(r,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?ur(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):ur(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function fr(e,r,t,n,o,i,a,s,u,c,f){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==r.baseClass?this.toWireType=Ke:n?(this.toWireType=Ye,this.destructorFunction=null):(this.toWireType=Je,this.destructorFunction=null)}function lr(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):N.get(r).apply(null,n)}function dr(e,r){var t,n,o,i=(e=ge(e)).includes("j")?(t=e,n=r,o=[],function(){o.length=arguments.length;for(var e=0;e>2)+n]);return t}function yr(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function gr(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=ke(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function wr(e,r,t,n,o){var i=r.length;i<2&&Ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==r[1]&&null!==t,s=!1,u=1;u0?", ":"")+l),d+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)d+="runDestructors(destructors);\n";else for(u=a?1:2;u4&&0==--_r[e].refcount&&(_r[e]=void 0,br.push(e))}function Tr(){for(var e=0,r=5;r<_r.length;++r)void 0!==_r[r]&&++e;return e}function Pr(){for(var e=5;e<_r.length;++e)if(void 0!==_r[e])return _r[e];return null}function Cr(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=br.length?br.pop():_r.length;return _r[r]={refcount:1,value:e},r}}function Ar(e){if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e}function Dr(e,r){switch(r){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(U[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Sr(e,r,t){switch(r){case 0:return t?function(e){return x[e]}:function(e){return $[e]};case 1:return t?function(e){return R[e>>1]}:function(e){return M[e>>1]};case 2:return t?function(e){return O[e>>2]}:function(e){return I[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Fr(e){return e||Ce("Cannot use deleted val. handle = "+e),_r[e].value}function xr(e,r){var t=Ee[e];return void 0===t&&Ce(r+" has unknown type "+hr(e)),t}var $r={};var Rr=[];function Mr(e,r){return(e>>>0)+4294967296*r}function Or(e,r){if(e<=0)return e;var t=r<=32?Math.abs(1<=t&&(r<=32||e>t)&&(e=-2*t+e),e}function Ir(e,r){return e>=0?e:r<=32?2*Math.abs(1<0?"\n":"")+function(e){var r=ue(),t=r.lastIndexOf("_emscripten_log"),n=r.lastIndexOf("_emscripten_get_callstack"),o=r.indexOf("\n",Math.max(t,n))+1;r=r.slice(o),32&e&&b("EM_LOG_DEMANGLE is deprecated; ignoring"),8&e&&"undefined"==typeof emscripten_source_map&&(b('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var i=null;if(128&e)for(i=jr(arguments);i[1].includes("_emscripten_");)i=jr(i[0]);var a=r.split("\n");r="";var s=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),u=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),c=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var f in a){var l=a[f],d="",p="",h=0,m=0,v=c.exec(l);if(v&&5==v.length)d=v[1],p=v[2],h=v[3],m=v[4];else{if((v=s.exec(l))||(v=u.exec(l)),!(v&&v.length>=4)){r+=l+"\n";continue}d=v[1],p=v[2],h=v[3],m=0|v[4]}var y=!1;if(8&e){var g=emscripten_source_map.originalPositionFor({line:h,column:m});(y=g&&g.source)&&(64&e&&(g.source=g.source.substring(g.source.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=" at "+d+" ("+g.source+":"+g.line+":"+g.column+")\n")}(16&e||!y)&&(64&e&&(p=p.substring(p.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=(y?" = "+d:" at "+d)+" ("+p+":"+h+":"+m+")\n"),128&e&&i[0]&&(i[1]==d&&i[2].length>0&&(r=r.replace(/\s+$/,""),r+=" with values: "+i[1]+i[2]+"\n"),i=jr(i[0]))}return r.replace(/\s+$/,"")}(e)),1&e?4&e?E(r):2&e?console.warn(r):512&e?console.info(r):256&e?console.debug(r):w(r):6&e?E(r):w(r)}var Nr={};function Br(){if(!Br.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:d||"./this.program"};for(var r in Nr)void 0===Nr[r]?delete e[r]:e[r]=Nr[r];var t=[];for(var r in e)t.push(r+"="+e[r]);Br.strings=t}return Br.strings}var Lr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=he.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},Wr=365,zr=146;function Hr(e,r,t){var n=t>0?t:S(e)+1,o=new Array(n),i=A(e,o,0,o.length);return r&&(o.length=i),o}Object.defineProperties(Lr.prototype,{read:{get:function(){return(this.mode&Wr)===Wr},set:function(e){e?this.mode|=Wr:this.mode&=-366}},write:{get:function(){return(this.mode&zr)===zr},set:function(e){e?this.mode|=zr:this.mode&=-147}},isFolder:{get:function(){return he.isDir(this.mode)}},isDevice:{get:function(){return he.isChrdev(this.mode)}}}),he.FSNode=Lr,he.staticInit(),function(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);ye=e}(),Pe=t.BindingError=Te(Error,"BindingError"),Ae=t.InternalError=Te(Error,"InternalError"),He.prototype.isAliasOf=xe,He.prototype.clone=je,He.prototype.delete=Ue,He.prototype.isDeleted=Ne,He.prototype.deleteLater=ze,fr.prototype.getPointee=Ze,fr.prototype.destructor=er,fr.prototype.argPackAdvance=8,fr.prototype.readValueFromPointer=Qe,fr.prototype.deleteObject=rr,fr.prototype.fromWireType=cr,t.getInheritedInstanceCount=nr,t.getLiveInheritedInstances=or,t.flushPendingDeletes=We,t.setDelayFunction=ir,pr=t.UnboundTypeError=Te(Error,"UnboundTypeError"),t.count_emval_handles=Tr,t.get_first_emval=Pr;var Vr={y:function(e,r,t){me.varargs=t;try{var n=me.getStreamFromFD(e);switch(r){case 0:return(o=me.get())<0?-28:he.open(n.path,n.flags,0,o).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var o=me.get();return n.flags|=o,0;case 12:o=me.get();return R[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,O[qr()>>2]=i,-1}}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),-e.errno}var i},x:function(e,r,t){me.varargs=t;try{var n=me.getStr(e),o=t?me.get():0;return he.open(n,r,o).fd}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),-e.errno}},s:function(e,r,t,n,o){},D:function(e,r,t,n,o){var i=ve(t);Fe(e,{name:r=ge(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===t)n=x;else if(2===t)n=R;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+r);n=O}return this.fromWireType(n[e>>i])},destructorFunction:null})},n:function(e,r,n,o,i,a,s,u,c,f,l,d,p){l=ge(l),a=dr(i,a),u&&(u=dr(s,u)),f&&(f=dr(c,f)),p=dr(d,p);var h=_e(l);!function(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&Ce("Cannot register public name '"+e+"' twice"),Xe(t,e,e),t.hasOwnProperty(n)&&Ce("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}(h,(function(){mr("Cannot construct "+l+" due to unbound types",[o])})),Se([e,r,n],o?[o]:[],(function(r){var n,i;r=r[0],i=o?(n=r.registeredClass).instancePrototype:He.prototype;var s=ke(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new Pe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Pe(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Pe("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:s}});s.prototype=c;var d=new Ge(l,s,c,p,n,a,u,f),m=new fr(l,d,!0,!1,!1),v=new fr(l+"*",d,!1,!1,!1),y=new fr(l+" const*",d,!1,!0,!1);return Ve[e]={pointerType:v,constPointerType:y},function(e,r,n){t.hasOwnProperty(e)||De("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}(h,s),[m,v,y]}))},i:function(e,r,t,n,o,i){k(r>0);var a=vr(r,t);o=dr(n,o),Se([],[e],(function(e){var t="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Pe("Cannot register multiple constructors with identical number of parameters ("+(r-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[r-1]=function(){mr("Cannot construct "+e.name+" due to unbound types",a)},Se([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=wr(t,n,null,o,i),[]})),[]}))},f:function(e,r,t,n,o,i,a,s){var u=vr(t,n);r=ge(r),i=dr(o,i),Se([],[e],(function(e){var n=(e=e[0]).name+"."+r;function o(){mr("Cannot call "+n+" due to unbound types",u)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var c=e.registeredClass.instancePrototype,f=c[r];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===t-2?(o.argCount=t-2,o.className=e.name,c[r]=o):(Xe(c,r,n),c[r].overloadTable[t-2]=o),Se([],u,(function(o){var s=wr(n,o,e,i,a);return void 0===c[r].overloadTable?(s.argCount=t-2,c[r]=s):c[r].overloadTable[t-2]=s,[]})),[]}))},I:function(e,r,t,n,o,i,a,s,u,c){r=ge(r),o=dr(n,o),Se([],[e],(function(e){var n=(e=e[0]).name+"."+r,f={get:function(){mr("Cannot access "+n+" due to unbound types",[t,a])},enumerable:!0,configurable:!0};return f.set=u?function(){mr("Cannot access "+n+" due to unbound types",[t,a])}:function(e){Ce(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,r,f),Se([],u?[t,a]:[t],(function(t){var a=t[0],f={get:function(){var r=Er(this,e,n+" getter");return a.fromWireType(o(i,r))},enumerable:!0};if(u){u=dr(s,u);var l=t[1];f.set=function(r){var t=Er(this,e,n+" setter"),o=[];u(c,t,l.toWireType(o,r)),yr(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,f),[]})),[]}))},C:function(e,r){Fe(e,{name:r=ge(r),fromWireType:function(e){var r=_r[e].value;return kr(e),r},toWireType:function(e,r){return Cr(r)},argPackAdvance:8,readValueFromPointer:Qe,destructorFunction:null})},l:function(e,r,t){var n=ve(t);Fe(e,{name:r=ge(r),fromWireType:function(e){return e},toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Ar(r)+'" to '+this.name);return r},argPackAdvance:8,readValueFromPointer:Dr(r,n),destructorFunction:null})},c:function(e,r,t,n,o){r=ge(r),-1===o&&(o=4294967295);var i=ve(t),a=function(e){return e};if(0===n){var s=32-8*t;a=function(e){return e<>>s}}var u=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Ar(t)+'" to '+this.name);if(to)throw new TypeError('Passing a number "'+Ar(t)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+n+", "+o+"]!");return u?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:Sr(r,i,0!==n),destructorFunction:null})},b:function(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=I,t=r[e>>=2],o=r[e+1];return new n(F,o,t)}Fe(e,{name:t=ge(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},m:function(e,r){var t="std::string"===(r=ge(r));Fe(e,{name:r,fromWireType:function(e){var r,n=I[e>>2];if(t)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==$[a]){var s=C(o,a-o);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),o=a+1}}else{var u=new Array(n);for(i=0;i>2]=o,t&&n)D(r,i+4,o+1);else if(n)for(var a=0;a255&&(Xr(i),Ce("String has UTF-16 code units that do not fit in 8 bits")),$[i+4+a]=s}else for(a=0;a>2],a=i(),u=e+4,c=0;c<=o;++c){var f=e+4+c*r;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),u=f+r}}return Xr(e),t},toWireType:function(e,n){"string"!=typeof n&&Ce("Cannot pass non-string to C++ string type "+t);var i=a(n),u=Gr(4+i+r);return I[u>>2]=i>>s,o(n,u+4,i+r),null!==e&&e.push(Xr,u),u},argPackAdvance:8,readValueFromPointer:Qe,destructorFunction:function(e){Xr(e)}})},E:function(e,r){Fe(e,{isVoid:!0,name:r=ge(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})},v:function(e,r,t){e=Fr(e),r=xr(r,"emval::as");var n=[],o=Cr(n);return O[t>>2]=o,r.toWireType(n,e)},e:function(e,r,t,n){var o,i;(e=Rr[e])(r=Fr(r),t=void 0===(i=$r[o=t])?ge(o):i,null,n)},p:kr,d:function(e,r){for(var t=function(e,r){for(var t=new Array(e),n=0;n>2)+n],"parameter "+n);return t}(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",i=["retType"],a=[n],s="",u=0;u4&&(_r[e].refcount+=1)},q:function(e){yr(_r[e].value),kr(e)},B:function(e,r){return Cr((e=xr(e,"_emval_take_value")).readValueFromPointer(r))},a:function(){ee()},G:function e(){return void 0===e.start&&(e.start=Date.now()),1e3*(Date.now()-e.start)|0},H:function(e,r,t){var n=function(e,r){var t=e,n=r;function o(e){var r;return n=function(e,r){return"double"!==r&&"i64"!==r||7&e&&(e+=4),e}(n,e),"double"===e?(r=U[n>>3],n+=8):"i64"==e?(r=[O[n>>2],O[n+4>>2]],n+=8):(e="i32",r=O[n>>2],n+=4),r}for(var i,a,s,u,c=[];;){var f=t;if(0===(i=x[t>>0]))break;if(a=x[t+1>>0],37==i){var l=!1,d=!1,p=!1,h=!1,m=!1;e:for(;;){switch(a){case 43:l=!0;break;case 45:d=!0;break;case 35:p=!0;break;case 48:if(h)break e;h=!0;break;case 32:m=!0;break;default:break e}t++,a=x[t+1>>0]}var v=0;if(42==a)v=o("i32"),t++,a=x[t+1>>0];else for(;a>=48&&a<=57;)v=10*v+(a-48),t++,a=x[t+1>>0];var y,g=!1,w=-1;if(46==a){if(w=0,g=!0,t++,42==(a=x[t+1>>0]))w=o("i32"),t++;else for(;;){var E=x[t+1>>0];if(E<48||E>57)break;w=10*w+(E-48),t++}a=x[t+1>>0]}switch(w<0&&(w=6,g=!1),String.fromCharCode(a)){case"h":104==x[t+2>>0]?(t++,y=1):y=2;break;case"l":108==x[t+2>>0]?(t++,y=8):y=4;break;case"L":case"q":case"j":y=8;break;case"z":case"t":case"I":y=4;break;default:y=null}switch(y&&t++,a=x[t+1>>0],String.fromCharCode(a)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var b=100==a||105==a;s=o("i"+8*(y=y||4)),8==y&&(s=117==a?(s[0]>>>0)+4294967296*(s[1]>>>0):Mr(s[0],s[1])),y<=4&&(s=(b?Or:Ir)(s&Math.pow(256,y)-1,8*y));var _=Math.abs(s),k="";if(100==a||105==a)C=Or(s,8*y).toString(10);else if(117==a)C=Ir(s,8*y).toString(10),s=Math.abs(s);else if(111==a)C=(p?"0":"")+_.toString(8);else if(120==a||88==a){if(k=p&&0!=s?"0x":"",s<0){s=-s,C=(_-1).toString(16);for(var T=[],P=0;P=0&&(l?k="+"+k:m&&(k=" "+k)),"-"==C.charAt(0)&&(k="-"+k,C=C.substr(1));k.length+C.lengthS&&S>=-4?(a=(103==a?"f":"F").charCodeAt(0),w-=S+1):(a=(103==a?"e":"E").charCodeAt(0),w--),D=Math.min(w,20)}101==a||69==a?(C=s.toExponential(D),/[eE][-+]\d$/.test(C)&&(C=C.slice(0,-1)+"0"+C.slice(-1))):102!=a&&70!=a||(C=s.toFixed(D),0===s&&((u=s)<0||0===u&&1/u==-1/0)&&(C="-"+C));var F=C.split("e");if(A&&!p)for(;F[0].length>1&&F[0].includes(".")&&("0"==F[0].slice(-1)||"."==F[0].slice(-1));)F[0]=F[0].slice(0,-1);else for(p&&-1==C.indexOf(".")&&(F[0]+=".");w>D++;)F[0]+="0";C=F[0]+(F.length>1?"e"+F[1]:""),69==a&&(C=C.toUpperCase()),s>=0&&(l?C="+"+C:m&&(C=" "+C))}else C=(s<0?"-":"")+"inf",h=!1;for(;C.length>0]);else c=c.concat(Hr("(null)".substr(0,M),!0));if(d)for(;M0;)c.push(32);d||c.push(o("i8"));break;case"n":var I=o("i32*");O[I>>2]=c.length;break;case"%":c.push(i);break;default:for(P=f;P>0])}t+=2}else c.push(i),t+=1}return c}(r,t);Ur(e,P(n,0))},t:function(e){$.length,ee("OOM")},u:function(e,r){var t=0;return Br().forEach((function(n,o){var i=r+t;O[e+4*o>>2]=i,function(e,r,t){for(var n=0;n>0]=e.charCodeAt(n);t||(x[r>>0]=0)}(n,i),t+=n.length+1})),0},w:function(e,r){var t=Br();O[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),O[r>>2]=n,0},k:function(e){try{var r=me.getStreamFromFD(e);return he.close(r),0}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),e.errno}},z:function(e,r){try{var t=me.getStreamFromFD(e),n=t.tty?2:he.isDir(t.mode)?3:he.isLink(t.mode)?7:4;return x[r>>0]=n,0}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),e.errno}},A:function(e,r,t,n){try{var o=me.getStreamFromFD(e),i=me.doReadv(o,r,t);return O[n>>2]=i,0}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),e.errno}},r:function(e,r,t,n,o){try{var i=me.getStreamFromFD(e),a=4294967296*t+(r>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(he.llseek(i,a,n),ne=[i.position>>>0,(te=i.position,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],O[o>>2]=ne[0],O[o+4>>2]=ne[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),e.errno}},j:function(e,r,t,n){try{var o=me.getStreamFromFD(e),i=me.doWritev(o,r,t);return O[n>>2]=i,0}catch(e){return void 0!==he&&e instanceof he.ErrnoError||ee(e),e.errno}},F:function(e){var r=Date.now();return O[e>>2]=r/1e3|0,O[e+4>>2]=r%1e3*1e3|0,0},g:function(e){}};!function(){var e={a:Vr};function r(e,r){var n,o,i=e.exports;t.asm=i,g=t.asm.J,n=g.buffer,F=n,t.HEAP8=x=new Int8Array(n),t.HEAP16=R=new Int16Array(n),t.HEAP32=O=new Int32Array(n),t.HEAPU8=$=new Uint8Array(n),t.HEAPU16=M=new Uint16Array(n),t.HEAPU32=I=new Uint32Array(n),t.HEAPF32=j=new Float32Array(n),t.HEAPF64=U=new Float64Array(n),N=t.asm.N,o=t.asm.K,q.unshift(o),Z()}function n(e){r(e.instance)}function o(r){return function(){if(!y&&(p||h)){if("function"==typeof fetch&&!ie(re))return fetch(re,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+re+"'";return e.arrayBuffer()})).catch((function(){return ae(re)}));if(u)return new Promise((function(e,r){u(re,(function(r){e(new Uint8Array(r))}),r)}))}return Promise.resolve().then((function(){return ae(re)}))}().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){E("failed to asynchronously prepare wasm: "+e),ee(e)}))}if(Q(),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}y||"function"!=typeof WebAssembly.instantiateStreaming||oe(re)||ie(re)||"function"!=typeof fetch?o(n):fetch(re,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,e).then(n,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),o(n)}))}))}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.K).apply(null,arguments)};var Xr=t._free=function(){return(Xr=t._free=t.asm.L).apply(null,arguments)},Gr=t._malloc=function(){return(Gr=t._malloc=t.asm.M).apply(null,arguments)},qr=t.___errno_location=function(){return(qr=t.___errno_location=t.asm.O).apply(null,arguments)},Yr=t._strlen=function(){return(Yr=t._strlen=t.asm.P).apply(null,arguments)},Kr=t.___getTypeName=function(){return(Kr=t.___getTypeName=t.asm.Q).apply(null,arguments)};t.___embind_register_native_and_builtin_types=function(){return(t.___embind_register_native_and_builtin_types=t.asm.R).apply(null,arguments)};var Jr,Qr=t._memalign=function(){return(Qr=t._memalign=t.asm.S).apply(null,arguments)};function Zr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function et(e){function r(){Jr||(Jr=!0,t.calledRun=!0,_||(t.noFSInit||he.init.initialized||he.init(),he.ignorePermissions=!1,se(q),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),Y.unshift(e);var e;se(Y)}()))}K>0||(!function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),G.unshift(e);var e;se(G)}(),K>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),r()}),1)):r()))}if(t.dynCall_ijiii=function(){return(t.dynCall_ijiii=t.asm.T).apply(null,arguments)},t.dynCall_viiijj=function(){return(t.dynCall_viiijj=t.asm.U).apply(null,arguments)},t.dynCall_jij=function(){return(t.dynCall_jij=t.asm.V).apply(null,arguments)},t.dynCall_jii=function(){return(t.dynCall_jii=t.asm.W).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.X).apply(null,arguments)},t._ff_h264_cabac_tables=83749,J=function e(){Jr||et(),Jr||(J=e)},t.run=et,t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();et(),e.exports=t}));const u="initVideo",c="render",f="playAudio",l="print",d="printErr",p="initAudio",h="audioCode",m="videoCode",v=1,y=2,g="init",w="decode",E="audioDecode",b="videoDecode",_="close",k="key",T="delta";(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})(),Date.now||(Date.now=function(){return(new Date).getTime()}),s.print=function(e){postMessage({cmd:l,text:e})},s.printErr=function(e){postMessage({cmd:d,text:e})},s.postRun=function(){var e=[],r={};"VideoEncoder"in self&&(r={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){r.isEmitInfo||(t.opt.debug&&console.log("Jessibuca: [worker] Webcodecs Video Decoder initSize"),postMessage({cmd:u,w:e.codedWidth,h:e.codedHeight}),r.isEmitInfo=!0,r.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),r.offscreenCanvasCtx=r.offscreenCanvas.getContext("2d")),r.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let n=r.offscreenCanvas.transferToImageBitmap();postMessage({cmd:c,buffer:n,delay:t.delay,ts:0},[n]),setTimeout((function(){e.close?e.close():e.destroy()}),100)},error:function(e){console.error(e)}}),decode:function(e,n){const o=e[0]>>4==1;if(r.hasInit){const t=new EncodedVideoChunk({data:e.slice(5),timestamp:n,type:o?k:T});r.decoder.decode(t)}else if(o&&0===e[1]){const n=15&e[0];t.setVideoCodec(n);const o=function(e){let r=e.subarray(1,4),t="avc1.";for(let e=0;e<3;e++){let n=r[e].toString(16);n.length<2&&(n="0"+n),t+=n}return{codec:t,description:e}}(e.slice(5));r.decoder.configure(o),r.hasInit=!0}},reset(){r.hasInit=!1,r.isEmitInfo=!1,r.offscreenCanvas=null,r.offscreenCanvasCtx=null}});var t={opt:{},useOffscreen:function(){return!this.opt.forceNoOffscreen&&"undefined"!=typeof OffscreenCanvas},initAudioPlanar:function(e,r){postMessage({cmd:p,sampleRate:r,channels:e});var t=[],n=[],o=0;this.playAudioPlanar=function(r,i,a){for(var u=i,c=[],l=0,d=0;d<2;d++){var p=s.HEAPU32[(r>>2)+d]>>2;c[d]=s.HEAPF32.subarray(p,p+u)}if(o){if(!(u>=(i=1024-o)))return o+=u,t[0]=Float32Array.of(...t[0],...c[0]),void(2==e&&(t[1]=Float32Array.of(...t[1],...c[1])));n[0]=Float32Array.of(...t[0],...c[0].subarray(0,i)),2==e&&(n[1]=Float32Array.of(...t[1],...c[1].subarray(0,i))),postMessage({cmd:f,buffer:n,ts:a},n.map((e=>e.buffer))),l=i,u-=i}for(o=u;o>=1024;o-=1024)n[0]=c[0].slice(l,l+=1024),2==e&&(n[1]=c[1].slice(l-1024,l)),postMessage({cmd:f,buffer:n,ts:a},n.map((e=>e.buffer)));o&&(t[0]=c[0].slice(l),2==e&&(t[1]=c[1].slice(l)))}},setVideoCodec:function(e){postMessage({cmd:m,code:e})},setAudioCodec:function(e){postMessage({cmd:h,code:e})},setVideoSize:function(e,r){postMessage({cmd:u,w:e,h:r});var n=e*r,o=n>>2;t.useOffscreen()?(this.offscreenCanvas=new OffscreenCanvas(e,r),this.offscreenCanvasGL=this.offscreenCanvas.getContext("webgl"),this.webglObj=(e=>{var r=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),t=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,r),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(n));var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,t),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(o));var i=e.createProgram();e.attachShader(i,n),e.attachShader(i,o),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(i)),e.useProgram(i);var a=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var s=e.getAttribLocation(i,"vertexPos");e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0);var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(i,"texturePos");function f(r,t){var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(i,r),t),n}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var l=f("ySampler",0),d=f("uSampler",1),p=f("vSampler",2);return{render:function(r,t,n,o,i){e.viewport(0,0,r,t),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,l),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r,t,0,e.LUMINANCE,e.UNSIGNED_BYTE,n),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,d),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r/2,t/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,p),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r/2,t/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,i),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(i),e.deleteBuffer(a),e.deleteBuffer(u),e.deleteTexture(l),e.deleteTexture(d),e.deleteBuffer(p)}catch(e){}}}})(this.offscreenCanvasGL),this.draw=function(t,i,a,u){this.webglObj.render(e,r,s.HEAPU8.subarray(i,i+n),s.HEAPU8.subarray(a,a+o),s.HEAPU8.subarray(u,u+o));let f=this.offscreenCanvas.transferToImageBitmap();postMessage({cmd:c,buffer:f,delay:this.delay,ts:t},[f])}):this.draw=function(e,r,t,i){var a=[s.HEAPU8.subarray(r,r+n),s.HEAPU8.subarray(t,t+o),s.HEAPU8.subarray(i,i+o)].map((e=>Uint8Array.from(e)));postMessage({cmd:c,output:a,delay:this.delay,ts:e},a.map((e=>e.buffer)))}},getDelay:function(e){return e?(this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1,this.getDelay=function(e){return e&&(this.delay=Date.now()-this.startTimestamp-(e-this.firstTimestamp)),this.delay},-1):-1},init:function(){t.opt.debug&&console.log("Jessibuca: [worker] init");const n=e=>{t.opt.useWCS&&t.useOffscreen()&&e.type===y&&r.decode?r.decode(e.payload,e.ts):e.decoder.decode(e.payload,e.ts)};this.stopId=setInterval((()=>{if(e.length)if(this.dropping){for(r=e.shift();!r.isIFrame&&e.length;)r=e.shift();r.isIFrame&&(this.dropping=!1,n(r))}else{var r=e[0];if(-1===this.getDelay(r.ts))e.shift(),n(r);else if(this.delay>this.opt.videoBuffer+1e3)this.dropping=!0;else for(;e.length&&(r=e[0],this.getDelay(r.ts)>this.opt.videoBuffer);)e.shift(),n(r)}}),10)},close:function(){this.opt.debug&&console.log("Jessibuca: [worker]: close"),clearInterval(this.stopId),this.stopId=null,n.clear(),o.clear(),r.reset&&r.reset(),this.firstTimestamp=0,this.startTimestamp=0,this.delay=-1,this.webglObj&&(this.webglObj.destroy(),this.offscreenCanvas=null,this.offscreenCanvasGL=null,this.offscreenCanvasCtx=null),e=[],delete this.playAudioPlanar,delete this.draw},pushBuffer:function(r,t){t.type===v?e.push({ts:t.ts,payload:r,decoder:n,type:v}):t.type===y&&e.push({ts:t.ts,payload:r,decoder:o,type:y,isIFrame:t.isIFrame})}},n=new s.AudioDecoder(t),o=new s.VideoDecoder(t);postMessage({cmd:g}),self.onmessage=function(e){var r=e.data;switch(r.cmd){case g:t.opt=JSON.parse(r.opt),n.sample_rate=r.sampleRate,t.init();break;case w:t.pushBuffer(r.buffer,r.options);break;case E:n.decode(r.buffer,r.ts);break;case b:o.decode(r.buffer,r.ts);break;case _:t.close()}}}})); diff --git a/web/client/assets/js/jessibuca/decoder.wasm b/web/client/assets/js/jessibuca/decoder.wasm new file mode 100644 index 0000000..7ea58df Binary files /dev/null and b/web/client/assets/js/jessibuca/decoder.wasm differ diff --git a/web/client/assets/js/jessibuca/jessibuca.js b/web/client/assets/js/jessibuca/jessibuca.js new file mode 100644 index 0000000..32e245d --- /dev/null +++ b/web/client/assets/js/jessibuca/jessibuca.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jessibuca=t()}(this,(function(){"use strict";const e=0,t=1,i="flv",n="m7s",o={videoBuffer:1e3,isResize:!0,isFullResize:!1,isFlv:!1,debug:!1,loadingTimeout:10,heartTimeout:10,timeout:10,supportDblclickFullscreen:!1,showBandwidth:!1,keepScreenOn:!1,isNotMute:!1,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1},hasControl:!1,loadingText:"",background:"",decoder:"/assets/js/jessibuca/decoder.js",url:"",rotate:0,forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:t,demuxType:i,useWCS:!1,useMSE:!1,useOffscreen:!1},r="init",s="initVideo",a="render",A="playAudio",c="initAudio",d="audioCode",l="videoCode",u=1,h=2,f=8,p=9,g="init",m="decode",b="audioDecode",y="close",v={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",stats:"stats",performance:"performance",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio"},w={load:v.load,timeUpdate:v.timeUpdate,videoInfo:v.videoInfo,audioInfo:v.audioInfo,error:v.error,kBps:v.kBps,log:v.log,start:v.start,timeout:v.timeout,loadingTimeout:v.loadingTimeout,delayTimeout:v.delayTimeout,fullscreen:"fullscreen",play:v.play,pause:v.pause,mute:v.mute,stats:v.stats,performance:v.performance,recordingTimestamp:v.recordingTimestamp,recordStart:v.recordStart,recordEnd:v.recordEnd},E={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",wasmDecodeError:"wasmDecodeError"},S="notConnect",R="open",C="close",B="error",k={download:"download",base64:"base64",blob:"blob"},I={7:"H264(AVC)",12:"H265(HEVC)"},T=7,x=12,L={10:"AAC",7:"ALAW",8:"MULAW"},D=32,O=33,j=34,U=0,F=1,P=2,M="mp4",V="webm",Q="webcodecs",N="webgl",W="offscreen",G="key",H="delta",J='video/mp4; codecs="avc1.64002A"',q="ended",z="open",X="closed";class Y{constructor(e){this.log=function(t){if(e._opt.debug){for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?i-1:0),o=1;o3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,n)));e.addEventListener(t,i,n);const o=()=>e.removeEventListener(t,i,n);return this.destroys.push(o),o}destroy(){this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e()))}}var K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _(e,t){return e(t={exports:{}},t.exports),t.exports}var $=_((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,n=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,o=i.length,r={};n0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),n=t[0].replace("data:","").replace(";base64","");let o=i.length,r=new Uint8Array(o);for(;o--;)r[o]=i.charCodeAt(o);return new File([r],"file",{type:n})}function ie(e,t){const i=document.createElement("a");i.download=t,i.href=URL.createObjectURL(e),i.click(),URL.revokeObjectURL(e)}function ne(){return(new Date).getTime()}function oe(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function re(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{re(e,i,t[i])})),e.style[t]=i,e}function se(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const n=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(n):n}function ae(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function Ae(e){let t=0,i=ae();return n=>{t+=n;const o=ae(),r=o-i;r>=1e3&&(e(t/r*1e3),i=o,t=0)}}function ce(e){if(null==e||""===e)return"0 KB/S";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/S"}function de(e){return null==e}function le(e){return!de(e)}$.isEnabled,(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();class ue{on(e,t,i){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const n=this;function o(){n.off(e,o);for(var r=arguments.length,s=new Array(r),a=0;a1?i-1:0),o=1;o{delete i[e]})),void delete this.e;const n=i[e],o=[];if(n&&t)for(let e=0,i=n.length;e{var t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),i=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n"),n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(n));var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,i),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(o));var r=e.createProgram();e.attachShader(r,n),e.attachShader(r,o),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(r)),e.useProgram(r);var s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var a=e.getAttribLocation(r,"vertexPos");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);var A=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,A),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(r,"texturePos");function d(t,i){var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(r,t),i),n}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var l=d("ySampler",0),u=d("uSampler",1),h=d("vSampler",2);return{render:function(t,i,n,o,r){e.viewport(0,0,t,i),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,l),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t,i,0,e.LUMINANCE,e.UNSIGNED_BYTE,n),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,u),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,i/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,i/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,r),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(r),e.deleteBuffer(s),e.deleteBuffer(A),e.deleteTexture(l),e.deleteTexture(u),e.deleteBuffer(h)}catch(e){}}}})(this.contextGl);this.contextGlRender=e.render,this.contextGlDestroy=e.destroy}_initContext2D(){this.context2D=this.$videoElement.getContext("2d")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=Q,this._initContext2D()):this._supportOffscreen()?(this.renderType=W,this._bindOffscreen()):(this.renderType=N,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}render(e){switch(this.player.videoTimestamp=e.ts,this.renderType){case W:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case N:this.contextGlRender(this.$videoElement.width,this.$videoElement.height,e.output[0],e.output[1],e.output[2]);break;case Q:this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height)}}screenshot(e,t,i,n){e=e||ne(),n=n||k.download;const o={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};let r=.92;!o[t]&&k[t]&&(n=t,t="png",i=void 0),"string"==typeof i&&(n=i,i=void 0),void 0!==i&&(r=Number(i));const s=this.$videoElement.toDataURL(o[t]||o.png,r),a=te(s);return n===k.base64?s:n===k.blob?a:void(n===k.download&&ie(a,e))}clearView(){switch(this.renderType){case W:(function(e,t){const i=document.createElement("canvas");return i.width=e,i.height=t,createImageBitmap(i,0,0,e,t)})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case N:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case Q:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}resize(){this.player.debug.log("canvasVideo","resize");const e=this.player._opt,t=this.player.width;let i=this.player.height;e.hasControl&&(i-=38);let n=this.$videoElement.width,o=this.$videoElement.height;const r=e.rotate;let s=(t-n)/2,a=(i-o)/2;270!==r&&90!==r||(n=this.$videoElement.height,o=this.$videoElement.width);const A=t/n,c=i/o;let d=A>c?c:A;e.isResize||A!==c&&(d=A+","+c),e.isFullResize&&(d=A>c?A:c);let l="scale("+d+")";r&&(l+=" rotate("+r+"deg)"),this.$videoElement.style.transform=l,this.$videoElement.style.left=s+"px",this.$videoElement.style.top=a+"px"}destroy(){this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.contextGlRender&&(this.contextGlDestroy&&this.contextGlDestroy(),this.contextGlDestroy=null,this.contextGlRender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.videoInfo={width:"",height:"",encType:"",encTypeCode:""},this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off(),this.player.debug.log("CanvasVideoLoader","destroy")}}class pe extends he{constructor(e){super(),this.player=e;const t=document.createElement("video");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,e.$container.appendChild(t),this.$videoElement=t,this.videoInfo={width:"",height:"",encType:""},this.resize();const{proxy:i}=this.player.events;i(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video","canplay")})),i(this.$videoElement,"waiting",(()=>{this.player.emit(v.videoWaiting)})),i(this.$videoElement,"timeupdate",(e=>{})),this.player.debug.log("Video","init")}play(){this.$videoElement.play()}clearView(){}screenshot(e,t,i,n){e=e||ne(),n=n||k.download;let o=.92;!{png:"image/png",jpeg:"image/jpeg",webp:"image/webp"}[t]&&k[t]&&(n=t,t="png",i=void 0),"string"==typeof i&&(n=i,i=void 0),void 0!==i&&(o=Number(i));const r=this.$videoElement;let s=document.createElement("canvas");s.width=r.videoWidth,s.height=r.videoHeight;s.getContext("2d").drawImage(r,0,0,s.width,s.height);const a=s.toDataURL(k[t]||k.png,o),A=te(a);return n===k.base64?a:n===k.blob?A:void(n===k.download&&ie(A,e))}initCanvasViewSize(){this.resize()}resize(){this.$videoElement.width=this.player.width,this.$videoElement.height=this.player._opt.hasControl?this.player.height-38:this.player.height;const e=this.player._opt;let t="contain";const i=e.rotate;e.isResize||(t="fill"),e.isFullResize&&(t="none"),this.$videoElement.style.objectFit=t,this.$videoElement.style.transform="rotate("+i+"deg)"}destroy(){this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off(),this.player.debug.log("Video","destroy")}}class ge{constructor(e){return new(ge.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE?pe:fe}}class me extends ue{constructor(e){super(),this.bufferList=[],this.player=e,this.scriptNode=null,this.hasInitScriptNode=!1,this.audioContextChannel=null,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.audioEnabled(!0),this.gainNode.gain.value=0,this.playing=!1,this.audioSyncVideoOption={diff:null},this.audioInfo={encType:"",channels:"",sampleRate:""},this.init=!1,this.on(v.videoSyncAudio,(e=>{this.player.debug.log("AudioContext",`videoSyncAudio , audioTimestamp: ${e.audioTimestamp},videoTimestamp: ${e.videoTimestamp},diff:${e.diff}`),this.audioSyncVideoOption=e})),this.player.debug.log("AudioContext","init")}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encType=L[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(v.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value||this.isStateSuspended()}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}initScriptNode(){if(this.playing=!0,this.hasInitScriptNode)return;const e=this.audioInfo.channels,t=this.audioContext.createScriptProcessor(1024,0,e);t.onaudioprocess=t=>{const i=t.outputBuffer;if(this.bufferList.length&&this.playing){if(!this.player._opt.useWCS&&!this.player._opt.useMSE){if(this.audioSyncVideoOption.diff>200)return void this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${this.audioSyncVideoOption.diff}`);if(this.audioSyncVideoOption.diff<-200){this.player.debug.warn("AudioContext",`audioSyncVideoOption less than diff :${this.audioSyncVideoOption.diff}`);let e=this.bufferList.shift();for(;e.ts-this.player.videoTimestamp<-200&&this.bufferList.length>0;)e=this.bufferList.shift();if(0===this.bufferList.length)return}}if(0===this.bufferList.length)return;const t=this.bufferList.shift();t&&t.ts&&(this.player.audioTimestamp=t.ts);for(let n=0;n20&&(this.player.debug.warn("AudioContext",`bufferList is large: ${this.bufferList.length}`),this.bufferList.length>50&&this.bufferList.shift())}pause(){this.audioSyncVideoOption={diff:null},this.playing=!1,this.clear()}resume(){this.playing=!0}destroy(){this.closeAudio(),this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.init=!1,this.scriptNode&&(this.scriptNode.onaudioprocess=ee,this.scriptNode=null),this.audioBufferSourceNode=null,this.mediaStreamAudioDestinationNode=null,this.hasInitScriptNode=!1,this.audioSyncVideoOption={diff:null},this.off(),this.player.debug.log("AudioContext","destroy")}}class be{constructor(e){return new(be.getLoaderFactory())(e)}static getLoaderFactory(){return me}}class ye extends ue{constructor(e){super(),this.player=e,this.playing=!1,this.abortController=new AbortController,this.streamRate=Ae((t=>{e.emit(v.kBps,(t/1024).toFixed(2))})),e.debug.log("FetchStream","init")}fetchStream(e){const{demux:t}=this.player;fetch(e,{signal:this.abortController.signal}).then((e=>{const i=e.body.getReader();this.emit(v.streamSuccess);const n=()=>{i.read().then((e=>{let{done:i,value:o}=e;i?t.close():(this.streamRate&&this.streamRate(o.byteLength),t.dispatch(o),n())})).catch((e=>{t.close(),this.emit(E.fetchError,e),this.player.emit(v.error,E.fetchError),this.abort()}))};n()})).catch((e=>{this.abort(),this.emit(E.fetchError,e),this.player.emit(v.error,E.fetchError)}))}abort(){this.abortController&&(this.abortController.abort(),this.abortController=null)}destroy(){this.abort(),this.off(),this.streamRate=null,this.player.debug.log("FetchStream","destroy")}}class ve extends ue{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=S,this.wsUrl=null,this.streamRate=Ae((t=>{e.emit(v.kBps,(t/1024).toFixed(2))}))}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:n}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",i(this.socket,"open",(()=>{this.emit(v.streamSuccess),t.log("websocketLoader","socket open"),this.socketStatus=R})),i(this.socket,"message",(e=>{this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)})),i(this.socket,"close",(()=>{t.log("websocketLoader","socket close"),this.emit(v.streamEnd),this.socketStatus=C})),i(this.socket,"error",(e=>{t.log("websocketLoader","socket error"),this.emit(E.websocketError,e),this.player.emit(v.error,E.websocketError),this.socketStatus=B,n.close(),t.log("websocketLoader","socket error:",e)}))}_handleMessage(e){const{demux:t}=this.player;t.dispatch(e)}fetchStream(e){this.wsUrl=e,this._createWebSocket()}destroy(){this.socket&&(this.socket.close(),this.socket=null),this.socketStatus=S,this.streamRate=null,this.off(),this.player.debug.log("websocketLoader","destroy")}}class we{constructor(e){return new(we.getLoaderFactory(e._opt.protocol))(e)}static getLoaderFactory(i){return i===t?ye:i===e?ve:void 0}}var Ee=_((function(e){function t(e,o){if(!e)throw"First parameter is required.";o=new i(e,o=o||{type:"video"});var r=this;function s(t){t&&(o.initCallback=function(){t(),t=o.initCallback=null});var i=new n(e,o);(h=new i(e,o)).record(),u("recording"),o.disableLogs||console.log("Initialized recorderType:",h.constructor.name,"for output-type:",o.type)}function a(e){if(e=e||function(){},h){if("paused"===r.state)return r.resumeRecording(),void setTimeout((function(){a(e)}),1);"recording"===r.state||o.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',r.state),o.disableLogs||console.log("Stopped recording "+o.type+" stream."),"gif"!==o.type?h.stop(t):(h.stop(),t()),u("stopped")}else p();function t(t){if(h){Object.keys(h).forEach((function(e){"function"!=typeof h[e]&&(r[e]=h[e])}));var i=h.blob;if(!i){if(!t)throw"Recording failed.";h.blob=i=t}if(i&&!o.disableLogs&&console.log(i.type,"->",m(i.size)),e){var n;try{n=d.createObjectURL(i)}catch(e){}"function"==typeof e.call?e.call(r,n):e(n)}o.autoWriteToDisk&&c((function(e){var t={};t[o.type+"Blob"]=e,T.Store(t)}))}else"function"==typeof e.call?e.call(r,""):e("")}}function A(e){postMessage((new FileReaderSync).readAsDataURL(e))}function c(e,t){if(!e)throw"Pass a callback function over getDataURL.";var i=t?t.blob:(h||{}).blob;if(!i)return o.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){c(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var n=new FileReader;n.readAsDataURL(i),n.onload=function(t){e(t.target.result)}}else{var r=function(e){try{var t=d.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return d.revokeObjectURL(t),i}catch(e){}}(A);r.onmessage=function(t){e(t.data)},r.postMessage(i)}}function l(e){e=e||0,"paused"!==r.state?"stopped"!==r.state&&(e>=r.recordingDuration?a(r.onRecordingStopped):(e+=1e3,setTimeout((function(){l(e)}),1e3))):setTimeout((function(){l(e)}),1e3)}function u(e){r&&(r.state=e,"function"==typeof r.onStateChanged.call?r.onStateChanged.call(r,e):r.onStateChanged(e))}var h,f='It seems that recorder is destroyed or "startRecording" is not invoked for '+o.type+" recorder.";function p(){!0!==o.disableLogs&&console.warn(f)}var g={startRecording:function(t){return o.disableLogs||console.log("RecordRTC version: ",r.version),t&&(o=new i(e,t)),o.disableLogs||console.log("started recording "+o.type+" stream."),h?(h.clearRecordedData(),h.record(),u("recording"),r.recordingDuration&&l(),r):(s((function(){r.recordingDuration&&l()})),r)},stopRecording:a,pauseRecording:function(){h?"recording"===r.state?(u("paused"),h.pause(),o.disableLogs||console.log("Paused recording.")):o.disableLogs||console.warn("Unable to pause the recording. Recording state: ",r.state):p()},resumeRecording:function(){h?"paused"===r.state?(u("recording"),h.resume(),o.disableLogs||console.log("Resumed recording.")):o.disableLogs||console.warn("Unable to resume the recording. Recording state: ",r.state):p()},initRecorder:s,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return r.recordingDuration=e,r.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){r.onRecordingStopped=e}}},clearRecordedData:function(){h?(h.clearRecordedData(),o.disableLogs||console.log("Cleared old recorded data.")):p()},getBlob:function(){if(h)return h.blob;p()},getDataURL:c,toURL:function(){if(h)return d.createObjectURL(h.blob);p()},getInternalRecorder:function(){return h},save:function(e){h?b(h.blob,e):p()},getFromDisk:function(e){h?t.getFromDisk(o.type,e):p()},setAdvertisementArray:function(e){o.advertisement=[];for(var t=e.length,i=0;i-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),f=!u&&!l&&!!navigator.webkitGetUserMedia||y()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),p=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);p&&!f&&-1!==navigator.userAgent.indexOf("CriOS")&&(p=!1,f=!0);var g=window.MediaStream;function m(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function b(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var n=t.split(".");t=n[0],i=n[1]}var o=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,o);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,o);var r=document.createElement("a");r.href=d.createObjectURL(e),r.download=o,r.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(r),"function"==typeof r.click?r.click():(r.target="_blank",r.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),d.revokeObjectURL(r.href)}function y(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function v(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function w(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=b,t.getTracks=v,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,n=new EBML.Decoder,o=EBML.tools,r=new FileReader;r.onload=function(e){n.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var r=o.makeMetadataSeekable(i.metadatas,i.duration,i.cues),s=this.result.slice(i.metadataSize),a=new Blob([r,s],{type:"video/webm"});t(a)},r.readAsArrayBuffer(e)},t.bytesToSize=m,t.isElectron=y;var E={};function S(){if(h||p||l)return!0;var e,t,i=navigator.userAgent,n=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10);return(f||u)&&(e=i.indexOf("Chrome"),n=i.substring(e+7)),-1!==(t=n.indexOf(";"))&&(n=n.substring(0,t)),-1!==(t=n.indexOf(" "))&&(n=n.substring(0,t)),o=parseInt(""+n,10),isNaN(o)&&(n=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10)),o>=49}function R(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var n;if(v(e,"video").length&&v(e,"audio").length)navigator.mozGetUserMedia?(n=new g).addTrack(v(e,"audio")[0]):n=new g(v(e,"audio")),e=n;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=f?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var o,r=[];function s(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function a(e){return o&&o.mimeType?o.mimeType:e.mimeType||"video/webm"}function A(){r=[],o=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return r},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],c=[],r=[];var n=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",n),o&&(o=null),f&&!S()&&(n="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&n.mimeType&&(MediaRecorder.isTypeSupported(n.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",n.mimeType),n.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{o=new MediaRecorder(e,n),t.mimeType=n.mimeType}catch(t){o=new MediaRecorder(e)}n.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in o&&!1===o.canRecordMimeType(n.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",n.mimeType)),o.ondataavailable=function(e){if(e.data&&c.push("ondataavailable: "+m(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:a(n)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:a(n)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(r.push(e.data),s(),"function"==typeof t.ondataavailable)){var o=t.getNativeBlob?e.data:new Blob([e.data],{type:a(n)});t.ondataavailable(o)}},o.onstart=function(){c.push("started")},o.onpause=function(){c.push("paused")},o.onresume=function(){c.push("resumed")},o.onstop=function(){c.push("stopped")},o.onerror=function(e){e&&(e.name||(e.name="UnknownError"),c.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",n.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&o&&"inactive"===o.state)return delete t.timeslice,void o.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==o.state&&"stopped"!==o.state&&o.stop())},"number"==typeof t.timeSlice?(s(),o.start(t.timeSlice)):o.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,o&&(this.recordingCallback=e,"recording"===o.state&&o.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(r,{type:a(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){o&&"recording"===o.state&&o.pause()},this.resume=function(){o&&"paused"===o.state&&o.resume()},this.clearRecordedData=function(){o&&"recording"===o.state&&i.stop(A),A()},this.getInternalRecorder=function(){return o},this.blob=null,this.getState=function(){return o&&o.state||"inactive"};var c=[];this.getAllStates=function(){return c},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function n(){if(o&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(n,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function C(e,i){if(!v(e,"audio").length)throw"Your stream has no audio tracks.";var n,o=this,r=[],s=[],a=!1,A=0,c=2,l=(i=i||{}).desiredSampRate;function u(){if(!1===i.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function h(e,t){function i(e,t){var i,n=e.numberOfAudioChannels,o=e.leftBuffers.slice(0),r=e.rightBuffers.slice(0),s=e.sampleRate,a=e.internalInterleavedLength,A=e.desiredSampRate;function c(e,t,i){var n=Math.round(e.length*(t/i)),o=[],r=Number((e.length-1)/(n-1));o[0]=e[0];for(var s=1;s96e3)&&(i.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),i.disableLogs||i.desiredSampRate&&console.log("Desired sample-rate: "+i.desiredSampRate);var y=!1;function w(){r=[],s=[],A=0,S=!1,a=!1,y=!1,f=null,o.leftchannel=r,o.rightchannel=s,o.numberOfAudioChannels=c,o.desiredSampRate=l,o.sampleRate=b,o.recordingLength=A,R={left:[],right:[],recordingLength:0}}function E(){n&&(n.onaudioprocess=null,n.disconnect(),n=null),p&&(p.disconnect(),p=null),w()}this.pause=function(){y=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!a)return i.disableLogs||console.log("Seems recording has been restarted."),void this.record();y=!1},this.clearRecordedData=function(){i.checkForInactiveTracks=!1,a&&this.stop(E),E()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var S=!1;n.onaudioprocess=function(e){if(!y)if(!1===u()&&(i.disableLogs||console.log("MediaStream seems stopped."),n.disconnect(),a=!1),a){S||(S=!0,i.onAudioProcessStarted&&i.onAudioProcessStarted(),i.initCallback&&i.initCallback());var t=e.inputBuffer.getChannelData(0),d=new Float32Array(t);if(r.push(d),2===c){var l=e.inputBuffer.getChannelData(1),h=new Float32Array(l);s.push(h)}A+=m,o.recordingLength=A,void 0!==i.timeSlice&&(R.recordingLength+=m,R.left.push(d),2===c&&R.right.push(h))}else p&&(p.disconnect(),p=null)},f.createMediaStreamDestination?n.connect(f.createMediaStreamDestination()):n.connect(f.destination),this.leftchannel=r,this.rightchannel=s,this.numberOfAudioChannels=c,this.desiredSampRate=l,this.sampleRate=b,o.recordingLength=A;var R={left:[],right:[],recordingLength:0};function C(){a&&"function"==typeof i.ondataavailable&&void 0!==i.timeSlice&&(R.left.length?(h({desiredSampRate:l,sampleRate:b,numberOfAudioChannels:c,internalInterleavedLength:R.recordingLength,leftBuffers:R.left,rightBuffers:1===c?[]:R.right},(function(e,t){var n=new Blob([t],{type:"audio/wav"});i.ondataavailable(n),setTimeout(C,i.timeSlice)})),R={left:[],right:[],recordingLength:0}):setTimeout(C,i.timeSlice))}}function B(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var n,o,r,s=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),a=50,A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(s&&A&&A[2]&&(a=parseInt(A[2],10)),s&&a<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)n=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";n=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(r=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in n?e=n.captureStream(25):"mozCaptureStream"in n?e=n.mozCaptureStream(25):"webkitCaptureStream"in n&&(e=n.webkitCaptureStream(25));try{var s=new g;s.addTrack(v(e,"video")[0]),e=s}catch(e){}if(!e)throw"captureStream API are NOT available.";(o=new R(e,{mimeType:t.mimeType||"video/webm"})).record()}else h.frames=[],u=(new Date).getTime(),l();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var n=h.frames.length;h.frames.forEach((function(e,i){var o=n-i;t.disableLogs||console.log(o+"/"+n+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(o,n);var r=e.image.toDataURL("image/webp",1);h.frames[i].image=r})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){r=!1;var n=this;i&&o?o.stop(e):this.getWebPImages((function(){h.compile((function(i){t.disableLogs||console.log("Recording finished!"),n.blob=i,n.blob.forEach&&(n.blob=new Blob([],{type:"video/webm"})),e&&e(n.blob),h.frames=[]}))}))};var c=!1;function d(){h.frames=[],r=!1,c=!1}function l(){if(c)return u=(new Date).getTime(),setTimeout(l,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),h.frames.push({image:(n=document.createElement("canvas"),o=n.getContext("2d"),n.width=e.width,n.height=e.height,o.drawImage(e,0,0),n),duration:i}),void(r&&setTimeout(l,t.frameInterval))}var n,o;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(l,t.frameInterval);u=(new Date).getTime(),h.frames.push({image:e.toDataURL("image/webp",1),duration:i}),r&&setTimeout(l,t.frameInterval)}})}this.pause=function(){c=!0,o instanceof R&&o.pause()},this.resume=function(){c=!1,o instanceof R?o.resume():r||this.record()},this.clearRecordedData=function(){r&&this.stop(d),d()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),h=new I.Video(100)}function k(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-A;return t?r?(A=(new Date).getTime(),setTimeout(i,100)):(A=(new Date).getTime(),a.paused&&a.play(),l.drawImage(a,0,0,d.width,d.height),c.frames.push({duration:t,image:d.toDataURL("image/webp")}),void(o||setTimeout(i,e,e))):setTimeout(i,e,e)}function n(e,t,i,n,o){var r=document.createElement("canvas");r.width=d.width,r.height=d.height;var s,a,A,c=r.getContext("2d"),l=[],u=-1===t,h=t&&t>0&&t<=e.length?t:e.length,f=0,p=0,g=0,m=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),b=i&&i>=0&&i<=1?i:0,y=n&&n>=0&&n<=1?n:0,v=!1;a=-1,A=(s={length:h,functionToLoop:function(t,i){var n,o,r,s=function(){!v&&r-n<=r*y||(u&&(v=!0),l.push(e[i])),t()};if(v)s();else{var a=new Image;a.onload=function(){c.drawImage(a,0,0,d.width,d.height);var e=c.getImageData(0,0,d.width,d.height);n=0,o=e.data.length,r=e.data.length/4;for(var t=0;t127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function n(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i1?2*r[0].width:r[0].width;var a=1;3!==e&&4!==e||(a=2),5!==e&&6!==e||(a=3),7!==e&&8!==e||(a=4),9!==e&&10!==e||(a=5),o.height=r[0].height*a}else o.width=s.width||360,o.height=s.height||240;t&&t instanceof HTMLVideoElement&&u(t),r.forEach((function(e,t){u(e,t)})),setTimeout(l,s.frameInterval)}}function u(e,t){if(!n){var i=0,o=0,s=e.width,a=e.height;1===t&&(i=e.width),2===t&&(o=e.height),3===t&&(i=e.width,o=e.height),4===t&&(o=2*e.height),5===t&&(i=e.width,o=2*e.height),6===t&&(o=3*e.height),7===t&&(i=e.width,o=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(o=e.stream.top),void 0!==e.stream.width&&(s=e.stream.width),void 0!==e.stream.height&&(a=e.stream.height),r.drawImage(e,i,o,s,a),"function"==typeof e.stream.onRender&&e.stream.onRender(r,i,o,s,a,t)}}function h(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||s.width||360,i.height=e.height||s.height||240,i.play(),i}function f(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=h(e);t.stream=e,i.push(t)}}))}void 0!==a?d.AudioContext=a:"undefined"!=typeof webkitAudioContext&&(d.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){l()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var n=new c;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var o=h(t);o.stream=t,i.push(o),n.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var r=s.audioContext.createMediaStreamSource(t);s.audioDestination=s.audioContext.createMediaStreamDestination(),r.connect(s.audioDestination),n.addTrack(s.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(n)}))},this.releaseStreams=function(){i=[],n=!0,s.gainNode&&(s.gainNode.disconnect(),s.gainNode=null),s.audioSources.length&&(s.audioSources.forEach((function(e){e.disconnect()})),s.audioSources=[]),s.audioDestination&&(s.audioDestination.disconnect(),s.audioDestination=null),s.audioContext&&s.audioContext.close(),s.audioContext=null,r.clearRect(0,0,o.width,o.height),o.stream&&(o.stream.stop(),o.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),f(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){n=!1;var t=function(){var e;f(),"captureStream"in o?e=o.captureStream():"mozCaptureStream"in o?e=o.mozCaptureStream():s.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new c;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),o.stream=t,t}(),i=function(){d.AudioContextConstructor||(d.AudioContextConstructor=new d.AudioContext);s.audioContext=d.AudioContextConstructor,s.audioSources=[],!0===s.useGainNode&&(s.gainNode=s.audioContext.createGain(),s.gainNode.connect(s.audioContext.destination),s.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=s.audioContext.createMediaStreamSource(e);!0===s.useGainNode&&i.connect(s.gainNode),s.audioSources.push(i)}})),!t)return;return s.audioDestination=s.audioContext.createMediaStreamDestination(),s.audioSources.forEach((function(e){e.connect(s.audioDestination)})),s.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function D(e,t){e=e||[];var i,n,o=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var o;i=new L(e,t.elementClass||"multi-streams-mixer"),(o=[],e.forEach((function(e){v(e,"video").forEach((function(e){o.push(e)}))})),o).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(n=new R(i.getMixedStream(),t)).record()},this.stop=function(e){n&&n.stop((function(t){o.blob=t,e(t),o.clearRecordedData()}))},this.pause=function(){n&&n.pause()},this.resume=function(){n&&n.resume()},this.clearRecordedData=function(){n&&(n.clearRecordedData(),n=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(o){if(!o)throw"First parameter is required.";o instanceof Array||(o=[o]),e.concat(o),n&&i&&(i.appendStreams(o),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function O(e,t){var i,n,o;function r(){return new ReadableStream({start:function(n){var o=document.createElement("canvas"),r=document.createElement("video"),s=!0;r.srcObject=e,r.muted=!0,r.height=t.height,r.width=t.width,r.volume=0,r.onplaying=function(){o.width=t.width,o.height=t.height;var e=o.getContext("2d"),a=1e3/t.frameRate,A=setInterval((function(){if(i&&(clearInterval(A),n.close()),s&&(s=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(r,0,0),"closed"!==n._controlledReadableStream.state)try{n.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),a)},r.play()}})}function s(e,A){if(!t.workerPath&&!A)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){s(e,t)}))}));if(!t.workerPath&&A instanceof ArrayBuffer){var c=new Blob([A],{type:"text/javascript"});t.workerPath=d.createObjectURL(c)}t.workerPath||console.error("workerPath parameter is missing."),(n=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),n.addEventListener("message",(function(e){"READY"===e.data?(n.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),r().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):n.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(o||a.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){a=[],o=!1,this.blob=null,s(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){o=!0},this.resume=function(){o=!1};var a=[];this.stop=function(e){i=!0;var t=this;!function(e){n?(n.addEventListener("message",(function(t){null===t.data&&(n.terminate(),n=null,e&&e())})),n.postMessage(null)):e&&e()}((function(){t.blob=new Blob(a,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){a=[],o=!1,this.blob=null},this.blob=null}t.DiskStorage=T,t.GifRecorder=x,t.MultiStreamRecorder=D,t.RecordRTCPromisesHandler=function(e,i){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var n=this;n.recordRTC=new t(e,i),this.startRecording=function(){return new Promise((function(e,t){try{n.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{n.recordRTC.stopRecording((function(i){n.blob=n.recordRTC.getBlob(),n.blob&&n.blob.size?e(i):t("Empty blob.",n.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{n.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{n.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{n.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(n.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(n.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(n.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(n.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(n.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=O}));class Se extends ue{constructor(e){super(),this.player=e,this.fileName="",this.fileType=V,this.isRecording=!1,this.recordingTimestamp=0,this.recordingInterval=null,e.debug.log("Recorder","init")}setFileName(e,t){this.fileName=e,M!==t&&V!==t||(this.fileType=t)}get recording(){return this.isRecording}get recordTime(){return this.recordingTimestamp}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",onTimeStamp:t=>{e.log("Recorder","record timestamp :"+t)},disableLogs:!this.player._opt.debug};try{const e=this.player.video.$videoElement.captureStream(25),i=this.player.audio.mediaStreamAudioDestinationNode.stream;e.addTrack(i.getAudioTracks()[0]),this.recorder=Ee(e,t)}catch(t){e.error("Recorder",t),this.emit(v.recordCreateError)}this.recorder&&(this.isRecording=!0,this.emit(v.recording,!0),this.recorder.startRecording(),e.log("Recorder","start recording"),this.player.emit(v.recordStart),this.recordingInterval=window.setInterval((()=>{this.recordingTimestamp+=1,this.player.emit(v.recordingTimestamp,this.recordingTimestamp)}),1e3))}stopRecordAndSave(){this.recorder&&this.isRecording&&this.recorder.stopRecording((()=>{this.player.debug.log("Recorder","stop recording"),this.player.emit(v.recordEnd),function(e,t,i){const n=window.URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=(t||ne())+"."+(i||FILE_SUFFIX.webm),o.click(),window.URL.revokeObjectURL(n)}(this.recorder.getBlob(),this.fileName,this.fileType),this._reset(),this.emit(v.recording,!1)}))}_reset(){this.isRecording=!1,this.recordingTimestamp=0,this.recorder&&(this.recorder.destroy(),this.recorder=null),this.fileName=null,this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}destroy(){this._reset(),this.player.debug.log("Recorder","destroy"),this.player=null}}class Re{constructor(e){return new(Re.getLoaderFactory())(e)}static getLoaderFactory(){return Se}}class Ce{constructor(e){this.player=e,this.decoderWorker=new Worker(e._opt.decoder),this._initDecoderWorker(),e.debug.log("decoderWorker","init")}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case r:e.log("decoderWorker","onmessage:",r),this.player.loaded||this.player.emit(v.load),this.player.emit(v.decoderWorkerInit),this._initWork();break;case l:e.log("decoderWorker","onmessage:",l,i.code),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case d:e.log("decoderWorker","onmessage:",d,i.code),this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case s:e.log("decoderWorker","onmessage:",s,`width:${i.w},height:${i.h}`),this.player.video.updateVideoInfo({width:i.w,height:i.h}),this.player.video.initCanvasViewSize();break;case c:e.log("decoderWorker","onmessage:",c,`channels:${i.channels},sampleRate:${i.sampleRate}`),this.player.audio.updateAudioInfo(i),this.player.audio.initScriptNode(i);break;case a:this.player.handleRender(),this.player.video.render(i),this.player.emit(v.timeUpdate,i.ts),this.player.updateStats({fps:!0,ts:i.ts,buf:i.delay});break;case A:this.player.playing&&this.player.audio.play(i.buffer,i.ts);break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){this.decoderWorker.postMessage({cmd:g,opt:JSON.stringify(this.player._opt),sampleRate:this.player.audio.audioContext.sampleRate})}decodeVideo(e,t,i){const n={type:h,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:m,buffer:e,options:n},[e.buffer])}decodeAudio(e,t){this.player._opt.useWCS&&!this.player._opt.useOffscreen||this.player._opt.useMSE?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t)}_decodeAudio(e,t){const i={type:u,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:m,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:b,buffer:e,ts:Math.max(t,0)},[e.buffer])}destroy(){this.player.debug.log("decoderWorker","destroy"),this.decoderWorker.postMessage({cmd:y}),this.decoderWorker.terminate(),this.decoderWorker=null,this.player=null}}class Be extends ue{constructor(e){super(),this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.initInterval()}getDelay(e){return e?(this.firstTimestamp?e&&(this.delay=Date.now()-this.startTimestamp-(e-this.firstTimestamp)):(this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1),this.delay):-1}initInterval(){const e=this.player._opt.videoBuffer;this.player.debug.log("common dumex","init Interval");let t=()=>{let t;if(this.bufferList.length)if(this.dropping){for(t=this.bufferList.shift();!t.isIFrame&&this.bufferList.length;)t=this.bufferList.shift();t.isIFrame&&(this.dropping=!1,this._doDecoderDecode(t))}else if(t=this.bufferList[0],-1===this.getDelay(t.ts))this.bufferList.shift(),this._doDecoderDecode(t);else if(this.delay>e+1e3)this.dropping=!0;else for(;this.bufferList.length&&(t=this.bufferList[0],this.getDelay(t.ts)>e);)this.bufferList.shift(),this._doDecoderDecode(t)};t(),this.stopId=setInterval(t,10)}_doDecode(e,t,i,n){const o=this.player,{decoderWorker:r}=o;let s={ts:i,type:t,isIFrame:!1};o._opt.useWCS&&!o._opt.useOffscreen||o._opt.useMSE?(t===h&&(s.isIFrame=n),this.pushBuffer(e,s)):t===h?r.decodeVideo(e,i,n):t===u&&r.decodeAudio(e,i)}_doDecoderDecode(e){const t=this.player,{decoderWorker:i,webcodecsDecoder:n,mseDecoder:o}=t;e.type===u?i.decodeAudio(e.payload,e.ts):e.type===h&&(t._opt.useWCS&&!t._opt.useOffscreen?n.decodeVideo(e.payload,e.ts,e.isIFrame):t._opt.useMSE&&o.decodeVideo(e.payload,e.ts,e.isIFrame))}pushBuffer(e,t){t.type===u?this.bufferList.push({ts:t.ts,payload:e,type:u}):t.type===h&&this.bufferList.push({ts:t.ts,payload:e,type:h,isIFrame:t.isIFrame})}close(){}destroy(){this.stopId&&(clearInterval(this.stopId),this.stopId=null),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.off()}}class ke extends Be{constructor(e){super(e),this.input=this._inputFlv(),this.flvDemux=this.dispatchFlvData(this.input),e.debug.log("FlvDemux","init")}dispatch(e){this.flvDemux(e)}*_inputFlv(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),n=this.player;for(;;){t[3]=0;const e=yield 15,o=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const r=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8];let s=i[0];16777215===s&&(t[3]=e[11],s=i[0]);const a=yield r;switch(o){case f:n._opt.hasAudio&&(n.updateStats({abps:a.byteLength}),a.byteLength>0&&this._doDecode(a,u,s));break;case p:if(n._opt.hasVideo){n.updateStats({vbps:a.byteLength});const e=a[0]>>4==1;a.byteLength>0&&this._doDecode(a,h,s,e)}}}}dispatchFlvData(e){let t=e.next(),i=null;return n=>{let o=new Uint8Array(n);if(i){let e=new Uint8Array(i.length+o.length);e.set(i),e.set(o,i.length),o=e,i=null}for(;o.length>=t.value;){let i=o.slice(t.value);t=e.next(o.slice(0,t.value)),o=i}o.length>0&&(i=o)}}close(){this.input&&this.input.return(null)}destroy(){super.destroy(),this.input=null,this.flvDemux=null,this.player.debug.log("FlvDemux","destroy")}}class Ie extends Be{constructor(e){super(e),e.debug.log("M7sDemux","init")}dispatch(e){const t=this.player,i=new DataView(e),n=i.getUint8(0),o=i.getUint32(1,!1);switch(n){case u:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,n,o)}break;case h:if(t._opt.hasVideo&&i.byteLength>5){const r=new Uint8Array(e,5),s=i.getUint8(5)>>4==1;t.updateStats({vbps:r.byteLength}),r.byteLength>0&&this._doDecode(r,n,o,s)}}}destroy(){super.destroy(),this.player.debug.log("M7sDemux","destroy")}}class Te{constructor(e){return new(Te.getLoaderFactory(e._opt.demuxType))(e)}static getLoaderFactory(e){return e===n?Ie:e===i?ke:void 0}}class xe extends ue{constructor(e){super(),this.player=e,this.hasInit=!1,this.isInitInfo=!1,this.decoder=null,this.initDecoder(),e.debug.log("Webcodecs","init")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player.handleRender(),this.player.video.render({videoFrame:e}),this.player.updateStats({fps:!0,ts:0,buf:this.player.demux.delay}),setTimeout((function(){e.close?e.close():e.destroy()}),100)}handleError(e){this.player.debug.log("Webcodecs","VideoDecoder handleError",e)}decodeVideo(e,t,i){if(this.hasInit){const n=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?G:H});this.decoder.decode(n)}else if(i&&0===e[1]){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===x)return void this.emit(E.webcodecsH265NotSupport);const i=function(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let n=t[e].toString(16);n.length<2&&(n="0"+n),i+=n}return{codec:i,description:e}}(e.slice(5));this.decoder.configure(i),this.hasInit=!0}}destroy(){this.decoder.close(),this.decoder=null,this.hasInit=!1,this.isInitInfo=!1,this.off(),this.player.debug.log("Webcodecs","destroy"),this.player=null}}const Le={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"加载",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制"};var De=Object.keys(Le).reduce(((e,t)=>(e[t]=`\n \n ${Le[t]?`${Le[t]}`:""}\n`,e)),{}),Oe=(e,t)=>{const{events:{proxy:i}}=e,n=document.createElement("object");n.setAttribute("aria-hidden","true"),n.setAttribute("tabindex",-1),n.type="text/html",n.data="about:blank",re(n,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let o=e.width,r=e.height;i(n,"load",(()=>{i(n.contentDocument.defaultView,"resize",(()=>{e.width===o&&e.height===r||(o=e.width,r=e.height,e.emit(v.resize))}))})),e.$container.appendChild(n),e.on(v.destroy,(()=>{e.$container.removeChild(n)})),e.on(v.volumechange,(()=>{!function(e){if(0===e)re(t.$volumeOn,"display","none"),re(t.$volumeOff,"display","flex"),re(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=se(t.$volumePanel,"height")||60,n=se(t.$volumeHandle,"height"),o=i-(i-n)*e-n;re(t.$volumeHandle,"top",`${o}px`),re(t.$volumeOn,"display","flex"),re(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(v.loading,(e=>{re(t.$loading,"display",e?"flex":"none"),re(t.$poster,"display","none"),e&&re(t.$playBig,"display","none")}));try{const i=()=>{re(t.$fullscreenExit,"display",e.fullscreen?"flex":"none"),re(t.$fullscreen,"display",e.fullscreen?"none":"flex")};$.on("change",i),e.events.destroys.push((()=>{$.off("change",i)}))}catch(e){}e.on(v.recording,(()=>{re(t.$record,"display",e.recording?"none":"flex"),re(t.$recordStop,"display",e.recording?"flex":"none")})),e.on(v.recordingTimestamp,(e=>{})),e.on(v.playing,(e=>{re(t.$play,"display",e?"none":"flex"),re(t.$playBig,"display",e?"none":"block"),re(t.$pause,"display",e?"flex":"none"),re(t.$screenshot,"display",e?"flex":"none"),re(t.$record,"display",e?"flex":"none"),re(t.$fullscreen,"display",e?"flex":"none"),e||t.$speed&&(t.$speed.innerHTML=ce(""))})),e.on(v.kBps,(e=>{const i=ce(e);t.$speed&&(t.$speed.innerHTML=i)}))};function je(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}je('@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}.jessibuca-container .jessibuca-icon{cursor:pointer;width:16px;height:16px}.jessibuca-container .jessibuca-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jessibuca-container .jessibuca-play-big{position:absolute;display:none;height:100%;width:100%;background:rgba(0,0,0,.4);background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoQ+3ZPYsTQRjA8eeZZCFlWttAwCIkZOaZJt8hlvkeHrlccuAFT6wEG0FQOeQQLCIWih6chQgKgkkKIyqKCVYip54IWmiQkTmyYhFvd3Zn3yDb7szu/7cv7GaDkPEFM94PK0DSZ9DzDAyHw7uI2HRDlVJX5/N5r9FoHCYdr/fvCRiNRmpJ6AEidoUQ15NG+AH8BgD2n9AHANAmohdJQfwAfgGA4xF4bjabnW21Whob62ILoKNfAsAGEd2PU2ATcNSNiDf0/cE5/xAHxDpgEf0NADaJ6HLUiKgAbvcjpdSGlPJZVJCoAUfdSqkLxWLxTLlc/mkbEgtgET1TSnWklLdtIuIEuN23crlcp16vv7cBSQKgu38AwBYRXQyLSArg3hsjRDxNRE+CQhIF/BN9qVAobFYqle+mkLQAdLd+8K0T0U0TRJoAbvc9fVkJId75gaQRoLv1C2STiPTb7rFLWgE6+g0RncwyYEJEtawCvjDGmpzzp5kD6NfxfD7frtVqB17xen2a7oG3ALBm+oMoFQBEPD+dTvtBfpImDXjIGFvjnD/3c7ksG5MU4HDxWeZa0HB3XhKAXcdxOn5vUi9gnIDXSqm2lHLPK8pkfVyAbSLqm4T5HRs1YB8RO0KIid8g03FRAT4rpbpSyh3TINPxUQB2GGM9zvkn05gg420CJovLZT9ISNA5tgB9ItoOGhFmnh/AcZ/X9xhj65zzV2Eiwsz1A1j2B8dHAOgS0W6YnduY6wkYj8d3lFKn/j66Ea84jtOrVqtfbQSE3YYnYDAY5Eql0hYAnNDv6kKIx2F3anO+J8DmzqLY1goQxVE12ebqDJgcrSjGrs5AFEfVZJt/AF0m+jHzUTtnAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%;cursor:pointer;background-size:48px 48px}.jessibuca-container .jessibuca-play-big:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACEElEQVRoQ+2ZXStEQRjH/3/yIXwDdz7J+i7kvdisXCk3SiFJW27kglBcSFFKbqwQSa4krykuKB09Naf2Yndn5jgzc06d53Znd36/mWfeniVyHsw5PwqB0DOonYEoijYBlOpAFwCMkHwLDS/9mwhEDUCfAAyTXA4tYSLwC6CtCegegH6S56FETAR+AHRoACcBTJAUWa+RloBAXwAYIrnt0yBNgZi7qtbHgw8RFwLC/QFglOScawlXAjH3gUqrE1cirgVi7mkAYyS/0xbxJSDcdwAGSa6nKeFTIOZeUyL3aYiEEBDuLwDjJGf+KxFKIOY+BdBL8iipSGiBmHtWbbuftiJZERBuOfgGSK7aSGRJIObeUml1ayKSRQHhlgtkiaTcdltGVgUE+ppkV54FaiS78yrwqlLoOI8Cch2XV548W7WRpTVwA6DP9kGUFYEpAOUkT9LQAvtq1M+0udKkQSgBqSlJWWYxKXj8vRACK+o6bbRIdYI+Ba7U7rKjg7L53JdAhWTZBsy0rWuBXZUuNVMg23auBF7UIl2yBbJt70JAoKV6/WwLk6R9mgKSJlJ1kLTxFmkJyCla8UZd15GJQKvyumyJ8gy8DAEvfZoINPqD41EtUjmUgoaJwAaAnjrKebVI34OSq85NBNqlCAWgE0CV5GEWwI3vQlmCbcSinYFCwPEIFDPgeIC1P1/MgHaIHDf4Aydx2TF7wnKeAAAAAElFTkSuQmCC")}.jessibuca-container .jessibuca-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jessibuca-container .jessibuca-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jessibuca-container .jessibuca-controls{background-color:#161616;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;user-select:none}.jessibuca-container .jessibuca-controls .jessibuca-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jessibuca-container .jessibuca-controls .jessibuca-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jessibuca-container .jessibuca-controls .jessibuca-fullscreen,.jessibuca-container .jessibuca-controls .jessibuca-fullscreen-exit,.jessibuca-container .jessibuca-controls .jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-microphone-close,.jessibuca-container .jessibuca-controls .jessibuca-pause,.jessibuca-container .jessibuca-controls .jessibuca-play,.jessibuca-container .jessibuca-controls .jessibuca-record,.jessibuca-container .jessibuca-controls .jessibuca-record-stop,.jessibuca-container .jessibuca-controls .jessibuca-screenshot{display:none}.jessibuca-container .jessibuca-controls .jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-icon-mute{z-index:1}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom{display:flex;justify-content:space-between;height:100%}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-left,.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-right{display:flex;align-items:center}.jessibuca-container.jessibuca-controls-show .jessibuca-controls{opacity:1;visibility:visible}.jessibuca-container.jessibuca-hide-cursor *{cursor:none!important}.jessibuca-container.jessibuca-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100%!important;height:100%!important;background:#000}.jessibuca-container .jessibuca-icon-loading{width:50px;height:50px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHHklEQVRoQ91bfYwdVRX/nTvbPuuqlEQM0q4IRYMSP0KkaNTEEAokNUEDFr9iEIOiuCC2++4dl+Tti9nOmbfWFgryESPhH7V+IIpG8SN+Fr8qqKgQEKoUkQREwXTLs8495mze1tf35s2bfTu7ndf758y55/x+c879OvcMYYnbxMTEy4IgOImIxkRkrYisNsasUrPe+wNE9C8ielRE9iVJsndmZubBpYRES6E8DMNXeu83ENHrAJwO4OUARvrY+i+ABwDcLSJ7jDF3RlF0f9H4CiNcrVZPCIJgk4hcCOCNBQH9EYBveO93NRqNx4rQuWjCExMT64IguEJE3kdEq4sA1alDRDTsb02SZOfMzMxDi7ExMGFr7THGGCciVwKYG5PL0HTMb69UKtNTU1Ozg9gbiLC1diMRXQ/gxEGMFtDnQRHZHMfxHQvVtWDCzrkdANSredvfRWQ3Ee0F8DCAJwDs994nQRCM6qxNROu892uI6A0ATs2rWER2xHF8VV55lctN2Dl3LICvA3hzDgMPENFXROT2SqVyb71efzZHnzkRnRNGRkY2isj5AM7K0e/HAN7OzP/MIZuP8OTk5FiSJDpjnpylVER+YIzZEUXRN/MY7ydTrVbXE9FlRPT+LFkiesh7f1Ycx4/009nXw9balxDRLwC8OEPZ/SLi4jjWCCi8WWtfA2CKiN6WofzxIAhePz09/dfMj5P1slqtPj8IgntEZF0vORH51Ozs7NU7d+5sFs60Q2EYhpeKyDUZq8LDInJ6HMdP98KS6WHn3E8BvKlHZx2X72Xmry410Xb91trTiOjLAF7Rw+5uZu6FufcYds7pl7wiTSkRPSUi5zHzr5eT7LytWq32gmaz+a0MZ1zDzB9LxZ72s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7meme8ZKre2gU0teXDOnQ2gV3q2FBfig37wnjUevVI/auhIlzwMSnYOe1bnPkUtWrXznuUualkM2b6EtWzJGKMlBaf0MrScZUuLJduXsAq07l1/DuCEDIP3iUi4VIVpRRCd19G3Ek8FtfTQe//DrAI1lSu69LBIogsirMK1Wm11s9n8GoC35AByH4DbvPe3r1q16g8LKS7NoXtRIrk83G4ha/bugURL93cD+Mt8+TAR6YT3j0ql8rtBC70HZb1gwmooDMO3eu+vJaKTBjXc6rfPe39ho9H41SL15O4+EOFWiGv5n2sViz83t8VuwWW9pRyY8Dxu59zJIqJVAhcP+JPHI8y8bL8SLJrwPHH9jYeI3kFEF+Ssmp/rqjN7HMe6lV2WVhjhdrRhGJ7a+lFrPYDXAtB667Q/X5723p+tNwLLwrbf1rIIEBryxpgTkyQZA6DlFccS0fMA6G84d6RVvBZht5eO/wEB1Kvsoc6vtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;animation:rotation 1s linear infinite}.jessibuca-container .jessibuca-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE5UlEQVRoQ+1YW2sdVRT+1s7JxbsoVkEUrIIX0ouz15zYNA+N1RdtQfCltlUfvLbqL/BCwZ8grbHtizQqPojgBSr0JkiMmT2nxgapqBURtPVCq7HxJCeZJVPmxDlzZubMmXOSEsnAvOy917fXt9e39tp7E5b4R0vcfywTuNgRbBgBx3HuJqLVzPzmYjprjHkcwAlmLqXNm4XAISLaSESPaq2HF4OE67rbRGRYRA7btn1fbgLGmKsA/Azg0gBkGzO/vZAkHMd5hIiqc5wHcCMz/5k0Z2oExsfHV1QqldPAf8lORNu11m8tBAljzFYAYWxRSl1vWdZvuQj4RsYYF4AVBlgIOVVlE55HRIxt23ZuCfmGjuOsJ6LPoiAistW27XfaEYmIbOYhPc9bXywWR1oiEJDYQkR1zrYjEjGyqfqbKd8a7kJVtLgQ+30i8pht2wfyRKIdmJkJBPkQTb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8x6zwEWbemLbyMfJr5qiSiJ96oclymBOR3bZtP9+M89WxxpjdAHY2sN3DzM8ljWl4I3Nd9x7/OE1ENcdpETnmH3e11n41zv0l4J8RkU+J6AAz+xtF4teQQG7PFslwmcAiLfSyhC72Qv9/I/Avns2OT7QJskoAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAED0lEQVRoQ+2ZycsdRRTFf2ejqHFAMQqiYBTUoElUHLNx3GgCgpuYRF2o0UT9CxwQ/BMkMSbZSKLiQgQHUDCJgjiAxiEiESdEcJbEedgcKaj3UV+/6q7u/jovPPkK3qbr1ql76p5bt6qemPKmKfefeQKHOoLFCNg+H1gi6fFJOmv7VmCvpD1N87Yh8ApwNXCzpB2TIGF7DRDm2inpmt4EbB8LfAMcGUHWSHryYJKwfRMwmuMP4BRJv9TN2RgB2wuB72BWsq+V9MTBIGF7NZBiGzhJ0o+9CIRBtt8FLqgADC6nRDbpVO9Iuqi3hCKB5cDrGZDVkp4aIhIV2aSQyyW9MScCkcQqIOfsnCORkc3I31b5VtyFRmg1IQ7dt0ja3icSQ2C2JhAjUU2ykd+dE7tBNp2i2olAJJFuc+nCt564QTadF6IzgUhiVGiqyinKaQjZpJP2ItBXTkPJZhACXeU0pGwGI9BWTkPLZlACBTldG4o5EA6E1dY66edcyNrs8Q36zg1vVaTazNs7iXPgDVJJzYs7VRvHRzaDEohyugJ4CTi84sg/wHWSdnVxsGQ7aQLXS9pZcqpL/6AEplpCU5HE8YpJ9YrXUKQ6baN1+HPaRm1fBqwFQnKGK2ZoPwCvAo8Ai4FnMpPMHMwapHUj8DFwbw3+Dklv9iZgexOwvktSRduxU2VDlErwmyXV+lCbxLbDdndlCT3TX3vV7JgnKfRuSVflfMkSsL0ZuDMz4E/gL+CETN+/wCpJzzaRtn0D8DRwWMbu1/gCcnSm7zFJd1W/jxGwvQx4r2IYnlbuA14GAomQFw8B6YtBKFSnNj2BxEJ3IvB1pdB9CjwQ8yqYhcg/DJxZ8WOZpA/SbzkC24DbEqOfgPMkBRKzmu23gEuSj1sk5SI3Y2J7C3BHMuZz4FxJf6fgto8APgIWJd+3SUrHjr9O294HnJUMWi8pSGqs2V4CvJ88fH0i6eyChKr4KyS9WIO/Ang+6RvDz0XgABCeFEdtkaQv65yy/QVweuwPY0+T9FuNQ8cAXwHHxf7wdHiypN9r7BfEl8GjYv9+SceXJLQ/mSDYTh2Baog3SHq0pYT2STqno4RWSnqhBn8l8FzSN4bfJol/jkn8bXUS228DFyfft0paVyCwFbg9sQkSDEkctueZZju8iO+tJPEYfo7A0piYKd73wP3xnB+20cvjNnphxdmlkj4sEMjhfwY8COyOY0fb6Bkl/K6FLKxS+M1KpDhJY8mvrG5doRwlf66QZfGbjhLh4pEt35kV3iUp/IvTunU8qtTil/7gaHOY2yjpntaez9b5RmBDYewmSXfX2RRvZLYvbThOh+NuqMa9Ww1+yLnXgO2SwkZR24oEens2oYHzBCa00PMSOtQL/f+NwH+Hg8hAnbrYgQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoQ+3ZPYsTQRjA8eeZZCFlWttAwCIkZOaZJt8hlvkeHrlccuAFT6wEG0FQOeQQLCIWih6chQgKgkkKIyqKCVYip54IWmiQkTmyYhFvd3Zn3yDb7szu/7cv7GaDkPEFM94PK0DSZ9DzDAyHw7uI2HRDlVJX5/N5r9FoHCYdr/fvCRiNRmpJ6AEidoUQ15NG+AH8BgD2n9AHANAmohdJQfwAfgGA4xF4bjabnW21Whob62ILoKNfAsAGEd2PU2ATcNSNiDf0/cE5/xAHxDpgEf0NADaJ6HLUiKgAbvcjpdSGlPJZVJCoAUfdSqkLxWLxTLlc/mkbEgtgET1TSnWklLdtIuIEuN23crlcp16vv7cBSQKgu38AwBYRXQyLSArg3hsjRDxNRE+CQhIF/BN9qVAobFYqle+mkLQAdLd+8K0T0U0TRJoAbvc9fVkJId75gaQRoLv1C2STiPTb7rFLWgE6+g0RncwyYEJEtawCvjDGmpzzp5kD6NfxfD7frtVqB17xen2a7oG3ALBm+oMoFQBEPD+dTvtBfpImDXjIGFvjnD/3c7ksG5MU4HDxWeZa0HB3XhKAXcdxOn5vUi9gnIDXSqm2lHLPK8pkfVyAbSLqm4T5HRs1YB8RO0KIid8g03FRAT4rpbpSyh3TINPxUQB2GGM9zvkn05gg420CJovLZT9ISNA5tgB9ItoOGhFmnh/AcZ/X9xhj65zzV2Eiwsz1A1j2B8dHAOgS0W6YnduY6wkYj8d3lFKn/j66Ea84jtOrVqtfbQSE3YYnYDAY5Eql0hYAnNDv6kKIx2F3anO+J8DmzqLY1goQxVE12ebqDJgcrSjGrs5AFEfVZJt/AF0m+jHzUTtnAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACEElEQVRoQ+2ZXStEQRjH/3/yIXwDdz7J+i7kvdisXCk3SiFJW27kglBcSFFKbqwQSa4krykuKB09Naf2Yndn5jgzc06d53Znd36/mWfeniVyHsw5PwqB0DOonYEoijYBlOpAFwCMkHwLDS/9mwhEDUCfAAyTXA4tYSLwC6CtCegegH6S56FETAR+AHRoACcBTJAUWa+RloBAXwAYIrnt0yBNgZi7qtbHgw8RFwLC/QFglOScawlXAjH3gUqrE1cirgVi7mkAYyS/0xbxJSDcdwAGSa6nKeFTIOZeUyL3aYiEEBDuLwDjJGf+KxFKIOY+BdBL8iipSGiBmHtWbbuftiJZERBuOfgGSK7aSGRJIObeUml1ayKSRQHhlgtkiaTcdltGVgUE+ppkV54FaiS78yrwqlLoOI8Cch2XV548W7WRpTVwA6DP9kGUFYEpAOUkT9LQAvtq1M+0udKkQSgBqSlJWWYxKXj8vRACK+o6bbRIdYI+Ba7U7rKjg7L53JdAhWTZBsy0rWuBXZUuNVMg23auBF7UIl2yBbJt70JAoKV6/WwLk6R9mgKSJlJ1kLTxFmkJyCla8UZd15GJQKvyumyJ8gy8DAEvfZoINPqD41EtUjmUgoaJwAaAnjrKebVI34OSq85NBNqlCAWgE0CV5GEWwI3vQlmCbcSinYFCwPEIFDPgeIC1P1/MgHaIHDf4Aydx2TF7wnKeAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABA0lEQVRoQ+1YwQqCUBAcfWXXsLr2AXWTPXno8yVB8AP6Aa3oHI+kCDqYaawJljSe133uzO44bx0M/HEG/v1gAd9mkAyQgY4I/F8LJUlyrQFtD2AtIkcNoFEU+Z7n7QD4DfFHEVlocrVmgAUAIAOl3mILPcDgEFcUhyrUKMGUUcroc3NQRimj9XJBGaWMvvPydKN0o6/9QTdKN6rZANxj6EbpRulGuZnjYqs8BbyR8Ub2Izeys+u6yyAIDpo/ehzHM2NMDsA0xFsRmWhyfTIDWSXxCEBmrd2EYXjSHJqm6bQoii2AOYBL5Z0xgFxEVppcrQvQJO0zhgX0iXbdWWSADHRE4AZQ731AhEUeNwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA7klEQVRoQ+2YSwrCQBBEX6HiVvxsPYDewfN7By/gD9ciQkvERQwJdBSiYs0mEDo96aruombEjy/9+P/jAj7NoBkwA28i8H8tFBFRA9oeWEo6ZgCNiDGwAYpn3TpKmmVytWbABQBmoNRbbqEHGB7iiuJYhRol2DJqGX1uDsuoZdRmLuNZSzGWUcuoZdRHSp/IylNgK2ErYSthK3FHwLcSvpXIjoLt9Jfa6TMwl3TIMBkRE2AH9BriL5KGmVyvWIltJXEfKN6tJJ0ym0bECFgDU+Ba+WZQFCdpkcnVuoBM0i5jXECXaNftZQbMwJsI3AAPN3dAQflHegAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC+UlEQVRoQ+1ZS2sTURT+zlDJYE3XSq219QHVuEjnJDT+Bff9Abqw2voAEfGxqygUqWhVFHGl/yMLu9BwByxk5SNI66ML6U7axjhHbmhgWiftncxoOiV3FcI53z3f/e65594zhIQPSnj86BBot4IdBToKRFyBnbeFlFIScVEiuYvIWC6Xe2YK8pcC7SYA4CMzH4mDQBXAqilQBDsLQLfPf9FxnF4i8kwwmypARI+Wl5dvmIBEsUmlUkNE9NaHsVCpVAZGR0d/m+A2JSAid3K53E0TkCg2pVKpz7KseR/GfKVSGYxMAMA0M1+JEpyJb6lUOm5ZVnkrAsVisaunp+esiByr1Wp3R0ZGvmifzZK4XQQWHMc52MgBpdQuAOcAXABwuB400ZTjONdaIjA7O5u2bVsnWU1EujzP+5nP5xdMVjvIJkCBD8x8VCm1G8AYgAkAAxt8Z5j5YmgCSqlTAJ4D2OcD/AXgATNfbYVEAIFPIvKKiE4D6GuCea8xX6gtpJT6DmBvECgRFRzHeROWRAABE4iWCbwHEFhkPM/L5vP5dyaz+23+KwHXdR3P854S0YG1ILSCuthNMfNM2OC1/RYENLY+ygcBnPfht6ZAA6BYLNr6dyqVokKhsGpaNQ2TWJstreXaE2aed133sojcj41AKyvdzCdAgSXLsk4MDw9/a/i4rntbRPxFNZoC/5jAV2be759DKTUJ4FZSFFi0bbs/k8noy2R9dAjEuWU2YgXkQOK3kD6BMsysi2Z9JC2Jdcw/ALzwPO+xvmcl7Rj177JVEbkO4BARjSflFDJJuW1dBxJPoCIiL4noDIB1BS0pW6j+oJmbm+uuVqvjRKQfLr0bZHnIzJf0f6HeAybahrUJqAPruhLlcnnPysqKfpXp11n/Gv62zoHAroS+AafT6QkiGrIsazKbzX7eVIHEt1US39gCkOzWYthkjNE+tuZujDGZQ8XRXn8N4KT5lLFZ6uaYPt+nwyDuvC80YdhvB9uOAu1WoaNAR4GIK/AHvdr+QAexB7EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACfUlEQVRoQ+2ZSYsUQRCFvycK4nJXXEbHBdwO4kn/gv9CD467ICIutxEFkREdFUU86T/xojcPntyQcT2INw+uISFVkD1Wd2dWlU7nUHlqisiX+fJFZGREi8yHMt8/HYG5VrBToFOg4QnMPxcyM2t4KE2nT0i6EwvylwIjQOCFpE1tEPgGfI0FamC3AFgazP8IrJL0KwZzkAI3gLMxIA1ttgCPA4w3wHpJP2NwBxG4KOlcDEgTGzNbA8wEGP57vA0CU5JONtlczFwz2wY8HUbAzBYCB4CtwCVJb33OIAXmioC70LoyBsxsEXAQOApsLIhelnS6FgEzW+5BBvwA/FS+SPJFa40KBZ5L2mxmS4AJ4IjHxCzwaUnHkgmY2V7gLrAyAPwOXJN0qg6DCgIvgQfAPsDjo2pcKddLciEz+wCs6AO6W9KjVBIVBGIgahN4BvRLMjslPYlZPbT53wR2AbeBtcUmXEFPdh5U06mbd/shBBzbr/Jx4FCAX0+BEsDMFocEYrNmFcE+BD4XsXZL0oyZnQCutkagzkn3m1NBwDe/Q9L74MAuFEqUn5op8I8JvJO0elacTALnc1HAH3Njkvwx+WeYWUegTa/pwaqIgexdyIN4uyRPmqULZRXEvulPwD3gpr+zcrtGQxfzRHYG2AAczuUWiom3kc4D2RN4BdwH9gM9CS0XFyoLGu9UuN974eIFVDiuSzruH5LqgRhtU20q8kBPV8LMlhVVmVdnYwX+SMdAZVeieAF7eeltmElJr4cpkH1bJfvGVvatxdR4bMu+teZuWxtKxWncXn8I7EldtQV7vz79fp9KwZp//9CksB8F206BuVahU6BToOEJ/Ab7+KdABdTt8AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAGDElEQVRoQ82ZaahVVRTHf//moKKggQawcmg0olGl0awvRoMVBRGFlQ1YQZIZqRVKmJmFgVk59EFQykYjgmajbJ7n2WiAbKKCBq0Vfznndd723Lvvve/5bMH9cvfaa63/2WuvaYteoIjYHDgEOAAYDOwIbA/4f9PvwHfAt8DbwGvAS5L8f49Ine6OCO89CTgFOBrYqU1Z3wBPAUskPdDm3i72jgBExCXAWGBQp4qTfR8CMyXd0a68tgBExEjgBmCfdhW1yP8eMFHS/S3y0xKAiNgQmA2MaUHwB8DnwNfAbwX/FsDOwG7Ani3I8ElcLOnvHG8WQET0Ax4C9msi7BHgbuAFSXaHhhQRewBDgZOBE5qwvuV1SSuayWsKICIcVZ4Atq4R8mdxKnMkfZT7UnXrEeE7dD7gO7VpDc/PwAhJrzaS3xBAROzrUFcJhVUZjhrjJX3cieHpnogYUNytUTXy/gAOlvROna5aABHhGG5f3qZmk33ztt4wvAbIBcCcBicxSNLKdK0RgNeB/RPmVcBxkp5eF8aXMiPiKODRGpd6XZJduhutBSAipgNX1Bg/tJkv9iao4u4tBzZJ5N4oaXz1v24AImIvwLE4peGSnDX7jCLC2f3JGoV7S3q//D8F8DJwULJpgiQnrz6niLgSmJYofkXSwWsBiIgRwGPNmPscARARDqGp7zu0Orz/l4kjYhlweGLk4Ebhq8oXEc6wGwH/tAhyA2C1JGfsphQRTqBvJkzLJB3ZBaBIKGkGXSqpWab013FWvacooXO21K07256WS4QRsRQ4PhHgsPrxmjsQEZOB6xKGIZJebGZVRDwOHNOJ5ZU9j0s6NqPnUJcpCc9kSVNKAA5ZQyoMn0gamDMsIj4rCrQca7P1zyT1zwmIiE+A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QAeLHQLuV5/UeM6ZZPDXKfa1nqs/4QUXSG21bXdnQYwBV5RHhy2rXcmh0E+5GxOTGyCWwp34fSCovd09sX7P3X2uzPXCoLsVMAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAHn0lEQVRoQ81ZbYxcVRl+nnvu7ErSEmtqDdKwO3e2LWJLSEuFNiofFv9AUIpfiSFqCzt31lITGgEjHxKIKVirqXbnzpZSf5BAoHwIhpiAgDVSwBaU1rZLd+7skiIJKCWVpOzOPfc1d3dn986dO3Nn9kvuz3ve87zPc857znnPe4gZ+BZvlzPMed4XDG2sBGWFAGcRXET6ZwTwIsZpgbxL4B0ID/nKf8370Hz1xE08PV33nDKACDOO/roQ15K4TASfbQWLxL9E8AKJvcWs+WQrfcO2UxKQcfSNAn8TwKVTdVzdT/oJbi/aZl+reC0JsArelRDeC8jnW3XUnL0cofC2Ys58ojl7oDkBj4hKv697CXQnA8sxCEsE3hbKh4E9hfMEOBuUNMBzkzAE6Ct9SvXgW9RJtokC0r+VDqb8pyByfgOwZ0g84mv1cqmH/Y2cpntlmUG9BgauEcHVdW3JN6RsXF3axKFGeA0FdBVGVvpi/AnAJ2NAhkHpBU3H7eabSSMV1271yVL63g0C3gigPcbmA/r+umJP28F6+HUFZPLDy4XqVQCjW2HkexJQN7s2j0+FeLRPZqd0idL3Algfg/cRRa8u5toPx/mKFZDJyyKhPgZgQU0nssfNqvxMEK8RktdZoThxM2G0qaUDG/hetC1WgOXo1wG5IGJcNkS+OpBLvTgb5CuYXfnypT75x2hICfh6yVYrEwWknfJ9BH8cJU/fX9MoFmdS1Pja2w+gLYwrkF+U7NTN4X9VM9CxUz6nlD5So5JyeTGbemEmSSZhZQrly0T4fNROa3Xe0A95tPK/SoDleH8DcGF1J97q2ipYYHP+WY6+BZCtEccHXNtcXSPA6iuvg89nG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FJ7frj5dOaeqyioZR98mkLurycgR107N0ntAUuiUj0bL8YxERU1p0Sp4gxB0VEETj7lZ8xuzMcr1MGNytCBehtys2Vkd5hGE8bJeXDl7t2ub18+FiEze2yVEjS+D/qqBbNtrDQUEjWNvYLIjSlaA36sR9e2BzRyeDSHBocph/TCBmkOU4OairX4T9Vv3fcByyr8G+KMaosSAaNlQ6kn9ZSZFWIXyFyH8XbjyUMEXkR2lXKqWS2R11/CxHO9+ABtjiQryMNRWN8u3piOka5cs9rX+KQA7Fod4wM2a8RySBIyGU768TcgtdUieJrEbvjxczKX+2oqQ8REPrrLfAzAvri8h24p2Klrqj+wvTXhNO95GjqXcqp45KUcF3CfAAaEcN+H/25e2/wb2BkfmezAWUrgEgtWEfDnhtVJD0O3mzAeS6CW+UlYArMLwCoj6JYCGZcCIw8pij3vAq8dtH6g3udn2Q0nkg/amBVTA0gXveopsaea9txkCkzZynOC2Vl/rWxYwMSN5b8PoAifWtkY0Yi14CcT9rm0Gd/OWvykLqHjq7Bu5QIm6QkQuAbG85hSPUiKGIDhM8s+a+tnB7ra/t8w61GHaAsLOl+2W+WVdPpfaWCzBE63BM0fbfTlF4KQo/0RKpY71b+To4p6J73/tXyc1fevA3AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAHTElEQVRoQ+1Zb4xcVRX/nZl5u2/LrrO0EFKoBYpVaRu3u/e+3WlDZJdIRLQhNLIiEggxqURIjGmqTTAmWiRpjH4wghq+KIQYupYQEvEDmEVdyu7OfbPbzQaEYqtSwTb4Z3aV7s6b9445mzvm7XRm3oy7oanZ82ny5txzz++ec8+/S7jIiS5y/bEG4EJbcJkFpqenryqXy6cbKBUB+AeANIBuAG8AuAzAn06ePOkNDw+H9dZOTU11h2H4EwB7ALwL4FIA7wFw7O9aSxkAE9H9SqnHazGc50LGGFFQlGu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k15zoQt90v+3FvgPXUePXrKTg9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFvklEQVRoQ+2ZaaiVVRSGn9fS0iabCNO0eSaosAmplKJRxMiygSQCixQipBKMoDRBon5EI/0pQ8JuRQTVj4omo+FH04/muVum2GCDWVYr3ss+8t3vfud8+3guXi6cBYc7nD2sd6+11/BuMcxFw1x/ugCG2oL9LBAR44HeFkr9B/wMbAOMBT4B9gC+BiZL+rfZ3Ijw+PuB6cA6YFdgAzAy/V41NQB/rpL0QNWAAS4UEVbQm+XKj8B4SX/VTYiIicC9wMnAjnXjC9/fKemaWgARsSfwEbBbxeDPgAOBL4AdgF2AD4ETJP2dq0xEHArcA4yGvjv4D/Br2vOo9P/ycosl3ZQD4IDkFiMqBl8LPASMkfRdREwFVknalKt8Y1xETJDUGxFea0NE2CX9aWbF+ZLuzgEwBlgPbNtEqYuAlZLsl4MmEWGL/t5iwQWS7sgB4Iv1TcE//yyZ1Ke9AOiR9MNgIGihvAOCrWJZKGlZDoCjgTdTZLDy1wGLS1HCkehF4DxJ9t0tlhbKXwbcAByRFp8taWUOgN2B94G9AZ/A9sD5wIPAdqUFngAuBTZuiUu1UH4O8DjwVQrR3nZuVhiNCEcFT3S4swX2k7QmImYDs3zqJRCOzfOBTe2AaKW8pOUR4cPy/tbH9+0cSc/mWMATfkp5wAtMlLQuAXNo7QEcfYqyBLjZFssBUad8IVI5bDsqWs7OAuCREeHselCaeLgkx/o+iQi71lPAsSUQyyQtrLsM6SB8h8oyxydf2Meu/CrgnGGZJcluNUDKpYRN9zEwCVgLjJPUb8OIODiBOKSw2lhJDr8tJSIc5ZzE7JIN6ad8OijrNQ9w8nJynSrppRwAjXhs5e0+lYklIo4DHgP2AUa1k8wiwjnmGeB0YIDyBSv4MB2yHQnPkvRGDgAjfxs4vq48iIh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9bYyZIaLjjudzIQoFkKbTbwCO+UI0HcB9J/LdeY0xs0R02IGYYObRrWqiFQCfEZEtSHsfmGZm+4qxbbM/hQD8BeBNa0hEM2EYnmgLgP3lFARBT1dXly4vL//b29tbzQNIU+llAHeJaLFSqRzJes5vegR8xGbZLCwsHKzVav8z8/0sm0ID+MDvAfh4qZk2exFopnd9vv0ELrXBQO7fD10AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC/ElEQVRoQ+2Zy49NQRCHvx+ReK6IlZ34E7CUiCAR4xEbTLCyQRATYswwb2IQZDYWgojHZpCQECts+ResiQwLj0RClNSkb9Lu3HtPz7mZc8+V6eXt6tP1VVV3VdcVbT7U5vozC9BqD/7/HjCzlZLet9rS9fbP9ICZvQPWSfqRAmFmS4ClMHm+JiR9S1mXVyYFwIBXwEZJv7I2MrPjQH8A6JN0OWtNM/OpAL7HS0mbsjYzswGgN8gNS+rJWtPM/HQAfJ9nkrY22tDMTgMjQaZH0nAzCmatTQE4ClyNPvQU2CbJQ2vKKB2Aa2hmR4DrkbbPgQ5Jv6sJSgkQILqA0dgTkjraBiBAxPHtPz2UtDuGKK0HKkqamd8qg5HS9yXtjebLdYjrHNRqiAeS9gQvnQGGSnML1bvGzOwc0BfN35PUaWYHgRulBwjW9ju+O4JwqM/AWFsABIgLwKkIYgJY1jYAAeJQuGIXVIVcKTKxh8WfBin9J+AVpx/eFWUEqFkyNACKp0rhgWYArkg6kQibSyylmPOklQdibijBX+fSLHFRJkDid+qKmdlaYENOI0zeEcBNSZ9qbVIEQHWuyGOTNZLetgrAz8ClPFpHa1ZL8rf5lFGEB2oBfAxQi4D5DeDmAP7mGJPka0oD4LnDr9imH/xFe8AP4vLIjBclxWXItCOtaIBjwOKo3HaFRyWdnLbmYUHhAJKumdkt4ECk9JCkSitmWixFAwxKOjt5uZvdBvZH2vZLit8XSSBFA/yjpJndAfY1A9FSgOCJu0BnBNErqfIkzfRCywECxCNgR6Rtt6TzmdqHBmyKXG4ZM4sTWc04NzNPWE+AuG3ZlZInSuGBinXMbBzYGVkrE6JUACGcHgPbUyGKAIj7REmZ18y897o5ghiQ5E/bltRChwE/kF7Xj0jyLkbDYWbzgBfA+iA4LmlXqwD8LydvszjAF0lfswBCKC0E3gBeP22p186f8RBKUbaejJmtAr5L+lBPptQAKfCzAClWmkmZWQ/MpHVTvv0X9iFAQGQyevIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACrUlEQVRoQ+2ZPYgTURCAZzbBXJnCeL2Cnb87b9MEtPBUrrMQFAtrtT5/ClGs9LBWWz0RtbBUFCF4oJDsbO68wsLA2YqQSmLlvpEHu7IuMdlLcus+yUKKhJfZ+ebnvZl5CJY/aLn+MAP41x7M1QPMfFtr/crzvHfTAs8FoNPp1LTWzwHgqIg0lFLvrQHwfX8BER8DwC6jNCIecF13wwoA3/dvIuKNpLJa60Oe560XGoCZd4rICiKeTCtaeABmPg4AJmRqg6xcaABmvg4At4aFRyEBhoVM4UMoCplHADCfJTEL5YEsIVNID5iQAYCHALCYxeq5b6PMfF5EBAAEESthGK7W6/XPRpFWq7W3VCqtZg2ZcT3g+/6i4zjzIlLSWn/yPO/DIGMNLCWY2Sj/+xGRK0qpZfNDEASnROTFVi0fr8+aA8z8Ld6KEfGt67oLYwMAwEUium8EREn7OgeAjwCwPyo/nrque3YSgAtE9GDaAM1mc65arc4Zuf1+P2w0Gt9jJZl5DQAORt+fENG5wgEw8zUAMB/zbBBRwyqAIAjuiMjlSOlNItpjFUCqWl0josMzgChR/9hGAWBbknjmAdPhDdqa0gfZzAMJKyVP4v8hhJYRcSni+0JEu63ahZj5anyQici6UuqIVQDdbrfS6/UqRulyufyTiH5sF8AlIro37VpoWEHIzGZ2tM+sEZFnSqkzk9RCS0R01wjIsZz+mug53hDRia0AnI4bGgDYISItz/M2jYC8Gpp2u30MEWuO4zha665Sqp0ZYFStX/iWchRAItFGzoHSsrJ2ZFl1mHg6bfVYJeGJv85CC++BpIJZ5kSFC6G0ha0e7mYJqcJ7IOkRay84UhD2XjHFIFZf8iW9YcYoYRi+tO6aNeupOs66iU/icV46zf/MAKZpzXFk/QL+JG1PUPhRiQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACSElEQVRoQ+2Zu4sUQRCHf5+C+gf4yBXMfMYHGvjCzEBQDIzV+HwEohipGKupD0QNDE8UEwUFTe68wEDhTMVUMFJ+0tArzbjs9u3Ojt0wBR0M9MzUV1XdXVWNKhcq1189wP/2YKcesH1d0nPgdVvgnQDY3iTpqaT9kuaAt9UA2D4o6aGkzVHpXcByFQC2r0q60lB2D7BUNIDtjZIeSDoyRNGyAWwfiiET4n6YlAtg+7Kka2PCozyAMSHT5CkLIIbMfUlbMhdmOQCZIVOeB2LI3JN0NNPq6bTZe8D2aUmOY72kN8DnoIXt7eF5FSEzkQdsB+OEsFwr6RPwbpixhqYStoPyqVwAbkaAY5KeTWD5wStZHrD9XdJgK34FhBP9H8kFOAvciQBhn3/RAcBHSTvjfx4DJ6cBOAPcbRvA9gZJYQT5DfwYKGl7UdLu+PwIOFUiwCVJYQRZBuZqA7gh6XxUegXYVhtAmq0uAnt7gLhQm9vorBZx74Hcc6D3QLKH/z2JGyVnlYs4pCfzEe4rsLW2XehicpAtAftqAwiZbhhBfgE/ZwVwDrjddi40KiG0HXpHO+KcJ8CJaXKheeBWBOgqnf6W1BwvgcOrATieFDTrJL0HViJAVwXNgVgPrJH0BfiQDTDKtREiNK7KLSnHASQLLacP1PxcVkWWq8PU3emq2yqJJ0b1Qsv2QKpdZp+orBBqmrfq5m5mSJXtgUZI1XnB0YCo94opCal6L/ka3ghtlIXqrllzT9VJ5k19Ek/y0zbf6QHatOYk3/oDujC8QMWgjf4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKYklEQVRoQ+1Z+3NV1Rld397nXJIbIGBARTQgohGNQZJLEtFSMmpfan10aJ1OZzqd/jOd/g3t9AetD2KLCiigNFUgj/tIQoh1SqBRwVqNYgp53XvP2V9nped0Lpebl/LQmZ4ZZpjkZJ+99voe61tb8C1/5Fu+f/wfwPVm8DIG+vv7H1bVWufcp9baUefcWCqVKi5lo11dXV5NTc06EblPRNoAtABYqapD1tq9zrmelpaWaRHRpaxb6d3LAGSz2d+IyAbn3FljTG+xWEy3t7efW+yHuru7q621t3med7+qPgigGcCdAPIAuowxzyUSiaONjY2Fxa4533uVABwEsA3ARQDHAez1fb9769atn823kKrKyZMnVxUKhdtFJKWq3wWQAnAzgBoAH6vqQWvtH8nAUlmd69uXAcjlci+q6sMA1gL4BMB+Vd2fSCR6K4HYs2eP3bRp0zJjDN/f7Jzjphk2PPkN0YcDACOqekhVO5PJZPZqMvBLAI8BeATAagBnARwRkT97ntdXDmJ4eHj59PT0emPMVufcA9y8iNwBoA6AjQCEAE5dEwDpdPo2EXlQRJ4G8B0A6yImDqjqvnImstnsOlVtFZHvA9gJ4C4AfhnlLAJnABxW1T3V1dWZq8aAqppMJrM+AvE4gB8CuKGUCd/3jzU1NX3JuB8cHNwchuGjBKyq7QCWV4jXawcg/ng6nb7ZWrtTVX8C4CEAtxCEiLzBZAzD8ERNTc1YoVBY6ZxjtXkyYoDvxaETL3ftAfDLvb29t1prufnHohBZQxCqmmVJVNVjQRB8VF1dXeece0hVfxAlcD1wSZe/dgCy2Wy97/sz1topAIWpqambRKTDGPOsqu4AUAvgPICMiBxU1SMzMzMfJJP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H8uYWIuVzwG8pUAxH+czWbpJqwPw/DeyMjaDoD/Z7MqrVIEMOvMOef2VLofKGMidsU5Qx+iig2CoGf58uXjjY2NE6UsfC0AXIgh1dDQQEeOecEEZ25QL3HKihveggCYY319fbdUYIJ9gobYc6p6prW1lU32f8/XBhCvxAGF10uqui262GNusGpRhvDhnM24fkFE0nMZW2TC8zzmAjs/c4ylukdVOa29H88SVySEyhMqm81yBKSpu4VMiMgOVaX0YCOcva4yxjw/3x0ZmcjlcrxnI5Ps+mtUdYTgwzD8sLwqXTEGSqtUfX09PR/aKIxldvAGOt0A3nHOvRwEwfEdO3ZMz1UbR0ZGlp0/f/4WEam31vL+4by19hQ7dPnNzhUHEG9qYGBgVRAEd0UNj2YYWThjjHmrUChk2tvbKfDmfHjX7Pt+te/7nAnYUKcqhd1VA8Dkrq+vXxcxQdnAewbOAb1BEAwtBCAq16azs3N2j5TalSTFVQMw3+leyd996wH8BxA4v3x6wGifAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAHsUlEQVRoQ+2Z969VVRCFv7H33nvvvfcSe2+xxJgY4z9j/Bs0/mABFQXBhl1sgNjQSCyoiL2BDaxs873MJsfDuZd7gfeQxJ3cvAfv3HP22rNmzZo5wRq+Yg3fP/8DWN0RXCYCpZSzgM2Br4GPgW8j4s9hNlpKWQfYETgUOB44GtgMmA1MBF4BFkdEGea+Xdd2AbgF2B2YD0wHZkbEZ4M+qJSyIbArcARwMnAUsC/wO/AscCfwQkT8Meg9+13XBeBx4EjgZ+ClPLGXI+KbfjcqpXivLYA9gWOA0/PnDsDGwOeA977bCAwb1V7P7gIwDpBG2wJfAg/nZ3oXiFLK2sD6ef0+uWlp48kbSddfwAfAVOB+YNZoRuBG4CLgbGDLpNLTwIPAjDaIUsomwM7A4cCJyfm9ga0Bwbn+Bt4fKwDyV+5e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QBSIEzsukedwTIvxkcNQL/TXZV/W+MB/AMANfVPjBGemwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-text{font-size:14px;width:30px}.jessibuca-container .jessibuca-speed{font-size:14px;color:#fff}.jessibuca-container .jessibuca-quality-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px}.jessibuca-container .jessibuca-quality-menu-list.jessibuca-quality-menu-shown{visibility:visible;opacity:1}.jessibuca-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jessibuca-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jessibuca-container .jessibuca-quality-menu{padding:8px 0}.jessibuca-container .jessibuca-quality-menu-item{display:block;height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jessibuca-container .jessibuca-quality-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-quality-menu-item:focus{outline:none}.jessibuca-container .jessibuca-quality-menu-item.jessibuca-quality-menu-item-active{color:#2298fc}.jessibuca-container .jessibuca-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-wrap.jessibuca-volume-panel-wrap-show{visibility:visible;opacity:1}.jessibuca-container .jessibuca-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jessibuca-container .jessibuca-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:before{bottom:-54px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-volume-panel-handle:after,.jessibuca-container .jessibuca-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}');class Ue{constructor(e){var t;this.player=e,((e,t)=>{e.$container.classList.add("jessibuca-controls-show");const i=e._opt,n=i.operateBtns;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`
`:""}\n
\n ${De.loading}\n ${i.loadingText?`
${i.loadingText}
`:""}\n
\n ${i.hasControl&&n.play?'
':""}\n ${i.hasControl?`\n
\n
\n
\n ${i.showBandwidth?'
':""}\n
\n
\n ${n.audio?`\n
\n ${De.audio}\n ${De.mute}\n
\n
\n
\n
\n
\n
\n
\n `:""}\n ${n.play?`
${De.play}
${De.pause}
`:""}\n ${n.screenshot?`
${De.screenshot}
`:""}\n ${n.record?`
${De.record}
${De.recordStop}
`:""}\n ${n.fullscreen?`
${De.fullscreen}
${De.fullscreenExit}
`:""}\n
\n
\n
\n `:""}\n\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jessibuca-poster")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jessibuca-loading")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jessibuca-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jessibuca-play-big")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jessibuca-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jessibuca-controls")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jessibuca-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jessibuca-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jessibuca-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jessibuca-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jessibuca-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jessibuca-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jessibuca-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jessibuca-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jessibuca-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jessibuca-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jessibuca-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jessibuca-speed")})})(e,this),Oe(e,this),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),((e,t)=>{const{events:{proxy:i}}=e;function n(e){const{bottom:i,height:n}=t.$volumePanel.getBoundingClientRect(),{height:o}=t.$volumeHandle.getBoundingClientRect();return oe(i-e.y-o/2,0,n-o/2)/(n-o)}i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(window,"orientationchange",(()=>{setTimeout((()=>{e.resize()}),300)})),i(t.$controls,"click",(e=>{e.stopPropagation()})),i(t.$pause,"click",(t=>{e.pause()})),i(t.$play,"click",(t=>{e.play()})),i(t.$playBig,"click",(t=>{e.play()})),i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jessibuca-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jessibuca-volume-panel-wrap-show")})),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),re(t.$volumeOn,"display","none"),re(t.$volumeOff,"display","block"),e.lastVolume=e.volume,e.volume=0})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),re(t.$volumeOn,"display","block"),re(t.$volumeOff,"display","none"),e.volume=e.lastVolume||.5})),i(t.$screenshot,"click",(t=>{t.stopPropagation(),e.video.screenshot()})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=n(t)})),i(t.$volumeHandle,"mousedown",(()=>{t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=n(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)})),i(t.$record,"click",(t=>{t.stopPropagation(),e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),e.recording=!1})),i(t.$fullscreen,"click",(t=>{t.stopPropagation(),e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),e.fullscreen=!1}))})(e,this),this.player.debug.log("Control","init")}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,n=t/i,o=e.audio.$videoElement.width/e.audio.$videoElement.height;if(n>o){const n=(t-i*o)/2;e.$container.style.padding=`0 ${n}px`}else{const n=(i-t/o)/2;e.$container.style.padding=`${n}px 0`}}destroy(){this.player.debug.log("control","destroy"),this.$poster&&this.player.$container.removeChild(this.$poster),this.player.$container.removeChild(this.$loading),this.$controls&&this.player.$container.removeChild(this.$controls),this.player=null}}je(".jessibuca-container{position:relative;width:100%;height:100%;overflow:hidden}.jessibuca-container.jessibuca-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100%!important;height:100%!important;background:#000}");class Fe{static init(){Fe.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};for(let e in Fe.types)Fe.types.hasOwnProperty(e)&&(Fe.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=Fe.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,n=Array.prototype.slice.call(arguments,1),o=n.length;for(let e=0;e>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let r=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return Fe.box(Fe.types.trak,Fe.tkhd(e),Fe.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,n=e.presentWidth,o=e.presentHeight;return Fe.box(Fe.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,o>>>8&255,255&o,0,0]))}static mdia(e){return Fe.box(Fe.types.mdia,Fe.mdhd(e),Fe.hdlr(e),Fe.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return Fe.box(Fe.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?Fe.constants.HDLR_AUDIO:Fe.constants.HDLR_VIDEO,Fe.box(Fe.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?Fe.box(Fe.types.smhd,Fe.constants.SMHD):Fe.box(Fe.types.vmhd,Fe.constants.VMHD),Fe.box(Fe.types.minf,t,Fe.dinf(),Fe.stbl(e))}static dinf(){return Fe.box(Fe.types.dinf,Fe.box(Fe.types.dref,Fe.constants.DREF))}static stbl(e){return Fe.box(Fe.types.stbl,Fe.stsd(e),Fe.box(Fe.types.stts,Fe.constants.STTS),Fe.box(Fe.types.stsc,Fe.constants.STSC),Fe.box(Fe.types.stsz,Fe.constants.STSZ),Fe.box(Fe.types.stco,Fe.constants.STCO))}static stsdOld(e){return"audio"===e.type?Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.mp4a(e)):"avc"===e.videoType?Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.avc1(e)):Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.hvc1(e))}static stsd(e){return"audio"===e.type?Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.mp4a(e)):"avc"===e.videoType?Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.avc1(e)):Fe.box(Fe.types.stsd,Fe.constants.STSD_PREFIX,Fe.hvc1(e))}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Fe.box(Fe.types.mp4a,n,Fe.esds(e))}static esds(e){let t=e.config||[],i=t.length,n=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return Fe.box(Fe.types.esds,n)}static avc1(e){let t=e.avcc;const i=e.codecWidth,n=e.codecHeight;let o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Fe.box(Fe.types.avc1,o,Fe.box(Fe.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,n=e.codecHeight;let o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Fe.box(Fe.types.hvc1,o,Fe.box(Fe.types.hvcC,t))}static mvex(e){return Fe.box(Fe.types.mvex,Fe.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Fe.box(Fe.types.trex,i)}static moof(e,t){return Fe.box(Fe.types.moof,Fe.mfhd(e.sequenceNumber),Fe.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Fe.box(Fe.types.mfhd,t)}static traf(e,t){let i=e.id,n=Fe.box(Fe.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),o=Fe.box(Fe.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),r=Fe.sdtp(e),s=Fe.trun(e,r.byteLength+16+16+8+16+8+8);return Fe.box(Fe.types.traf,n,o,s,r)}static sdtpOld(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,Fe.box(Fe.types.sdtp,t)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,Fe.box(Fe.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let n=e.duration,o=e.size,r=e.flags,s=e.cts;return i.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s],12),Fe.box(Fe.types.trun,i)}static mdat(e){return Fe.box(Fe.types.mdat,e)}}Fe.init();class Pe{constructor(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index,t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let n=Math.min(i,this._current_word_bits_left),o=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Me{static _ebsp2rbsp(e){let t=e,i=t.byteLength,n=new Uint8Array(i),o=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[o]=t[e],o++);return new Uint8Array(n.buffer,0,o)}static parseSPS(e){let t=Me._ebsp2rbsp(e),i=new Pe(t);i.readByte();let n=i.readByte();i.readByte();let o=i.readByte();i.readUEG();let r=Me.getProfileString(n),s=Me.getLevelString(o),a=1,A=420,c=[0,420,422,444],d=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(a=i.readUEG(),3===a&&i.readBits(1),a<=3&&(A=c[a]),d=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==a?8:12;for(let t=0;t0&&e<16?(v=t[e-1],w=n[e-1]):255===e&&(v=i.readByte()<<8|i.readByte(),w=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);S=i.readBool(),R=t,C=2*e,E=R/C}}let B=1;1===v&&1===w||(B=v/w);let k=0,I=0;if(0===a)k=1,I=2-p;else{k=3===a?1:2,I=(1===a?2:1)*(2-p)}let T=16*(h+1),x=16*(f+1)*(2-p);T-=(g+m)*k,x-=(b+y)*I;let L=Math.ceil(T*B);return i.destroy(),i=null,{profile_string:r,level_string:s,bit_depth:d,ref_frames:u,chroma_format:A,chroma_format_string:Me.getChromaFormatString(A),frame_rate:{fixed:S,fps:E,fps_den:C,fps_num:R},sar_ratio:{width:v,height:w},codec_size:{width:T,height:x},present_size:{width:L,height:x}}}static _skipScalingList(e,t){let i=8,n=8,o=0;for(let r=0;r{this.mediaSourceOpen=!0,this.player.emit(v.mseSourceOpen)})),i(this.mediaSource,"sourceclose",(()=>{this.player.emit(v.mseSourceClose)})),e.debug.log("MediaSource","init")}get state(){return this.mediaSource.readyState}get isStateOpen(){return this.state===z}get isStateClosed(){return this.state===X}get isStateEnded(){return this.state===q}get duration(){return this.mediaSource.duration}set duration(e){this.mediaSource.duration=e}decodeVideo(e,t,i){const n=this.player;if(this.hasInit)this._decodeVideo(e,t,i);else if(i&&0===e[1]){const o=15&e[0];if(n.video.updateVideoInfo({encTypeCode:o}),o===x)return void this.emit(E.mediaSourceH265NotSupport);this._decodeConfigurationRecord(e,t,i,o),this.hasInit=!0}}_doDecode(){const e=this.bufferList.shift();e&&this._decodeVideo(e.payload,e.ts,e.isIframe)}_decodeConfigurationRecord(e,t,i,n){let o=e.slice(5),r={};n===T?r=function(e){const t={},i=new DataView(e.buffer);let n=i.getUint8(0),o=i.getUint8(1);if(i.getUint8(2),i.getUint8(3),1!==n||0===o)return;const r=1+(3&i.getUint8(4));if(3!==r&&4!==r)return;let s=31&i.getUint8(5);if(0===s)return;let a=6;for(let n=0;n1&&(this.removeBuffer(a.buffered.start(0),a.buffered.end(0)),this.timeInit=!1),a.drop&&s-this.cacheTrack.dts>1e3)a.drop=!1,this.cacheTrack={};else if(this.cacheTrack&&s>this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(Fe.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=s-this.cacheTrack.dts;let o=Fe.moof(this.cacheTrack,this.cacheTrack.dts),r=new Uint8Array(o.byteLength+i.byteLength);r.set(o,0),r.set(i,o.byteLength),this.appendBuffer(r.buffer),n.handleRender(),n.updateStats({fps:!0,ts:t,buf:n.demux.delay})}else n.debug.log("MediaSource","timeInit set false , cacheTrack = {}"),this.timeInit=!1,this.cacheTrack={};this.cacheTrack.id=1,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=r,this.cacheTrack.dts=s,this.cacheTrack.cts=0,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=o,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},this.timeInit||1!==a.buffered.length||(n.debug.log("MediaSource","timeInit set true"),this.timeInit=!0,a.currentTime=a.buffered.end(0)),!this.isInitInfo&&a.videoWidth>0&&a.videoHeight>0&&(n.debug.log("MediaSource",`updateVideoInfo: ${a.videoWidth},${a.videoHeight}`),n.video.updateVideoInfo({width:a.videoWidth,height:a.videoHeight}),n.video.initCanvasViewSize(),this.isInitInfo=!0)}appendBuffer(e){const{debug:t,events:{proxy:i}}=this.player;null===this.sourceBuffer&&(this.sourceBuffer=this.mediaSource.addSourceBuffer(J),i(this.sourceBuffer,"error",(e=>{this.player.emit(v.mseSourceBufferError,e)}))),!1===this.sourceBuffer.updating&&this.isStateOpen?this.sourceBuffer.appendBuffer(e):this.isStateClosed?this.player.emit(v.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed"):this.isStateEnded?this.player.emit(v.mseSourceBufferError,"mediaSource is closed"):!0===this.sourceBuffer.updating&&(this.player.emit(v.mseSourceBufferBusy),this.dropSourceBuffer(!0))}stop(){this.isStateOpen&&this.sourceBuffer&&this.sourceBuffer.abort(),this.endOfStream()}dropSourceBuffer(e){const t=this.player.video.$videoElement;this.dropping=e,t.buffered.length>0&&t.buffered.end(0)-t.currentTime>1&&(t.currentTime=t.buffered.end(0))}removeBuffer(e,t){if(this.isStateOpen&&!1===this.sourceBuffer.updating)try{this.sourceBuffer.remove(e,t)}catch(e){console.error(e)}}endOfStream(){this.isStateOpen&&this.mediaSource.endOfStream()}destroy(){this.stop(),this.bufferList=[],this.mediaSource=null,this.mediaSourceOpen=!1,this.sourceBuffer=null,this.hasInit=!1,this.isInitInfo=!1,this.sequenceNumber=0,this.cacheTrack=null,this.timeInit=!1,this.off(),this.player.debug.log("MediaSource","destroy")}}const Qe=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,Ne=()=>"wakeLock"in navigator;class We{constructor(e){if(this.player=e,this.enabled=!1,Ne()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else Qe()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEH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QFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCG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ABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSB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AAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,t,i){var n=document.createElement("source");n.src=i,n.type=`video/${t}`,e.appendChild(n)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(Ne())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.error("wakeLock",`${t.name}, ${t.message}`),t}));if(Qe())return this.disable(),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();return this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){const e=this.player.debug;Ne()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Qe()?this.noSleepTimer&&(e.warn("wakeLock","NoSleep now disabled for older iOS devices."),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}class Ge extends ue{constructor(e,t){var i;super(),this.$container=e,this._opt=Object.assign({},o,t),this.debug=new Y(this),this._opt.useWCS&&(this._opt.useWCS="VideoEncoder"in window),this._opt.useMSE&&(this._opt.useMSE=window.MediaSource&&window.MediaSource.isTypeSupported(J)),this._opt.useMSE?(this._opt.useWCS&&this.debug.log("Player","useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.log("Player","forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0):this._opt.useWCS,this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0},this._videoTimestamp=0,this._audioTimestamp=0,i=this,Object.defineProperty(i,"rect",{get:()=>i.$container.getBoundingClientRect()}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(i,e,{get:()=>i.rect[e]})})),this.events=new Z(this),this.video=new ge(this),this.audio=new be(this),this.recorder=new Re(this),this.decoderWorker=new Ce(this),this.stream=null,this.demux=null,this._opt.useWCS&&(this.webcodecsDecoder=new xe(this)),this._opt.useMSE&&(this.mseDecoder=new Ve(this)),this.control=new Ue(this),this.keepScreenOn=new We(this),(e=>{try{const t=()=>{e.emit(w.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize()};$.on("change",t),e.events.destroys.push((()=>{$.off("change",t)}))}catch(e){}if(e.on(v.decoderWorkerInit,(()=>{e.debug.log("player","has loaded"),e._hasLoaded=!0})),e.on(v.play,(()=>{e.loading=!1})),e.on(v.fullscreen,(t=>{if(t)try{$.request(e.$container).then((()=>{})).catch((t=>{e.webFullscreen=!0}))}catch(t){e.webFullscreen=!0}else try{$.exit().then((()=>{})).catch((()=>{e.webFullscreen=!1}))}catch(t){e.webFullscreen=!1}})),e.on(v.webFullscreen,(t=>{if(t){e.$container.classList.add("webmediaplayer-fullscreen-web");const{clientHeight:t,clientWidth:i}=document.body,{clientHeight:n,clientWidth:o}=e.video.$videoElement;if(i/t{e.video.resize()})),e._opt.debug){const t=[v.timeUpdate];Object.keys(v).forEach((i=>{e.on(v[i],(n=>{t.includes(i)||e.debug.log("player events",v[i],n)}))})),Object.keys(E).forEach((t=>{e.on(E[t],(i=>{e.debug.log("player event error",E[t],i)}))}))}})(this),(e=>{const{_opt:t,debug:i,events:{proxy:n}}=e;t.supportDblclickFullscreen&&n(e.$container,"dblclick",(()=>{e.fullscreen=!e.fullscreen})),n(document,"visibilitychange",(()=>{t.hiddenAutoPause&&(i.log("visibilitychange",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),n(window,"fullscreenchange",(()=>{null!==e.keepScreenOn&&"visible"===document.visibilityState&&e.enableWakeLock()}))})(this),this._opt.useWCS&&this.debug.log("Player","use WCS"),this._opt.useMSE&&this.debug.log("Player","use MSE"),this._opt.useOffscreen&&this.debug.log("Player","use offscreen"),this.debug.log("Player options",this._opt)}set fullscreen(e){this.emit(v.fullscreen,e)}get fullscreen(){return document.isFullScreen||document.mozIsFullScreen||document.webkitIsFullScreen||this.webFullscreen}set webFullscreen(e){this.emit(v.webFullscreen,e)}get webFullscreen(){return this.$container.classList.contains("jessibuca-fullscreen-web")}get loaded(){return this._hasLoaded}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(v.playing,e),this.emit(v.volumechange,this.volume),e?this.emit(v.play):this.emit(v.pause))}get playing(){return this._playing}get volume(){return this.audio.volume}set volume(e){this.audio.setVolume(e)}set loading(e){this.loading!==e&&(this._loading=e,this.emit(v.loading,this._loading))}get loading(){return this._loading}set recording(e){this.playing&&(e?this.recorder.startRecord():this.recorder.stopRecordAndSave())}get recording(){return this.recorder.recording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){null!==e&&(this._videoTimestamp=e,this._opt.useWCS||this._opt.useMSE||this.audioTimestamp&&this.videoTimestamp&&this.audio.emit(v.videoSyncAudio,{audioTimestamp:this.audioTimestamp,videoTimestamp:this.videoTimestamp,diff:this.audioTimestamp-this.videoTimestamp}))}get videoTimestamp(){return this._videoTimestamp}updateOption(e){this._opt=Object.assign({},this._opt,e)}init(){return new Promise(((e,t)=>{this.stream||(this.stream=new we(this)),this.demux||(this.demux=new Te(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new xe(this))),this._opt.useMSE&&(this.mseDecoder||(this.mseDecoder=new Ve(this))),this.decoderWorker?e():(this.decoderWorker=new Ce(this),this.once(v.decoderWorkerInit,(()=>{e()})))}))}play(e){return new Promise(((t,i)=>{if(!e&&!this._opt.url)return i();this.loading=!0,this.playing=!1,e||(e=this._opt.url),this._opt.url=e,this.clearCheckHeartTimeout(),this.init().then((()=>{this._opt.isNotMute&&this.mute(!1),this.webcodecsDecoder&&this.webcodecsDecoder.once(E.webcodecsH265NotSupport,(()=>{this.emit(E.webcodecsH265NotSupport),this.emit(v.error,E.webcodecsH265NotSupport)})),this.mseDecoder&&this.mseDecoder.once(E.mediaSourceH265NotSupport,(()=>{this.emit(E.mediaSourceH265NotSupport),this.emit(v.error,E.mediaSourceH265NotSupport)})),this.enableWakeLock(),this.stream.fetchStream(e),this.checkLoadingTimeout(),this.stream.once(E.fetchError,(e=>{i(e)})),this.stream.once(E.websocketError,(e=>{i(e)})),this.stream.once(v.streamSuccess,(()=>{t(),this._opt.useMSE&&this.video.play()}))})).catch((e=>{i(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video.clearView(),e()}))}))}_close(){return new Promise(((e,t)=>{this.stream&&(this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.playing=!1,this.loading=!1,this.recording=!1,this.audio.pause(),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,setTimeout((()=>{e()}),0)}))}pause(e){return e?this.close():this._close()}mute(e){this.audio.mute(e)}resize(){this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(){this.recording&&(this.recording=!1)}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&(t=!0)})),(this._opt.showBandwidth||this._opt.text||t)&&(e=!0),e}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}checkHeartTimeout(){this._checkHeartTimeout=setTimeout((()=>{this.pause(!1).then((()=>{this.emit(v.timeout,v.delayTimeout),this.emit(v.delayTimeout)}))}),1e3*this._opt.heartTimeout)}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.pause(!1).then((()=>{this.emit(v.timeout,v.loadingTimeout),this.emit(v.loadingTimeout)}))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}handleRender(){this.loading&&(this.emit(v.start),this.loading=!1,this.clearCheckLoadingTimeout()),this.playing||(this.playing=!0),this.checkHeart()}updateStats(e){e=e||{},this._startBpsTime||(this._startBpsTime=ne()),le(e.ts)&&(this._stats.ts=e.ts),le(e.buf)&&(this._stats.buf=e.buf),e.fps&&(this._stats.fps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps);const t=ne();t-this._startBpsTime<1e3||(this.emit(v.stats,this._stats),this.emit(v.performance,function(e){let t=0;return e>=24?t=2:e>=15&&(t=1),t}(this._stats.fps)),this._stats.fps=0,this._stats.abps=0,this._stats.vbps=0,this._startBpsTime=t)}resetStats(){this._startBpsTime=null,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn.disable()}destroy(){this._loading=!1,this._playing=!1,this._hasLoaded=!1,this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.video&&(this.video.destroy(),this.video=null),this.audio&&(this.audio.destroy(),this.audio=null),this.stream&&(this.stream.destroy(),this.stream=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.events&&(this.events.destroy(),this.events=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.releaseWakeLock(),this.keepScreenOn=null,this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}}var He=_((function(e,t){e.exports=function(){var e,t;function i(t){this.name="__st"+(1e9*Math.random()>>>0)+e+"__",null==t||t.forEach(this.add,this),e+=1}Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o=t)return n=T(n),r(n.splice(0,n.length)),void(i&&clearTimeout(i));i&&clearTimeout(i),i=setTimeout((function(){i=null,0<(n=T(n)).length&&r(n.splice(0,n.length))}),o.delay)}},G=function(e,t){return Array.isArray(e)?t(e.map((function(e){return o(o({},e),{msg:"string"==typeof e.msg?e.msg:[].concat(e.msg).map(w).join(" ")})}))):t(o(o({},e),{msg:"string"==typeof e.msg?e.msg:w(e.msg)}))},H=function(e){var t,i=!1,n=!1,o=!1,r=[];return e.lifeCycle.on("onConfigChange",(function(){t&&clearTimeout(t),t=setTimeout((function(){var t,s;!o&&e.config&&(o=!0,t=e.config.whiteListUrl,(s=void 0===t?"":t)&&e.sendPipeline([function(t,o){o({url:s,type:g.WHITE_LIST,success:function(t){n=!0;try{var o=t.data||JSON.parse(t),s=o.retcode,a=o.result,A=void 0===a?{}:a;if(0===s){if(i=A.is_in_white_list,e.isWhiteList=i,A.shutdown)return void e.destroy();0<=A.rate&&A.rate<=1&&(e.config.random=A.rate,e.isGetSample=!1)}e.isWhiteList&&r.length?X(e)(r.splice(0),(function(){})):!e.isWhiteList&&r.length&&(r.length=0);var c=e.config.onWhitelist;"function"==typeof c&&c(i)}catch(t){}},fail:function(t){"403 forbidden"===t&&e.destroy(),n=!0}})}],g.WHITE_LIST)(null),o=!1)}),e.config.uin?50:500)})),e.lifeCycle.on("destroy",(function(){r.length=0})),function(t,o){var s;i||null!==(s=null===(s=e.config)||void 0===s?void 0:s.api)&&void 0!==s&&s.reportRequest?o(t.concat(r.splice(0)).map((function(e){return x(e),e}))):(t=t.filter((function(e){return e.level!==p.INFO&&e.level!==p.API_RESPONSE?(x(e),!0):(n||(r.push(e),200<=r.length&&(r.length=200)),!1)}))).length&&o(t)}},J=function(e){return setTimeout((function(){var t=e.config.pvUrl,i=void 0===t?"":t;i&&e.sendPipeline([function(t,n){n({url:i,type:g.PV,fail:function(t){"403 forbidden"===t&&e.destroy()}})}],g.PV)(null)}),100),function(e,t){t(e)}},q=function(e){var t={};return function(i,n){var o,r;e.speedSample?(r="object"==typeof e.repeat?e.repeat:{repeat:e.repeat},o=+r.speed||+r.repeat||5,Array.isArray(i)?(r=i.filter((function(e){var i=!t[e.url]||t[e.url]o))})))}},X=function(e){return function(t){return e.sendPipeline([function(t,i){return i({url:e.config.url||"",data:s(t),method:"post",contentType:"application/x-www-form-urlencoded",type:g.LOG,log:t,requestConfig:{timeout:5e3},success:function(){var n=e.config.onReport;"function"==typeof n&&t.forEach((function(e){n(e)})),"function"==typeof i&&i([])},fail:function(t){"403 forbidden"===t&&e.destroy()}})}],g.LOG)(t)}},Y=function(e){if(!e||!e.reduce||!e.length)throw new TypeError("createPipeline need at least one function param");return 1===e.length?function(t,i){e[0](t,i||O)}:e.reduce((function(e,t){return function(i,n){return void 0===n&&(n=O),e(i,(function(e){return null==t?void 0:t(e,n)}))}}))},Z=(Object.defineProperty(Ae.prototype,"__version__",{get:function(){return console.warn("__version__ has discard, please use version"),"1.24.48"},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"LogType",{get:function(){return console.warn("LogType has discard, please use logType"),p},enumerable:!1,configurable:!0}),Ae.prototype.init=function(e){this.setConfig(e);for(var t=0;tc&&o.isInFirstScreen(t.roots[n])&&(c=t.rootsDomNum[n],d=t.time,("object"!=typeof(null===(i=e.config)||void 0===i?void 0:i.pagePerformance)||null!==(i=e.config.pagePerformance)&&void 0!==i&&i.firstScreenInfo)&&(e.firstScreenInfo={element:t.roots[n],timing:d}))})),!d&&Se?A=setTimeout((function(){return a()}),3e3):(s.disconnect(),null==t||t(d)),--Se},A=setTimeout((function(){return a()}),3e3)},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){if(!e||"function"!=typeof e.getBoundingClientRect)return!1;var t=e.getBoundingClientRect(),i=window.innerHeight;return e=window.innerWidth,0<=t.left&&t.left{this.player.on(w[e],(t=>{this.emit(e,t)}))}))}setDebug(e){this.player.updateOption({isDebug:!!e})}mute(){this.player.mute(!0)}cancelMute(){this.player.mute(!1)}setVolume(e){this.player.volume=e}audioResume(){this.player.audio.audioEnabled(!0)}setTimeout(e){e=Number(e),this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e})}setScaleMode(e){let t={isFullResize:!1,isResize:!1};switch(e=Number(e)){case U:t.isFullResize=!1,t.isResize=!1;break;case F:t.isFullResize=!1,t.isResize=!0;break;case P:t.isFullResize=!0,t.isResize=!0}this.player.updateOption(t),this.resize()}pause(){return this.player.pause()}close(){return this._opt.url="",this.player.close()}clearView(){this.player.video.clearView()}play(e){return new Promise(((t,i)=>{if(!e&&!this._opt.url)return this.emit(v.error,E.playError),void i();if(e){if(!this._opt.url)return this._play(e);e===this._opt.url?this.player.playing?t():(this.clearView(),this.player.play(this._opt.url).then((()=>{t()})).catch((()=>{this.player.pause().then((()=>{i()}))}))):this.player.pause().then((()=>(this.clearView(),this._play(e)))).catch((()=>{i()}))}else this.player.play(this._opt.url).then((()=>{t()})).catch((()=>{this.player.pause().then((()=>{i()}))}))}))}_play(o){return new Promise(((r,s)=>{this._opt.url=o;const a=0===o.indexOf("http"),A=a?t:e,c=a||-1!==o.indexOf(".flv")||this._opt.isFlv?i:n;this.player.updateOption({protocol:A,demuxType:c}),this.player.once(E.mediaSourceH265NotSupport,(()=>{this.close()})),this.player.once(E.webcodecsH265NotSupport,(()=>{this.close()})),this.hasLoaded()?this.player.play(o).then((()=>{r()})).catch((()=>{this.player.pause().then((()=>{s()}))})):this.player.once(v.decoderWorkerInit,(()=>{this.player.play(o).then((()=>{r()})).catch((()=>{this.player.pause().then((()=>{s()}))}))}))}))}resize(){this.player.resize()}setBufferTime(e){e=Number(e),this.player.updateOption({videoBuffer:1e3*e})}setRotate(e){e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,270].indexOf(e)&&(this.player.updateOption({rotate:e}),this.resize())}hasLoaded(){return this.player.loaded}setKeepScreenOn(){this.player.updateOption({keepScreenOn:!0})}setFullscreen(e){const t=!!e;this.player.fullscreen!==t&&(this.player.fullscreen=t)}screenshot(e,t,i,n){return this.player.video.screenshot(e,t,i,n)}startRecord(e,t){return new Promise(((i,n)=>{this.player.playing?(this.player.startRecord(e,t),i()):n()}))}stopRecordAndSave(){this.player.recording&&this.player.stopRecordAndSave()}isPlaying(){return this.player.playing}isMute(){return this.player.audio.isMute}isRecording(){return this.player.recorder.recording}destroy(){this.player.destroy(),this.player=null,this.off()}}return window.Jessibuca=Je,Je})); diff --git a/web/client/assets/video/cross_loading.mp4 b/web/client/assets/video/cross_loading.mp4 new file mode 100644 index 0000000..aa6b925 Binary files /dev/null and b/web/client/assets/video/cross_loading.mp4 differ diff --git a/web/client/assets/video/login_bg.mp4 b/web/client/assets/video/login_bg.mp4 new file mode 100644 index 0000000..1236cb4 Binary files /dev/null and b/web/client/assets/video/login_bg.mp4 differ diff --git a/web/client/index.ejs b/web/client/index.ejs new file mode 100644 index 0000000..488bfac --- /dev/null +++ b/web/client/index.ejs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/web/client/index.html b/web/client/index.html new file mode 100644 index 0000000..9474515 --- /dev/null +++ b/web/client/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/web/client/index.js b/web/client/index.js new file mode 100644 index 0000000..734451c --- /dev/null +++ b/web/client/index.js @@ -0,0 +1,20 @@ +/** + * User: liuxinyi/liu.xinyi@free-sun.com.cn + * Date: 2016/2/22 + * Time: 15:29 + * + */ +'use strict'; + +const views = require('koa-view'); +const path = require('path'); + +module.exports = { + entry: function (app, router, opt) { + app.use(views(__dirname)); + + router.get('(.*)', async function (ctx) { + await ctx.render(path.join(__dirname, './index')); + }); + } +}; \ No newline at end of file diff --git a/web/client/src/app.jsx b/web/client/src/app.jsx new file mode 100644 index 0000000..ad0accd --- /dev/null +++ b/web/client/src/app.jsx @@ -0,0 +1,41 @@ +'use strict'; + +import React, { useEffect } from 'react'; +import Layout from './layout'; +import Auth from './sections/auth'; +import Example from './sections/example'; +import NoMatch from './sections/noMatch'; +import Business from './sections/business'; + +const App = props => { + const { projectName } = props + + useEffect(() => { + document.title = projectName; + + console.log(` + _ _------ +        />  フ +       |  _  _ l +       /\` ミ_xノ +      /      | +     /  ヽ   ノ +     │  | | | +  / ̄|   | | | +  | ( ̄ヽ__ヽ_)__) +  \二つ ​ + `); + }, []) + + return ( + + ) +} + +export default App; \ No newline at end of file diff --git a/web/client/src/components/index.js b/web/client/src/components/index.js new file mode 100644 index 0000000..e560b3f --- /dev/null +++ b/web/client/src/components/index.js @@ -0,0 +1,14 @@ +'use strict'; +import SimpleFileDownButton from './simpleFileDownButton' +import ReminderBox from './reminderBox' +import Setup from './setup' +import { SkeletonScreen } from './skeletonScreen' +import OutHidden from './outHidden' + +export { + SimpleFileDownButton, + ReminderBox, + Setup, + SkeletonScreen, + OutHidden, +}; diff --git a/web/client/src/components/outHidden.jsx b/web/client/src/components/outHidden.jsx new file mode 100644 index 0000000..24e7521 --- /dev/null +++ b/web/client/src/components/outHidden.jsx @@ -0,0 +1,40 @@ +import React, { useState, useEffect } from "react"; +import { Tooltip } from "@douyinfe/semi-ui"; + +function OutHidden ({ name, width, height, color, background, number }) { + + return <> + {number ? +
+ +
+ {name.length > number ? `${name.substr(0, number)}...` : name} +
+
+
+ + :
+ +
+ {name} +
+
+
} + +} + +export default OutHidden; \ No newline at end of file diff --git a/web/client/src/components/reminderBox.jsx b/web/client/src/components/reminderBox.jsx new file mode 100644 index 0000000..595658a --- /dev/null +++ b/web/client/src/components/reminderBox.jsx @@ -0,0 +1,50 @@ +import { Button, Checkbox, Modal } from "@douyinfe/semi-ui"; +import React from "react"; + +const ReminderBox = ({ title, wait, toadd, visible, onOk, close, USER}) => { + return ( + + {title} + + } + onCancel={() => { + close() + }} + icon={ + + } + footer={ +
+ { + localStorage.setItem( USER, JSON.stringify(checked.target.checked) + ) + }} + aria-label="Checkbox 示例" + style={{ width: 100 }} + > + 不再提醒 + +
+ + +
+
+ } + visible={visible} + >
+ ); +}; + +export default ReminderBox; diff --git a/web/client/src/components/setup.jsx b/web/client/src/components/setup.jsx new file mode 100644 index 0000000..41d8792 --- /dev/null +++ b/web/client/src/components/setup.jsx @@ -0,0 +1,123 @@ +import React, { useState, useEffect } from "react"; +import { + Modal, + CheckboxGroup, + Checkbox, +} from "@douyinfe/semi-ui"; + +function Setup (props) { + const { + close, + tableType, + tableList, + length + } = props; + const [check, setCheck] = useState([]); + + const checkboxcss = { width: "25%", height: 16, margin: "0 0 20px 0" }; + + useEffect(() => { + //获取是否勾选信息 + const checkItem = localStorage.getItem(tableType); + setCheck(checkItem ? JSON.parse(checkItem) : []) + ischeck(); + }, []); + function ischeck (value) { + if (check.length >= length) { + if (check.includes(value)) { + return false; + } else { + return true; + } + } + } + + return ( + + 表格属性设置 + + {check.length}/{length} + + + } + visible={true} + style={{ width: 600 }} + onOk={() => { + localStorage.setItem(tableType, JSON.stringify(check)); + close(); + }} + onCancel={() => { + close(); + }} + > + { + setCheck(check); + ischeck(); + }} + > + {tableList.map((item, index) => { + return ( +
+
+ {item.title} +
+
+ {item.list?.map((itm) => { + return ( + + {itm.name} + + ); + })} +
+
+ ) + })} +
+
+ ); +} + +export default Setup; diff --git a/web/client/src/components/simpleFileDownButton.jsx b/web/client/src/components/simpleFileDownButton.jsx new file mode 100644 index 0000000..5ee4eee --- /dev/null +++ b/web/client/src/components/simpleFileDownButton.jsx @@ -0,0 +1,40 @@ +import React, { useState, useEffect, useRef } from "react"; +import { connect } from "react-redux"; +import moment from 'moment' +import { Button, } from "@douyinfe/semi-ui"; + +const SimpleFileDownButton = (props) => { + const { src, user } = props + const [downloadUrl, setDownloadUrl] = useState('') + + return ( + <> + + { + downloadUrl ?