From 06eaf1ecb9b25d7af22420d9be7dede3631cbef4 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 14:44:00 +0800 Subject: [PATCH 01/14] demo: add electron demo --- .github/workflows/build-electron.yml | 31 + .github/workflows/build-nextjs.yml | 1 - README.md | 2 + demos/with-electron/package.json | 29 + demos/with-electron/pnpm-lock.yaml | 2423 ++++++++ demos/with-electron/src/ezuikit.js | 129 + .../PlayCtrlWasm/playCtrl1/HasSIMD/Decoder.js | 172 + .../PlayCtrlWasm/playCtrl1/NoSIMD/Decoder.js | 172 + .../playCtrl3/hasWorker/HasSIMD/Decoder.js | 21 + .../playCtrl3/hasWorker/HasSIMD/Decoder.wasm | Bin 0 -> 3447970 bytes .../hasWorker/HasSIMD/Decoder.worker.js | 1 + .../playCtrl3/hasWorker/NoSIMD/Decoder.js | 21 + .../playCtrl3/hasWorker/NoSIMD/Decoder.wasm | Bin 0 -> 3055848 bytes .../hasWorker/NoSIMD/Decoder.worker.js | 1 + .../playCtrl3/noWorker/Decoder.js | 21 + .../playCtrl3/noWorker/Decoder.wasm | Bin 0 -> 2928093 bytes .../src/ezuikit_static/css/component.css | 1257 ++++ .../src/ezuikit_static/css/inspectTheme.css | 354 ++ .../src/ezuikit_static/css/theme.css | 167 + .../src/ezuikit_static/imgs/bg.png | Bin 0 -> 1810861 bytes .../src/ezuikit_static/imgs/bg.svg | 33 + .../src/ezuikit_static/imgs/empty.png | Bin 0 -> 50594 bytes .../src/ezuikit_static/imgs/end.png | Bin 0 -> 1730 bytes .../src/ezuikit_static/imgs/fallback.svg | 52 + .../src/ezuikit_static/imgs/start.png | Bin 0 -> 3255 bytes .../ezuikit_static/rec/datepicker.en-US.js | 19 + .../src/ezuikit_static/rec/datepicker.js | 1523 +++++ .../src/ezuikit_static/rec/datepicker.min.css | 36 + .../ezuikit_static/rec/datepicker.zh-CN.js | 19 + .../src/ezuikit_static/rec/jquery.min.js | 2 + .../src/ezuikit_static/speed/speed.css | 170 + .../src/ezuikit_static/talk/adapeter.js | 5497 +++++++++++++++++ .../src/ezuikit_static/talk/janus.js | 3505 +++++++++++ .../src/ezuikit_static/talk/tts-v4.js | 343 + demos/with-electron/src/index.html | 206 + demos/with-electron/src/main.js | 18 + 36 files changed, 16224 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-electron.yml create mode 100644 demos/with-electron/package.json create mode 100644 demos/with-electron/pnpm-lock.yaml create mode 100644 demos/with-electron/src/ezuikit.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl1/HasSIMD/Decoder.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl1/NoSIMD/Decoder.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.wasm create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.worker.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.wasm create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.worker.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.js create mode 100644 demos/with-electron/src/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.wasm create mode 100644 demos/with-electron/src/ezuikit_static/css/component.css create mode 100644 demos/with-electron/src/ezuikit_static/css/inspectTheme.css create mode 100644 demos/with-electron/src/ezuikit_static/css/theme.css create mode 100644 demos/with-electron/src/ezuikit_static/imgs/bg.png create mode 100644 demos/with-electron/src/ezuikit_static/imgs/bg.svg create mode 100644 demos/with-electron/src/ezuikit_static/imgs/empty.png create mode 100644 demos/with-electron/src/ezuikit_static/imgs/end.png create mode 100644 demos/with-electron/src/ezuikit_static/imgs/fallback.svg create mode 100644 demos/with-electron/src/ezuikit_static/imgs/start.png create mode 100644 demos/with-electron/src/ezuikit_static/rec/datepicker.en-US.js create mode 100644 demos/with-electron/src/ezuikit_static/rec/datepicker.js create mode 100644 demos/with-electron/src/ezuikit_static/rec/datepicker.min.css create mode 100644 demos/with-electron/src/ezuikit_static/rec/datepicker.zh-CN.js create mode 100644 demos/with-electron/src/ezuikit_static/rec/jquery.min.js create mode 100644 demos/with-electron/src/ezuikit_static/speed/speed.css create mode 100644 demos/with-electron/src/ezuikit_static/talk/adapeter.js create mode 100644 demos/with-electron/src/ezuikit_static/talk/janus.js create mode 100644 demos/with-electron/src/ezuikit_static/talk/tts-v4.js create mode 100644 demos/with-electron/src/index.html create mode 100644 demos/with-electron/src/main.js diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml new file mode 100644 index 0000000..88f57dc --- /dev/null +++ b/.github/workflows/build-electron.yml @@ -0,0 +1,31 @@ +name: build-nextjs + +on: + push: + branches: ["main", "develop"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: windows-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 21.x, 22.x, 23.x, 24.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: Build with-electron + working-directory: ./demos/with-electron + run: | + pnpm install --no-frozen-lockfile + pnpm run build \ No newline at end of file diff --git a/.github/workflows/build-nextjs.yml b/.github/workflows/build-nextjs.yml index ae08daa..c30e7f6 100644 --- a/.github/workflows/build-nextjs.yml +++ b/.github/workflows/build-nextjs.yml @@ -30,4 +30,3 @@ jobs: pnpm install --no-frozen-lockfile pnpm run build - diff --git a/README.md b/README.md index 8fadae6..abd44ba 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本, > 如果使用 next.js,可参考 demos => [with-next](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-next) +> 如果使用 electron,可参考 demos => [with-electron](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-electron) + > 如果使用 vue3,可参考 demos => [vue3-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue3-demo) > 如果使用 vue2.7,可参考 demos => [vue-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue-demo) diff --git a/demos/with-electron/package.json b/demos/with-electron/package.json new file mode 100644 index 0000000..5fefceb --- /dev/null +++ b/demos/with-electron/package.json @@ -0,0 +1,29 @@ +{ + "name": "with-electron", + "version": "1.0.0", + "description": "", + "main": "src/main.js", + "scripts": { + "dev": "npx electron .", + "build": "electron-builder" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + }, + "devDependencies": { + "electron": "^36.3.2", + "electron-builder": "^26.0.12" + }, + "build": { + "appId": "com.ezuikit.app", + "productName": "Ezuikit", + "win": { + "target": "nsis" + }, + "mac": { + "target": "dmg" + } + } +} diff --git a/demos/with-electron/pnpm-lock.yaml b/demos/with-electron/pnpm-lock.yaml new file mode 100644 index 0000000..8dbeb47 --- /dev/null +++ b/demos/with-electron/pnpm-lock.yaml @@ -0,0 +1,2423 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + electron: + specifier: ^36.3.2 + version: 36.3.2 + +devDependencies: + electron-builder: + specifier: ^26.0.12 + version: 26.0.12(electron-builder-squirrel-windows@26.0.12) + +packages: + + /7zip-bin@5.2.0: + resolution: {integrity: sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==} + dev: true + + /@develar/schema-utils@2.6.5: + resolution: {integrity: sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==} + engines: {node: '>= 8.9.0'} + dependencies: + ajv: 6.12.6 + ajv-keywords: 3.5.2(ajv@6.12.6) + dev: true + + /@electron/asar@3.2.18: + resolution: {integrity: sha512-2XyvMe3N3Nrs8cV39IKELRHTYUWFKrmqqSY1U+GMlc0jvqjIVnoxhNd2H4JolWQncbJi1DCvb5TNxZuI2fEjWg==} + engines: {node: '>=10.12.0'} + hasBin: true + dependencies: + commander: 5.1.0 + glob: 7.2.3 + minimatch: 3.1.2 + dev: true + + /@electron/asar@3.4.1: + resolution: {integrity: sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==} + engines: {node: '>=10.12.0'} + hasBin: true + dependencies: + commander: 5.1.0 + glob: 7.2.3 + minimatch: 3.1.2 + dev: true + + /@electron/fuses@1.8.0: + resolution: {integrity: sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==} + hasBin: true + dependencies: + chalk: 4.1.2 + fs-extra: 9.1.0 + minimist: 1.2.8 + dev: true + + /@electron/get@2.0.3: + resolution: {integrity: sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==} + engines: {node: '>=12'} + dependencies: + debug: 4.4.1 + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1 + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + dev: false + + /@electron/notarize@2.5.0: + resolution: {integrity: sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==} + engines: {node: '>= 10.0.0'} + dependencies: + debug: 4.4.1 + fs-extra: 9.1.0 + promise-retry: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@electron/osx-sign@1.3.1: + resolution: {integrity: sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + compare-version: 0.1.2 + debug: 4.4.1 + fs-extra: 10.1.0 + isbinaryfile: 4.0.10 + minimist: 1.2.8 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@electron/rebuild@3.7.0: + resolution: {integrity: sha512-VW++CNSlZwMYP7MyXEbrKjpzEwhB5kDNbzGtiPEjwYysqyTCF+YbNJ210Dj3AjWsGSV4iEEwNkmJN9yGZmVvmw==} + engines: {node: '>=12.13.0'} + hasBin: true + dependencies: + '@electron/node-gyp': github.com/electron/node-gyp/06b29aafb7708acef8b3669835c8a7857ebc92d2 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 + debug: 4.4.1 + detect-libc: 2.0.4 + fs-extra: 10.1.0 + got: 11.8.6 + node-abi: 3.75.0 + node-api-version: 0.2.1 + ora: 5.4.1 + read-binary-file-arch: 1.0.6 + semver: 7.7.2 + tar: 6.2.1 + yargs: 17.7.2 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + + /@electron/universal@2.0.1: + resolution: {integrity: sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA==} + engines: {node: '>=16.4'} + dependencies: + '@electron/asar': 3.2.18 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.1 + dir-compare: 4.2.0 + fs-extra: 11.3.0 + minimatch: 9.0.5 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@electron/windows-sign@1.2.2: + resolution: {integrity: sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==} + engines: {node: '>=14.14'} + hasBin: true + requiresBuild: true + dependencies: + cross-dirname: 0.1.0 + debug: 4.4.1 + fs-extra: 11.3.0 + minimist: 1.2.8 + postject: 1.0.0-alpha.6 + transitivePeerDependencies: + - supports-color + dev: true + optional: true + + /@gar/promisify@1.1.3: + resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} + dev: true + + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: true + + /@malept/cross-spawn-promise@2.0.0: + resolution: {integrity: sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==} + engines: {node: '>= 12.13.0'} + dependencies: + cross-spawn: 7.0.6 + dev: true + + /@malept/flatpak-bundler@0.4.0: + resolution: {integrity: sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==} + engines: {node: '>= 10.0.0'} + dependencies: + debug: 4.4.1 + fs-extra: 9.1.0 + lodash: 4.17.21 + tmp-promise: 3.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@npmcli/fs@2.1.2: + resolution: {integrity: sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + '@gar/promisify': 1.1.3 + semver: 7.7.2 + dev: true + + /@npmcli/move-file@2.0.1: + resolution: {integrity: sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + deprecated: This functionality has been moved to @npmcli/fs + dependencies: + mkdirp: 1.0.4 + rimraf: 3.0.2 + dev: true + + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + + /@sindresorhus/is@4.6.0: + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + /@szmarczak/http-timer@4.0.6: + resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} + engines: {node: '>=10'} + dependencies: + defer-to-connect: 2.0.1 + + /@tootallnate/once@2.0.0: + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} + dev: true + + /@types/cacheable-request@6.0.3: + resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + dependencies: + '@types/http-cache-semantics': 4.0.4 + '@types/keyv': 3.1.4 + '@types/node': 22.15.29 + '@types/responselike': 1.0.3 + + /@types/debug@4.1.12: + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + dependencies: + '@types/ms': 2.1.0 + dev: true + + /@types/fs-extra@9.0.13: + resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} + dependencies: + '@types/node': 22.15.29 + dev: true + + /@types/http-cache-semantics@4.0.4: + resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} + + /@types/keyv@3.1.4: + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + dependencies: + '@types/node': 22.15.29 + + /@types/ms@2.1.0: + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + dev: true + + /@types/node@22.15.29: + resolution: {integrity: sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==} + dependencies: + undici-types: 6.21.0 + + /@types/plist@3.0.5: + resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==} + requiresBuild: true + dependencies: + '@types/node': 22.15.29 + xmlbuilder: 15.1.1 + dev: true + optional: true + + /@types/responselike@1.0.3: + resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} + dependencies: + '@types/node': 22.15.29 + + /@types/verror@1.10.11: + resolution: {integrity: sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==} + requiresBuild: true + dev: true + optional: true + + /@types/yauzl@2.10.3: + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + requiresBuild: true + dependencies: + '@types/node': 22.15.29 + dev: false + optional: true + + /@xmldom/xmldom@0.8.10: + resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} + engines: {node: '>=10.0.0'} + dev: true + + /abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + dev: true + + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + dev: true + + /agentkeepalive@4.6.0: + resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} + engines: {node: '>= 8.0.0'} + dependencies: + humanize-ms: 1.2.1 + dev: true + + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: true + + /ajv-keywords@3.5.2(ajv@6.12.6): + resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} + peerDependencies: + ajv: ^6.9.1 + dependencies: + ajv: 6.12.6 + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + + /app-builder-bin@5.0.0-alpha.12: + resolution: {integrity: sha512-j87o0j6LqPL3QRr8yid6c+Tt5gC7xNfYo6uQIQkorAC6MpeayVMZrEDzKmJJ/Hlv7EnOQpaRm53k6ktDYZyB6w==} + dev: true + + /app-builder-lib@26.0.12(dmg-builder@26.0.12)(electron-builder-squirrel-windows@26.0.12): + resolution: {integrity: sha512-+/CEPH1fVKf6HowBUs6LcAIoRcjeqgvAeoSE+cl7Y7LndyQ9ViGPYibNk7wmhMHzNgHIuIbw4nWADPO+4mjgWw==} + engines: {node: '>=14.0.0'} + peerDependencies: + dmg-builder: 26.0.12 + electron-builder-squirrel-windows: 26.0.12 + dependencies: + '@develar/schema-utils': 2.6.5 + '@electron/asar': 3.2.18 + '@electron/fuses': 1.8.0 + '@electron/notarize': 2.5.0 + '@electron/osx-sign': 1.3.1 + '@electron/rebuild': 3.7.0 + '@electron/universal': 2.0.1 + '@malept/flatpak-bundler': 0.4.0 + '@types/fs-extra': 9.0.13 + async-exit-hook: 2.0.1 + builder-util: 26.0.11 + builder-util-runtime: 9.3.1 + chromium-pickle-js: 0.2.0 + config-file-ts: 0.2.8-rc1 + debug: 4.4.1 + dmg-builder: 26.0.12(electron-builder-squirrel-windows@26.0.12) + dotenv: 16.5.0 + dotenv-expand: 11.0.7 + ejs: 3.1.10 + electron-builder-squirrel-windows: 26.0.12(dmg-builder@26.0.12) + electron-publish: 26.0.11 + fs-extra: 10.1.0 + hosted-git-info: 4.1.0 + is-ci: 3.0.1 + isbinaryfile: 5.0.4 + js-yaml: 4.1.0 + json5: 2.2.3 + lazy-val: 1.0.5 + minimatch: 10.0.1 + plist: 3.1.0 + resedit: 1.7.2 + semver: 7.7.2 + tar: 6.2.1 + temp-file: 3.4.0 + tiny-async-pool: 1.3.0 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /assert-plus@1.0.0: + resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} + engines: {node: '>=0.8'} + requiresBuild: true + dev: true + optional: true + + /astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + requiresBuild: true + dev: true + optional: true + + /async-exit-hook@2.0.1: + resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==} + engines: {node: '>=0.12.0'} + dev: true + + /async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + dev: true + + /asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: true + + /at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: true + + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + + /boolean@3.2.0: + resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + requiresBuild: true + dev: false + optional: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + dev: false + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + + /builder-util-runtime@9.3.1: + resolution: {integrity: sha512-2/egrNDDnRaxVwK3A+cJq6UOlqOdedGA7JPqCeJjN2Zjk1/QB/6QUi3b714ScIGS7HafFXTyzJEOr5b44I3kvQ==} + engines: {node: '>=12.0.0'} + dependencies: + debug: 4.4.1 + sax: 1.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /builder-util@26.0.11: + resolution: {integrity: sha512-xNjXfsldUEe153h1DraD0XvDOpqGR0L5eKFkdReB7eFW5HqysDZFfly4rckda6y9dF39N3pkPlOblcfHKGw+uA==} + dependencies: + 7zip-bin: 5.2.0 + '@types/debug': 4.1.12 + app-builder-bin: 5.0.0-alpha.12 + builder-util-runtime: 9.3.1 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.1 + fs-extra: 10.1.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + is-ci: 3.0.1 + js-yaml: 4.1.0 + sanitize-filename: 1.6.3 + source-map-support: 0.5.21 + stat-mode: 1.0.0 + temp-file: 3.4.0 + tiny-async-pool: 1.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /cacache@16.1.3: + resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + '@npmcli/fs': 2.1.2 + '@npmcli/move-file': 2.0.1 + chownr: 2.0.0 + fs-minipass: 2.1.0 + glob: 8.1.0 + infer-owner: 1.0.4 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + mkdirp: 1.0.4 + p-map: 4.0.0 + promise-inflight: 1.0.1 + rimraf: 3.0.2 + ssri: 9.0.1 + tar: 6.2.1 + unique-filename: 2.0.1 + transitivePeerDependencies: + - bluebird + dev: true + + /cacheable-lookup@5.0.4: + resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} + engines: {node: '>=10.6.0'} + + /cacheable-request@7.0.4: + resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} + engines: {node: '>=8'} + dependencies: + clone-response: 1.0.3 + get-stream: 5.2.0 + http-cache-semantics: 4.2.0 + keyv: 4.5.4 + lowercase-keys: 2.0.0 + normalize-url: 6.1.0 + responselike: 2.0.1 + + /call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: true + + /chromium-pickle-js@0.2.0: + resolution: {integrity: sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==} + dev: true + + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + dev: true + + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: true + + /cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + dependencies: + restore-cursor: 3.1.0 + dev: true + + /cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + dev: true + + /cli-truncate@2.1.0: + resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} + engines: {node: '>=8'} + requiresBuild: true + dependencies: + slice-ansi: 3.0.0 + string-width: 4.2.3 + dev: true + optional: true + + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + + /clone-response@1.0.3: + resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} + dependencies: + mimic-response: 1.0.1 + + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: true + + /commander@5.1.0: + resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + engines: {node: '>= 6'} + dev: true + + /commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + requiresBuild: true + dev: true + optional: true + + /compare-version@0.1.2: + resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} + engines: {node: '>=0.10.0'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /config-file-ts@0.2.8-rc1: + resolution: {integrity: sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg==} + dependencies: + glob: 10.4.5 + typescript: 5.8.3 + dev: true + + /core-util-is@1.0.2: + resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} + requiresBuild: true + dev: true + optional: true + + /crc@3.8.0: + resolution: {integrity: sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==} + requiresBuild: true + dependencies: + buffer: 5.7.1 + dev: true + optional: true + + /cross-dirname@0.1.0: + resolution: {integrity: sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==} + requiresBuild: true + dev: true + optional: true + + /cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + + /decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: true + + /defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + requiresBuild: true + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + dev: false + optional: true + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + requiresBuild: true + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + dev: false + optional: true + + /delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: true + + /detect-libc@2.0.4: + resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} + engines: {node: '>=8'} + dev: true + + /detect-node@2.1.0: + resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + requiresBuild: true + dev: false + optional: true + + /dir-compare@4.2.0: + resolution: {integrity: sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==} + dependencies: + minimatch: 3.1.2 + p-limit: 3.1.0 + dev: true + + /dmg-builder@26.0.12(electron-builder-squirrel-windows@26.0.12): + resolution: {integrity: sha512-59CAAjAhTaIMCN8y9kD573vDkxbs1uhDcrFLHSgutYdPcGOU35Rf95725snvzEOy4BFB7+eLJ8djCNPmGwG67w==} + dependencies: + app-builder-lib: 26.0.12(dmg-builder@26.0.12)(electron-builder-squirrel-windows@26.0.12) + builder-util: 26.0.11 + builder-util-runtime: 9.3.1 + fs-extra: 10.1.0 + iconv-lite: 0.6.3 + js-yaml: 4.1.0 + optionalDependencies: + dmg-license: 1.0.11 + transitivePeerDependencies: + - bluebird + - electron-builder-squirrel-windows + - supports-color + dev: true + + /dmg-license@1.0.11: + resolution: {integrity: sha512-ZdzmqwKmECOWJpqefloC5OJy1+WZBBse5+MR88z9g9Zn4VY+WYUkAyojmhzJckH5YbbZGcYIuGAkY5/Ys5OM2Q==} + engines: {node: '>=8'} + os: [darwin] + hasBin: true + requiresBuild: true + dependencies: + '@types/plist': 3.0.5 + '@types/verror': 1.10.11 + ajv: 6.12.6 + crc: 3.8.0 + iconv-corefoundation: 1.1.7 + plist: 3.1.0 + smart-buffer: 4.2.0 + verror: 1.10.1 + dev: true + optional: true + + /dotenv-expand@11.0.7: + resolution: {integrity: sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==} + engines: {node: '>=12'} + dependencies: + dotenv: 16.5.0 + dev: true + + /dotenv@16.5.0: + resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} + engines: {node: '>=12'} + dev: true + + /dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + dev: true + + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + + /ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + jake: 10.9.2 + dev: true + + /electron-builder-squirrel-windows@26.0.12(dmg-builder@26.0.12): + resolution: {integrity: sha512-kpwXM7c/ayRUbYVErQbsZ0nQZX4aLHQrPEG9C4h9vuJCXylwFH8a7Jgi2VpKIObzCXO7LKHiCw4KdioFLFOgqA==} + dependencies: + app-builder-lib: 26.0.12(dmg-builder@26.0.12)(electron-builder-squirrel-windows@26.0.12) + builder-util: 26.0.11 + electron-winstaller: 5.4.0 + transitivePeerDependencies: + - bluebird + - dmg-builder + - supports-color + dev: true + + /electron-builder@26.0.12(electron-builder-squirrel-windows@26.0.12): + resolution: {integrity: sha512-cD1kz5g2sgPTMFHjLxfMjUK5JABq3//J4jPswi93tOPFz6btzXYtK5NrDt717NRbukCUDOrrvmYVOWERlqoiXA==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + app-builder-lib: 26.0.12(dmg-builder@26.0.12)(electron-builder-squirrel-windows@26.0.12) + builder-util: 26.0.11 + builder-util-runtime: 9.3.1 + chalk: 4.1.2 + dmg-builder: 26.0.12(electron-builder-squirrel-windows@26.0.12) + fs-extra: 10.1.0 + is-ci: 3.0.1 + lazy-val: 1.0.5 + simple-update-notifier: 2.0.0 + yargs: 17.7.2 + transitivePeerDependencies: + - bluebird + - electron-builder-squirrel-windows + - supports-color + dev: true + + /electron-publish@26.0.11: + resolution: {integrity: sha512-a8QRH0rAPIWH9WyyS5LbNvW9Ark6qe63/LqDB7vu2JXYpi0Gma5Q60Dh4tmTqhOBQt0xsrzD8qE7C+D7j+B24A==} + dependencies: + '@types/fs-extra': 9.0.13 + builder-util: 26.0.11 + builder-util-runtime: 9.3.1 + chalk: 4.1.2 + form-data: 4.0.2 + fs-extra: 10.1.0 + lazy-val: 1.0.5 + mime: 2.6.0 + transitivePeerDependencies: + - supports-color + dev: true + + /electron-winstaller@5.4.0: + resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} + engines: {node: '>=8.0.0'} + requiresBuild: true + dependencies: + '@electron/asar': 3.4.1 + debug: 4.4.1 + fs-extra: 7.0.1 + lodash: 4.17.21 + temp: 0.9.4 + optionalDependencies: + '@electron/windows-sign': 1.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /electron@36.3.2: + resolution: {integrity: sha512-v0/j7n22CL3OYv9BIhq6JJz2+e1HmY9H4bjTk8/WzVT9JwVX/T/21YNdR7xuQ6XDSEo9gP5JnqmjOamE+CUY8Q==} + engines: {node: '>= 12.20.55'} + hasBin: true + requiresBuild: true + dependencies: + '@electron/get': 2.0.3 + '@types/node': 22.15.29 + extract-zip: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: true + + /encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + requiresBuild: true + dependencies: + iconv-lite: 0.6.3 + dev: true + optional: true + + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + + /env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + + /err-code@2.0.3: + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} + dev: true + + /es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + requiresBuild: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + requiresBuild: true + + /es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + dev: true + + /es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + dev: true + + /es6-error@4.1.1: + resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + requiresBuild: true + dev: false + optional: true + + /escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + requiresBuild: true + dev: false + optional: true + + /exponential-backoff@3.1.2: + resolution: {integrity: sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==} + dev: true + + /extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + dependencies: + debug: 4.4.1 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + dev: false + + /extsprintf@1.4.1: + resolution: {integrity: sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==} + engines: {'0': node >=0.6.0} + requiresBuild: true + dev: true + optional: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + requiresBuild: true + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + requiresBuild: true + dev: true + + /fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + dependencies: + pend: 1.2.0 + dev: false + + /filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + dependencies: + minimatch: 5.1.6 + dev: true + + /foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + dev: true + + /form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + mime-types: 2.1.35 + dev: true + + /fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + + /fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + + /fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: false + + /fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + dependencies: + at-least-node: 1.0.0 + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + + /fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + + /get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + dev: true + + /get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + dev: true + + /get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + dependencies: + pump: 3.0.2 + + /glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + + /global-agent@3.0.0: + resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} + engines: {node: '>=10.0'} + requiresBuild: true + dependencies: + boolean: 3.2.0 + es6-error: 4.1.1 + matcher: 3.0.0 + roarr: 2.15.4 + semver: 7.7.2 + serialize-error: 7.0.1 + dev: false + optional: true + + /globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + requiresBuild: true + dependencies: + define-properties: 1.2.1 + gopd: 1.2.0 + dev: false + optional: true + + /gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + requiresBuild: true + + /got@11.8.6: + resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} + engines: {node: '>=10.19.0'} + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 4.0.6 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.3 + cacheable-lookup: 5.0.4 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + http2-wrapper: 1.0.3 + lowercase-keys: 2.0.0 + p-cancelable: 2.1.1 + responselike: 2.0.1 + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + requiresBuild: true + dependencies: + es-define-property: 1.0.1 + dev: false + optional: true + + /has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.1.0 + dev: true + + /hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + dependencies: + lru-cache: 6.0.0 + dev: true + + /http-cache-semantics@4.2.0: + resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} + + /http-proxy-agent@5.0.0: + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} + dependencies: + '@tootallnate/once': 2.0.0 + agent-base: 6.0.2 + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.3 + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /http2-wrapper@1.0.3: + resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} + engines: {node: '>=10.19.0'} + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.3 + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: true + + /iconv-corefoundation@1.1.7: + resolution: {integrity: sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==} + engines: {node: ^8.11.2 || >=10} + os: [darwin] + requiresBuild: true + dependencies: + cli-truncate: 2.1.0 + node-addon-api: 1.7.2 + dev: true + optional: true + + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + requiresBuild: true + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + + /infer-owner@1.0.4: + resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /ip-address@9.0.5: + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.3 + dev: true + + /is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + dependencies: + ci-info: 3.9.0 + dev: true + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + + /is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + dev: true + + /is-lambda@1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + dev: true + + /is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + dev: true + + /isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + dev: true + + /isbinaryfile@5.0.4: + resolution: {integrity: sha512-YKBKVkKhty7s8rxddb40oOkuP0NbaeXrQvLin6QMHL7Ypiy2RW9LwOVrVgZRyOrhQlayMd9t+D8yDy8MKFTSDQ==} + engines: {node: '>= 18.0.0'} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + + /jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + async: 3.2.6 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + requiresBuild: true + dev: true + + /json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + requiresBuild: true + dev: false + optional: true + + /json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + optionalDependencies: + graceful-fs: 4.2.11 + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + + /lazy-val@1.0.5: + resolution: {integrity: sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==} + dev: true + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + dev: true + + /lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + + /lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + dev: true + + /make-fetch-happen@10.2.1: + resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + agentkeepalive: 4.6.0 + cacache: 16.1.3 + http-cache-semantics: 4.2.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-lambda: 1.0.1 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-fetch: 2.1.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + negotiator: 0.6.4 + promise-retry: 2.0.1 + socks-proxy-agent: 7.0.0 + ssri: 9.0.1 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + + /matcher@3.0.0: + resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} + engines: {node: '>=10'} + requiresBuild: true + dependencies: + escape-string-regexp: 4.0.0 + dev: false + optional: true + + /math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + dev: true + + /mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + dev: true + + /mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + dev: true + + /mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + dev: true + + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + + /mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + + /mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + /minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /minipass-collect@1.0.2: + resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + + /minipass-fetch@2.1.2: + resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minipass: 3.3.6 + minipass-sized: 1.0.3 + minizlib: 2.1.2 + optionalDependencies: + encoding: 0.1.13 + dev: true + + /minipass-flush@1.0.5: + resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: true + + /minipass-pipeline@1.2.4: + resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} + engines: {node: '>=8'} + dependencies: + minipass: 3.3.6 + dev: true + + /minipass-sized@1.0.3: + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} + dependencies: + minipass: 3.3.6 + dev: true + + /minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: true + + /minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: true + + /minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + + /minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: true + + /mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + /negotiator@0.6.4: + resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} + engines: {node: '>= 0.6'} + dev: true + + /node-abi@3.75.0: + resolution: {integrity: sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==} + engines: {node: '>=10'} + dependencies: + semver: 7.7.2 + dev: true + + /node-addon-api@1.7.2: + resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} + requiresBuild: true + dev: true + optional: true + + /node-api-version@0.2.1: + resolution: {integrity: sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==} + dependencies: + semver: 7.7.2 + dev: true + + /nopt@6.0.0: + resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: true + + /normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + requiresBuild: true + dev: false + optional: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + dev: true + + /p-cancelable@2.1.1: + resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} + engines: {node: '>=8'} + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: true + + /package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + dev: true + + /pe-library@0.4.1: + resolution: {integrity: sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==} + engines: {node: '>=12', npm: '>=6'} + dev: true + + /pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + dev: false + + /plist@3.1.0: + resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} + engines: {node: '>=10.4.0'} + dependencies: + '@xmldom/xmldom': 0.8.10 + base64-js: 1.5.1 + xmlbuilder: 15.1.1 + dev: true + + /postject@1.0.0-alpha.6: + resolution: {integrity: sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==} + engines: {node: '>=14.0.0'} + hasBin: true + requiresBuild: true + dependencies: + commander: 9.5.0 + dev: true + optional: true + + /proc-log@2.0.1: + resolution: {integrity: sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dev: true + + /progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + dev: false + + /promise-inflight@1.0.1: + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + dev: true + + /promise-retry@2.0.1: + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} + dependencies: + err-code: 2.0.3 + retry: 0.12.0 + dev: true + + /pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + requiresBuild: true + dev: true + + /quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + + /read-binary-file-arch@1.0.6: + resolution: {integrity: sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==} + hasBin: true + dependencies: + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: true + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + + /resedit@1.7.2: + resolution: {integrity: sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==} + engines: {node: '>=12', npm: '>=6'} + dependencies: + pe-library: 0.4.1 + dev: true + + /resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + + /responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + dependencies: + lowercase-keys: 2.0.0 + + /restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + dev: true + + /retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + dev: true + + /rimraf@2.6.3: + resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /roarr@2.15.4: + resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} + engines: {node: '>=8.0'} + requiresBuild: true + dependencies: + boolean: 3.2.0 + detect-node: 2.1.0 + globalthis: 1.0.4 + json-stringify-safe: 5.0.1 + semver-compare: 1.0.0 + sprintf-js: 1.1.3 + dev: false + optional: true + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true + + /sanitize-filename@1.6.3: + resolution: {integrity: sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==} + dependencies: + truncate-utf8-bytes: 1.0.2 + dev: true + + /sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + dev: true + + /semver-compare@1.0.0: + resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + requiresBuild: true + dev: false + optional: true + + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: false + + /semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} + engines: {node: '>=10'} + hasBin: true + requiresBuild: true + + /serialize-error@7.0.1: + resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} + engines: {node: '>=10'} + requiresBuild: true + dependencies: + type-fest: 0.13.1 + dev: false + optional: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + + /simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} + dependencies: + semver: 7.7.2 + dev: true + + /slice-ansi@3.0.0: + resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} + engines: {node: '>=8'} + requiresBuild: true + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: true + optional: true + + /smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: true + + /socks-proxy-agent@7.0.0: + resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} + engines: {node: '>= 10'} + dependencies: + agent-base: 6.0.2 + debug: 4.4.1 + socks: 2.8.4 + transitivePeerDependencies: + - supports-color + dev: true + + /socks@2.8.4: + resolution: {integrity: sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + dependencies: + ip-address: 9.0.5 + smart-buffer: 4.2.0 + dev: true + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + requiresBuild: true + + /ssri@9.0.1: + resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minipass: 3.3.6 + dev: true + + /stat-mode@1.0.0: + resolution: {integrity: sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==} + engines: {node: '>= 6'} + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: true + + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.1.0 + dev: true + + /sumchecker@3.0.1: + resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} + engines: {node: '>= 8.0'} + dependencies: + debug: 4.4.1 + transitivePeerDependencies: + - supports-color + dev: false + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: true + + /temp-file@3.4.0: + resolution: {integrity: sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==} + dependencies: + async-exit-hook: 2.0.1 + fs-extra: 10.1.0 + dev: true + + /temp@0.9.4: + resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==} + engines: {node: '>=6.0.0'} + dependencies: + mkdirp: 0.5.6 + rimraf: 2.6.3 + dev: true + + /tiny-async-pool@1.3.0: + resolution: {integrity: sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==} + dependencies: + semver: 5.7.2 + dev: true + + /tmp-promise@3.0.3: + resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} + dependencies: + tmp: 0.2.3 + dev: true + + /tmp@0.2.3: + resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} + engines: {node: '>=14.14'} + dev: true + + /truncate-utf8-bytes@1.0.2: + resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} + dependencies: + utf8-byte-length: 1.0.5 + dev: true + + /type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + requiresBuild: true + dev: false + optional: true + + /typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + /unique-filename@2.0.1: + resolution: {integrity: sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + unique-slug: 3.0.0 + dev: true + + /unique-slug@3.0.0: + resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + imurmurhash: 0.1.4 + dev: true + + /universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + requiresBuild: true + dependencies: + punycode: 2.3.1 + dev: true + + /utf8-byte-length@1.0.5: + resolution: {integrity: sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==} + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /verror@1.10.1: + resolution: {integrity: sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==} + engines: {node: '>=0.6.0'} + requiresBuild: true + dependencies: + assert-plus: 1.0.0 + core-util-is: 1.0.2 + extsprintf: 1.4.1 + dev: true + optional: true + + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + /xmlbuilder@15.1.1: + resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==} + engines: {node: '>=8.0'} + dev: true + + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + + /yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + dev: false + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + + github.com/electron/node-gyp/06b29aafb7708acef8b3669835c8a7857ebc92d2: + resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2} + name: '@electron/node-gyp' + version: 10.2.0-electron.1 + engines: {node: '>=12.13.0'} + hasBin: true + dependencies: + env-paths: 2.2.1 + exponential-backoff: 3.1.2 + glob: 8.1.0 + graceful-fs: 4.2.11 + make-fetch-happen: 10.2.1 + nopt: 6.0.0 + proc-log: 2.0.1 + semver: 7.7.2 + tar: 6.2.1 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true diff --git a/demos/with-electron/src/ezuikit.js b/demos/with-electron/src/ezuikit.js new file mode 100644 index 0000000..9cb44d7 --- /dev/null +++ b/demos/with-electron/src/ezuikit.js @@ -0,0 +1,129 @@ +/* +* ezuikit.js v8.1.10 +* ezuikit javascript for npm +* Copyright (c) 2025-05-26 Ezviz-OpenBiz +* Released under the MIT License. +*/ +!function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A="undefined"!=typeof globalThis?globalThis:A||self).EZUIKit=e()}(this,(function(){"use strict";function A(A){return A&&"undefined"!=typeof Symbol&&A.constructor===Symbol?"symbol":typeof A}Date.prototype.Format=function(A){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var t in/(y+)/.test(A)&&(A=A.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+t+")").test(A)&&(A=A.replace(RegExp.$1,1==RegExp.$1.length?e[t]:("00"+e[t]).substr((""+e[t]).length)));return A};var e=function(A,e,t,i){var n=document.getElementsByTagName("head")[0].getElementsByTagName("script"),a=!1;if(t)a=t();else for(var r=0;r3){var t=e[1],i=e[2],n="1"===e[3],a="live";return A.indexOf("rec=local")>-1?a="rec":A.indexOf("rec=cloud")>-1&&(a="cloud.rec"),{deviceSerial:t,channelNo:i,hd:n,type:a}}return{}};var c=function(e,t,i,n,a,r){var o=e,s=new XMLHttpRequest;s.onreadystatechange=function(){if(4==s.readyState&&200==s.status)if(function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!==(void 0===t?"undefined":A(t))||!t)}catch(A){return!1}}(s.responseText)){var e=JSON.parse(s.responseText);a(e)}else a(s.responseText)},s.open(t,o,!0);var g=new FormData;for(var l in i)g.append(l,i[l]);if(n&&"object"===(void 0===n?"undefined":A(n)))for(var l in n)s.setRequestHeader(l,n[l]);s.send(g)},d=function(){return!!window&&navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i)},I=function(){function A(A,t){var i=this;e("https://open.ys7.com/assets/ezuikit_v3.4/js/hls.js",(function(){window.Hls.isSupported()&&i.initHLS(A,t)}),(function(){return!!window.Hls}))}var t=A.prototype;return t.toString=function(){return"hls "+this.coreX+"-"+this.coreY},t.initHLS=function(A,e){var t=l(e);t.deviceSerial,t.channelNo,t.hd;var i=document.getElementById(A),n=new window.Hls({defaultAudioCodec:"mp4a.40.2"});n.loadSource(e),n.attachMedia(i),n.on(window.Hls.Events.MANIFEST_PARSED,(function(){i.play()})),n.on(window.Hls.Events.ERROR,(function(A,e){if(e.fatal)switch(e.type){case window.Hls.ErrorTypes.NETWORK_ERROR:n.startLoad();break;case window.Hls.ErrorTypes.MEDIA_ERROR:n.recoverMediaError();break;default:n.destroy()}})),this.hls=n,this.video=i,this.hlsUrl=e},t.play=function(){this.hls.startLoad(),this.video.play()},t.stop=function(){this.video.pause(),this.hls.stopLoad()},A}(),C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var u,B={exports:{}};var E=(u||(u=1,function(A,e){function t(A,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](A):A instanceof e}function i(A){return A&&"undefined"!=typeof Symbol&&A.constructor===Symbol?"symbol":typeof A}!function(t,n){"object"==i(e)&&"object"==i(A)?A.exports=n():"object"==i(e)?e.flvjs=n():t.flvjs=n()}(globalThis,(function(){return function(){var A={343:function(A){var e=function(){},t=function(A,e,t){this.fn=A,this.context=e,this.once=t||!1},i=function(A,e,i,n,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var r=new t(i,n||A,a),s=o?o+e:e;return A._events[s]?A._events[s].fn?A._events[s]=[A._events[s],r]:A._events[s].push(r):(A._events[s]=r,A._eventsCount++),A},n=function(A,t){0==--A._eventsCount?A._events=new e:delete A._events[t]},a=function(){this._events=new e,this._eventsCount=0},r=Object.prototype.hasOwnProperty,o="~";Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(o=!1)),a.prototype.eventNames=function(){var A,e,t=[];if(0===this._eventsCount)return t;for(e in A=this._events)r.call(A,e)&&t.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(A)):t},a.prototype.listeners=function(A){var e=o?o+A:A,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var i=0,n=t.length,a=new Array(n);i=A[n]&&e0&&A[0].originalDts=e[n].dts&&A((null===(e=t[n].lastSample)||void 0===e?void 0:e.originalDts)||0)&&A=((null===(t=null===(e=i[a])||void 0===e?void 0:e.lastSample)||void 0===t?void 0:t.originalDts)||0)&&(a===i.length-1||a0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)},A.prototype.getLastSegmentBefore=function(A){var e=this._searchNearestSegmentBefore(A);return e>=0?this._list[e]:null},A.prototype.getLastSampleBefore=function(A){var e=this.getLastSegmentBefore(A);return null!=e?e.lastSample:null},A.prototype.getLastSyncPointBefore=function(A){for(var e=this._searchNearestSegmentBefore(A),t=this._list[e].syncPoints;0===t.length&&e>0;)e--,t=this._list[e].syncPoints;return t.length>0?t[t.length-1]:null},A}()},976:function(A,e,n){var a=function(A,e,t){var i=A;if(e+t=128){e.push(String.fromCharCode(65535&r)),i+=2;continue}}else if(t[i]<240){if(a(t,i,2)&&(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2])>=2048&&55296!=(63488&r)){e.push(String.fromCharCode(65535&r)),i+=3;continue}}else if(t[i]<248){var r;if(a(t,i,3)&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3])>65536&&r<1114112){r-=65536,e.push(String.fromCharCode(r>>>10|55296)),e.push(String.fromCharCode(1023&r|56320)),i+=4;continue}}e.push(String.fromCharCode(65533)),++i}return e.join("")},u=n(713),B=(g=new ArrayBuffer(2),new DataView(g).setInt16(0,256,!0),256===new Int16Array(g)[0]),E=function(){function A(){}return A.parseScriptData=function(e,t,i){var n={};try{var a=A.parseValue(e,t,i),r=A.parseValue(e,t+a.size,i-a.size);n[a.data]=r.data}catch(A){d.A.e("AMF",A.toString())}return n},A.parseObject=function(e,t,i){if(i<3)throw new u.j4("Data not enough when parse ScriptDataObject");var n=A.parseString(e,t,i),a=A.parseValue(e,t+n.size,i-n.size),r=a.objectEnd;return{data:{name:n.data,value:a.data},size:n.size+a.size,objectEnd:r}},A.parseVariable=function(e,t,i){return A.parseObject(e,t,i)},A.parseString=function(A,e,t){if(t<2)throw new u.j4("Data not enough when parse String");var i=new DataView(A,e,t).getUint16(0,!B);return{data:i>0?h(new Uint8Array(A,e+2,i)):"",size:2+i}},A.parseLongString=function(A,e,t){if(t<4)throw new u.j4("Data not enough when parse LongString");var i=new DataView(A,e,t).getUint32(0,!B);return{data:i>0?h(new Uint8Array(A,e+4,i)):"",size:4+i}},A.parseDate=function(A,e,t){if(t<10)throw new u.j4("Data size invalid when parse Date");var i=new DataView(A,e,t),n=i.getFloat64(0,!B),a=i.getInt16(8,!B);return{data:new Date(n+=60*a*1e3),size:10}},A.parseValue=function(e,t,i){if(i<1)throw new u.j4("Data not enough when parse Value");var n,a=new DataView(e,t,i),r=1,o=a.getUint8(0),s=!1;try{switch(o){case 0:n=a.getFloat64(1,!B),r+=8;break;case 1:n=!!a.getUint8(1),r+=1;break;case 2:var g=A.parseString(e,t+1,i-1);n=g.data,r+=g.size;break;case 3:n={};var l=0;for(9==(16777215&a.getUint32(i-4,!B))&&(l=3);r32)throw new u.Qn("ExpGolomb: readBits() bits exceeded max 32bits!");if(A<=this._current_word_bits_left){var e=this._current_word>>>32-A;return this._current_word<<=A,this._current_word_bits_left-=A,e}var t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;var i=A-this._current_word_bits_left;this._fillCurrentWord();var n=Math.min(i,this._current_word_bits_left),a=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,t<>>A)return this._current_word<<=A,this._current_word_bits_left-=A,A;return this._fillCurrentWord(),A+this._skipLeadingZero()},A.prototype.readUEG=function(){var A=this._skipLeadingZero();return this.readBits(A+1)-1},A.prototype.readSEG=function(){var A=this.readUEG();return 1&A?A+1>>>1:-1*(A>>>1)},A}(),Q=function(){function A(){}return A._ebsp2rbsp=function(A){for(var e=A,t=e.byteLength,i=new Uint8Array(t),n=0,a=0;a=2&&3===e[a]&&0===e[a-1]&&0===e[a-2]||(i[n]=e[a],n++);return new Uint8Array(i.buffer,0,n)},A.parseSPS=function(e){for(var t=e.subarray(1,4),i="avc1.",n=0;n<3;n++){var a=t[n].toString(16);a.length<2&&(a="0"+a),i+=a}var r=A._ebsp2rbsp(e),o=new f(r);o.readByte();var s=o.readByte();o.readByte();var g=o.readByte();o.readUEG();var l=A.getProfileString(s),c=A.getLevelString(g),d=1,I=420,C=8,h=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(3===(d=o.readUEG())&&o.readBits(1),d<=3&&(I=[0,420,422,444][d]),C=o.readUEG()+8,h=o.readUEG()+8,o.readBits(1),o.readBool()))for(var u=3!==d?8:12,B=0;B0&&N<16?(w=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][N-1],b=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][N-1]):255===N&&(w=o.readByte()<<8|o.readByte(),b=o.readByte()<<8|o.readByte())}if(o.readBool()&&o.readBool(),o.readBool()&&(o.readBits(4),o.readBool()&&o.readBits(24)),o.readBool()&&(o.readUEG(),o.readUEG()),o.readBool()){var T=o.readBits(32),M=o.readBits(32);R=o.readBool(),F=(k=M)/(P=2*T)}}var L=1;1===w&&1===b||(L=w/b);var G=0,Y=0;0===d?(G=1,Y=2-y):(G=3===d?1:2,Y=(1===d?2:1)*(2-y));var U=16*(p+1),J=16*(m+1)*(2-y);U-=(_+S)*G,J-=(D+v)*Y;var H=Math.ceil(U*L);return o.destroy(),o=null,{codec_mimetype:i,profile_idc:s,level_idc:g,profile_string:l,level_string:c,chroma_format_idc:d,bit_depth:C,bit_depth_luma:C,bit_depth_chroma:h,ref_frames:x,chroma_format:I,chroma_format_string:A.getChromaFormatString(I),frame_rate:{fixed:R,fps:F,fps_den:P,fps_num:k},sar_ratio:{width:w,height:b},codec_size:{width:U,height:J},present_size:{width:H,height:J}}},A._skipScalingList=function(A,e){for(var t=8,i=8,n=0;n=2&&3===e[a]&&0===e[a-1]&&0===e[a-2]||(i[n]=e[a],n++);return new Uint8Array(i.buffer,0,n)},A.parseVPS=function(e){var t=A._ebsp2rbsp(e),i=new f(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}},A.parseSPS=function(e){var t=A._ebsp2rbsp(e),i=new f(t);i.readByte(),i.readByte();for(var n=0,a=0,r=0,o=0,s=(i.readBits(4),i.readBits(3)),g=(i.readBool(),i.readBits(2)),l=i.readBool(),c=i.readBits(5),d=i.readByte(),I=i.readByte(),C=i.readByte(),h=i.readByte(),u=i.readByte(),B=i.readByte(),E=i.readByte(),Q=i.readByte(),x=i.readByte(),p=i.readByte(),m=i.readByte(),y=[],_=[],S=0;S0)for(S=s;S<8;S++)i.readBits(2);for(S=0;S1&&i.readSEG(),S=0;S0&&z<=16?(j=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][z-1],W=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][z-1]):255===z&&(j=i.readBits(16),W=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),i.readBool()&&(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG()),i.readBool()&&(X=i.readBits(32),q=i.readBits(32),i.readBool()&&i.readUEG(),i.readBool())){var $,AA,eA=!1;for($=i.readBool(),AA=i.readBool(),($||AA)&&((eA=i.readBool())&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),eA&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5)),S=0;S<=s;S++){var tA=i.readBool();Z=tA;var iA=!1,nA=1;tA||(iA=i.readBool());var aA=!1;if(iA?i.readSEG():aA=i.readBool(),aA||(nA=i.readUEG()+1),$)for(Y=0;Y>3,a=!!(4&e[i]),r=!!(2&e[i]);e[i],i+=1,a&&(i+=1);var o=Number.POSITIVE_INFINITY;if(r){o=0;for(var s=0;o|=(127&e[i])<<7*s,128&e[i+=1];s++);}1===n&&(t=A.parseSeuqneceHeader(e.subarray(i,i+o))),i+=o}return t},A.parseSeuqneceHeader=function(e){var t=new f(e),i=t.readBits(3),n=(t.readBool(),t.readBool()),a=!0,r=0,o=0,s=[];if(n)s.push({operating_point_idc:0,level:t.readBits(5),tier:0});else{if(t.readBool()){var g=t.readBits(32),l=t.readBits(32),c=t.readBool();if(c){for(var d=0;0===t.readBits(1);)d+=1;d>=32||t.readBits(d)}r=l,o=g,a=c,t.readBool()&&(t.readBits(5),t.readBits(32),t.readBits(5),t.readBits(5))}for(var I=t.readBool(),C=t.readBits(5),h=0;h<=C;h++){var u=t.readBits(12),B=t.readBits(5),E=B>7?t.readBits(1):0;s.push({operating_point_idc:u,level:B,tier:E}),I&&t.readBool()&&t.readBits(4)}}var Q=s[0],x=Q.level,p=Q.tier,m=t.readBits(4),y=t.readBits(4),_=t.readBits(m+1)+1,S=t.readBits(y+1)+1,D=!1;n||(D=t.readBool()),D&&(t.readBits(4),t.readBits(4)),t.readBool(),t.readBool(),t.readBool();var v=!1;n||(t.readBool(),t.readBool(),t.readBool(),t.readBool(),(v=t.readBool())&&(t.readBool(),t.readBool()),(t.readBool()||t.readBits(1))&&(t.readBool()||t.readBits(1)),v&&t.readBits(3)),t.readBool(),t.readBool(),t.readBool();var w=t.readBool(),b=8;b=2===i&&w?t.readBool()?12:10:w?10:8;var F=!1;1!==i&&(F=t.readBool()),t.readBool()&&(t.readBits(8),t.readBits(8),t.readBits(8));var R=1,k=1;return F?(t.readBits(1),R=1,k=1):(t.readBits(1),0===i?(R=1,k=1):1===i?(R=0,k=0):12===b?t.readBits(1)&&t.readBits(1):(R=1,k=0),R&&k&&t.readBits(2),t.readBits(1)),t.readBool(),t.destroy(),t=null,{codec_mimetype:"av01.".concat(i,".").concat(A.getLevelString(x,p),".").concat(b.toString(10).padStart(2,"0")),level:x,tier:p,level_string:A.getLevelString(x,p),profile_idc:i,profile_string:"".concat(i),bit_depth:b,ref_frames:1,chroma_format:A.getChromaFormat(F,R,k),chroma_format_string:A.getChromaFormatString(F,R,k),frame_rate:{fixed:a,fps:r/o,fps_den:o,fps_num:r},sar_ratio:{width:1,height:1},codec_size:{width:_,height:S},present_size:{width:1*_,height:S}}},A.getLevelString=function(A,e){return"".concat(A.toString(10).padStart(2,"0")).concat(0===e?"M":"H")},A.getChromaFormat=function(A,e,t){return A?0:0===e&&0===t?3:1===e&&0===t?2:1===e&&1===t?1:Number.NaN},A.getChromaFormatString=function(A,e,t){return A?"4:0:0":0===e&&0===t?"4:4:4":1===e&&0===t?"4:2:2":1===e&&1===t?"4:2:0":"Unknown"},A}(),_=function(){function A(A,e){var t;this.TAG="FLVDemuxer",this._config=e,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=A.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=A.hasAudioTrack,this._hasVideo=A.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new C.A,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=(t=new ArrayBuffer(2),new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0])}return A.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},A.probe=function(A){var e=new Uint8Array(A);if(e.byteLength<9)return{needMoreData:!0};var t={match:!1};if(70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3])return t;var i,n=(4&e[4])>>>2!=0,a=!!(1&e[4]),r=(i=e)[5]<<24|i[6]<<16|i[7]<<8|i[8];return r<9?t:{match:!0,consumed:r,dataOffset:r,hasAudioTrack:n,hasVideoTrack:a}},A.prototype.bindDataSource=function(A){return A.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(A.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(A){this._onTrackMetadata=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(A){this._onMediaInfo=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(A){this._onMetaDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(A){this._onScriptDataArrived=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onError",{get:function(){return this._onError},set:function(A){this._onError=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(A){this._onDataAvailable=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(A){this._timestampBase=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"overridedDuration",{get:function(){return this._duration},set:function(A){this._durationOverrided=!0,this._duration=A,this._mediaInfo&&(this._mediaInfo.duration=A)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"overridedHasAudio",{set:function(A){this._hasAudioFlagOverrided=!0,this._hasAudio=A,this._mediaInfo&&(this._mediaInfo.hasAudio=A)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"overridedHasVideo",{set:function(A){this._hasVideoFlagOverrided=!0,this._hasVideo=A,this._mediaInfo&&(this._mediaInfo.hasVideo=A)},enumerable:!1,configurable:!0}),A.prototype.resetMediaInfo=function(){this._mediaInfo=new C.A},A.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},A.prototype.parseChunks=function(e,t){var i,n;if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new u.j4("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var a=0,r=this._littleEndian;if(0===t){if(!(e.byteLength>13))return 0;var o=A.probe(e);a=(null==o?void 0:o.dataOffset)||0}for(this._firstParse&&(this._firstParse=!1,t+a!==this._dataOffset&&d.A.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(s=new DataView(e,a)).getUint32(0,!r)&&d.A.w(this.TAG,"PrevTagSize0 !== 0 !!!"),a+=4);ae.byteLength)break;var g=s.getUint8(0),l=16777215&s.getUint32(0,!r);if(a+11+l+4>e.byteLength)break;if(8===g||9===g||18===g){var c=s.getUint8(4),I=s.getUint8(5),C=s.getUint8(6)|I<<8|c<<16|s.getUint8(7)<<24;16777215&s.getUint32(7,!r)&&d.A.w(this.TAG,"Meet tag which has StreamID != 0!");var h=a+11;switch(g){case 8:this._parseAudioData(e,h,l,C);break;case 9:this._parseVideoData(e,h,l,C,t+a);break;case 18:this._parseScriptData(e,h,l)}var B=s.getUint32(11+l,!r);B!==11+l&&d.A.w(this.TAG,"Invalid PrevTagSize ".concat(B)),a+=11+l+4}else d.A.w(this.TAG,"Unsupported tag type ".concat(g,", skipped")),a+=11+l+4}return this._isInitialMetadataDispatched()&&this._dispatch&&((null===(i=this._audioTrack)||void 0===i?void 0:i.length)||(null===(n=this._videoTrack)||void 0===n?void 0:n.length))&&this._onDataAvailable(this._audioTrack,this._videoTrack),a},A.prototype._parseScriptData=function(A,e,t){var n,a,r,o=E.parseScriptData(A,e,t);if(o.hasOwnProperty("onMetaData")){if(null==o.onMetaData||"object"!=i(o.onMetaData))return void d.A.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&d.A.w(this.TAG,"Found another onMetaData tag!"),this._metadata=o;var s=null===(n=this._metadata)||void 0===n?void 0:n.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),"boolean"==typeof(null==s?void 0:s.hasAudio)&&(this._hasAudioFlagOverrided||(this._hasAudio=s.hasAudio,this._mediaInfo&&(this._mediaInfo.hasAudio=this._hasAudio))),"boolean"==typeof(null==s?void 0:s.hasVideo)&&(this._hasVideoFlagOverrided||(this._hasVideo=s.hasVideo,this._mediaInfo&&(this._mediaInfo.hasVideo=this._hasVideo))),"number"==typeof(null==s?void 0:s.audiodatarate)&&this._mediaInfo&&(this._mediaInfo.audioDataRate=s.audiodatarate),"number"==typeof(null==s?void 0:s.videodatarate)&&this._mediaInfo&&(this._mediaInfo.videoDataRate=s.videodatarate),"number"==typeof(null==s?void 0:s.width)&&this._mediaInfo&&(this._mediaInfo.width=s.width),"number"==typeof(null==s?void 0:s.height)&&this._mediaInfo&&(this._mediaInfo.height=s.height),"number"==typeof(null==s?void 0:s.duration)){if(!this._durationOverrided){var g=Math.floor(s.duration*this._timescale);this._duration=g,this._mediaInfo&&(this._mediaInfo.duration=g)}}else this._mediaInfo&&(this._mediaInfo.duration=0);if("number"==typeof(null==s?void 0:s.framerate)){var l=Math.floor(1e3*s.framerate);if(l>0){var c=l/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=c,this._referenceFrameRate.fps_num=l,this._referenceFrameRate.fps_den=1e3,this._mediaInfo&&(this._mediaInfo.fps=c)}}if("object"==i(null==s?void 0:s.keyframes)){this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!0);var I=s.keyframes;this._mediaInfo&&(this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(I)),s.keyframes=null}else this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!1);this._dispatch=!1,this._mediaInfo&&(this._mediaInfo.metadata=s),d.A.v(this.TAG,"Parsed onMetaData"),(null===(a=this._mediaInfo)||void 0===a?void 0:a.isComplete())&&(null===(r=this._onMediaInfo)||void 0===r||r.call(this,this._mediaInfo))}Object.keys(o).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},o))},A.prototype._parseKeyframesIndex=function(A){for(var e=[],t=[],i=1;i>>4;if(2===u||10===u){var B=0,E=(12&h)>>>2;if(E>=0&&E<=4){B=this._flvSoundRateTable[E];var f=1&h,Q=this._audioMetadata,p=this._audioTrack;if(Q||(!1!==this._hasAudio||this._hasAudioFlagOverrided||(this._hasAudio=!0,this._mediaInfo&&(this._mediaInfo.hasAudio=!0)),(Q=this._audioMetadata={}).type="audio",Q.id=null==p?void 0:p.id,Q.timescale=this._timescale,Q.duration=this._duration,Q.audioSampleRate=B,Q.channelCount=0===f?1:2),10===u){var y=this._parseAACAudioData(A,e+1,t-1);if(void 0===y)return;if(0===(null==y?void 0:y.packetType)){if(null==Q?void 0:Q.config){if(m(y.data.config,null==Q?void 0:Q.config))return;d.A.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var _=y.data;Q.audioSampleRate=null==_?void 0:_.samplingRate,Q.channelCount=null==_?void 0:_.channelCount,Q.codec=null==_?void 0:_.codec,Q.originalCodec=null==_?void 0:_.originalCodec,Q.config=null==_?void 0:_.config,Q.refSampleDuration=1024/Q.audioSampleRate*Q.timescale,d.A.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&((null===(r=this._audioTrack)||void 0===r?void 0:r.length)||(null===(o=this._videoTrack)||void 0===o?void 0:o.length))&&(null===(s=this._onDataAvailable)||void 0===s||s.call(this,this._audioTrack,this._videoTrack)):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,null===(g=this._onTrackMetadata)||void 0===g||g.call(this,"audio",Q),(v=this._mediaInfo).audioCodec=Q.originalCodec||"",v.audioSampleRate=Q.audioSampleRate,v.audioChannelCount=Q.channelCount,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',(null==v?void 0:v.isComplete())&&(null===(l=this._onMediaInfo)||void 0===l||l.call(this,v))}else if(1===y.packetType){var S=this._timestampBase+i,D={unit:y.data,length:y.data.byteLength,dts:S,pts:S};p&&(null==p||p.samples.push(D),p.length+=(null===(c=null==y?void 0:y.data)||void 0===c?void 0:c.length)||0)}else d.A.e(this.TAG,"Flv: Unsupported AAC data type ".concat(y.packetType))}else if(2===u){if(!Q.codec){var v;if(void 0===(_=this._parseMP3AudioData(A,e+1,t-1,!0)))return;Q.audioSampleRate=_.samplingRate,Q.channelCount=_.channelCount,Q.codec=_.codec,Q.originalCodec=_.originalCodec,Q.refSampleDuration=1152/Q.audioSampleRate*Q.timescale,d.A.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,null===(I=this._onTrackMetadata)||void 0===I||I.call(this,"audio",Q),(v=this._mediaInfo).audioCodec=Q.codec,v.audioSampleRate=Q.audioSampleRate,v.audioChannelCount=Q.channelCount,v.audioDataRate=_.bitRate,(null==v?void 0:v.hasVideo)?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&(null===(C=this._onMediaInfo)||void 0===C||C.call(this,v))}var w=this._parseMP3AudioData(A,e+1,t-1,!1);if(void 0===w)return;S=this._timestampBase+i;var b={unit:w,length:w.byteLength,dts:S,pts:S};null==p||p.samples.push(b),p&&(p.length+=w.length)}}else null===(a=this._onError)||void 0===a||a.call(this,x.A.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+E)}else null===(n=this._onError)||void 0===n||n.call(this,x.A.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+u)}},A.prototype._parseAACAudioData=function(A,e,t){if(!(t<=1)){var i={},n=new Uint8Array(A,e,t);return i.packetType=n[0],0===n[0]?i.data=this._parseAACAudioSpecificConfig(A,e+1,t-1):i.data=n.subarray(1),i}d.A.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},A.prototype._parseAACAudioSpecificConfig=function(A,e,t){var i,n,a,r,o=new Uint8Array(A,e,t),s=null,g=0,l=null;if(g=a=o[0]>>>3,(r=(7&o[0])<<1|o[1]>>>7)<0||r>=this._mpegSamplingRates.length)null===(i=this._onError)||void 0===i||i.call(this,x.A.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[r],d=(120&o[1])>>>3;if(!(d<0||d>=8)){5===g&&(l=(7&o[1])<<1|o[2]>>>7,o[2]);var I=self.navigator.userAgent.toLowerCase();return I.includes("firefox")?r>=6?(g=5,s=new Array(4),l=r-3):(g=2,s=new Array(2),l=r):I.includes("android")?(g=2,s=new Array(2),l=r):(g=5,l=r,s=new Array(4),r>=6?l=r-3:1===d&&(g=2,s=new Array(2),l=r)),s[0]=g<<3,s[0]|=(15&r)>>>1,s[1]=(15&r)<<7,s[1]|=(15&d)<<3,5===g&&(s[1]|=(15&l)>>>1,s[2]=(1&l)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:c,channelCount:d,codec:"mp4a.40."+g,originalCodec:"mp4a.40."+a}}null===(n=this._onError)||void 0===n||n.call(this,x.A.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},A.prototype._parseMP3AudioData=function(A,e,t,i){if(!(t<4)){this._littleEndian;var n,a=new Uint8Array(A,e,t);if(i){if(255!==a[0])return;var r=a[1]>>>3&3,o=(6&a[1])>>1,s=(240&a[2])>>>4,g=(12&a[2])>>>2,l=3&~(a[3]>>>6)?2:1,c=0,I=0;switch(r){case 0:c=this._mpegAudioV25SampleRateTable[g];break;case 2:c=this._mpegAudioV20SampleRateTable[g];break;case 3:c=this._mpegAudioV10SampleRateTable[g]}switch(o){case 1:s>>4;if(128&o){var g=15&o,l=String.fromCharCode.apply(String,function(A,e,t){if(2===arguments.length)for(var i,n=0,a=e.length;n0)&&!(i=a.next()).done;)r.push(i.value)}catch(A){n={error:A}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return r}(new Uint8Array(A,e,t).slice(1,5)),!1));"hvc1"===l?this._parseEnhancedHEVCVideoPacket(A,e+5,t-5,i,n,s,g):"av01"===l?this._parseEnhancedAV1VideoPacket(A,e+5,t-5,i,n,s,g):null===(r=this._onError)||void 0===r||r.call(this,x.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(l))}else{var c=15&o;7===c?this._parseAVCVideoPacket(A,e+1,t-1,i,n,s):12===c?this._parseHEVCVideoPacket(A,e+1,t-1,i,n,s):null===(a=this._onError)||void 0===a||a.call(this,x.A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(c))}}},A.prototype._parseAVCVideoPacket=function(A,e,t,i,n,a){var r;if(t<4)d.A.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(A,e,t),g=s.getUint8(0),l=(16777215&s.getUint32(0,!o))<<8>>8;0===g?this._parseAVCDecoderConfigurationRecord(A,e+4,t-4):1===g?this._parseAVCVideoData(A,e+4,t-4,i,n,a,l):2===g||null===(r=this._onError)||void 0===r||r.call(this,x.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(g))}},A.prototype._parseHEVCVideoPacket=function(A,e,t,i,n,a){var r;if(t<4)d.A.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(A,e,t),g=s.getUint8(0),l=(16777215&s.getUint32(0,!o))<<8>>8;0===g?this._parseHEVCDecoderConfigurationRecord(A,e+4,t-4):1===g?this._parseHEVCVideoData(A,e+4,t-4,i,n,a,l):2===g||null===(r=this._onError)||void 0===r||r.call(this,x.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(g))}},A.prototype._parseEnhancedHEVCVideoPacket=function(A,e,t,i,n,a,r){var o,s=this._littleEndian,g=new DataView(A,e,t);if(0===r)this._parseHEVCDecoderConfigurationRecord(A,e,t);else if(1===r){var l=(4294967040&g.getUint32(0,!s))>>8;this._parseHEVCVideoData(A,e+3,t-3,i,n,a,l)}else 3===r?this._parseHEVCVideoData(A,e,t,i,n,a,0):2===r||null===(o=this._onError)||void 0===o||o.call(this,x.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(r))},A.prototype._parseEnhancedAV1VideoPacket=function(A,e,t,i,n,a,r){var o,s;this._littleEndian,0===r?this._parseAV1CodecConfigurationRecord(A,e,t):1===r?this._parseAV1VideoData(A,e,t,i,n,a,0):5===r?null===(o=this._onError)||void 0===o||o.call(this,x.A.FORMAT_ERROR,"Flv: Not Suported MP2T AV1 video packet type ".concat(r)):2===r||null===(s=this._onError)||void 0===s||s.call(this,x.A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(r))},A.prototype._parseAVCDecoderConfigurationRecord=function(A,e,t){var i,n,a,r,o,s,g,l,c,I,C;if(t<7)d.A.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var h=this._videoMetadata,u=this._videoTrack,B=this._littleEndian,E=new DataView(A,e,t);if(h){if(void 0!==h.avcc){var f=new Uint8Array(A,e,t);if(m(f,h.avcc))return;d.A.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1!==this._hasVideo||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),(h=this._videoMetadata={}).type="video",h.id=null==u?void 0:u.id,h.timescale=this._timescale,h.duration=this._duration;var p=E.getUint8(0),y=E.getUint8(1);if(E.getUint8(2),E.getUint8(3),1===p&&0!==y)if(this._naluLengthSize=1+(3&E.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var _=31&E.getUint8(5);if(0!==_){_>1&&d.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(_));for(var S=6,D=0;D<_;D++){var v=E.getUint16(S,!B);if(S+=2,0!==v){var w=new Uint8Array(A,e+S,v);S+=v;var b=Q.parseSPS(w);if(0===D){h.codecWidth=b.codec_size.width,h.codecHeight=b.codec_size.height,h.presentWidth=b.present_size.width,h.presentHeight=b.present_size.height,h.profile=b.profile_string,h.level=b.level_string,h.bitDepth=b.bit_depth,h.chromaFormat=b.chroma_format,h.sarRatio=b.sar_ratio,h.frameRate=b.frame_rate,b.frame_rate.fixed&&0!==b.frame_rate.fps_num&&0!==b.frame_rate.fps_den||(h.frameRate=this._referenceFrameRate);var F=null===(r=h.frameRate)||void 0===r?void 0:r.fps_den,R=null===(o=h.frameRate)||void 0===o?void 0:o.fps_num;h.refSampleDuration=h.timescale*(F/R);for(var k=w.subarray(1,4),P="avc1.",N=0;N<3;N++){var T=k[N].toString(16);T.length<2&&(T="0"+T),P+=T}h.codec=P;var M=this._mediaInfo;M.width=h.codecWidth,M.height=h.codecHeight,M.fps=h.frameRate.fps,M.profile=h.profile,M.level=h.level,M.refFrames=b.ref_frames,M.chromaFormat=b.chroma_format_string,M.sarNum=h.sarRatio.width,M.sarDen=h.sarRatio.height,M.videoCodec=P,M.hasAudio?null!=M.audioCodec&&(M.mimeType='video/x-flv; codecs="'+M.videoCodec+","+M.audioCodec+'"'):M.mimeType='video/x-flv; codecs="'+M.videoCodec+'"',M.isComplete()&&(null===(s=this._onMediaInfo)||void 0===s||s.call(this,M))}}}var L=E.getUint8(S);if(0!==L){for(L>1&&d.A.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(L)),S++,D=0;D=t){d.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(C,", offset = ").concat(c,", dataSize = ").concat(t));break}var u=s.getUint32(c,!o);if(3===I&&(u>>>=8),u>t-I)return void d.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(C,", NaluSize > DataSize!"));var B=31&s.getUint8(c+I);5===B&&(h=!0);var E=new Uint8Array(A,e+c,I+u),f={type:B,data:E};g.push(f),l+=E.byteLength,c+=I+u}if(g.length){var Q=this._videoTrack,x={units:g,length:l,isKeyframe:h,dts:C,cts:r,pts:C+r};h&&(x.fileposition=n),Q&&(Q.samples.push(x),Q.length+=l)}},A.prototype._parseHEVCVideoData=function(A,e,t,i,n,a,r){for(var o=this._littleEndian,s=new DataView(A,e,t),g=[],l=0,c=0,I=this._naluLengthSize,C=this._timestampBase+i,h=1===a;c=t){d.A.w(this.TAG,"Malformed Nalu near timestamp ".concat(C,", offset = ").concat(c,", dataSize = ").concat(t));break}var u=s.getUint32(c,!o);if(3===I&&(u>>>=8),u>t-I)return void d.A.w(this.TAG,"Malformed Nalus near timestamp ".concat(C,", NaluSize > DataSize!"));var B=31&s.getUint8(c+I);19!==B&&20!==B||(h=!0);var E=new Uint8Array(A,e+c,I+u),f={type:B,data:E};g.push(f),l+=E.byteLength,c+=I+u}if(g.length){var Q=this._videoTrack,x={units:g,length:l,isKeyframe:h,dts:C,cts:r,pts:C+r};h&&(x.fileposition=n),Q&&(null==Q||Q.samples.push(x),Q.length+=l)}},A.prototype._parseAV1VideoData=function(A,e,t,i,n,a,r){this._littleEndian;var o,s=[],g=this._timestampBase+i,l=1===a;if(o=t,s.push({unitType:0,data:new Uint8Array(A,e+0,t)}),s.length){var c=this._videoTrack,d={units:s,length:o,isKeyframe:l,dts:g,cts:r,pts:g+r};l&&(d.fileposition=n),c&&(null==c||c.samples.push(d),c.length+=o)}},A}(),S=_,D=function(){function A(){}return A.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},A}(),v=function(){this.program_pmt_pid={}};!function(A){A[A.kMPEG1Audio=3]="kMPEG1Audio",A[A.kMPEG2Audio=4]="kMPEG2Audio",A[A.kPESPrivateData=6]="kPESPrivateData",A[A.kADTSAAC=15]="kADTSAAC",A[A.kLOASAAC=17]="kLOASAAC",A[A.kAC3=129]="kAC3",A[A.kEAC3=135]="kEAC3",A[A.kID3=21]="kID3",A[A.kSCTE35=134]="kSCTE35",A[A.kH264=27]="kH264",A[A.kH265=36]="kH265"}(l||(l={}));var w,b=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}},F=function(){},R=function(){},k=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0,this.random_access_indicator=0};!function(A){A[A.kUnspecified=0]="kUnspecified",A[A.kSliceNonIDR=1]="kSliceNonIDR",A[A.kSliceDPA=2]="kSliceDPA",A[A.kSliceDPB=3]="kSliceDPB",A[A.kSliceDPC=4]="kSliceDPC",A[A.kSliceIDR=5]="kSliceIDR",A[A.kSliceSEI=6]="kSliceSEI",A[A.kSliceSPS=7]="kSliceSPS",A[A.kSlicePPS=8]="kSlicePPS",A[A.kSliceAUD=9]="kSliceAUD",A[A.kEndOfSequence=10]="kEndOfSequence",A[A.kEndOfStream=11]="kEndOfStream",A[A.kFiller=12]="kFiller",A[A.kSPSExt=13]="kSPSExt",A[A.kReserved0=14]="kReserved0"}(w||(w={}));var P,N,T=function(){},M=function(A){var e=A.data.byteLength;this.type=A.type,this.data=new Uint8Array(4+e),new DataView(this.data.buffer).setUint32(0,e),this.data.set(A.data,4)},L=function(){function A(A){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=A,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&d.A.e(this.TAG,"Could not find H264 startcode until payload end!")}return A.prototype.findNextStartCodeOffset=function(A){for(var e=A,t=this.data_;;){if(e+3>=t.byteLength)return this.eof_flag_=!0,t.byteLength;var i=t[e+0]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],n=t[e+0]<<16|t[e+1]<<8|t[e+2];if(1===i||1===n)return e;e++}},A.prototype.readNextNaluPayload=function(){for(var A=this.data_,e=null;null==e&&!this.eof_flag_;){var t=this.current_startcode_offset_,i=31&A[t+=1==(A[t]<<24|A[t+1]<<16|A[t+2]<<8|A[t+3])?4:3],n=(128&A[t])>>>7,a=this.findNextStartCodeOffset(t);if(this.current_startcode_offset_=a,!(i>=w.kReserved0)&&0===n){var r=A.subarray(t,a);(e=new T).type=i,e.data=r}}return e},A}(),G=function(){function A(A,e,t){var i=8+A.byteLength+1+2+e.byteLength,n=!1;66!==A[3]&&77!==A[3]&&88!==A[3]&&(n=!0,i+=4);var a=this.data=new Uint8Array(i);a[0]=1,a[1]=A[1],a[2]=A[2],a[3]=A[3],a[4]=255,a[5]=225;var r=A.byteLength;a[6]=r>>>8,a[7]=255&r;var o=8;a.set(A,8),a[o+=r]=1;var s=e.byteLength;a[o+1]=s>>>8,a[o+2]=255&s,a.set(e,o+3),o+=3+s,n&&(a[o]=252|t.chroma_format_idc,a[o+1]=248|t.bit_depth_luma-8,a[o+2]=248|t.bit_depth_chroma-8,a[o+3]=0,o+=4)}return A.prototype.getData=function(){return this.data},A}();!function(A){A[A.kNull=0]="kNull",A[A.kAACMain=1]="kAACMain",A[A.kAAC_LC=2]="kAAC_LC",A[A.kAAC_SSR=3]="kAAC_SSR",A[A.kAAC_LTP=4]="kAAC_LTP",A[A.kAAC_SBR=5]="kAAC_SBR",A[A.kAAC_Scalable=6]="kAAC_Scalable",A[A.kLayer1=32]="kLayer1",A[A.kLayer2=33]="kLayer2",A[A.kLayer3=34]="kLayer3"}(P||(P={})),function(A){A[A.k96000Hz=0]="k96000Hz",A[A.k88200Hz=1]="k88200Hz",A[A.k64000Hz=2]="k64000Hz",A[A.k48000Hz=3]="k48000Hz",A[A.k44100Hz=4]="k44100Hz",A[A.k32000Hz=5]="k32000Hz",A[A.k24000Hz=6]="k24000Hz",A[A.k22050Hz=7]="k22050Hz",A[A.k16000Hz=8]="k16000Hz",A[A.k12000Hz=9]="k12000Hz",A[A.k11025Hz=10]="k11025Hz",A[A.k8000Hz=11]="k8000Hz",A[A.k7350Hz=12]="k7350Hz"}(N||(N={}));var Y,U,J=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],H=(Y=function(A,e){return Y=Object.setPrototypeOf||t({__proto__:[]},Array)&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])},Y(A,e)},function(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=A}Y(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),K=function(){},V=function(A){function e(){return null!==A&&A.apply(this,arguments)||this}return H(e,A),e}(K),O=function(){function A(A){this.TAG="AACADTSParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&d.A.e(this.TAG,"Could not found ADTS syncword until payload end")}return A.prototype.findNextSyncwordOffset=function(A){for(var e=A,t=this.data_;;){if(e+7>=t.byteLength)return this.eof_flag_=!0,t.byteLength;if(4095==(t[e+0]<<8|t[e+1])>>>4)return e;e++}},A.prototype.readNextAACFrame=function(){for(var A=this.data_,e=null;null==e&&!this.eof_flag_;){var t=this.current_syncword_offset_,i=(8&A[t+1])>>>3,n=(6&A[t+1])>>>1,a=1&A[t+1],r=(192&A[t+2])>>>6,o=(60&A[t+2])>>>2,s=(1&A[t+2])<<2|(192&A[t+3])>>>6,g=(3&A[t+3])<<11|A[t+4]<<3|(224&A[t+5])>>>5;if(A[t+6],t+g>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var l=1===a?7:9,c=g-l;t+=l;var d=this.findNextSyncwordOffset(t+c);if(this.current_syncword_offset_=d,(0===i||1===i)&&0===n){var I=A.subarray(t,t+c);(e=new K).audio_object_type=r+1,e.sampling_freq_index=o,e.sampling_frequency=J[o],e.channel_config=s,e.data=I}}return e},A.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},A.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},A}(),j=function(){function A(A){this.TAG="AACLOASParser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&d.A.e(this.TAG,"Could not found LOAS syncword until payload end")}return A.prototype.findNextSyncwordOffset=function(A){for(var e=A,t=this.data_;;){if(e+1>=t.byteLength)return this.eof_flag_=!0,t.byteLength;if(695==(t[e+0]<<3|t[e+1]>>>5))return e;e++}},A.prototype.getLATMValue=function(A){for(var e=A.readBits(2),t=0,i=0;i<=e;i++)t<<=8,t|=A.readByte();return t},A.prototype.readNextAACFrame=function(A){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var i=this.current_syncword_offset_,n=(31&e[i+1])<<8|e[i+2];if(i+3+n>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var a=new f(e.subarray(i+3,i+3+n)),r=null;if(a.readBool()){if(null==A){d.A.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(i+3+n),a.destroy();continue}r=A}else{var o=a.readBool();if(o&&a.readBool()){d.A.e(this.TAG,"audioMuxVersionA is Not Supported"),a.destroy();break}if(o&&this.getLATMValue(a),!a.readBool()){d.A.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){d.A.e(this.TAG,"more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){d.A.e(this.TAG,"more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){d.A.e(this.TAG,"more than 2 numLayer Not Supported"),a.destroy();break}var s=o?this.getLATMValue(a):0,g=a.readBits(5);s-=5;var l=a.readBits(4);s-=4;var c=a.readBits(4);s-=4,a.readBits(3),(s-=3)>0&&a.readBits(s);var I=a.readBits(3);if(0!==I){d.A.e(this.TAG,"frameLengthType = ".concat(I,". Only frameLengthType = 0 Supported")),a.destroy();break}a.readByte();var C=a.readBool();if(C)if(o)this.getLATMValue(a);else for(;;){var h=a.readBool();if(a.readByte(),!h)break}a.readBool()&&a.readByte(),(r=new V).audio_object_type=g,r.sampling_freq_index=l,r.sampling_frequency=J[r.sampling_freq_index],r.channel_config=c,r.other_data_present=C}for(var u=0;;){var B=a.readByte();if(u+=B,255!==B)break}for(var E=new Uint8Array(u),Q=0;Q=6?(i=5,e=new Array(4),r=n-3):(i=2,e=new Array(2),r=n):o.includes("android")?(i=2,e=new Array(2),r=n):(i=5,r=n,e=new Array(4),n>=6?r=n-3:1===a&&(i=2,e=new Array(2),r=n)),e[0]=i<<3,e[0]|=(15&n)>>>1,e[1]=(15&n)<<7,e[1]|=(15&a)<<3,5===i&&(e[1]|=(15&r)>>>1,e[2]=(1&r)<<7,e[2]|=8,e[3]=0),this.config=e,this.sampling_rate=J[n],this.channel_count=a,this.codec_mimetype="mp4a.40."+i.toString(),this.original_codec_mimetype="mp4a.40."+t.toString()},Z=function(){},X=function(){};!function(A){A[A.kSpliceNull=0]="kSpliceNull",A[A.kSpliceSchedule=4]="kSpliceSchedule",A[A.kSpliceInsert=5]="kSpliceInsert",A[A.kTimeSignal=6]="kTimeSignal",A[A.kBandwidthReservation=7]="kBandwidthReservation",A[A.kPrivateCommand=255]="kPrivateCommand"}(U||(U={}));var q,z=function(A){var e=A.readBool();return e?(A.readBits(6),{time_specified_flag:e,pts_time:4*A.readBits(31)+A.readBits(2)}):(A.readBits(7),{time_specified_flag:e})},$=function(A){var e=A.readBool();return A.readBits(6),{auto_return:e,duration:4*A.readBits(31)+A.readBits(2)}},AA=function(A,e){var t=e.readBits(8);return A?{component_tag:t}:{component_tag:t,splice_time:z(e)}},eA=function(A){return{component_tag:A.readBits(8),utc_splice_time:A.readBits(32)}},tA=function(A){var e=A.readBits(32),t=A.readBool();A.readBits(7);var i={splice_event_id:e,splice_event_cancel_indicator:t};if(t)return i;if(i.out_of_network_indicator=A.readBool(),i.program_splice_flag=A.readBool(),i.duration_flag=A.readBool(),A.readBits(5),i.program_splice_flag)i.utc_splice_time=A.readBits(32);else{i.component_count=A.readBits(8),i.components=[];for(var n=0;n=t.byteLength)return this.eof_flag_=!0,t.byteLength;var i=t[e+0]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],n=t[e+0]<<16|t[e+1]<<8|t[e+2];if(1===i||1===n)return e;e++}},A.prototype.readNextNaluPayload=function(){for(var A=this.data_,e=null;null==e&&!this.eof_flag_;){var t=this.current_startcode_offset_,i=A[t+=1==(A[t]<<24|A[t+1]<<16|A[t+2]<<8|A[t+3])?4:3]>>1&63,n=(128&A[t])>>>7,a=this.findNextStartCodeOffset(t);if(this.current_startcode_offset_=a,0===n){var r=A.subarray(t,a);(e=new lA).type=i,e.data=r}}return e},A}(),IA=function(){function A(A,e,t,i){var n=23+(5+A.byteLength)+(5+e.byteLength)+(5+t.byteLength),a=this.data=new Uint8Array(n);a[0]=1,a[1]=(3&i.general_profile_space)<<6|(i.general_tier_flag?1:0)<<5|31&i.general_profile_idc,a[2]=i.general_profile_compatibility_flags_1,a[3]=i.general_profile_compatibility_flags_2,a[4]=i.general_profile_compatibility_flags_3,a[5]=i.general_profile_compatibility_flags_4,a[6]=i.general_constraint_indicator_flags_1,a[7]=i.general_constraint_indicator_flags_2,a[8]=i.general_constraint_indicator_flags_3,a[9]=i.general_constraint_indicator_flags_4,a[10]=i.general_constraint_indicator_flags_5,a[11]=i.general_constraint_indicator_flags_6,a[12]=i.general_level_idc,a[13]=240|(3840&i.min_spatial_segmentation_idc)>>8,a[14]=255&i.min_spatial_segmentation_idc,a[15]=252|3&i.parallelismType,a[16]=252|3&i.chroma_format_idc,a[17]=248|7&i.bit_depth_luma_minus8,a[18]=248|7&i.bit_depth_chroma_minus8,a[19]=0,a[20]=0,a[21]=(3&i.constant_frame_rate)<<6|(7&i.num_temporal_layers)<<3|(i.temporal_id_nested?1:0)<<2|3,a[22]=3,a[23]=128|q.kSliceVPS,a[24]=0,a[25]=1,a[26]=(65280&A.byteLength)>>8,a[27]=255&A.byteLength,a.set(A,28),a[23+(5+A.byteLength)+0]=128|q.kSliceSPS,a[23+(5+A.byteLength)+1]=0,a[23+(5+A.byteLength)+2]=1,a[23+(5+A.byteLength)+3]=(65280&e.byteLength)>>8,a[23+(5+A.byteLength)+4]=255&e.byteLength,a.set(e,23+(5+A.byteLength)+5),a[23+(5+A.byteLength+5+e.byteLength)+0]=128|q.kSlicePPS,a[23+(5+A.byteLength+5+e.byteLength)+1]=0,a[23+(5+A.byteLength+5+e.byteLength)+2]=1,a[23+(5+A.byteLength+5+e.byteLength)+3]=(65280&t.byteLength)>>8,a[23+(5+A.byteLength+5+e.byteLength)+4]=255&t.byteLength,a.set(t,23+(5+A.byteLength+5+e.byteLength)+5)}return A.prototype.getData=function(){return this.data},A}(),CA=function(){},hA=function(){},uA=function(){},BA=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],EA=function(){function A(A){this.TAG="AC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&d.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return A.prototype.findNextSyncwordOffset=function(A){for(var e=A,t=this.data_;;){if(e+7>=t.byteLength)return this.eof_flag_=!0,t.byteLength;if(2935==(t[e+0]<<8|t[e+1]))return e;e++}},A.prototype.readNextAC3Frame=function(){for(var A=this.data_,e=null;null==e&&!this.eof_flag_;){var t=this.current_syncword_offset_,i=A[t+4]>>6,n=[48e3,44200,33e3][i],a=63&A[t+4],r=2*BA[i][a];if(t+r>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var o=this.findNextSyncwordOffset(t+r);this.current_syncword_offset_=o;var s=A[t+5]>>3,g=7&A[t+5],l=A[t+6]>>5,c=0;1&l&&1!==l&&(c+=2),4&l&&(c+=2),2===l&&(c+=2);var d=(A[t+6]<<8|A[t+7])>>12-c&1,I=[2,1,2,3,3,4,4,5][l]+d;(e=new uA).sampling_frequency=n,e.channel_count=I,e.channel_mode=l,e.bit_stream_identification=s,e.low_frequency_effects_channel_on=d,e.bit_stream_mode=g,e.frame_size_code=a,e.data=A.subarray(t,t+r)}return e},A.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},A.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},A}(),fA=function(A){var e;e=[A.sampling_rate_code<<6|A.bit_stream_identification<<1|A.bit_stream_mode>>2,(3&A.bit_stream_mode)<<6|A.channel_mode<<3|A.low_frequency_effects_channel_on<<2|A.frame_size_code>>4,A.frame_size_code<<4&224],this.config=e,this.sampling_rate=A.sampling_frequency,this.bit_stream_identification=A.bit_stream_identification,this.bit_stream_mode=A.bit_stream_mode,this.low_frequency_effects_channel_on=A.low_frequency_effects_channel_on,this.channel_count=A.channel_count,this.channel_mode=A.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},QA=function(){},xA=function(){function A(A){this.TAG="EAC3Parser",this.data_=A,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&d.A.e(this.TAG,"Could not found AC3 syncword until payload end")}return A.prototype.findNextSyncwordOffset=function(A){for(var e=A,t=this.data_;;){if(e+7>=t.byteLength)return this.eof_flag_=!0,t.byteLength;if(2935==(t[e+0]<<8|t[e+1]))return e;e++}},A.prototype.readNextEAC3Frame=function(){for(var A=this.data_,e=null;null==e&&!this.eof_flag_;){var t=this.current_syncword_offset_,i=new f(A.subarray(t+2)),n=(i.readBits(2),i.readBits(3),i.readBits(11)+1<<1),a=i.readBits(2),r=null,o=null;3===a?(r=[24e3,22060,16e3][a=i.readBits(2)],o=3):(r=[48e3,44100,32e3][a],o=i.readBits(2));var s=i.readBits(3),g=i.readBits(1),l=i.readBits(5);if(t+n>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var c=this.findNextSyncwordOffset(t+n);this.current_syncword_offset_=c;var d=[2,1,2,3,3,4,4,5][s]+g;i.destroy(),(e=new QA).sampling_frequency=r,e.channel_count=d,e.channel_mode=s,e.bit_stream_identification=l,e.low_frequency_effects_channel_on=g,e.frame_size=n,e.num_blks=[1,2,3,6][o],e.data=A.subarray(t,t+n)}return e},A.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},A.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},A}(),pA=function(A){var e,t=Math.floor(A.frame_size*A.sampling_frequency/(16*A.num_blks));e=[255&t,248&t,A.sampling_rate_code<<6|A.bit_stream_identification<<1,A.channel_mode<<1|A.low_frequency_effects_channel_on,0],this.config=e,this.sampling_rate=A.sampling_frequency,this.bit_stream_identification=A.bit_stream_identification,this.num_blks=A.num_blks,this.low_frequency_effects_channel_on=A.low_frequency_effects_channel_on,this.channel_count=A.channel_count,this.channel_mode=A.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"},mA=function(){var A=function(e,i){return A=Object.setPrototypeOf||t({__proto__:[]},Array)&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])},A(e,i)};return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}(),yA=function(){return yA=Object.assign||function(A){for(var e,t=1,i=arguments.length;t0)&&!(i=a.next()).done;)r.push(i.value)}catch(A){n={error:A}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return r},SA=function(A,e,t){if(2===arguments.length)for(var i,n=0,a=e.length;n=4?(d.A.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),t-=4):204===i&&d.A.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:i,sync_offset:t})},e.prototype.bindDataSource=function(A){return A.onDataArrival=this.parseChunks.bind(this),this},e.prototype.resetMediaInfo=function(){this.media_info_=new C.A},e.prototype.parseChunks=function(A,e){var t;if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new u.j4("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0;for(this.first_parse_&&(this.first_parse_=!1,i=this.sync_offset_);i+this.ts_packet_size_<=A.byteLength;){var n=e+i;192===this.ts_packet_size_&&(i+=4);var a=new Uint8Array(A,i,188),r=a[0];if(71!==r){d.A.e(this.TAG,"sync_byte = ".concat(r,", not 0x47"));break}var o=(64&a[1])>>>6,s=(a[1],(31&a[1])<<8|a[2]),g=(48&a[3])>>>4,c=15&a[3],I={},C=4;if(2===g||3===g){var h=a[4];if(5+h===188){i+=188,204===this.ts_packet_size_&&(i+=16);continue}h>0&&(I=this.parseAdaptationField(A,i+4,1+h)),C=5+h}if(1===g||3===g)if(0===s||s===this.current_pmt_pid_||void 0!==this.pmt_&&this.pmt_.pid_stream_type[s]===l.kSCTE35){var B=188-C;this.handleSectionSlice(A,i+C,B,{pid:s,file_position:n,payload_unit_start_indicator:o,continuity_conunter:c,random_access_indicator:I.random_access_indicator})}else if(void 0!==(null===(t=this.pmt_)||void 0===t?void 0:t.pid_stream_type[s])){B=188-C;var E=this.pmt_.pid_stream_type[s];(s===this.pmt_.common_pids.h264||s===this.pmt_.common_pids.h265||s===this.pmt_.common_pids.adts_aac||s===this.pmt_.common_pids.loas_aac||s===this.pmt_.common_pids.ac3||s===this.pmt_.common_pids.eac3||s===this.pmt_.common_pids.opus||s===this.pmt_.common_pids.mp3||this.pmt_.pes_private_data_pids[s]||this.pmt_.timed_id3_pids[s])&&this.handlePESSlice(A,i+C,B,{pid:s,stream_type:E,file_position:n,payload_unit_start_indicator:o,continuity_conunter:c,random_access_indicator:I.random_access_indicator})}i+=188,204===this.ts_packet_size_&&(i+=16)}return this.dispatchAudioVideoMediaSegment(),i},e.prototype.parseAdaptationField=function(A,e,t){var i=new Uint8Array(A,e,t),n=i[0];return n>0?n>183?(d.A.w(this.TAG,"Illegal adaptation_field_length: ".concat(n)),{}):{discontinuity_indicator:(128&i[1])>>>7,random_access_indicator:(64&i[1])>>>6,elementary_stream_priority_indicator:(32&i[1])>>>5}:{}},e.prototype.handleSectionSlice=function(A,e,t,i){var n=new Uint8Array(A,e,t),a=this.section_slice_queues_?this.section_slice_queues_[i.pid]:{};if(i.payload_unit_start_indicator){var r=n[0];if(void 0!==a&&0!==(null==a?void 0:a.total_length)){var o=new Uint8Array(A,e+1,Math.min(t,r));a.slices.push(o),a.total_length+=o.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,i):this.clearSlices(a,i)}for(var s=1+r;s=a.expected_length&&this.clearSlices(a,i),s+=o.byteLength}}else void 0!==a&&0!==a.total_length&&(o=new Uint8Array(A,e,Math.min(t,a.expected_length-a.total_length)),a.slices.push(o),a.total_length+=o.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,i):a.total_length>=a.expected_length&&this.clearSlices(a,i))},e.prototype.handlePESSlice=function(A,e,t,i){var n=new Uint8Array(A,e,t),a=n[0]<<16|n[1]<<8|n[2],r=(n[3],n[4]<<8|n[5]);if(i.payload_unit_start_indicator){if(1!==a)return void d.A.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value ".concat(a));var o=this.pes_slice_queues_[i.pid];o&&(0===o.expected_length||o.expected_length===o.total_length?this.emitPESSlices(o,i):this.clearSlices(o,i)),this.pes_slice_queues_&&(this.pes_slice_queues_[i.pid]=new k,this.pes_slice_queues_[i.pid].file_position=i.file_position,this.pes_slice_queues_[i.pid].random_access_indicator=i.random_access_indicator)}if(void 0!==this.pes_slice_queues_[i.pid]){var s=this.pes_slice_queues_[i.pid];s.slices.push(n),i.payload_unit_start_indicator&&(s.expected_length=0===r?0:r+6),s.total_length+=n.byteLength,s.expected_length>0&&s.expected_length===s.total_length?this.emitPESSlices(s,i):s.expected_length>0&&s.expected_length>>6,r=e[8],o=void 0,s=void 0;2!==a&&3!==a||(o=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,s=3===a?536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2:o);var g=9+r,c=void 0;if(0!==n){if(n<3+r)return void d.A.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");c=n-3-r}else c=e.byteLength-g;var I=e.subarray(g,g+c);switch(A.stream_type){case l.kMPEG1Audio:case l.kMPEG2Audio:this.parseMP3Payload(I,o);break;case l.kPESPrivateData:this.pmt_.common_pids.opus===A.pid?this.parseOpusPayload(I,o):this.pmt_.common_pids.ac3===A.pid?this.parseAC3Payload(I,o):this.pmt_.common_pids.eac3===A.pid?this.parseEAC3Payload(I,o):this.pmt_.smpte2038_pids[A.pid]?this.parseSMPTE2038MetadataPayload(I,o,s,A.pid,i):this.parsePESPrivateDataPayload(I,o,s,A.pid,i);break;case l.kADTSAAC:this.parseADTSAACPayload(I,o);break;case l.kLOASAAC:this.parseLOASAACPayload(I,o);break;case l.kAC3:this.parseAC3Payload(I,o);break;case l.kEAC3:this.parseEAC3Payload(I,o);break;case l.kID3:this.parseTimedID3MetadataPayload(I,o,s,A.pid,i);break;case l.kH264:this.parseH264Payload(I,o,s,A.file_position,A.random_access_indicator);break;case l.kH265:this.parseH265Payload(I,o,s,A.file_position,A.random_access_indicator)}}else 188!==i&&191!==i&&240!==i&&241!==i&&255!==i&&242!==i&&248!==i||A.stream_type!==l.kPESPrivateData||(g=6,c=void 0,c=0!==n?n:e.byteLength-g,I=e.subarray(g,g+c),this.parsePESPrivateDataPayload(I,void 0,void 0,A.pid,i));else d.A.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value ".concat(t))},e.prototype.parsePAT=function(A){var e=A[0];if(0===e){var t=(15&A[1])<<8|A[2],i=(A[3],A[4],(62&A[5])>>>1),n=1&A[5],a=A[6],r=(A[7],null);if(1===n&&0===a)(r=new v).version_number=i;else if(null==(r=this.pat_))return;for(var o=t-5-4,s=-1,g=-1,l=8;l<8+o;l+=4){var c=A[l]<<8|A[l+1],I=(31&A[l+2])<<8|A[l+3];0===c?r.network_pid=I:(r.program_pmt_pid[c]=I,-1===s&&(s=c),-1===g&&(g=I))}1===n&&0===a&&(void 0===this.pat_&&d.A.v(this.TAG,"Parsed first PAT: ".concat(JSON.stringify(r))),this.pat_=r,this.current_program_=s,this.current_pmt_pid_=g)}else d.A.e(this.TAG,"parsePAT: table_id ".concat(e," is not corresponded to PAT!"))},e.prototype.parsePMT=function(A){var e=A[0];if(2===e){var t=(15&A[1])<<8|A[2],i=A[3]<<8|A[4],n=(62&A[5])>>>1,a=1&A[5],r=A[6],o=(A[7],null);if(1===a&&0===r)(o=new b).program_number=i,o.version_number=n,this.program_pmt_map_[i]=o;else if(null==(o=this.program_pmt_map_[i]))return;A[8],A[9];for(var s=(15&A[10])<<8|A[11],g=12+s,c=t-9-s-4,I=g;I0){for(var f=I+5;f1&&(d.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(s,"ms, PES pts: ").concat(o,"ms")),o=s)}}for(var g=new O(A),l=null,c=o,I=0;null!=(l=g.readNextAACFrame());){r=1024/l.sampling_frequency*1e3;var C={codec:"aac",data:l};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(C)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(C)):(this.audio_metadata_={codec:"aac",audio_object_type:l.audio_object_type,sampling_freq_index:l.sampling_freq_index,sampling_frequency:l.sampling_frequency,channel_config:l.channel_config},this.dispatchAudioInitSegment(C)),I=c;var h=Math.floor(c),u={unit:l.data,length:l.data.byteLength,pts:h,dts:h};this.audio_track_&&(null===(n=this.audio_track_)||void 0===n||n.samples.push(u),this.audio_track_.length+=l.data.byteLength),c+=r}g.hasIncompleteData()&&(this.aac_last_incomplete_data_=g.getIncompleteData()),I&&(this.aac_last_sample_pts_=I)}},e.prototype.parseLOASAACPayload=function(A,e){var t,i,n;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var a=new Uint8Array(A.byteLength+this.aac_last_incomplete_data_.byteLength);a.set(this.aac_last_incomplete_data_,0),a.set(A,this.aac_last_incomplete_data_.byteLength),A=a}var r,o=0;if(void 0!==e&&(o=e/this.timescale_),"aac"===(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec)){if(void 0===e&&void 0!==this.aac_last_sample_pts_)r=1024/this.audio_metadata_.sampling_frequency*1e3,o=this.aac_last_sample_pts_+r;else if(void 0===e)return void d.A.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){r=1024/this.audio_metadata_.sampling_frequency*1e3;var s=this.aac_last_sample_pts_+r;Math.abs(s-o)>1&&(d.A.w(this.TAG,"AAC: Detected pts overlapped, "+"expected: ".concat(s,"ms, PES pts: ").concat(o,"ms")),o=s)}}for(var g=new j(A),l=null,c=o,I=0;null!=(l=g.readNextAACFrame(null!==(i=this.loas_previous_frame)&&void 0!==i?i:void 0));){this.loas_previous_frame=l,r=1024/l.sampling_frequency*1e3;var C={codec:"aac",data:l};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(C)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(C)):(this.audio_metadata_={codec:"aac",audio_object_type:l.audio_object_type,sampling_freq_index:l.sampling_freq_index,sampling_frequency:l.sampling_frequency,channel_config:l.channel_config},this.dispatchAudioInitSegment(C)),I=c;var h=Math.floor(c),u={unit:l.data,length:l.data.byteLength,pts:h,dts:h};this.audio_track_&&(null===(n=this.audio_track_)||void 0===n||n.samples.push(u),this.audio_track_.length+=l.data.byteLength),c+=r}g.hasIncompleteData()&&(this.aac_last_incomplete_data_=g.getIncompleteData()),I&&(this.aac_last_sample_pts_=I)}},e.prototype.parseAC3Payload=function(A,e){var t,i;if(!this.has_video_||this.video_init_segment_dispatched_){var n,a=0;if(void 0!==e&&(a=e/this.timescale_),"ac-3"===(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec))if(void 0===e&&void 0!==this.aac_last_sample_pts_)n=1536/this.audio_metadata_.sampling_frequency*1e3,a=this.aac_last_sample_pts_+n;else if(void 0===e)return void d.A.w(this.TAG,"AC3: Unknown pts");for(var r=new EA(A),o=null,s=a,g=0;null!=(o=r.readNextAC3Frame());){n=1536/o.sampling_frequency*1e3;var l={codec:"ac-3",data:o};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(l)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(l)):(this.audio_metadata_={codec:"ac-3",sampling_frequency:o.sampling_frequency,bit_stream_identification:o.bit_stream_identification,bit_stream_mode:o.bit_stream_mode,low_frequency_effects_channel_on:o.low_frequency_effects_channel_on,channel_mode:o.channel_mode},this.dispatchAudioInitSegment(l)),g=s;var c=Math.floor(s),I={unit:o.data,length:o.data.byteLength,pts:c,dts:c};this.audio_track_&&(null===(i=this.audio_track_)||void 0===i||i.samples.push(I),this.audio_track_.length+=o.data.byteLength),s+=n}g&&(this.aac_last_sample_pts_=g)}},e.prototype.parseEAC3Payload=function(A,e){var t,i;if(!this.has_video_||this.video_init_segment_dispatched_){var n,a=0;if(void 0!==e&&(a=e/this.timescale_),"ec-3"===(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec))if(void 0===e&&void 0!==this.aac_last_sample_pts_)n=256*(this.audio_metadata_.num_blks||0)/(this.audio_metadata_.sampling_frequency||0)*1e3,a=this.aac_last_sample_pts_+n;else if(void 0===e)return void d.A.w(this.TAG,"EAC3: Unknown pts");for(var r=new xA(A),o=null,s=a,g=0;null!=(o=r.readNextEAC3Frame());){n=1536/o.sampling_frequency*1e3;var l={codec:"ec-3",data:o};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(l)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(l)):(this.audio_metadata_={codec:"ec-3",sampling_frequency:o.sampling_frequency,bit_stream_identification:o.bit_stream_identification,low_frequency_effects_channel_on:o.low_frequency_effects_channel_on,num_blks:o.num_blks,channel_mode:o.channel_mode},this.dispatchAudioInitSegment(l)),g=s;var c=Math.floor(s),I={unit:o.data,length:o.data.byteLength,pts:c,dts:c};this.audio_track_&&(null===(i=this.audio_track_)||void 0===i||i.samples.push(I),this.audio_track_.length+=o.data.byteLength),s+=n}g&&(this.aac_last_sample_pts_=g)}},e.prototype.parseOpusPayload=function(A,e){var t,i;if(!this.has_video_||this.video_init_segment_dispatched_){var n,a=0;if(void 0!==e&&(a=e/this.timescale_),"opus"===(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec))if(void 0===e&&void 0!==this.aac_last_sample_pts_)n=20,a=this.aac_last_sample_pts_+n;else if(void 0===e)return void d.A.w(this.TAG,"Opus: Unknown pts");for(var r=a,o=0,s=0;s>>3&3,n=(6&A[1])>>1,a=(A[2],(12&A[2])>>>2),r=3&~(A[3]>>>6)?2:1,o=0,s=34;switch(i){case 0:o=[11025,12e3,8e3,0][a];break;case 2:o=[22050,24e3,16e3,0][a];break;case 3:o=[44100,48e3,32e3,0][a]}switch(n){case 1:s=34;break;case 2:s=33;break;case 3:s=32}var g=new hA;g.object_type=s,g.sample_rate=o,g.channel_count=r,g.data=A;var l={codec:"mp3",data:g};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(l)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(l)):(this.audio_metadata_={codec:"mp3",object_type:s,sample_rate:o,channel_count:r},this.dispatchAudioInitSegment(l));var c={unit:A,length:A.byteLength,pts:e/this.timescale_,dts:e/this.timescale_};this.audio_track_&&(null===(t=this.audio_track_)||void 0===t||t.samples.push(c),this.audio_track_.length+=A.byteLength)}},e.prototype.detectAudioMetadataChange=function(A){var e,t,i,n;if(A.codec!==(null===(e=this.audio_metadata_)||void 0===e?void 0:e.codec))return d.A.v(this.TAG,"Audio: Audio Codecs changed from "+"".concat(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec," to ").concat(A.codec)),!0;if("aac"===A.codec&&"aac"===this.audio_metadata_.codec){if((a=A.data).audio_object_type!==this.audio_metadata_.audio_object_type)return d.A.v(this.TAG,"AAC: AudioObjectType changed from "+"".concat(this.audio_metadata_.audio_object_type," to ").concat(a.audio_object_type)),!0;if(a.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return d.A.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sampling_freq_index," to ").concat(a.sampling_freq_index)),!0;if(a.channel_config!==this.audio_metadata_.channel_config)return d.A.v(this.TAG,"AAC: Channel configuration changed from "+"".concat(null===(i=this.audio_metadata_)||void 0===i?void 0:i.channel_config," to ").concat(a.channel_config)),!0}else if("ac-3"===A.codec&&"ac-3"===this.audio_metadata_.codec){var a;if((a=A.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return d.A.v(this.TAG,"AC3: Sampling Frequency changed from "+"".concat(null===(n=this.audio_metadata_)||void 0===n?void 0:n.sampling_frequency," to ").concat(a.sampling_frequency)),!0;if(a.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return d.A.v(this.TAG,"AC3: Bit Stream Identification changed from "+"".concat(this.audio_metadata_.bit_stream_identification," to ").concat(a.bit_stream_identification)),!0;if(a.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return d.A.v(this.TAG,"AC3: BitStream Mode changed from "+"".concat(this.audio_metadata_.bit_stream_mode," to ").concat(a.bit_stream_mode)),!0;if(a.channel_mode!==this.audio_metadata_.channel_mode)return d.A.v(this.TAG,"AC3: Channel Mode changed from "+"".concat(this.audio_metadata_.channel_mode," to ").concat(a.channel_mode)),!0;if(a.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return d.A.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+"".concat(this.audio_metadata_.low_frequency_effects_channel_on," to ").concat(a.low_frequency_effects_channel_on)),!0}else if("opus"===A.codec&&"opus"===this.audio_metadata_.codec){if((r=A.meta).sample_rate!==this.audio_metadata_.sample_rate)return d.A.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(r.sample_rate)),!0;if(r.channel_count!==this.audio_metadata_.channel_count)return d.A.v(this.TAG,"Opus: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(r.channel_count)),!0}else if("mp3"===A.codec&&"mp3"===this.audio_metadata_.codec){var r;if((r=A.data).object_type!==this.audio_metadata_.object_type)return d.A.v(this.TAG,"MP3: AudioObjectType changed from "+"".concat(this.audio_metadata_.object_type," to ").concat(r.object_type)),!0;if(r.sample_rate!==this.audio_metadata_.sample_rate)return d.A.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+"".concat(this.audio_metadata_.sample_rate," to ").concat(r.sample_rate)),!0;if(r.channel_count!==this.audio_metadata_.channel_count)return d.A.v(this.TAG,"MP3: Channel count changed from "+"".concat(this.audio_metadata_.channel_count," to ").concat(r.channel_count)),!0}return!1},e.prototype.dispatchAudioInitSegment=function(A){var e,t,i,n,a,r,o={type:"audio"};if(o.id=null===(e=this.audio_track_)||void 0===e?void 0:e.id,o.timescale=1e3,o.duration=this.duration_,"aac"===(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec)){var s="aac"===A.codec?A.data:null,g=new W(s);o.audioSampleRate=g.sampling_rate,o.channelCount=g.channel_count,o.codec=g.codec_mimetype,o.originalCodec=g.original_codec_mimetype,o.config=g.config,o.refSampleDuration=1024/o.audioSampleRate*o.timescale}else if("ac-3"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec)){var l="ac-3"===A.codec?A.data:null,c=new fA(l);o.audioSampleRate=c.sampling_rate,o.channelCount=c.channel_count,o.codec=c.codec_mimetype,o.originalCodec=c.original_codec_mimetype,o.config=c.config,o.refSampleDuration=1536/o.audioSampleRate*o.timescale}else if("ec-3"===(null===(n=this.audio_metadata_)||void 0===n?void 0:n.codec)){var I="ec-3"===A.codec?A.data:null,C=new pA(I);o.audioSampleRate=C.sampling_rate,o.channelCount=C.channel_count,o.codec=C.codec_mimetype,o.originalCodec=C.original_codec_mimetype,o.config=C.config,o.refSampleDuration=256*C.num_blks/o.audioSampleRate*o.timescale}else"opus"===(null===(a=this.audio_metadata_)||void 0===a?void 0:a.codec)?(o.audioSampleRate=this.audio_metadata_.sample_rate,o.channelCount=this.audio_metadata_.channel_count,o.channelConfigCode=this.audio_metadata_.channel_config_code,o.codec="opus",o.originalCodec="opus",o.config=void 0,o.refSampleDuration=20):"mp3"===(null===(r=this.audio_metadata_)||void 0===r?void 0:r.codec)&&(o.audioSampleRate=this.audio_metadata_.sample_rate,o.channelCount=this.audio_metadata_.channel_count,o.codec="mp3",o.originalCodec="mp3",o.config=void 0);this.audio_init_segment_dispatched_||d.A.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: ".concat(o.codec)),this.onTrackMetadata&&this.onTrackMetadata("audio",o),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var h=this.media_info_;h.hasAudio=!0,h.audioCodec=o.originalCodec,h.audioSampleRate=o.audioSampleRate,h.audioChannelCount=o.channelCount,h.hasVideo&&h.videoCodec?h.mimeType='video/mp2t; codecs="'.concat(h.videoCodec,",").concat(h.audioCodec,'"'):h.mimeType='video/mp2t; codecs="'.concat(h.audioCodec,'"'),h.isComplete()&&this.onMediaInfo&&this.onMediaInfo(h)},e.prototype.dispatchPESPrivateDataDescriptor=function(A,e,t){var i=new X;i.pid=A,i.stream_type=e,i.descriptor=t,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(i)},e.prototype.parsePESPrivateDataPayload=function(A,e,t,i,n){var a=new Z;if(a.pid=i,a.stream_id=n,a.len=A.byteLength,a.data=A,void 0!==e){var r=Math.floor(e/this.timescale_);a.pts=r}else a.nearest_pts=this.aac_last_sample_pts_;if(void 0!==t){var o=Math.floor(t/this.timescale_);a.dts=o}this.onPESPrivateData&&this.onPESPrivateData(a)},e.prototype.parseTimedID3MetadataPayload=function(A,e,t,i,n){var a=new Z;if(a.pid=i,a.stream_id=n,a.len=A.byteLength,a.data=A,void 0!==e){var r=Math.floor(e/this.timescale_);a.pts=r}if(void 0!==t){var o=Math.floor(t/this.timescale_);a.dts=o}this.onTimedID3Metadata&&this.onTimedID3Metadata(a)},e.prototype.parseSMPTE2038MetadataPayload=function(A,e,t,i,n){var a=new CA;if(a.pid=i,a.stream_id=n,a.len=A.byteLength,a.data=A,void 0!==e){var r=Math.floor(e/this.timescale_);a.pts=r}if(a.nearest_pts=this.aac_last_sample_pts_,void 0!==t){var o=Math.floor(t/this.timescale_);a.dts=o}a.ancillaries=function(A){for(var e=new f(A),t=0,i=[];t+=6,0===e.readBits(6);){var n=e.readBool();t+=1;var a=e.readBits(11);t+=11;var r=e.readBits(12);t+=12;var o=255&e.readBits(10);t+=10;var s=255&e.readBits(10);t+=10;var g=255&e.readBits(10);t+=10;for(var l=new Uint8Array(g),c=0;c>>24&255,n[1]=i>>>16&255,n[2]=i>>>8&255,n[3]=255&i,n.set(A,4);var s=8;for(o=0;o>>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]))},A.trak=function(e){return A.box(A.types.trak,A.tkhd(e),A.mdia(e))},A.tkhd=function(e){var t=e.id,i=e.duration,n=e.presentWidth,a=e.presentHeight;return A.box(A.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,a>>>8&255,255&a,0,0]))},A.mdia=function(e){return A.box(A.types.mdia,A.mdhd(e),A.hdlr(e),A.minf(e))},A.mdhd=function(e){var t=e.timescale,i=e.duration;return A.box(A.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]))},A.hdlr=function(e){var t;return t="audio"===e.type?A.constants.HDLR_AUDIO:A.constants.HDLR_VIDEO,A.box(A.types.hdlr,t)},A.minf=function(e){var t;return t="audio"===e.type?A.box(A.types.smhd,A.constants.SMHD):A.box(A.types.vmhd,A.constants.VMHD),A.box(A.types.minf,t,A.dinf(),A.stbl(e))},A.dinf=function(){return A.box(A.types.dinf,A.box(A.types.dref,A.constants.DREF))},A.stbl=function(e){return A.box(A.types.stbl,A.stsd(e),A.box(A.types.stts,A.constants.STTS),A.box(A.types.stsc,A.constants.STSC),A.box(A.types.stsz,A.constants.STSZ),A.box(A.types.stco,A.constants.STCO))},A.stsd=function(e){return"audio"===e.type?"mp3"===e.codec?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.mp3(e)):"ac-3"===e.codec?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.ac3(e)):"ec-3"===e.codec?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.ec3(e)):"opus"===e.codec?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.Opus(e)):A.box(A.types.stsd,A.constants.STSD_PREFIX,A.mp4a(e)):"video"===e.type&&e.codec.startsWith("hvc1")?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.hvc1(e)):"video"===e.type&&e.codec.startsWith("av01")?A.box(A.types.stsd,A.constants.STSD_PREFIX,A.av01(e)):A.box(A.types.stsd,A.constants.STSD_PREFIX,A.avc1(e))},A.mp3=function(e){var 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 A.box(A.types[".mp3"],n)},A.mp4a=function(e){var 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 A.box(A.types.mp4a,n,A.esds(e))},A.ac3=function(e){var t,i=e.channelCount,n=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return A.box(A.types["ac-3"],a,A.box(A.types.dac3,new Uint8Array(null!==(t=e.config)&&void 0!==t?t:[])))},A.ec3=function(e){var t,i=e.channelCount,n=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return A.box(A.types["ec-3"],a,A.box(A.types.dec3,new Uint8Array(null!==(t=e.config)&&void 0!==t?t:[])))},A.esds=function(e){var t,i=null!==(t=e.config)&&void 0!==t?t:[],n=i.length,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(i).concat([6,1,2]));return A.box(A.types.esds,a)},A.Opus=function(e){var 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 A.box(A.types.Opus,n,A.dOps(e))},A.dOps=function(e){var t=e.channelCount,i=e.channelConfigCode,n=e.audioSampleRate,a=[];switch(i){case 1:case 2:a=[0];break;case 0:a=[255,1,1,0,1];break;case 128:a=[255,2,0,0,1];break;case 3:a=[1,2,1,0,2,1];break;case 4:a=[1,2,2,0,1,2,3];break;case 5:a=[1,3,2,0,4,1,2,3];break;case 6:a=[1,4,2,0,4,1,2,3,5];break;case 7:a=[1,4,2,0,4,1,2,3,5,6];break;case 8:a=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:a=[1,1,2,0,1];break;case 131:a=[1,1,3,0,1,2];break;case 132:a=[1,1,4,0,1,2,3];break;case 133:a=[1,1,5,0,1,2,3,4];break;case 134:a=[1,1,6,0,1,2,3,4,5];break;case 135:a=[1,1,7,0,1,2,3,4,5,6];break;case 136:a=[1,1,8,0,1,2,3,4,5,6,7]}var r=new Uint8Array(function(A,e,t){if(2===arguments.length)for(var i,n=0,a=e.length;n>>24&255,n>>>17&255,n>>>8&255,n>>>0&255,0,0],function(A,e){var t="function"==typeof Symbol&&A[Symbol.iterator];if(!t)return A;var i,n,a=t.call(A),r=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(A){n={error:A}}finally{try{i&&!i.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return r}(a),!1));return A.box(A.types.dOps,r)},A.avc1=function(e){var t=e.avcc,i=e.codecWidth,n=e.codecHeight,a=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,10,120,113,113,47,102,108,118,46,106,115,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 A.box(A.types.avc1,a,A.box(A.types.avcC,t))},A.hvc1=function(e){var t=e.hvcc,i=e.codecWidth,n=e.codecHeight,a=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,10,120,113,113,47,102,108,118,46,106,115,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 A.box(A.types.hvc1,a,A.box(A.types.hvcC,t))},A.av01=function(e){var t,i,n=e.av1c,a=null!==(t=e.codecWidth)&&void 0!==t?t:192,r=null!==(i=e.codecHeight)&&void 0!==i?i:108,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,a>>>8&255,255&a,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,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 A.box(A.types.av01,o,A.box(A.types.av1C,n))},A.mvex=function(e){return A.box(A.types.mvex,A.trex(e))},A.trex=function(e){var 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 A.box(A.types.trex,i)},A.moof=function(e,t){return A.box(A.types.moof,A.mfhd(e.sequenceNumber),A.traf(e,t))},A.mfhd=function(e){var t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return A.box(A.types.mfhd,t)},A.traf=function(e,t){var i=e.id,n=A.box(A.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=A.box(A.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),r=A.sdtp(e),o=A.trun(e,r.byteLength+16+16+8+16+8+8);return A.box(A.types.traf,n,a,o,r)},A.sdtp=function(e){for(var t=e.samples||[],i=t.length,n=new Uint8Array(4+i),a=0;a>>24&255,n>>>16&255,n>>>8&255,255&n,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(var o=0;o>>24&255,s>>>16&255,s>>>8&255,255&s,g>>>24&255,g>>>16&255,g>>>8&255,255&g,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.isNonSync,0,0,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o)}return A.box(A.types.trun,r)},A.mdat=function(e){return A.box(A.types.mdat,e)},A.constants={FTYP:new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),STSD_PREFIX:new Uint8Array([0,0,0,0,0,0,0,1]),STTS:wA,STSC:wA,STCO:wA,STSZ:new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),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]),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]),DREF:new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),SMHD:new Uint8Array([0,0,0,0,0,0,0,0]),VMHD:new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},A}();bA.init();var FA=bA,RA=function(){function A(){}return A.getSilentFrame=function(A,e){if("mp4a.40.2"===A){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},A}(),kA=n(453),PA=function(){function A(A){var e;this.TAG="MP4Remuxer",this._fillSilentAfterSeek=!1,this._config=A,this._isLive=!!A.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new kA.Sc("audio"),this._videoSegmentInfoList=new kA.Sc("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!I.A.chrome||!(I.A.version&&I.A.version.major<50||I.A.version&&50===I.A.version.major&&((null===(e=I.A.version)||void 0===e?void 0:e.build)||0)<2661)),this._fillSilentAfterSeek=!(!I.A.msedge&&!I.A.msie),this._mp3UseMpegAudio=!I.A.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return A.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},A.prototype.bindDataSource=function(A){var e;return A.onDataAvailable=null===(e=this.remux)||void 0===e?void 0:e.bind(this),A.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(A.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(A){this._onInitSegment=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(A){this._onMediaSegment=A},enumerable:!1,configurable:!0}),A.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},A.prototype.seek=function(A){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},A.prototype.remux=function(A,e){if(!this._onMediaSegment)throw new u.j4("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(A,e),e&&this._remuxVideo(e),A&&this._remuxAudio(A)},A.prototype._onTrackMetadataReceived=function(A,e){var t=null,i="mp4",n=e.codec;if("audio"===A)this._audioMeta=e,"mp3"===e.codec&&this._mp3UseMpegAudio?(i="mpeg",n="",t=new Uint8Array):t=FA.generateInitSegment(e);else{if("video"!==A)return;this._videoMeta=e,t=FA.generateInitSegment(e)}if(!this._onInitSegment)throw new u.j4("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(A,{type:A,data:t.buffer,codec:n,container:"".concat(A,"/").concat(i),mediaDuration:e.duration})},A.prototype._calculateDtsBase=function(A,e){var t,i;this._dtsBaseInited||((null===(t=null==A?void 0:A.samples)||void 0===t?void 0:t.length)&&(this._audioDtsBase=A.samples[0].dts),(null===(i=null==e?void 0:e.samples)||void 0===i?void 0:i.length)&&(this._videoDtsBase=e.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},A.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},A.prototype.flushStashedSamples=function(){var A=this._videoStashedLastSample,e=this._audioStashedLastSample,t={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=A&&(t.samples.push(A),t.length=null==A?void 0:A.length);var i={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=null==e?void 0:e.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(t,!0),this._remuxAudio(i,!0)},A.prototype._remuxAudio=function(A,e){var t,i,n,a,r,o,s;if(null!=this._audioMeta){var g,l,c=A,C=c.samples,h=-1,u=this._audioMeta.refSampleDuration,B="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,E=this._dtsBaseInited&&void 0===this._audioNextDts,f=!1;if(C&&0!==C.length&&(1!==C.length||e)){var Q=0,x=null,p=0;B?(Q=0,p=c.length):(Q=8,p=8+c.length);var m=null;if(C.length>1&&(p-=(m=C.pop()).length),null!=this._audioStashedLastSample){var y=this._audioStashedLastSample;this._audioStashedLastSample=null,C.unshift(y),p+=y.length}null!=m&&(this._audioStashedLastSample=m);var _=C[0].dts-this._dtsBase;if(this._audioNextDts)g=_-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())g=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(f=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(_);if(null!=S){var D=_-(S.originalDts+S.duration);D<=3&&(D=0),g=_-(S.dts+S.duration+D)}else g=0}if(f){var v=_-g,w=this._videoSegmentInfoList.getLastSegmentBefore(_);if(null!=w&&w.beginDts=3*(u||0)&&this._fillAudioTimestampGap&&!I.A.safari){T=!0;var Y,U=Math.floor(g/(u||0));d.A.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"originalDts: ".concat(N," ms, curRefDts: ").concat(G," ms, ")+"dtsCorrection: ".concat(Math.round(g)," ms, generate: ").concat(U," frames")),b=Math.floor(G),L=Math.floor(G+(u||0))-b,null==(Y=RA.getSilentFrame(null===(n=this._audioMeta)||void 0===n?void 0:n.originalCodec,this._audioMeta.channelCount))&&(d.A.w(this.TAG,"Unable to generate silent frame for "+"".concat(null===(a=this._audioMeta)||void 0===a?void 0:a.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Y=P),M=[];for(var J=0;J=1?null===(r=R[R.length-1])||void 0===r?void 0:r.duration:Math.floor(u||0),this._audioNextDts=b+L;-1===h&&(h=b),R.push({dts:b,pts:b,cts:0,unit:y.unit,size:null===(o=y.unit)||void 0===o?void 0:o.byteLength,duration:L,originalDts:N,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),T&&R.push.apply(R,M)}}if(0===R.length)return c.samples=[],void(c.length=0);for(B?x=new Uint8Array(p):((x=new Uint8Array(p))[0]=p>>>24&255,x[1]=p>>>16&255,x[2]=p>>>8&255,x[3]=255&p,x.set(FA.types.mdat,4)),k=0;k1&&(I-=(C=s.pop()).length),null!=this._videoStashedLastSample){var h=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(h),I+=(null==h?void 0:h.length)||0}null!=C&&(this._videoStashedLastSample=C);var u=s[0].dts-this._dtsBase;if(this._videoNextDts)n=u-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())n=0;else{var B=this._videoSegmentInfoList.getLastSampleBefore(u);if(null!=B){var E=u-(B.originalDts+B.duration);E<=3&&(E=0),n=u-(B.dts+B.duration+E)}else n=0}for(var f=new kA.EZ,Q=[],x=0;x=1?Q[Q.length-1].duration:Math.floor((null===(t=this._videoMeta)||void 0===t?void 0:t.refSampleDuration)||0),m){var v=new kA.$_(y,S,D,h.dts,!0);v.fileposition=h.fileposition,f.appendSyncPoint(v)}Q.push({dts:y,pts:S,cts:_,units:h.units,size:h.length,isKeyframe:m,duration:D,originalDts:p,flags:{isLeading:0,dependsOn:m?2:1,isDependedOn:m?1:0,hasRedundancy:0,isNonSync:m?0:1}})}for((d=new Uint8Array(I))[0]=I>>>24&255,d[1]=I>>>16&255,d[2]=I>>>8&255,d[3]=255&I,d.set(FA.types.mdat,4),x=0;x0)null===(t=this._demuxer)||void 0===t||t.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments?null===(i=this._mediaDataSource.segments[this._currentSegmentIndex])||void 0===i?void 0:i.timestampBase:0,s=(null===(n=this._demuxer)||void 0===n?void 0:n.parseChunks(A,e))||0;else{var g=null;(g=S.probe(A)).match&&(this._setupFLVDemuxerRemuxer(g),s=(null===(a=this._demuxer)||void 0===a?void 0:a.parseChunks(A,e))||0),g.match||(null==g?void 0:g.needMoreData)||(g=vA.probe(A)).match&&(this._setupTSDemuxerRemuxer(g),s=(null===(r=this._demuxer)||void 0===r?void 0:r.parseChunks(A,e))||0),g.match||(null==g?void 0:g.needMoreData)||(g=null,d.A.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then((function(){o._internalAbort()})),this._emitter.emit(TA.A.DEMUX_ERROR,x.A.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return s},A.prototype._setupFLVDemuxerRemuxer=function(A){var e;this._demuxer=new S(A,this._config),this._remuxer||(this._remuxer=new PA(this._config));var t=this._mediaDataSource;void 0===t.duration||isNaN(t.duration)||(this._demuxer.overridedDuration=t.duration),"boolean"==typeof t.hasAudio&&(this._demuxer.overridedHasAudio=t.hasAudio),"boolean"==typeof t.hasVideo&&(this._demuxer.overridedHasVideo=t.hasVideo),t.segments&&this._demuxer&&this._remuxer&&(this._demuxer.timestampBase=null===(e=null==t?void 0:t.segments[this._currentSegmentIndex])||void 0===e?void 0:e.timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this))},A.prototype._setupTSDemuxerRemuxer=function(A){var e=this._demuxer=new vA(A,this._config);this._remuxer||(this._remuxer=new PA(this._config)),e.onError=this._onDemuxException.bind(this),e.onMediaInfo=this._onMediaInfo.bind(this),e.onMetaDataArrived=this._onMetaDataArrived.bind(this),e.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),e.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),e.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),e.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),e.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},A.prototype._onMediaInfo=function(A){var e,t,i=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},A),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=(null===(t=null===(e=this._mediaDataSource)||void 0===e?void 0:e.segments)||void 0===t?void 0:t.length)||0,Object.setPrototypeOf(this._mediaInfo,C.A.prototype));var n=Object.assign({},A);Object.setPrototypeOf(n,C.A.prototype),this._mediaInfo.segments&&(this._mediaInfo.segments[this._currentSegmentIndex]=n),this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var A=i._pendingSeekTime;i._pendingSeekTime=null,i.seek(A)}))},A.prototype._onMetaDataArrived=function(A){this._emitter.emit(TA.A.METADATA_ARRIVED,A)},A.prototype._onScriptDataArrived=function(A){this._emitter.emit(TA.A.SCRIPTDATA_ARRIVED,A)},A.prototype._onTimedID3Metadata=function(A){var e,t=null===(e=this._remuxer)||void 0===e?void 0:e.getTimestampBase();void 0!==t&&(void 0!==A.pts&&(A.pts-=t),void 0!==A.dts&&(A.dts-=t),this._emitter.emit(TA.A.TIMED_ID3_METADATA_ARRIVED,A))},A.prototype._onSMPTE2038Metadata=function(A){var e,t=null===(e=this._remuxer)||void 0===e?void 0:e.getTimestampBase();void 0!==t&&(void 0!==A.pts&&(A.pts-=t),void 0!==A.dts&&(A.dts-=t),void 0!==A.nearest_pts&&(A.nearest_pts-=t),this._emitter.emit(TA.A.SMPTE2038_METADATA_ARRIVED,A))},A.prototype._onSCTE35Metadata=function(A){var e,t=null===(e=this._remuxer)||void 0===e?void 0:e.getTimestampBase();void 0!==t&&(void 0!==A.pts&&(A.pts-=t),void 0!==A.nearest_pts&&(A.nearest_pts-=t),this._emitter.emit(TA.A.SCTE35_METADATA_ARRIVED,A))},A.prototype._onPESPrivateDataDescriptor=function(A){this._emitter.emit(TA.A.PES_PRIVATE_DATA_DESCRIPTOR,A)},A.prototype._onPESPrivateData=function(A){var e,t=null===(e=this._remuxer)||void 0===e?void 0:e.getTimestampBase();void 0!==t&&(void 0!==A.pts&&(A.pts-=t),void 0!==A.nearest_pts&&(A.nearest_pts-=t),void 0!==A.dts&&(A.dts-=t),this._emitter.emit(TA.A.PES_PRIVATE_DATA_ARRIVED,A))},A.prototype._onIOSeeked=function(){var A;null===(A=this._remuxer)||void 0===A||A.insertDiscontinuity()},A.prototype._onIOComplete=function(A){var e,t,i=A+1;i<((null===(t=null===(e=this._mediaDataSource)||void 0===e?void 0:e.segments)||void 0===t?void 0:t.length)||0)?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(i)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(TA.A.LOADING_COMPLETE),this._disableStatisticsReporter())},A.prototype._onIORedirect=function(A){var e,t=null===(e=this._ioctl)||void 0===e?void 0:e.extraData;this._mediaDataSource.segments&&(this._mediaDataSource.segments[t].redirectedURL=A)},A.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(TA.A.RECOVERED_EARLY_EOF)},A.prototype._onIOException=function(A,e){d.A.e(this.TAG,"IOException: type = ".concat(A,", code = ").concat(e.code,", msg = ").concat(e.msg)),this._emitter.emit(TA.A.IO_ERROR,A,e),this._disableStatisticsReporter()},A.prototype._onDemuxException=function(A,e){d.A.e(this.TAG,"DemuxException: type = ".concat(A,", info = ").concat(e)),this._emitter.emit(TA.A.DEMUX_ERROR,A,e)},A.prototype._onRemuxerInitSegmentArrival=function(A,e){this._emitter.emit(TA.A.INIT_SEGMENT,A,e)},A.prototype._onRemuxerMediaSegmentArrival=function(A,e){if(null==this._pendingSeekTime&&(this._emitter.emit(TA.A.MEDIA_SEGMENT,A,e),null!=this._pendingResolveSeekPoint&&"video"===A)){var t=e.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,I.A.safari&&t.length>0&&t[0].originalDts===i&&(i=t[0].pts),this._emitter.emit(TA.A.RECOMMEND_SEEKPOINT,i)}},A.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&this._reportStatisticsInfo&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},A.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},A.prototype._reportSegmentMediaInfo=function(A){var e,t,i,n,a=(null===(e=this._mediaInfo)||void 0===e?void 0:e.segments)?null===(t=this._mediaInfo)||void 0===t?void 0:t.segments[A]:{},r=Object.assign({},a);r.duration=null===(i=this._mediaInfo)||void 0===i?void 0:i.duration,r.segmentCount=null===(n=this._mediaInfo)||void 0===n?void 0:n.segmentCount,delete r.segments,delete r.keyframesIndex,this._emitter.emit(TA.A.MEDIA_INFO,r)},A.prototype._reportStatisticsInfo=function(){var A,e,t,i,n,a,r={};r.url=null===(A=this._ioctl)||void 0===A?void 0:A.currentURL,r.hasRedirect=null===(e=this._ioctl)||void 0===e?void 0:e.hasRedirect,r.hasRedirect&&(r.redirectedURL=null===(t=this._ioctl)||void 0===t?void 0:t.currentRedirectedURL),r.speed=null===(i=this._ioctl)||void 0===i?void 0:i.currentSpeed,r.loaderType=null===(n=this._ioctl)||void 0===n?void 0:n.loaderType,r.currentSegmentIndex=this._currentSegmentIndex,r.totalSegmentCount=null===(a=this._mediaDataSource.segments)||void 0===a?void 0:a.length,this._emitter.emit(TA.A.STATISTICS_INFO,r)},A}()},716:function(A,e,t){t.d(e,{A:function(){return i}});var i={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},291:function(A,e,t){var i=function(A,e){var t={msg:x.A.INIT_SEGMENT,data:{type:A,data:e}};self.postMessage(t,[e.data])},n=function(A,e){var t={msg:x.A.MEDIA_SEGMENT,data:{type:A,data:e}};self.postMessage(t,[e.data])},a=function(){var A={msg:x.A.LOADING_COMPLETE};self.postMessage(A)},r=function(){var A={msg:x.A.RECOVERED_EARLY_EOF};self.postMessage(A)},o=function(A){var e={msg:x.A.MEDIA_INFO,data:A};self.postMessage(e)},s=function(A){var e={msg:x.A.METADATA_ARRIVED,data:A};self.postMessage(e)},g=function(A){var e={msg:x.A.SCRIPTDATA_ARRIVED,data:A};self.postMessage(e)},l=function(A){var e={msg:x.A.TIMED_ID3_METADATA_ARRIVED,data:A};self.postMessage(e)},c=function(A){var e={msg:x.A.SMPTE2038_METADATA_ARRIVED,data:A};self.postMessage(e)},d=function(A){var e={msg:x.A.SCTE35_METADATA_ARRIVED,data:A};self.postMessage(e)},I=function(A){var e={msg:x.A.PES_PRIVATE_DATA_DESCRIPTOR,data:A};self.postMessage(e)},C=function(A){var e={msg:x.A.PES_PRIVATE_DATA_ARRIVED,data:A};self.postMessage(e)},h=function(A){var e={msg:x.A.STATISTICS_INFO,data:A};self.postMessage(e)},u=function(A,e){self.postMessage({msg:x.A.IO_ERROR,data:{type:A,info:e}})},B=function(A,e){self.postMessage({msg:x.A.DEMUX_ERROR,data:{type:A,info:e}})},E=function(A){self.postMessage({msg:x.A.RECOMMEND_SEEKPOINT,data:A})},f=t(641),Q=t(976),x=t(716),p=null,m=function(A,e){self.postMessage({msg:"logcat_callback",data:{type:A,logcat:e}})};self.addEventListener("message",(function(A){switch(A.data.cmd){case"init":(p=new Q.A(A.data.param[0],A.data.param[1])).on(x.A.IO_ERROR,u),p.on(x.A.DEMUX_ERROR,B),p.on(x.A.INIT_SEGMENT,i),p.on(x.A.MEDIA_SEGMENT,n),p.on(x.A.LOADING_COMPLETE,a),p.on(x.A.RECOVERED_EARLY_EOF,r),p.on(x.A.MEDIA_INFO,o),p.on(x.A.METADATA_ARRIVED,s),p.on(x.A.SCRIPTDATA_ARRIVED,g),p.on(x.A.TIMED_ID3_METADATA_ARRIVED,l),p.on(x.A.SMPTE2038_METADATA_ARRIVED,c),p.on(x.A.SCTE35_METADATA_ARRIVED,d),p.on(x.A.PES_PRIVATE_DATA_DESCRIPTOR,I),p.on(x.A.PES_PRIVATE_DATA_ARRIVED,C),p.on(x.A.STATISTICS_INFO,h),p.on(x.A.RECOMMEND_SEEKPOINT,E);break;case"destroy":p&&(p.destroy(),p=null),self.postMessage({msg:"destroyed"});break;case"start":null==p||p.start();break;case"stop":null==p||p.stop();break;case"seek":null==p||p.seek(A.data.param);break;case"pause":null==p||p.pause();break;case"resume":null==p||p.resume();break;case"logging_config":var e=A.data.param;f.A.applyConfig(e),!0===e.enableCallback?f.A.addLogListener(m):f.A.removeLogListener(m)}}))},465:function(A,e,t){t.d(e,{A:function(){return i}});var i={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},133:function(A,e,n){var a=function(){return Object.assign({},I)},r=function(A){return(A+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")},o=function(A){return!isNaN(1*A)},s=function(A,e,t){var i={};i[t]=[];var a=e.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||a.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!s)return i;for(var g,l=s[1],c=new RegExp("(\\\\n|\\W)"+r(l)+m,"g");g=c.exec(a);)"dll-reference"!==g[3]&&i[t].push(g[3]);for(c=new RegExp("\\("+r(l)+'\\("(dll-reference\\s('+p+'))"\\)\\)'+m,"g");g=c.exec(a);)A[g[2]]||(i[t].push(g[1]),A[g[2]]=n(g[1]).m),i[g[2]]=i[g[2]]||[],i[g[2]].push(g[4]);for(var d=Object.keys(i),I=0;I0}),!1)},l=function(A,e,t,i){var n=A[i].map((function(A){return'"'+A+'": '+e[i][A].toString()})).join(","),a=x.toString().split("ENTRY_MODULE");return a[0]+"{"+n+"}"+a[1]+'"'+t+'"'+a[2]};n.d(e,{default:function(){return V}});var c={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32},d=n(302),I={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0,url:void 0,redirectedURL:void 0,cors:!1},C=function(){function A(){}return A.supportMSEH264Playback=function(){var A;return null===(A=window.MediaSource)||void 0===A?void 0:A.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},A.supportMSEH265Playback=function(){var A;return null===(A=window.MediaSource)||void 0===A?void 0:A.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"')},A.supportNetworkStreamIO=function(){var A=new d.A({},a()),e=A.loaderType;return A.destroy(),"fetch-stream-loader"===e||"xhr-moz-chunked-loader"===e},A.getNetworkLoaderTypeName=function(){var A=new d.A({},a()),e=A.loaderType;return A.destroy(),e},A.supportNativeMediaPlayback=function(e){void 0===A.videoElement&&(A.videoElement=window.document.createElement("video"));var t=A.videoElement.canPlayType(e);return"probably"===t||"maybe"===t},A.getFeatureList=function(){var e={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.msePlayback=A.supportMSEH264Playback(),e.networkStreamIO=A.supportNetworkStreamIO(),e.networkLoaderName=A.getNetworkLoaderTypeName()||"",e.mseLivePlayback=e.msePlayback&&e.networkStreamIO,e.mseH265Playback=A.supportMSEH265Playback(),e.nativeMP4H264Playback=A.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeMP4H265Playback=A.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),e.nativeWebmVP8Playback=A.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=A.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e},A}(),h=C,u=n(288),B=n(413),E=n(502),f=n(620),Q={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",DESTROYING:"destroying"},x=function(){var A=ENTRY_MODULE,e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return A[i](n,n.exports,t),n.exports}t.m=A,t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,{a:e}),e},t.d=function(A,e){for(var i in e)t.o(e,i)&&!t.o(A,i)&&Object.defineProperty(A,i,{enumerable:!0,get:e[i]})},t.g=function(){if("[object Object]"===Object.prototype.toString.call(globalThis))return globalThis;try{return this||new Function("return this")()}catch(A){if("[object Object]"===Object.prototype.toString.call(window))return window}}(),t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var i=t(ENTRY_MODULE);return i.default||i};x.toString();var p="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+p+").*?\\)",y=n(641),_=n(976),S=n(716),D=n(825),v=function(){function A(A,e){if(this.TAG="Transmuxer",this._workerDestroying=!1,this._controller=null,this._emitter=new B.A,e.enableWorker&&"undefined"!=typeof Worker)try{this._worker=this._worker=function(A,e){e=e||{};var t={main:n.m},i=e.all?{main:Object.keys(t.main)}:function(A,e){for(var t={main:[e]},i={main:[]},n={main:{}};g(t);)for(var a=Object.keys(t),r=0;r0&&(n+=";codecs=".concat(i.codec));var a=!1;if(E.A.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])E.A.v(this.TAG,"Notice: ".concat(i.type," mimeType changed, origin: ").concat(this._mimeTypes[i.type]||"",", target: ").concat(n));else{a=!0;try{var r=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);r.addEventListener("error",this.e.onSourceBufferError),r.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(A){return E.A.e(this.TAG,A.message),void this._emitter.emit(b,{code:A.code,msg:A.message})}}this._mimeTypes[i.type]=n}e||this._pendingSegments[i.type].push(i),a||this._sourceBuffers[i.type]&&!(null===(t=this._sourceBuffers[i.type])||void 0===t?void 0:t.updating)&&this._doAppendSegments(),f.A.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())},A.prototype.appendMediaSegment=function(A){var e=A;this._pendingSegments[e.type].push(e),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var t=this._sourceBuffers[e.type];!t||t.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},A.prototype.seek=function(A){var e,t;for(var i in this._sourceBuffers)if(this._sourceBuffers[i]){var n=this._sourceBuffers[i];if("open"===(null===(e=this._mediaSource)||void 0===e?void 0:e.readyState))try{null==n||n.abort()}catch(A){E.A.e(this.TAG,A.message)}this._idrList.clear();var a=this._pendingSegments[i];if(a.splice(0,a.length),"closed"!==(null===(t=this._mediaSource)||void 0===t?void 0:t.readyState)){if(n){for(var r=0;r=1&&t-a.start(0)>=((null===(e=this._config)||void 0===e?void 0:e.autoCleanupMaxBackwardDuration)||0))return!0}}return!1},A.prototype._doCleanupSourceBuffer=function(){var A,e,t,i=null===(A=this._mediaElement)||void 0===A?void 0:A.currentTime;for(var n in this._sourceBuffers){var a=this._sourceBuffers[n];if(a){for(var r=a.buffered,o=!1,s=0;s=((null===(e=this._config)||void 0===e?void 0:e.autoCleanupMaxBackwardDuration)||0)){o=!0;var c=i-((null===(t=this._config)||void 0===t?void 0:t.autoCleanupMinBackwardDuration)||0);this._pendingRemoveRanges[n].push({start:g,end:c})}}else l0&&(isNaN(a)||r>a)&&(E.A.v(this.TAG,"Update MediaSource duration from ".concat(a," to ").concat(r)),this._mediaSource.duration=r),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},A.prototype._doRemoveRanges=function(){var A;for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!(null===(A=this._sourceBuffers[e])||void 0===A?void 0:A.updating))for(var t=this._sourceBuffers[e],i=this._pendingRemoveRanges[e];i.length&&!(null==t?void 0:t.updating);){var n=i.shift();null==t||t.remove(n.start,n.end)}},A.prototype._doAppendSegments=function(){var A,e,t,i=this._pendingSegments;for(var n in i)if(this._sourceBuffers[n]&&!(null===(A=this._sourceBuffers[n])||void 0===A?void 0:A.updating)&&i[n].length>0){var a=i[n].shift();if(null==a?void 0:a.timestampOffset){var r=(null===(e=this._sourceBuffers[n])||void 0===e?void 0:e.timestampOffset)||0,o=a.timestampOffset/1e3;Math.abs(r-o)>.1&&(E.A.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(o)),this._sourceBuffers[n]&&(this._sourceBuffers[n].timestampOffset=o)),delete a.timestampOffset}if(!a.data||0===a.data.byteLength)continue;try{null===(t=this._sourceBuffers[n])||void 0===t||t.appendBuffer(a.data),this._isBufferFull=!1,"video"===n&&a.hasOwnProperty("info")&&this._idrList.appendArray(a.info.syncPoints)}catch(A){this._pendingSegments[n].unshift(a),22===A.code?(this._isBufferFull||this._emitter.emit(k),this._isBufferFull=!0):(E.A.e(this.TAG,A.message),this._emitter.emit(b,{code:A.code,msg:A.message}))}}},A.prototype._onSourceOpen=function(){var A;if(E.A.v(this.TAG,"MediaSource onSourceOpen"),null===(A=this._mediaSource)||void 0===A||A.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(F)},A.prototype._onSourceEnded=function(){E.A.v(this.TAG,"MediaSource onSourceEnded")},A.prototype._onSourceClose=function(){E.A.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},A.prototype._hasPendingSegments=function(){var A=this._pendingSegments;return A.video.length>0||A.audio.length>0},A.prototype._hasPendingRemoveRanges=function(){var A=this._pendingRemoveRanges;return A.video.length>0||A.audio.length>0},A.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(R)},A.prototype._onSourceBufferError=function(A){E.A.e(this.TAG,"SourceBuffer Error: ".concat(A))},A}(),M=T,L=n(465),G={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Y={NETWORK_EXCEPTION:u.Xv.EXCEPTION,NETWORK_STATUS_CODE_INVALID:u.Xv.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:u.Xv.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:u.Xv.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:L.A.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:L.A.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:L.A.CODEC_UNSUPPORTED},U=function(){function A(A,e){var t,n,r;this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new B.A,this._config=a(),"object"==(void 0===e?"undefined":i(e))&&Object.assign(this._config,e);var o=A.type.toLowerCase();if("mse"!==o&&"mpegts"!==o&&"m2ts"!==o&&"flv"!==o)throw new N.Qn("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");A.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=A,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var s=f.A.chrome&&(f.A.version&&(null===(t=f.A.version)||void 0===t?void 0:t.major)<50||f.A.version&&50===(null===(n=null===f.A||void 0===f.A?void 0:f.A.version)||void 0===n?void 0:n.major)&&((null===(r=null===f.A||void 0===f.A?void 0:f.A.version)||void 0===r?void 0:r.build)||-1)<2661);this._alwaysSeekKeyframe=!!(s||f.A.msedge||f.A.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return A.prototype.destroy=function(){this._emitter.emit(Q.DESTROYING),null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},A.prototype.on=function(A,e){var t=this;A===Q.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){t._emitter.emit(Q.MEDIA_INFO,t.mediaInfo)})):A===Q.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){t._emitter.emit(Q.STATISTICS_INFO,t.statisticsInfo)})),this._emitter.addListener(A,e)},A.prototype.off=function(A,e){this._emitter.removeListener(A,e)},A.prototype.attachMediaElement=function(A){var e,t,i,n,a,r=this;if(this._mediaElement=A,A.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),A.addEventListener("seeking",this.e.onvSeeking),A.addEventListener("canplay",this.e.onvCanPlay),A.addEventListener("stalled",this.e.onvStalled),A.addEventListener("progress",this.e.onvProgress),this._msectl=new M(this._config),null===(e=this._msectl)||void 0===e||e.on(R,this._onmseUpdateEnd.bind(this)),null===(t=this._msectl)||void 0===t||t.on(k,this._onmseBufferFull.bind(this)),null===(i=this._msectl)||void 0===i||i.on(F,(function(){r._mseSourceOpened=!0,r._hasPendingLoad&&(r._hasPendingLoad=!1,r.load())})),null===(n=this._msectl)||void 0===n||n.on(b,(function(A){r._emitter.emit(Q.ERROR,G.MEDIA_ERROR,Y.MEDIA_MSE_ERROR,A)})),null===(a=this._msectl)||void 0===a||a.attachMediaElement(A),null!=this._pendingSeekTime)try{A.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(A){}},A.prototype.detachMediaElement=function(){var A;this._mediaElement&&(null===(A=this._msectl)||void 0===A||A.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},A.prototype.load=function(){var A=this;if(!this._mediaElement)throw new N.j4("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new N.j4("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(!this._config.deferLoadAfterSourceOpen||this._mseSourceOpened?(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new w(this._mediaDataSource,this._config),this._transmuxer.on(S.A.INIT_SEGMENT,(function(e,t){var i;null===(i=A._msectl)||void 0===i||i.appendInitSegment(t)})),this._transmuxer.on(S.A.MEDIA_SEGMENT,(function(e,t){var i,n,a;if(null===(i=A._msectl)||void 0===i||i.appendMediaSegment(t),A._config.lazyLoad&&!A._config.isLive){var r=null===(n=A._mediaElement)||void 0===n?void 0:n.currentTime;t.info.endDts>=1e3*(r+((null===(a=A._config)||void 0===a?void 0:a.lazyLoadMaxDuration)||0))&&null==A._progressChecker&&(E.A.v(A.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),A._suspendTransmuxer())}})),this._transmuxer.on(S.A.LOADING_COMPLETE,(function(){var e;null===(e=A._msectl)||void 0===e||e.endOfStream(),A._emitter.emit(Q.LOADING_COMPLETE)})),this._transmuxer.on(S.A.RECOVERED_EARLY_EOF,(function(){A._emitter.emit(Q.RECOVERED_EARLY_EOF)})),this._transmuxer.on(S.A.IO_ERROR,(function(e,t){A._emitter.emit(Q.ERROR,G.NETWORK_ERROR,e,t)})),this._transmuxer.on(S.A.DEMUX_ERROR,(function(e,t){A._emitter.emit(Q.ERROR,G.MEDIA_ERROR,e,{code:-1,msg:t})})),this._transmuxer.on(S.A.MEDIA_INFO,(function(e){A._mediaInfo=e,A._emitter.emit(Q.MEDIA_INFO,Object.assign({},e))})),this._transmuxer.on(S.A.METADATA_ARRIVED,(function(e){A._emitter.emit(Q.METADATA_ARRIVED,e)})),this._transmuxer.on(S.A.SCRIPTDATA_ARRIVED,(function(e){A._emitter.emit(Q.SCRIPTDATA_ARRIVED,e)})),this._transmuxer.on(S.A.TIMED_ID3_METADATA_ARRIVED,(function(e){A._emitter.emit(Q.TIMED_ID3_METADATA_ARRIVED,e)})),this._transmuxer.on(S.A.SMPTE2038_METADATA_ARRIVED,(function(e){A._emitter.emit(Q.SMPTE2038_METADATA_ARRIVED,e)})),this._transmuxer.on(S.A.SCTE35_METADATA_ARRIVED,(function(e){A._emitter.emit(Q.SCTE35_METADATA_ARRIVED,e)})),this._transmuxer.on(S.A.PES_PRIVATE_DATA_DESCRIPTOR,(function(e){A._emitter.emit(Q.PES_PRIVATE_DATA_DESCRIPTOR,e)})),this._transmuxer.on(S.A.PES_PRIVATE_DATA_ARRIVED,(function(e){A._emitter.emit(Q.PES_PRIVATE_DATA_ARRIVED,e)})),this._transmuxer.on(S.A.STATISTICS_INFO,(function(e){A._statisticsInfo=A._fillStatisticsInfo(e),A._emitter.emit(Q.STATISTICS_INFO,Object.assign({},A._statisticsInfo))})),this._transmuxer.on(S.A.RECOMMEND_SEEKPOINT,(function(e){A._mediaElement&&!A._config.accurateSeek&&(A._requestSetTime=!0,A._mediaElement.currentTime=e/1e3)})),this._transmuxer.open()):this._hasPendingLoad=!0)},A.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},A.prototype.play=function(){var A;return function(A,e,i,n){return new(i||(i=Promise))((function(e,a){function r(A){try{s(n.next(A))}catch(A){a(A)}}function o(A){try{s(n.throw(A))}catch(A){a(A)}}function s(A){var n;A.done?e(A.value):(n=A.value,t(n,i)?n:new i((function(A){A(n)}))).then(r,o)}s((n=n.apply(A,[])).next())}))}(this,0,void 0,(function(){return function(A,e){var t,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(r=0)),r;)try{if(t=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,i=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]0&&!(null===(t=this._mediaElement)||void 0===t?void 0:t.paused)){var r=n.end(n.length-1);if(r>((null===(i=this._config)||void 0===i?void 0:i.liveBufferLatencyMaxLatency)||0)&&r-a>(this._config.liveBufferLatencyMaxLatency||0)){var o=r-(this._config.liveBufferLatencyMinRemain||0);this.currentTime=o}}if(this._config.lazyLoad&&!this._config.isLive){for(var s=0,g=0;g=a+(this._config.lazyLoadMaxDuration||0)&&null==this._progressChecker&&(E.A.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},A.prototype._onmseBufferFull=function(){E.A.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},A.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},A.prototype._checkProgressAndResume=function(){for(var A,e,t,i=(null===(A=this._mediaElement)||void 0===A?void 0:A.currentTime)||0,n=null===(e=this._mediaElement)||void 0===e?void 0:e.buffered,a=!1,r=0;r=o&&i=s-(this._config.lazyLoadRecoverDuration||0)&&(a=!0);break}}a&&(window.clearInterval(this._progressChecker),this._progressChecker=null,a&&(E.A.v(this.TAG,"Continue loading from paused position"),null===(t=this._transmuxer)||void 0===t||t.resume()))},A.prototype._isTimepointBuffered=function(A){for(var e,t=null===(e=this._mediaElement)||void 0===e?void 0:e.buffered,i=0;i=n&&A0){var g=(null===(t=this._mediaElement)||void 0===t?void 0:t.buffered).start(0);(g<1&&A0&&e.currentTime0){var r=a.start(0);if(r<1&&n0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},A.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},A.prototype.play=function(){var A;return function(A,e,i,n){return new(i||(i=Promise))((function(e,a){function r(A){try{s(n.next(A))}catch(A){a(A)}}function o(A){try{s(n.throw(A))}catch(A){a(A)}}function s(A){var n;A.done?e(A.value):(n=A.value,t(n,i)?n:new i((function(A){A(n)}))).then(r,o)}s((n=n.apply(A,[])).next())}))}(this,0,void 0,(function(){return function(A,e){var t,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(r=0)),r;)try{if(t=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,i=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"averageKBps",{get:function(){var A=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/A/1024},enumerable:!1,configurable:!0}),A}(),s=n(288),g=n(620),l=n(713),c=(a=function(A,e){return a=Object.setPrototypeOf||t({__proto__:[]},Array)&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])},a(A,e)},function(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=A}a(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),d=function(A){function e(e,t){var i=A.call(this,"fetch-stream-loader")||this;return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=t,i._needStash=!0,i._requestAbort=!1,i._abortController=null,i._contentLength=null,i._receivedLength=0,i}return c(e,A),e.isSupported=function(){var A;try{var e=g.A.msedge&&((null===(A=null===g.A||void 0===g.A?void 0:g.A.version)||void 0===A?void 0:A.minor)||0)>=15048&&!g.A.webkit,t=!g.A.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(A){return!1}},e.prototype.destroy=function(){this.isWorking()&&this.abort(),A.prototype.destroy.call(this)},e.prototype.open=function(A,e){var t=this;this._dataSource=A,this._range=e;var n=A.url;this._config.reuseRedirectedURL&&void 0!==A.redirectedURL&&(n=A.redirectedURL);var a=this._seekHandler.getConfig(n,e),r=new self.Headers;if("object"==i(a.headers)){var o=a.headers;for(var g in o)o.hasOwnProperty(g)&&r.append(g,o[g])}var c={method:"GET",headers:r,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==i(this._config.headers))for(var g in this._config.headers)r.append(g,this._config.headers[g]);A.cors||(c.mode="same-origin"),A.withCredentials&&(c.credentials="include"),(null==A?void 0:A.referrerPolicy)&&(c.referrerPolicy=A.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,this._abortController&&(c.signal=this._abortController.signal)),this._status=s.eO.kConnecting,self.fetch(a.url,c).then((function(A){var e,i;if(t._requestAbort)return t._status=s.eO.kIdle,void(null===(e=A.body)||void 0===e||e.cancel());if(A.ok&&A.status>=200&&A.status<=299){if(A.url!==a.url&&t._onURLRedirect){var n=t._seekHandler.removeURLParameters(A.url);t._onURLRedirect(n)}var r=A.headers.get("Content-Length");return null!=r&&(t._contentLength=parseInt(r),0!==t._contentLength&&t._onContentLengthKnown&&t._onContentLengthKnown(t._contentLength)),t._pump.call(t,null===(i=A.body)||void 0===i?void 0:i.getReader())}if(t._status=s.eO.kError,!t._onError)throw new l.Al("FetchStreamLoader: Http code invalid, "+A.status+" "+A.statusText);t._onError(s.Xv.HTTP_STATUS_CODE_INVALID,{code:A.status,msg:A.statusText})})).catch((function(A){var e;if(!(null===(e=t._abortController)||void 0===e?void 0:e.signal.aborted)){if(t._status=s.eO.kError,!t._onError)throw A;t._onError(s.Xv.EXCEPTION,{code:-1,msg:A.message})}}))},e.prototype.abort=function(){var A;if(this._requestAbort=!0,(this._status!==s.eO.kBuffering||!g.A.chrome)&&this._abortController)try{null===(A=this._abortController)||void 0===A||A.abort()}catch(A){}},e.prototype._pump=function(A){var e=this;return A.read().then((function(t){var i,n,a,r;if(t.done)if(null!==e._contentLength&&e._receivedLength299)){if(this._status=s.eO.kError,!this._onError)throw new l.Al("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(s.Xv.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else this._status=s.eO.kBuffering}},e.prototype._onProgress=function(A){var e;if(this._status!==s.eO.kError){null===this._contentLength&&null!==A.total&&0!==A.total&&(this._contentLength=A.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=A.target.response,i=((null===(e=this._range)||void 0===e?void 0:e.from)||0)+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}},e.prototype._onLoadEnd=function(A){this._requestAbort?this._requestAbort=!1:this._status!==s.eO.kError&&(this._status=s.eO.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))},e.prototype._onXhrError=function(A){this._status=s.eO.kError;var e=0,t=null;if(this._contentLength&&A.loaded=this._contentLength&&(n=((null===(e=this._range)||void 0===e?void 0:e.from)||0)+this._contentLength-1),this._currentRequestRange={from:i,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)},e.prototype._internalOpen=function(A,e){this._lastTimeLoaded=0;var t=A.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?t=this._currentRedirectedURL:null!=A.redirectedURL&&(t=A.redirectedURL));var n=this._seekHandler.getConfig(t,e);this._currentRequestURL=n.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",n.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),A.withCredentials&&(a.withCredentials=!0),"object"==i(n.headers)){var r=n.headers;for(var o in r)r.hasOwnProperty(o)&&a.setRequestHeader(o,r[o])}if("object"==i(this._config.headers))for(var o in r=this._config.headers)r.hasOwnProperty(o)&&a.setRequestHeader(o,r[o]);a.send()},e.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=s.eO.kComplete},e.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},e.prototype._onReadyStateChange=function(A){var e=A.target;if(2===e.readyState){if(null!=e.responseURL){var t=this._seekHandler.removeURLParameters(e.responseURL);e.responseURL!==this._currentRequestURL&&t!==this._currentRedirectedURL&&(this._currentRedirectedURL=t,this._onURLRedirect&&this._onURLRedirect(t))}if(e.status>=200&&e.status<=299){if(this._waitForTotalLength)return;this._status=s.eO.kBuffering}else{if(this._status=s.eO.kError,!this._onError)throw new l.Al("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(s.Xv.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}}},e.prototype._onProgress=function(A){if(this._status!==s.eO.kError){if(null===this._contentLength){var e=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,e=!0;var t=A.total;this._internalAbort(),null!=t&&0!==t&&(this._totalLength=t)}if(-1===this._range.to?this._contentLength=(this._totalLength||0)-this._range.from:this._contentLength=this._range.to-this._range.from+1,e)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=A.loaded-this._lastTimeLoaded;this._lastTimeLoaded=A.loaded,this._speedSampler.addBytes(i)}},e.prototype._normalizeSpeed=function(A){var e=this._chunkSizeKBList,t=e.length-1,i=0,n=0,a=t;if(A=e[i]&&A=3&&(e=this._speedSampler.currentKBps)),0!==e){var t=this._normalizeSpeed(e);this._currentSpeedNormalized!==t&&(this._currentSpeedNormalized=t,this._currentChunkSizeKB=t)}var i=A.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0)for(var a=e.split("&"),r=0;r0;o[0]!==this._startName&&o[0]!==this._endName&&(s&&(n+="&"),n+=a[r])}return 0===n.length?t:t+"?"+n},A}(),x=function(){function A(A,e,t){this.TAG="IOController",this._config=e,this._extraData=t,this._stashInitialSize=65536,void 0!==e.stashInitialSize&&e.stashInitialSize>0&&(this._stashInitialSize=e.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,e.enableStashBuffer||(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=A,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(A.url||""),this._refTotalLength=A.filesize?A.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new o,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return A.prototype.destroy=function(){var A,e,t;(null===(A=this._loader)||void 0===A?void 0:A.isWorking())&&(null===(e=this._loader)||void 0===e||e.abort()),null===(t=this._loader)||void 0===t||t.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},A.prototype.isWorking=function(){var A;return(null===(A=this._loader)||void 0===A?void 0:A.isWorking())&&!this._paused},A.prototype.isPaused=function(){return this._paused},Object.defineProperty(A.prototype,"status",{get:function(){var A;return null===(A=this._loader)||void 0===A?void 0:A.status},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"extraData",{get:function(){return this._extraData},set:function(A){this._extraData=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(A){this._onDataArrival=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(A){this._onSeeked=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onError",{get:function(){return this._onError},set:function(A){this._onError=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onComplete",{get:function(){return this._onComplete},set:function(A){this._onComplete=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(A){this._onRedirect=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(A){this._onRecoveredEarlyEof=A},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"currentURL",{get:function(){var A;return null===(A=this._dataSource)||void 0===A?void 0:A.url},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"hasRedirect",{get:function(){var A;return null!=this._redirectedURL||void 0!==(null===(A=this._dataSource)||void 0===A?void 0:A.redirectedURL)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"currentRedirectedURL",{get:function(){var A;return this._redirectedURL||(null===(A=this._dataSource)||void 0===A?void 0:A.redirectedURL)},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"currentSpeed",{get:function(){var A,e;return this._loaderClass===u?null===(A=this._loader)||void 0===A?void 0:A.currentSpeed:null===(e=this._speedSampler)||void 0===e?void 0:e.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"loaderType",{get:function(){var A;return null===(A=this._loader)||void 0===A?void 0:A.type},enumerable:!1,configurable:!0}),A.prototype._selectSeekHandler=function(){var A=this._config;if("range"===A.seekType)this._seekHandler=new f(!!this._config.rangeLoadZeroStart);else if("param"===A.seekType){var e=A.seekParamStart||"bstart",t=A.seekParamEnd||"bend";this._seekHandler=new Q(e,t)}else{if("custom"!==A.seekType)throw new l.Qn("Invalid seekType in config: ".concat((null==A?void 0:A.seekType)||""));if("function"!=typeof A.customSeekHandler)throw new l.Qn("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new A.customSeekHandler}},A.prototype._selectLoader=function(){var A;if(null!=this._config.customLoader)this._loaderClass=(null===(A=this._config)||void 0===A?void 0:A.customLoader)||null;else if(this._isWebSocketURL)this._loaderClass=E;else if(d.isSupported())this._loaderClass=d;else if(C.isSupported())this._loaderClass=C;else{if(!u.isSupported())throw new l.Al("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=u}},A.prototype._createLoader=function(){var A;this._loaderClass&&(this._loader=new this._loaderClass(this._seekHandler,this._config),(null===(A=this._loader)||void 0===A?void 0:A.needStashBuffer)||(this._enableStash=!1),this._loader&&(this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)))},A.prototype.open=function(A){var e,t;this._currentRange={from:0,to:-1},A&&(this._currentRange.from=A),null===(e=this._speedSampler)||void 0===e||e.reset(),A||(this._fullRequestFlag=!0),null===(t=this._loader)||void 0===t||t.open(this._dataSource,Object.assign({},this._currentRange))},A.prototype.abort=function(){var A;null===(A=this._loader)||void 0===A||A.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},A.prototype.pause=function(){var A,e;this.isWorking()&&(null===(A=this._loader)||void 0===A||A.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange&&(this._currentRange.to=this._stashByteStart-1)):this._resumeFrom=((null===(e=this._currentRange)||void 0===e?void 0:e.to)||0)+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},A.prototype.resume=function(){if(this._paused){this._paused=!1;var A=this._resumeFrom;this._resumeFrom=0,this._internalSeek(A,!0)}},A.prototype.seek=function(A){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(A,!0)},A.prototype._internalSeek=function(A,e){var t,i,n,a;(null===(t=this._loader)||void 0===t?void 0:t.isWorking())&&(null===(i=this._loader)||void 0===i||i.abort()),this._flushStashBuffer(e),null===(n=this._loader)||void 0===n||n.destroy(),this._loader=null;var r={from:A,to:-1};this._currentRange={from:r.from,to:-1},null===(a=this._speedSampler)||void 0===a||a.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,r),this._onSeeked&&this._onSeeked()},A.prototype.updateUrl=function(A){if(!A||"string"!=typeof A||0===A.length)throw new l.Qn("Url must be a non-empty string!");this._dataSource.url=A},A.prototype._expandBuffer=function(A){for(var e=this._stashSize;e+10485760){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(t,0,e).set(i,0)}this._stashBuffer=t,this._bufferSize=e}},A.prototype._normalizeSpeed=function(A){var e=this._speedNormalizeList,t=e.length-1,i=0,n=0,a=t;if(A=e[i]&&A=512&&A<=1024?Math.floor(1.5*A):2*A)>8192&&(e=8192);var t=1024*e+1048576;this._bufferSize0){var o=this._stashBuffer.slice(0,this._stashUsed);(c=this._dispatchChunks(o,this._stashByteStart))0&&(d=new Uint8Array(o,c),g.set(d,0),this._stashUsed=d.byteLength,this._stashByteStart+=c):(this._stashUsed=0,this._stashByteStart+=c),this._stashUsed+A.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+A.byteLength),g=new Uint8Array(this._stashBuffer,0,this._bufferSize)),g.set(new Uint8Array(A),this._stashUsed),this._stashUsed+=A.byteLength}else(c=this._dispatchChunks(A,e))this._bufferSize&&(this._expandBuffer(s),g=new Uint8Array(this._stashBuffer,0,this._bufferSize)),g.set(new Uint8Array(A,c),0),this._stashUsed+=s,this._stashByteStart=e+c);else if(0===this._stashUsed){var s;(c=this._dispatchChunks(A,e))this._bufferSize&&this._expandBuffer(s),(g=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(A,c),0),this._stashUsed+=s,this._stashByteStart=e+c)}else{var g,c;if(this._stashUsed+A.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+A.byteLength),(g=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(A),this._stashUsed),this._stashUsed+=A.byteLength,(c=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))0){var d=new Uint8Array(this._stashBuffer,c);g.set(d,0)}this._stashUsed-=c,this._stashByteStart+=c}}},A.prototype._flushStashBuffer=function(A){if(this._stashUsed>0){var e=this._stashBuffer.slice(0,this._stashUsed),t=this._dispatchChunks(e,this._stashByteStart),i=e.byteLength-t;if(t0){var n=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(e,t);n.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=t}return 0}r.A.w(this.TAG,"".concat(i," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,i}return 0},A.prototype._onLoaderComplete=function(A,e){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},A.prototype._onLoaderError=function(A,e){var t;switch(r.A.e(this.TAG,"Loader error, code = ".concat(e.code,", msg = ").concat(e.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,A=s.Xv.UNRECOVERABLE_EARLY_EOF),A){case s.Xv.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var i=((null===(t=this._currentRange)||void 0===t?void 0:t.to)||0)+1;return void(i1&&(a.version.minor=parseInt(r[1],10)),r.length>2&&(a.version.build=parseInt(r[2],10))}if(n.platform&&(a[n.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),a.rv||a.iemobile){a.rv&&delete a.rv;var o="msie";n.browser=o,a[o]=!0}if(a.edge){delete a.edge;var s="msedge";n.browser=s,a[s]=!0}if(a.opr){var g="opera";n.browser=g,a[g]=!0}if(a.safari&&a.android){var l="android";n.browser=l,a[l]=!0}for(var c in a.name=n.browser,a.platform=n.platform,i)Object.prototype.hasOwnProperty.call(i,c)&&delete i[c];Object.assign(i,a)}();var n=i},713:function(A,e,i){i.d(e,{Al:function(){return r},Qn:function(){return s},Xu:function(){return g},j4:function(){return o}});var n,a=(n=function(A,e){return n=Object.setPrototypeOf||t({__proto__:[]},Array)&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])},n(A,e)},function(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=A}n(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),r=function(){function A(A){this.name="RuntimeException",this._message=A}return Object.defineProperty(A.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),A.prototype.toString=function(){return this.name+": "+this.message},A}(),o=function(A){function e(e){var t=A.call(this,e)||this;return t.name="IllegalStateException",t}return a(e,A),e}(r),s=function(A){function e(e){var t=A.call(this,e)||this;return t.name="InvalidArgumentException",t}return a(e,A),e}(r),g=function(A){function e(e){var t=A.call(this,e)||this;return t.name="NotImplementedException",t}return a(e,A),e}(r)},502:function(A,e,t){t.d(e,{A:function(){return n}});var i=t(413),n=function(){function A(){}return A.e=function(e,t){var i;e&&!A.FORCE_GLOBAL_TAG||(e=A.GLOBAL_TAG);var n="[".concat(e,"] > ").concat(t);A.ENABLE_CALLBACK&&(null===(i=A.emitter)||void 0===i||i.emit("log","error",n)),A.ENABLE_ERROR&&(console.error||console.warn)},A.i=function(e,t){e&&!A.FORCE_GLOBAL_TAG||(e=A.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(t);A.ENABLE_CALLBACK&&A.emitter.emit("log","info",i),A.ENABLE_INFO&&console.info},A.w=function(e,t){e&&!A.FORCE_GLOBAL_TAG||(e=A.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(t);A.ENABLE_CALLBACK&&A.emitter.emit("log","warn",i),A.ENABLE_WARN&&console.warn},A.d=function(e,t){var i;e&&!A.FORCE_GLOBAL_TAG||(e=A.GLOBAL_TAG);var n="[".concat(e,"] > ").concat(t);A.ENABLE_CALLBACK&&(null===(i=A.emitter)||void 0===i||i.emit("log","debug",n)),A.ENABLE_DEBUG&&console.debug},A.v=function(e,t){var i;e&&!A.FORCE_GLOBAL_TAG||(e=A.GLOBAL_TAG);var n="[".concat(e,"] > ").concat(t);A.ENABLE_CALLBACK&&(null===(i=A.emitter)||void 0===i||i.emit("log","verbose",n)),A.ENABLE_VERBOSE},A.FORCE_GLOBAL_TAG=!1,A.GLOBAL_TAG="ezuikit-flv",A.ENABLE_CALLBACK=!1,A.emitter=new i.A,A.ENABLE_ERROR=!0,A.ENABLE_INFO=!0,A.ENABLE_WARN=!0,A.ENABLE_DEBUG=!0,A.ENABLE_VERBOSE=!0,A}()},641:function(A,e,t){t.d(e,{A:function(){return a}});var i=t(413),n=t(502),a=function(){function A(){}return Object.defineProperty(A,"forceGlobalTag",{get:function(){return n.A.FORCE_GLOBAL_TAG},set:function(e){n.A.FORCE_GLOBAL_TAG=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"globalTag",{get:function(){return n.A.GLOBAL_TAG},set:function(e){n.A.GLOBAL_TAG=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableAll",{get:function(){return n.A.ENABLE_VERBOSE&&n.A.ENABLE_DEBUG&&n.A.ENABLE_INFO&&n.A.ENABLE_WARN&&n.A.ENABLE_ERROR},set:function(e){n.A.ENABLE_VERBOSE=e,n.A.ENABLE_DEBUG=e,n.A.ENABLE_INFO=e,n.A.ENABLE_WARN=e,n.A.ENABLE_ERROR=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableDebug",{get:function(){return n.A.ENABLE_DEBUG},set:function(e){n.A.ENABLE_DEBUG=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableVerbose",{get:function(){return n.A.ENABLE_VERBOSE},set:function(e){n.A.ENABLE_VERBOSE=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableInfo",{get:function(){return n.A.ENABLE_INFO},set:function(e){n.A.ENABLE_INFO=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableWarn",{get:function(){return n.A.ENABLE_WARN},set:function(e){n.A.ENABLE_WARN=e,A._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(A,"enableError",{get:function(){return n.A.ENABLE_ERROR},set:function(e){n.A.ENABLE_ERROR=e,A._notifyChange()},enumerable:!1,configurable:!0}),A.getConfig=function(){return{globalTag:n.A.GLOBAL_TAG,forceGlobalTag:n.A.FORCE_GLOBAL_TAG,enableVerbose:n.A.ENABLE_VERBOSE,enableDebug:n.A.ENABLE_DEBUG,enableInfo:n.A.ENABLE_INFO,enableWarn:n.A.ENABLE_WARN,enableError:n.A.ENABLE_ERROR,enableCallback:n.A.ENABLE_CALLBACK}},A.applyConfig=function(A){n.A.GLOBAL_TAG=A.globalTag,n.A.FORCE_GLOBAL_TAG=A.forceGlobalTag,n.A.ENABLE_VERBOSE=A.enableVerbose,n.A.ENABLE_DEBUG=A.enableDebug,n.A.ENABLE_INFO=A.enableInfo,n.A.ENABLE_WARN=A.enableWarn,n.A.ENABLE_ERROR=A.enableError,n.A.ENABLE_CALLBACK=!!A.enableCallback},A._notifyChange=function(){var e=A.emitter;if(e.listenerCount("change")>0){var t=A.getConfig();e.emit("change",t)}},A.registerListener=function(e){A.emitter.addListener("change",e)},A.removeListener=function(e){A.emitter.removeListener("change",e)},A.addLogListener=function(e){n.A.emitter.addListener("log",e),n.A.emitter.listenerCount("log")>0&&(n.A.ENABLE_CALLBACK=!0,A._notifyChange())},A.removeLogListener=function(e){n.A.emitter.removeListener("log",e),0===n.A.emitter.listenerCount("log")&&(n.A.ENABLE_CALLBACK=!1,A._notifyChange())},A.emitter=new i.A,A}()},413:function(A,e,t){t.d(e,{A:function(){return i}});var i=t(343)}},e={};function n(t){var i=e[t];if(void 0!==i)return i.exports;var a=e[t]={exports:{}};return A[t](a,a.exports,n),a.exports}return n.m=A,n.d=function(A,e){for(var t in e)n.o(e,t)&&!n.o(A,t)&&Object.defineProperty(A,t,{enumerable:!0,get:e[t]})},n.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},n(446)}()}))}(B,B.exports)),B.exports),f=h(E);window.flvjs=f;var Q,x=function(){function A(A,e){window.flvjs.isSupported()&&this.initFLV(A,e)}var e=A.prototype;return e.toString=function(){return"Flv "+this.coreX+"-"+this.coreY},e.initFLV=function(A,e){var t=l(e);t.deviceSerial,t.channelNo,t.hd,t.type;var i=document.getElementById(A);i.getAttribute("controls")||i.setAttribute("controls",!0);var n=window.flvjs.createPlayer({type:"flv",url:e,isLive:!0},{enableStashBuffer:!0,stashInitialSize:128,enableWorker:!0});n.attachMediaElement(i),n.load(),n.play(),this.flvUrl=e,this.flv=n,this.video=i,this.video.addEventListener("oncanplaythrough",(function(){}),!1),this.video.addEventListener("onerror",(function(){}),!1)},e.play=function(){this.video.play()},e.stop=function(){this.video.pause(),this.flv.unload()},e.destroy=function(){void 0!==this.flv&&null!==this.flv&&(this.flv.pause(),this.flv.unload(),this.flv.detachMediaElement(),this.flv.destroy(),this.flv=null)},A}();Q||(Q=1,function(){function A(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,i=Array(e);t=A.length?{done:!0}:{done:!1,value:A[i++]}},e:function(A){throw A},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,o=!1;return{s:function(){t=t.call(A)},n:function(){var A=t.next();return r=A.done,A},e:function(A){o=!0,a=A},f:function(){try{r||null==t.return||t.return()}finally{if(o)throw a}}}}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(A,e,t){var i=I(A,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?A:t):n.value}},o.apply(null,arguments)}function s(A){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},s(A)}function g(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),e&&d(A,e)}function l(){try{var A=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(A){}return(l=function(){return!!A})()}function c(A,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return e(A)}function d(A,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,e){return A.__proto__=e,A},d(A,e)}function I(A,e){for(;!{}.hasOwnProperty.call(A,e)&&null!==(A=s(A)););return A}function h(A,e,t,i){var n=o(s(A.prototype),e,t);return"function"==typeof n?function(A){return n.apply(t,A)}:n}function u(A,e){if("object"!=typeof A||!A)return A;var t=A[Symbol.toPrimitive];if(void 0!==t){var i=t.call(A,e);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(A)}function B(A){var e=u(A,"string");return"symbol"==typeof e?e:e+""}function E(e,t){if(e){if("string"==typeof e)return A(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(e,t):void 0}}function f(A){var e;try{e=new Event("abort")}catch(A){"undefined"!=typeof document?document.createEvent?(e=document.createEvent("Event")).initEvent("abort",!1,!1):(e=document.createEventObject()).type="abort":e={type:"abort",bubbles:!1,cancelable:!1}}return e.reason=A,e}function Q(A){if(void 0===A)if("undefined"==typeof document)(A=new Error("This operation was aborted")).name="AbortError";else try{A=new DOMException("signal is aborted without reason"),Object.defineProperty(A,"name",{value:"AbortError"})}catch(e){(A=new Error("This operation was aborted")).name="AbortError"}return A}!function(A){A.AbortSignal,A.AbortController}("undefined"!=typeof self?self:C);var x=function(){function A(){i(this,A),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return a(A,[{key:"addEventListener",value:function(A,e,t){A in this.listeners||(this.listeners[A]=[]),this.listeners[A].push({callback:e,options:t})}},{key:"removeEventListener",value:function(A,e){if(A in this.listeners)for(var t=this.listeners[A],i=0,n=t.length;i>>0)+"_",n=0;return function A(i){if(this instanceof A)throw new TypeError("Symbol is not a constructor");return new e(t+(i||"")+"_"+n++,i)}})),a("Symbol.iterator",(function(A){if(A)return A;A=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),a=0;a2?a[1]:"sd"),"rec"===e.type&&n[2]&&(e.recType=n[2].includes(".cloud.")?"cloud":""),e.searchParams=function(A){var e=A.split("?")[1],t={};if(e)for(var i=e.split("&"),n=0;n=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0),this.setOptions(A)}var e=A.prototype;return e.setOptions=function(A){var e;this._options=Object.assign({},this._options,A),this._levelNum=this._matchLevel(null!=(e=this._options.level)?e:"INFO"),this.info=this._loggerFactory("info",this._levelNum>=3),this.log=this._loggerFactory("log",this._levelNum>=2),this.warn=this._loggerFactory("warn",this._levelNum>=1),this.error=this._loggerFactory("error",this._levelNum>=0)},e._matchLevel=function(A){var e=3;switch(A){case"INFO":e=3;break;case"LOG":e=2;break;case"WARN":e=1;break;case"ERROR":e=0}return e},e._loggerFactory=function(e,t){var i=console[e];if(t&&i){var n,a=this._options.name?"%c["+this._options.name+"]%c %c["+e.toUpperCase()+"]":"%c["+e.toUpperCase()+"]",r=[this._options.name?"background: green;color: #fff":null,this._options.name?"":null,D[e]].filter((function(A){return null!=A}));return(n=i).bind.apply(n,[].concat([console,a],r))}return A.noop},e.getOptions=function(){return this._options},e.getVersion=function(){return"1.0.1"},A}();function b(A){return(A=+A)<10&&(A="0"+A),A+""}w.noop=function(){};var F=["info","log","warn","error"];function R(A){var e=new w(A);return new Proxy(e,{get:function(A,e){if(F.includes(e)){var t;if(null==(t=A._options)?void 0:t.showTime){var i=(a=(n=new Date(Date.now())).getFullYear(),r=n.getMonth()+1,o=n.getDate(),s=n.getHours(),g=n.getMinutes(),l=n.getSeconds(),c=n.getMilliseconds(),a+"/"+b(r)+"/"+b(o)+" "+b(s)+":"+b(g)+":"+b(l)+":"+c);return A[e].bind(console,"["+i+"]")}return A[e].bind(console)}var n,a,r,o,s,g,l,c;return Reflect.get(A,e)}})} +/* + * + * @ezuikit/utils-i18n v1.0.1 + * Copyright (c) 2024-3-23 Ezviz-OpenBiz + * Released under MIT the License. + * + */var k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function P(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var N,T=Array.isArray,M="object"==typeof k&&k&&k.Object===Object&&k,L=M,G="object"==typeof self&&self&&self.Object===Object&&self,Y=L||G||Function("return this")(),U=Y.Symbol,J=U,H=Object.prototype,K=H.hasOwnProperty,V=H.toString,O=J?J.toStringTag:void 0,j=Object.prototype.toString,W=function(A){var e=K.call(A,O),t=A[O];try{A[O]=void 0;var i=!0}catch(A){}var n=V.call(A);return i&&(e?A[O]=t:delete A[O]),n},Z=U?U.toStringTag:void 0,X=function(A){return null==A?void 0===A?"[object Undefined]":"[object Null]":Z&&Z in Object(A)?W(A):function(A){return j.call(A)}(A)},q=function(A){return null!=A&&"object"==typeof A},z=X,AA=q,eA=function(A){return"symbol"==typeof A||AA(A)&&"[object Symbol]"==z(A)},tA=T,iA=eA,nA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aA=/^\w*$/,rA=function(A,e){if(tA(A))return!1;var t=typeof A;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=A&&!iA(A))||aA.test(A)||!nA.test(A)||null!=e&&A in Object(e)},oA=function(A){var e=typeof A;return null!=A&&("object"==e||"function"==e)},sA=X,gA=oA,lA=function(A){if(!gA(A))return!1;var e=sA(A);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},cA=Y["__core-js_shared__"],dA=(N=/[^.]+$/.exec(cA&&cA.keys&&cA.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",IA=Function.prototype.toString,CA=function(A){if(null!=A){try{return IA.call(A)}catch(A){}try{return A+""}catch(A){}}return""},hA=lA,uA=function(A){return!!dA&&dA in A},BA=oA,EA=CA,fA=/^\[object .+?Constructor\]$/,QA=Function.prototype,xA=Object.prototype,pA=QA.toString,mA=xA.hasOwnProperty,yA=RegExp("^"+pA.call(mA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_A=function(A,e){var t=function(A,e){return null==A?void 0:A[e]}(A,e);return function(A){return!(!BA(A)||uA(A))&&(hA(A)?yA:fA).test(EA(A))}(t)?t:void 0},SA=_A(Object,"create"),DA=SA,vA=SA,wA=Object.prototype.hasOwnProperty,bA=SA,FA=Object.prototype.hasOwnProperty,RA=SA,kA=function(){this.__data__=DA?DA(null):{},this.size=0},PA=function(A){var e=this.has(A)&&delete this.__data__[A];return this.size-=e?1:0,e},NA=function(A){var e=this.__data__;if(vA){var t=e[A];return"__lodash_hash_undefined__"===t?void 0:t}return wA.call(e,A)?e[A]:void 0};function TA(A){var e=-1,t=null==A?0:A.length;for(this.clear();++e-1},jA.prototype.set=function(A,e){var t=this.__data__,i=VA(t,A);return i<0?(++this.size,t.push([A,e])):t[i][1]=e,this};var WA=jA,ZA=_A(Y,"Map"),XA=MA,qA=WA,zA=ZA,$A=function(A,e){var t=A.__data__;return function(A){var e=typeof A;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==A:null===A}(e)?t["string"==typeof e?"string":"hash"]:t.map},Ae=$A,ee=$A,te=$A,ie=$A;function ne(A){var e=-1,t=null==A?0:A.length;for(this.clear();++e-1&&A%1==0&&A-1&&A%1==0&&A<=9007199254740991},Ve=ye,Oe=Ue,je=T,We=He,Ze=Ke,Xe=Se,qe=function(A,e,t){for(var i=-1,n=(e=Ve(e,A)).length,a=!1;++i0){if(++e>=800)return arguments[0]}else e=0;return A.apply(void 0,arguments)}}(qi),An=ji,en=function(A,e,t){return e=Wi(void 0===e?A.length-1:e,0),function(){for(var i=arguments,n=-1,a=Wi(i.length-e,0),r=Array(a);++n1?t[n-1]:void 0,r=n>2?t[2]:void 0;for(a=A.length>3&&"function"==typeof a?(n--,a):void 0,r&&cn(t[0],t[1],r)&&(a=n<3?void 0:a,n=1),e=Object(e);++i-1},_n=En,Sn=pn,Dn=Qn,vn=P((function(A){return A&&A.length?function(A,e,t){var i=-1,n=yn,a=A.length,r=!0,o=[],s=o;if(a>=200){var g=Sn(A);if(g)return Dn(g);r=!1,n=_n,s=new mn}else s=o;A:for(;++i{const t=[],i=[];return t.push(e),e||t.push(A.locale),A.enableFallback&&t.push(A.defaultLocale),t.filter(Boolean).map((A=>A.toString())).forEach((function(e){if(i.includes(e)||i.push(e),!A.enableFallback)return;const t=e.split("-");3===t.length&&i.push(`${t[0]}-${t[1]}`),i.push(t[0])})),vn(i)};class bn{constructor(A){this.i18n=A,this.registry={},this.register("default",wn)}register(A,e){if("function"!=typeof e){const A=e;e=()=>A}this.registry[A]=e}get(A){let e=this.registry[A]||this.registry[this.i18n.locale]||this.registry.default;return"function"==typeof e&&(e=e(this.i18n,A)),e instanceof Array||(e=[e]),e}}const Fn=function(A){let{pluralizer:e,includeZero:t=!0,ordinal:i=!1}=A;return function(A,n){return[t&&0===n?"zero":"",e(n,i)].filter(Boolean)}}({pluralizer:(A,e)=>{const t=String(A).split("."),i=!t[1],n=Number(t[0])==A,a=n&&t[0].slice(-1),r=n&&t[0].slice(-2);return e?1==a&&11!=r?"one":2==a&&12!=r?"two":3==a&&13!=r?"few":"other":1==A&&i?"one":"other"},includeZero:!0});class Rn{constructor(A){this.i18n=A,this.registry={},this.register("default",Fn)}register(A,e){this.registry[A]=e}get(A){return this.registry[A]||this.registry[this.i18n.locale]||this.registry.default}}var kn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Pn=function(A){return kn.test(A)},Nn="\\ud800-\\udfff",Tn="["+Nn+"]",Mn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ln="\\ud83c[\\udffb-\\udfff]",Gn="[^"+Nn+"]",Yn="(?:\\ud83c[\\udde6-\\uddff]){2}",Un="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="(?:"+Mn+"|"+Ln+")?",Hn="[\\ufe0e\\ufe0f]?",Kn=Hn+Jn+"(?:\\u200d(?:"+[Gn,Yn,Un].join("|")+")"+Hn+Jn+")*",Vn="(?:"+[Gn+Mn+"?",Mn,Yn,Un,Tn].join("|")+")",On=RegExp(Ln+"(?="+Ln+")|"+Vn+Kn,"g"),jn=function(A){return A.split("")},Wn=Pn,Zn=function(A,e,t){var i=A.length;return t=void 0===t?i:t,!e&&t>=i?A:function(A,e,t){var i=-1,n=A.length;e<0&&(e=-e>n?0:n+e),(t=t>n?n:t)<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(n);++i(e[La(t)]=A[t],e)),{}):{}}function Ya(A){return null!=A} +/* + * bignumber.js v9.1.2 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * + */var Ua=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Ja=Math.ceil,Ha=Math.floor,Ka="[BigNumber Error] ",Va=Ka+"Number primitive has more than 15 significant digits: ",Oa=1e14,ja=14,Wa=9007199254740991,Za=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xa=1e7,qa=1e9;function za(A){var e=0|A;return A>0||A===e?e:e-1}function $a(A){for(var e,t,i=1,n=A.length,a=A[0]+"";ig^t?1:-1;for(o=(s=n.length)<(g=a.length)?s:g,r=0;ra[r]^t?1:-1;return s==g?0:s>g^t?1:-1}function er(A,e,t,i){if(At||A!==Ha(A))throw Error(Ka+(i||"Argument")+("number"==typeof A?At?" out of range: ":" not an integer: ":" not a primitive number: ")+String(A))}function tr(A){var e=A.c.length-1;return za(A.e/ja)==e&&A.c[e]%2!=0}function ir(A,e){return(A.length>1?A.charAt(0)+"."+A.slice(1):A)+(e<0?"e":"e+")+e}function nr(A,e,t){var i,n;if(e<0){for(n=t+".";++e;n+=t);A=n+A}else if(++e>(i=A.length)){for(n=t,e-=i;--e;n+=t);A+=n}else ef?d.c=d.e=null:A.e=10;s/=10,o++);return void(o>f?d.c=d.e=null:(d.e=o,d.c=[A]))}c=String(A)}else{if(!Ua.test(c=String(A)))return n(d,c,g);d.s=45==c.charCodeAt(0)?(c=c.slice(1),-1):1}(o=c.indexOf("."))>-1&&(c=c.replace(".","")),(s=c.search(/e/i))>0?(o<0&&(o=s),o+=+c.slice(s+1),c=c.substring(0,s)):o<0&&(o=c.length)}else{if(er(e,2,y.length,"Base"),10==e&&_)return b(d=new S(A),C+d.e+1,h);if(c=String(A),g="number"==typeof A){if(0*A!=0)return n(d,c,g,e);if(d.s=1/A<0?(c=c.slice(1),-1):1,S.DEBUG&&c.replace(/^0\.0*|\./,"").length>15)throw Error(Va+A)}else d.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1;for(t=y.slice(0,e),o=s=0,l=c.length;so){o=l;continue}}else if(!r&&(c==c.toUpperCase()&&(c=c.toLowerCase())||c==c.toLowerCase()&&(c=c.toUpperCase()))){r=!0,s=-1,o=0;continue}return n(d,String(A),g,e)}g=!1,(o=(c=i(c,e,10,d.s)).indexOf("."))>-1?c=c.replace(".",""):o=c.length}for(s=0;48===c.charCodeAt(s);s++);for(l=c.length;48===c.charCodeAt(--l););if(c=c.slice(s,++l)){if(l-=s,g&&S.DEBUG&&l>15&&(A>Wa||A!==Ha(A)))throw Error(Va+d.s*A);if((o=o-s-1)>f)d.c=d.e=null;else if(o=B)?ir(s,r):nr(s,r,"0");else if(a=(A=b(new S(A),e,t)).e,o=(s=$a(A.c)).length,1==i||2==i&&(e<=a||a<=u)){for(;oo){if(--e>0)for(s+=".";e--;s+="0");}else if((e+=a-o)>0)for(a+1==o&&(s+=".");e--;s+="0");return A.s<0&&n?"-"+s:s}function v(A,e){for(var t,i,n=1,a=new S(A[0]);n=10;n/=10,i++);return(t=i+t*ja-1)>f?A.c=A.e=null:t=10;o/=10,n++);if((a=e-n)<0)a+=ja,r=e,s=c[g=0],l=Ha(s/d[n-r-1]%10);else if((g=Ja((a+1)/ja))>=c.length){if(!i)break A;for(;c.length<=g;c.push(0));s=l=0,n=1,r=(a%=ja)-ja+1}else{for(s=o=c[g],n=1;o>=10;o/=10,n++);l=(r=(a%=ja)-ja+n)<0?0:Ha(s/d[n-r-1]%10)}if(i=i||e<0||null!=c[g+1]||(r<0?s:s%d[n-r-1]),i=t<4?(l||i)&&(0==t||t==(A.s<0?3:2)):l>5||5==l&&(4==t||i||6==t&&(a>0?r>0?s/d[n-r]:0:c[g-1])%10&1||t==(A.s<0?8:7)),e<1||!c[0])return c.length=0,i?(e-=A.e+1,c[0]=d[(ja-e%ja)%ja],A.e=-e||0):c[0]=A.e=0,A;if(0==a?(c.length=g,o=1,g--):(c.length=g+1,o=d[ja-a],c[g]=r>0?Ha(s/d[n-r]%d[r])*o:0),i)for(;;){if(0==g){for(a=1,r=c[0];r>=10;r/=10,a++);for(r=c[0]+=o,o=1;r>=10;r/=10,o++);a!=o&&(A.e++,c[0]==Oa&&(c[0]=1));break}if(c[g]+=o,c[g]!=Oa)break;c[g--]=0,o=1}for(a=c.length;0===c[--a];c.pop());}A.e>f?A.c=A.e=null:A.e=B?ir(e,t):nr(e,t,"0"),A.s<0?"-"+e:e)}return S.clone=A,S.ROUND_UP=0,S.ROUND_DOWN=1,S.ROUND_CEIL=2,S.ROUND_FLOOR=3,S.ROUND_HALF_UP=4,S.ROUND_HALF_DOWN=5,S.ROUND_HALF_EVEN=6,S.ROUND_HALF_CEIL=7,S.ROUND_HALF_FLOOR=8,S.EUCLID=9,S.config=S.set=function(A){var e,t;if(null!=A){if("object"!=typeof A)throw Error(Ka+"Object expected: "+A);if(A.hasOwnProperty(e="DECIMAL_PLACES")&&(er(t=A[e],0,qa,e),C=t),A.hasOwnProperty(e="ROUNDING_MODE")&&(er(t=A[e],0,8,e),h=t),A.hasOwnProperty(e="EXPONENTIAL_AT")&&((t=A[e])&&t.pop?(er(t[0],-qa,0,e),er(t[1],0,qa,e),u=t[0],B=t[1]):(er(t,-qa,qa,e),u=-(B=t<0?-t:t))),A.hasOwnProperty(e="RANGE"))if((t=A[e])&&t.pop)er(t[0],-qa,-1,e),er(t[1],1,qa,e),E=t[0],f=t[1];else{if(er(t,-qa,qa,e),!t)throw Error(Ka+e+" cannot be zero: "+t);E=-(f=t<0?-t:t)}if(A.hasOwnProperty(e="CRYPTO")){if((t=A[e])!==!!t)throw Error(Ka+e+" not true or false: "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Q=!t,Error(Ka+"crypto unavailable");Q=t}else Q=t}if(A.hasOwnProperty(e="MODULO_MODE")&&(er(t=A[e],0,9,e),x=t),A.hasOwnProperty(e="POW_PRECISION")&&(er(t=A[e],0,qa,e),p=t),A.hasOwnProperty(e="FORMAT")){if("object"!=typeof(t=A[e]))throw Error(Ka+e+" not an object: "+t);m=t}if(A.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(t=A[e])||/^.?$|[+\-.\s]|(.).*\1/.test(t))throw Error(Ka+e+" invalid: "+t);_="0123456789"==t.slice(0,10),y=t}}return{DECIMAL_PLACES:C,ROUNDING_MODE:h,EXPONENTIAL_AT:[u,B],RANGE:[E,f],CRYPTO:Q,MODULO_MODE:x,POW_PRECISION:p,FORMAT:m,ALPHABET:y}},S.isBigNumber=function(A){if(!A||!0!==A._isBigNumber)return!1;if(!S.DEBUG)return!0;var e,t,i=A.c,n=A.e,a=A.s;A:if("[object Array]"=={}.toString.call(i)){if((1===a||-1===a)&&n>=-qa&&n<=qa&&n===Ha(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break A}if((e=(n+1)%ja)<1&&(e+=ja),String(i[0]).length==e){for(e=0;e=Oa||t!==Ha(t))break A;if(0!==t)return!0}}}else if(null===i&&null===n&&(null===a||1===a||-1===a))return!0;throw Error(Ka+"Invalid BigNumber: "+A)},S.maximum=S.max=function(){return v(arguments,-1)},S.minimum=S.min=function(){return v(arguments,1)},S.random=(a=9007199254740992,r=Math.random()*a&2097151?function(){return Ha(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(A){var e,t,i,n,a,o=0,s=[],g=new S(I);if(null==A?A=C:er(A,0,qa),n=Ja(A/ja),Q)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(n*=2));o>>11))>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),e[o]=t[0],e[o+1]=t[1]):(s.push(a%1e14),o+=2);o=n/2}else{if(!crypto.randomBytes)throw Q=!1,Error(Ka+"crypto unavailable");for(e=crypto.randomBytes(n*=7);o=9e15?crypto.randomBytes(7).copy(e,o):(s.push(a%1e14),o+=7);o=n/7}if(!Q)for(;o=10;a/=10,o++);ot-1&&(null==r[n+1]&&(r[n+1]=0),r[n+1]+=r[n]/t|0,r[n]%=t)}return r.reverse()}return function(i,n,a,r,o){var s,g,l,c,d,I,u,B,E=i.indexOf("."),f=C,Q=h;for(E>=0&&(c=p,p=0,i=i.replace(".",""),I=(B=new S(n)).pow(i.length-E),p=c,B.c=e(nr($a(I.c),I.e,"0"),10,a,A),B.e=B.c.length),l=c=(u=e(i,n,a,o?(s=y,A):(s=A,y))).length;0==u[--c];u.pop());if(!u[0])return s.charAt(0);if(E<0?--l:(I.c=u,I.e=l,I.s=r,u=(I=t(I,B,f,Q,a)).c,d=I.r,l=I.e),E=u[g=l+f+1],c=a/2,d=d||g<0||null!=u[g+1],d=Q<4?(null!=E||d)&&(0==Q||Q==(I.s<0?3:2)):E>c||E==c&&(4==Q||d||6==Q&&1&u[g-1]||Q==(I.s<0?8:7)),g<1||!u[0])i=d?nr(s.charAt(1),-f,s.charAt(0)):s.charAt(0);else{if(u.length=g,d)for(--a;++u[--g]>a;)u[g]=0,g||(++l,u=[1].concat(u));for(c=u.length;!u[--c];);for(E=0,i="";E<=c;i+=s.charAt(u[E++]));i=nr(i,l,s.charAt(0))}return i}}(),t=function(){function A(A,e,t){var i,n,a,r,o=0,s=A.length,g=e%Xa,l=e/Xa|0;for(A=A.slice();s--;)o=((n=g*(a=A[s]%Xa)+(i=l*a+(r=A[s]/Xa|0)*g)%Xa*Xa+o)/t|0)+(i/Xa|0)+l*r,A[s]=n%t;return o&&(A=[o].concat(A)),A}function e(A,e,t,i){var n,a;if(t!=i)a=t>i?1:-1;else for(n=a=0;ne[n]?1:-1;break}return a}function t(A,e,t,i){for(var n=0;t--;)A[t]-=n,n=A[t]1;A.splice(0,1));}return function(i,n,a,r,o){var s,g,l,c,d,I,C,h,u,B,E,f,Q,x,p,m,y,_=i.s==n.s?1:-1,D=i.c,v=n.c;if(!(D&&D[0]&&v&&v[0]))return new S(i.s&&n.s&&(D?!v||D[0]!=v[0]:v)?D&&0==D[0]||!v?0*_:_/0:NaN);for(u=(h=new S(_)).c=[],_=a+(g=i.e-n.e)+1,o||(o=Oa,g=za(i.e/ja)-za(n.e/ja),_=_/ja|0),l=0;v[l]==(D[l]||0);l++);if(v[l]>(D[l]||0)&&g--,_<0)u.push(1),c=!0;else{for(x=D.length,m=v.length,l=0,_+=2,(d=Ha(o/(v[0]+1)))>1&&(v=A(v,d,o),D=A(D,d,o),m=v.length,x=D.length),Q=m,E=(B=D.slice(0,m)).length;E=o/2&&p++;do{if(d=0,(s=e(v,B,m,E))<0){if(f=B[0],m!=E&&(f=f*o+(B[1]||0)),(d=Ha(f/p))>1)for(d>=o&&(d=o-1),C=(I=A(v,d,o)).length,E=B.length;1==e(I,B,C,E);)d--,t(I,m=10;_/=10,l++);b(h,a+(h.e=l+g*ja-1)+1,r,c)}else h.e=g,h.r=+c;return h}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,g=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,c=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(A,e,t,i){var n,a=t?e:e.replace(c,"");if(l.test(a))A.s=isNaN(a)?null:a<0?-1:1;else{if(!t&&(a=a.replace(o,(function(A,e,t){return n="x"==(t=t.toLowerCase())?16:"b"==t?2:8,i&&i!=n?A:e})),i&&(n=i,a=a.replace(s,"$1").replace(g,"0.$1")),e!=a))return new S(a,n);if(S.DEBUG)throw Error(Ka+"Not a"+(i?" base "+i:"")+" number: "+e);A.s=null}A.c=A.e=null},d.absoluteValue=d.abs=function(){var A=new S(this);return A.s<0&&(A.s=1),A},d.comparedTo=function(A,e){return Ar(this,new S(A,e))},d.decimalPlaces=d.dp=function(A,e){var t,i,n,a=this;if(null!=A)return er(A,0,qa),null==e?e=h:er(e,0,8),b(new S(a),A+a.e+1,e);if(!(t=a.c))return null;if(i=((n=t.length-1)-za(this.e/ja))*ja,n=t[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},d.dividedBy=d.div=function(A,e){return t(this,new S(A,e),C,h)},d.dividedToIntegerBy=d.idiv=function(A,e){return t(this,new S(A,e),0,1)},d.exponentiatedBy=d.pow=function(A,e){var t,i,n,a,r,o,s,g,l=this;if((A=new S(A)).c&&!A.isInteger())throw Error(Ka+"Exponent not an integer: "+F(A));if(null!=e&&(e=new S(e)),r=A.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!A.c||!A.c[0])return g=new S(Math.pow(+F(l),r?A.s*(2-tr(A)):+F(A))),e?g.mod(e):g;if(o=A.s<0,e){if(e.c?!e.c[0]:!e.s)return new S(NaN);(i=!o&&l.isInteger()&&e.isInteger())&&(l=l.mod(e))}else{if(A.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||r&&l.c[1]>=24e7:l.c[0]<8e13||r&&l.c[0]<=9999975e7)))return a=l.s<0&&tr(A)?-0:0,l.e>-1&&(a=1/a),new S(o?1/a:a);p&&(a=Ja(p/ja+2))}for(r?(t=new S(.5),o&&(A.s=1),s=tr(A)):s=(n=Math.abs(+F(A)))%2,g=new S(I);;){if(s){if(!(g=g.times(l)).c)break;a?g.c.length>a&&(g.c.length=a):i&&(g=g.mod(e))}if(n){if(0===(n=Ha(n/2)))break;s=n%2}else if(b(A=A.times(t),A.e+1,1),A.e>14)s=tr(A);else{if(0==(n=+F(A)))break;s=n%2}l=l.times(l),a?l.c&&l.c.length>a&&(l.c.length=a):i&&(l=l.mod(e))}return i?g:(o&&(g=I.div(g)),e?g.mod(e):a?b(g,p,h,void 0):g)},d.integerValue=function(A){var e=new S(this);return null==A?A=h:er(A,0,8),b(e,e.e+1,A)},d.isEqualTo=d.eq=function(A,e){return 0===Ar(this,new S(A,e))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(A,e){return Ar(this,new S(A,e))>0},d.isGreaterThanOrEqualTo=d.gte=function(A,e){return 1===(e=Ar(this,new S(A,e)))||0===e},d.isInteger=function(){return!!this.c&&za(this.e/ja)>this.c.length-2},d.isLessThan=d.lt=function(A,e){return Ar(this,new S(A,e))<0},d.isLessThanOrEqualTo=d.lte=function(A,e){return-1===(e=Ar(this,new S(A,e)))||0===e},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(A,e){var t,i,n,a,r=this,o=r.s;if(e=(A=new S(A,e)).s,!o||!e)return new S(NaN);if(o!=e)return A.s=-e,r.plus(A);var s=r.e/ja,g=A.e/ja,l=r.c,c=A.c;if(!s||!g){if(!l||!c)return l?(A.s=-e,A):new S(c?r:NaN);if(!l[0]||!c[0])return c[0]?(A.s=-e,A):new S(l[0]?r:3==h?-0:0)}if(s=za(s),g=za(g),l=l.slice(),o=s-g){for((a=o<0)?(o=-o,n=l):(g=s,n=c),n.reverse(),e=o;e--;n.push(0));n.reverse()}else for(i=(a=(o=l.length)<(e=c.length))?o:e,o=e=0;e0)for(;e--;l[t++]=0);for(e=Oa-1;i>o;){if(l[--i]=0;){for(t=0,d=f[n]%u,I=f[n]/u|0,a=n+(r=s);a>n;)t=((g=d*(g=E[--r]%u)+(o=I*g+(l=E[r]/u|0)*d)%u*u+C[a]+t)/h|0)+(o/u|0)+I*l,C[a--]=g%h;C[a]=t}return t?++i:C.splice(0,1),w(A,C,i)},d.negated=function(){var A=new S(this);return A.s=-A.s||null,A},d.plus=function(A,e){var t,i=this,n=i.s;if(e=(A=new S(A,e)).s,!n||!e)return new S(NaN);if(n!=e)return A.s=-e,i.minus(A);var a=i.e/ja,r=A.e/ja,o=i.c,s=A.c;if(!a||!r){if(!o||!s)return new S(n/0);if(!o[0]||!s[0])return s[0]?A:new S(o[0]?i:0*n)}if(a=za(a),r=za(r),o=o.slice(),n=a-r){for(n>0?(r=a,t=s):(n=-n,t=o),t.reverse();n--;t.push(0));t.reverse()}for((n=o.length)-(e=s.length)<0&&(t=s,s=o,o=t,e=n),n=0;e;)n=(o[--e]=o[e]+s[e]+n)/Oa|0,o[e]=Oa===o[e]?0:o[e]%Oa;return n&&(o=[n].concat(o),++r),w(A,o,r)},d.precision=d.sd=function(A,e){var t,i,n,a=this;if(null!=A&&A!==!!A)return er(A,1,qa),null==e?e=h:er(e,0,8),b(new S(a),A,e);if(!(t=a.c))return null;if(i=(n=t.length-1)*ja+1,n=t[n]){for(;n%10==0;n/=10,i--);for(n=t[0];n>=10;n/=10,i++);}return A&&a.e+1>i&&(i=a.e+1),i},d.shiftedBy=function(A){return er(A,-9007199254740991,Wa),this.times("1e"+A)},d.squareRoot=d.sqrt=function(){var A,e,i,n,a,r=this,o=r.c,s=r.s,g=r.e,l=C+4,c=new S("0.5");if(1!==s||!o||!o[0])return new S(!s||s<0&&(!o||o[0])?NaN:o?r:1/0);if(0==(s=Math.sqrt(+F(r)))||s==1/0?(((e=$a(o)).length+g)%2==0&&(e+="0"),s=Math.sqrt(+e),g=za((g+1)/2)-(g<0||g%2),i=new S(e=s==1/0?"5e"+g:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+g)):i=new S(s+""),i.c[0])for((s=(g=i.e)+l)<3&&(s=0);;)if(a=i,i=c.times(a.plus(t(r,a,l,1))),$a(a.c).slice(0,s)===(e=$a(i.c)).slice(0,s)){if(i.e0&&C>0){for(a=C%o||o,l=I.substr(0,a);a0&&(l+=g+I.slice(a)),d&&(l="-"+l)}i=c?l+(t.decimalSeparator||"")+((s=+t.fractionGroupSize)?c.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):c):l}return(t.prefix||"")+i+(t.suffix||"")},d.toFraction=function(A){var e,i,n,a,r,o,s,g,l,c,d,C,u=this,B=u.c;if(null!=A&&(!(s=new S(A)).isInteger()&&(s.c||1!==s.s)||s.lt(I)))throw Error(Ka+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+F(s));if(!B)return new S(u);for(e=new S(I),l=i=new S(I),n=g=new S(I),C=$a(B),r=e.e=C.length-u.e-1,e.c[0]=Za[(o=r%ja)<0?ja+o:o],A=!A||s.comparedTo(e)>0?r>0?e:l:s,o=f,f=1/0,s=new S(C),g.c[0]=0;c=t(s,e,0,1),1!=(a=i.plus(c.times(n))).comparedTo(A);)i=n,n=a,l=g.plus(c.times(a=l)),g=a,e=s.minus(c.times(a=e)),s=a;return a=t(A.minus(i),n,0,1),g=g.plus(a.times(l)),i=i.plus(a.times(n)),g.s=l.s=u.s,d=t(l,n,r*=2,h).minus(u).abs().comparedTo(t(g,i,r,h).minus(u).abs())<1?[l,n]:[g,i],f=o,d},d.toNumber=function(){return+F(this)},d.toPrecision=function(A,e){return null!=A&&er(A,1,qa),D(this,A,e,2)},d.toString=function(A){var e,t=this,n=t.s,a=t.e;return null===a?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==A?e=a<=u||a>=B?ir($a(t.c),a):nr($a(t.c),a,"0"):10===A&&_?e=nr($a((t=b(new S(t),C+a+1,h)).c),t.e,"0"):(er(A,2,y.length,"Base"),e=i(nr($a(t.c),a,"0"),10,A,n,!0)),n<0&&t.c[0]&&(e="-"+e)),e},d.valueOf=d.toJSON=function(){return F(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,null!=e&&S.set(e),S}();function or(A){var e;return null!==(e=ar[A])&&void 0!==e?e:ar.default}!function(A){A[A.up=rr.ROUND_UP]="up",A[A.down=rr.ROUND_DOWN]="down",A[A.truncate=rr.ROUND_DOWN]="truncate",A[A.halfUp=rr.ROUND_HALF_UP]="halfUp",A[A.default=rr.ROUND_HALF_UP]="default",A[A.halfDown=rr.ROUND_HALF_DOWN]="halfDown",A[A.halfEven=rr.ROUND_HALF_EVEN]="halfEven",A[A.banker=rr.ROUND_HALF_EVEN]="banker",A[A.ceiling=rr.ROUND_CEIL]="ceiling",A[A.ceil=rr.ROUND_CEIL]="ceil",A[A.floor=rr.ROUND_FLOOR]="floor"}(ar||(ar={}));var sr=Math.floor,gr=/\s/,lr=/^\s+/,cr=function(A){return A?A.slice(0,function(A){for(var e=A.length;e--&&gr.test(A.charAt(e)););return e}(A)+1).replace(lr,""):A},dr=oA,Ir=eA,Cr=/^[-+]0x[0-9a-f]+$/i,hr=/^0b[01]+$/i,ur=/^0o[0-7]+$/i,Br=parseInt,Er=1/0,fr=function(A){return A?(A=function(A){if("number"==typeof A)return A;if(Ir(A))return NaN;if(dr(A)){var e="function"==typeof A.valueOf?A.valueOf():A;A=dr(e)?e+"":e}if("string"!=typeof A)return 0===A?A:+A;A=cr(A);var t=hr.test(A);return t||ur.test(A)?Br(A.slice(2),t?2:8):Cr.test(A)?NaN:+A}(A))===Er||A===-1/0?17976931348623157e292*(A<0?-1:1):A==A?A:0:0===A?A:0},Qr=fr,xr=gn,pr=fe,mr=P((function(A,e,t){return e=(t?xr(A,e,t):void 0===e)?1:function(A){var e=Qr(A),t=e%1;return e==e?t?e-t:e:0}(e),function(A,e){var t="";if(!A||e<1||e>9007199254740991)return t;do{e%2&&(t+=A),(e=sr(e/2))&&(A+=A)}while(e);return t}(pr(A),e)}));function yr(A,e){const t=function(A,e){let{precision:t,significant:i}=e;return i&&null!==t&&t>0?t-function(A){return A.isZero()?1:Math.floor(Math.log10(A.abs().toNumber())+1)}(A):t}(A,e);if(null===t)return A.toString();const i=or(e.roundMode);if(t>=0)return A.toFixed(t,i);const n=Math.pow(10,Math.abs(t));return(A=new rr(A.div(n).toFixed(0,i)).times(n)).toString()}function _r(A,e){var t,i,n;const a=new rr(A);if(e.raise&&!a.isFinite())throw new Error(`"${A}" is not a valid numeric value`);const r=yr(a,e),o=new rr(r),s=o.lt(0),g=o.isZero();let[l,c]=r.split(".");const d=[];let I;const C=null!==(t=e.format)&&void 0!==t?t:"%n",h=null!==(i=e.negativeFormat)&&void 0!==i?i:`-${C}`,u=s&&!g?h:C;for(l=l.replace("-","");l.length>0;)d.unshift(l.substr(Math.max(0,l.length-3),3)),l=l.substr(0,l.length-3);return l=d.join(""),I=d.join(e.delimiter),c=e.significant?function(A){let{significand:e,whole:t,precision:i}=A;if("0"===t||null===i)return e;const n=Math.max(0,i-t.length);return(null!=e?e:"").substr(0,n)}({whole:l,significand:c,precision:e.precision}):null!=c?c:mr("0",null!==(n=e.precision)&&void 0!==n?n:0),e.stripInsignificantZeros&&c&&(c=c.replace(/0+$/,"")),a.isNaN()&&(I=A.toString()),c&&a.isFinite()&&(I+=(e.separator||".")+c),function(A,e){let{formattedNumber:t,unit:i}=e;return A.replace("%n",t).replace("%u",i)}(u,{formattedNumber:I,unit:e.unit})}function Sr(A,e,t){let i="";return(e instanceof String||"string"==typeof e)&&(i=e),e instanceof Array&&(i=e.join(A.defaultSeparator)),t.scope&&(i=[t.scope,i].join(A.defaultSeparator)),i}function Dr(A){var e,t;if(null===A)return"null";const i=typeof A;return"object"!==i?i:(null===(t=null===(e=null==A?void 0:A.constructor)||void 0===e?void 0:e.name)||void 0===t?void 0:t.toLowerCase())||"object"}function vr(A,e,t){t=Object.keys(t).reduce(((e,i)=>(e[A.transformKey(i)]=t[i],e)),{});const i=e.match(A.placeholder);if(!i)return e;for(;i.length;){let n;const a=i.shift(),r=a.replace(A.placeholder,"$1");n=Ya(t[r])?t[r].toString().replace(/\$/gm,"_#$#_"):r in t?A.nullPlaceholder(A,a,e,t):A.missingPlaceholder(A,a,e,t);const o=new RegExp(a.replace(/\{/gm,"\\{").replace(/\}/gm,"\\}"));e=e.replace(o,n)}return e.replace(/_#\$#_/g,"$")}function wr(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i="locale"in(t=Object.assign({},t))?t.locale:A.locale,n=Dr(i),a=A.locales.get("string"===n?i:typeof i).slice(),r=Sr(A,e,t).split(A.defaultSeparator).map((e=>A.transformKey(e))),o=a.map((e=>r.reduce(((A,e)=>A&&A[e]),A.translations[e])));return o.push(t.defaultValue),o.find((A=>Ya(A)))}var br=function(A,e){for(var t=-1,i=e.length,n=A.length;++to))return!1;var g=a.get(A),l=a.get(e);if(g&&l)return g==e&&l==A;var c=-1,d=!0,I=2&t?new Tr:void 0;for(a.set(A,e),a.set(e,A);++ce||a&&r&&s&&!o&&!g||i&&r&&s||!t&&s||!n)return 1;if(!i&&!a&&!g&&A0&&i(s)?t>1?A(s,t-1,i,n,a):Pr(a,s):n||(a[a.length]=s)}return a},Ds=function(A,e,t){e=e.length?Qs(e,(function(A){return _s(A)?function(e){return xs(e,1===A.length?A[0]:A)}:A})):[ys];var i=-1;e=Qs(e,ms(ps));var n=function(A,e){var t=-1,i=Bs(A)?Array(A.length):[];return us(A,(function(A,n,a){i[++t]=e(A,n,a)})),i}(A,(function(A,t,n){return{criteria:Qs(e,(function(e){return e(A)})),index:++i,value:A}}));return function(A,e){var t=A.length;for(A.sort(e);t--;)A[t]=A[t].value;return A}(n,(function(A,e){return function(A,e,t){for(var i=-1,n=A.criteria,a=e.criteria,r=n.length,o=t.length;++i=o?s:s*("desc"==t[i]?-1:1)}return A.index-e.index}(A,e,t)}))},vs=gn,ws=P(nn((function(A,e){if(null==A)return[];var t=e.length;return t>1&&vs(A,e[0],e[1])?e=[]:t>2&&vs(e[0],e[1],e[2])&&(e=[e[0]]),Ds(A,Ss(e,1),[])}))),bs=oi;const Fs={0:"unit",1:"ten",2:"hundred",3:"thousand",6:"million",9:"billion",12:"trillion",15:"quadrillion","-1":"deci","-2":"centi","-3":"mili","-6":"micro","-9":"nano","-12":"pico","-15":"femto"},Rs=P((function(A,e){return function(A,e,t){for(var i=-1,n=A.length,a=e.length,r={};++iparseInt(A,10))));const ks=["byte","kb","mb","gb","tb","pb","eb"];function Ps(A){if(A instanceof Date)return A;if("number"==typeof A){const e=new Date;return e.setTime(A),e}const e=new String(A).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);if(e){const A=e.slice(1,8).map((A=>parseInt(A,10)||0));A[1]-=1;const[t,i,n,a,r,o,s]=A;return e[8]?new Date(Date.UTC(t,i,n,a,r,o,s)):new Date(t,i,n,a,r,o,s)}A.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)&&(new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" ")));const t=new Date;return t.setTime(Date.parse(A)),t}function Ns(A){let e,t,{i18n:i,count:n,scope:a,options:r,baseScope:o}=A;if(r=Object.assign({},r),e="object"==typeof a&&a?a:wr(i,a,r),!e)return i.missingTranslation.get(a,r);const s=i.pluralization.get(r.locale)(i,n),g=[];for(;s.length;){const A=s.shift();if(Ya(e[A])){t=e[A];break}g.push(A)}return Ya(t)?(r.count=n,i.interpolate(i,t,r)):i.missingTranslation.get(o.split(i.defaultSeparator).concat([g[0]]),r)}const Ts={meridian:{am:"AM",pm:"PM"},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};var Ms=Math.ceil,Ls=Math.max,Gs=gn,Ys=fr,Us=P((function(A,e,t){return t&&"number"!=typeof t&&Gs(A,e,t)&&(e=t=void 0),A=Ys(A),void 0===e?(e=A,A=0):e=Ys(e),function(A,e,t){for(var i=-1,n=Ls(Ms((e-A)/(t||1)),0),a=Array(n);n--;)a[++i]=A,A+=t;return a}(A,e,t=void 0===t?At>=A&&t<=e,Hs=function(A,e){e instanceof Array&&(e=e.join(A.defaultSeparator));const t=e.split(A.defaultSeparator).slice(-1)[0];return A.missingTranslationPrefix+t.replace("_"," ").replace(/([a-z])([A-Z])/g,((A,e,t)=>`${e} ${t.toLowerCase()}`))},Ks=(A,e,t)=>{const i=Sr(A,e,t),n="locale"in t?t.locale:A.locale,a=Dr(n);return`[missing "${["string"==a?n:a,i].join(A.defaultSeparator)}" translation]`},Vs=(A,e,t)=>{const i=Sr(A,e,t),n=[A.locale,i].join(A.defaultSeparator);throw new Error(`Missing translation: ${n}`)};class Os{constructor(A){this.i18n=A,this.registry={},this.register("guess",Hs),this.register("message",Ks),this.register("error",Vs)}register(A,e){this.registry[A]=e}get(A,e){var t;return this.registry[null!==(t=e.missingBehavior)&&void 0!==t?t:this.i18n.missingBehavior](this.i18n,A,e)}}const js={defaultLocale:"en",availableLocales:["en"],locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,enableFallback:!1,missingBehavior:"message",missingTranslationPrefix:"",missingPlaceholder:(A,e)=>`[missing "${e}" value]`,nullPlaceholder:(A,e,t,i)=>A.missingPlaceholder(A,e,t,i),transformKey:A=>A};let Ws=class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._locale=js.locale,this._defaultLocale=js.defaultLocale,this._version=0,this.onChangeHandlers=[],this.translations={},this.availableLocales=[],this.t=this.translate,this.p=this.pluralize,this.l=this.localize,this.distanceOfTimeInWords=this.timeAgoInWords;const{locale:t,enableFallback:i,missingBehavior:n,missingTranslationPrefix:a,missingPlaceholder:r,nullPlaceholder:o,defaultLocale:s,defaultSeparator:g,placeholder:l,transformKey:c}=Object.assign(Object.assign({},js),e);this.locale=t,this.defaultLocale=s,this.defaultSeparator=g,this.enableFallback=i,this.locale=t,this.missingBehavior=n,this.missingTranslationPrefix=a,this.missingPlaceholder=r,this.nullPlaceholder=o,this.placeholder=l,this.pluralization=new Rn(this),this.locales=new bn(this),this.missingTranslation=new Os(this),this.transformKey=c,this.interpolate=vr,this.store(A)}store(A){In(this.translations,A),this.hasChanged()}get locale(){return this._locale||this.defaultLocale||"en"}set locale(A){if("string"!=typeof A)throw new Error(`Expected newLocale to be a string; got ${Dr(A)}`);const e=this._locale!==A;this._locale=A,e&&this.hasChanged()}get defaultLocale(){return this._defaultLocale||"en"}set defaultLocale(A){if("string"!=typeof A)throw new Error(`Expected newLocale to be a string; got ${Dr(A)}`);const e=this._defaultLocale!==A;this._defaultLocale=A,e&&this.hasChanged()}translate(A,e){const t=function(A,e,t){let i=[{scope:e}];if(Ya(t.defaults)&&(i=i.concat(t.defaults)),Ya(t.defaultValue)){const n="function"==typeof t.defaultValue?t.defaultValue(A,e,t):t.defaultValue;i.push({message:n}),delete t.defaultValue}return i}(this,A,e=Object.assign({},e));let i;return t.some((A=>(Ya(A.scope)?i=wr(this,A.scope,e):Ya(A.message)&&(i=A.message),null!=i)))?("string"==typeof i?i=this.interpolate(this,i,e):"object"==typeof i&&i&&Ya(e.count)&&(i=Ns({i18n:this,count:e.count||0,scope:i,options:e,baseScope:Sr(this,A,e)})),e&&i instanceof Array&&(i=i.map((A=>"string"==typeof A?vr(this,A,e):A))),i):this.missingTranslation.get(A,e)}pluralize(A,e,t){return Ns({i18n:this,count:A,scope:e,options:Object.assign({},t),baseScope:Sr(this,e,null!=t?t:{})})}localize(A,e,t){if(t=Object.assign({},t),null==e)return"";switch(A){case"currency":return this.numberToCurrency(e);case"number":return _r(e,Object.assign({delimiter:",",precision:3,separator:".",significant:!1,stripInsignificantZeros:!1},wr(this,"number.format")));case"percentage":return this.numberToPercentage(e);default:{let i;return i=A.match(/^(date|time)/)?this.toTime(A,e):e.toString(),vr(this,i,t)}}}toTime(A,e){const t=Ps(e),i=wr(this,A);return t.toString().match(/invalid/i)?t.toString():i?this.strftime(t,i):t.toString()}numberToCurrency(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _r(A,Object.assign(Object.assign(Object.assign({delimiter:",",format:"%u%n",precision:2,separator:".",significant:!1,stripInsignificantZeros:!1,unit:"$"},Ga(this.get("number.format"))),Ga(this.get("number.currency.format"))),e))}numberToPercentage(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _r(A,Object.assign(Object.assign(Object.assign({delimiter:"",format:"%n%",precision:3,stripInsignificantZeros:!1,separator:".",significant:!1},Ga(this.get("number.format"))),Ga(this.get("number.percentage.format"))),e))}numberToHumanSize(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(A,e,t){const i=or(t.roundMode),n=1024,a=new rr(e).abs(),r=a.lt(n);let o;const s=(A=>{const e=ks.length-1,t=new rr(Math.log(A.toNumber())).div(Math.log(n)).integerValue(rr.ROUND_DOWN).toNumber();return Math.min(e,t)})(a);o=r?a.integerValue():new rr(yr(a.div(Math.pow(n,s)),{significant:t.significant,precision:t.precision,roundMode:t.roundMode}));const g=A.translate("number.human.storage_units.format",{defaultValue:"%n %u"}),l=A.translate(`number.human.storage_units.units.${r?"byte":ks[s]}`,{count:a.integerValue().toNumber()});let c=o.toFixed(t.precision,i);return t.stripInsignificantZeros&&(c=c.replace(/(\..*?)0+$/,"$1").replace(/\.$/,"")),g.replace("%n",c).replace("%u",l)}(this,A,Object.assign(Object.assign(Object.assign({delimiter:"",precision:3,significant:!0,stripInsignificantZeros:!0,units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},Ga(this.get("number.human.format"))),Ga(this.get("number.human.storage_units"))),e))}numberToHuman(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(A,e,t){const i={roundMode:t.roundMode,precision:t.precision,significant:t.significant};let n;if("string"===Dr(t.units)){const e=t.units;if(n=wr(A,e),!n)throw new Error(`The scope "${A.locale}${A.defaultSeparator}${Sr(A,e,{})}" couldn't be found`)}else n=t.units;let a=yr(new rr(e),i);const r=((A,e)=>{const t=A.isZero()?0:Math.floor(Math.log10(A.abs().toNumber()));return(A=>ws(Object.keys(A).map((A=>Rs[A])),(A=>-1*A)))(e).find((A=>t>=A))||0})(new rr(a),n),o=((A,e)=>A[Fs[e.toString()]]||"")(n,r);if(a=yr(new rr(a).div(Math.pow(10,r)),i),t.stripInsignificantZeros){let[A,e]=a.split(".");e=(e||"").replace(/0+$/,""),a=A,e&&(a+=`${t.separator}${e}`)}return t.format.replace("%n",a||"0").replace("%u",o).trim()}(this,A,Object.assign(Object.assign(Object.assign({delimiter:"",separator:".",precision:3,significant:!0,stripInsignificantZeros:!0,format:"%n %u",roundMode:"default",units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},Ga(this.get("number.human.format"))),Ga(this.get("number.human.decimal_units"))),e))}numberToRounded(A,e){return _r(A,Object.assign({unit:"",precision:3,significant:!1,separator:".",delimiter:"",stripInsignificantZeros:!1},e))}numberToDelimited(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(A,e){const t=new rr(A);if(!t.isFinite())return A.toString();if(!e.delimiterPattern.global)throw new Error(`options.delimiterPattern must be a global regular expression; received ${e.delimiterPattern}`);let[i,n]=t.toString().split(".");return i=i.replace(e.delimiterPattern,(A=>`${A}${e.delimiter}`)),[i,n].filter(Boolean).join(e.separator)}(A,Object.assign({delimiterPattern:/(\d)(?=(\d\d\d)+(?!\d))/g,delimiter:",",separator:"."},e))}withLocale(A,e){return function(A,e,t,i){return new(t||(t=Promise))((function(e,n){function a(A){try{o(i.next(A))}catch(A){n(A)}}function r(A){try{o(i.throw(A))}catch(A){n(A)}}function o(A){var i;A.done?e(A.value):(i=A.value,i instanceof t?i:new t((function(A){A(i)}))).then(a,r)}o((i=i.apply(A,[])).next())}))}(this,0,void 0,(function*(){const t=this.locale;try{this.locale=A,yield e()}finally{this.locale=t}}))}strftime(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{abbrDayNames:i,dayNames:n,abbrMonthNames:a,monthNames:r,meridian:o}=Object.assign(Object.assign({},Ts),t);if(isNaN(A.getTime()))throw new Error("strftime() requires a valid date object, but received an invalid date.");const s=A.getDay(),g=A.getDate(),l=A.getFullYear(),c=A.getMonth()+1,d=A.getHours();let I=d;const C=d>11?"pm":"am",h=A.getSeconds(),u=A.getMinutes(),B=A.getTimezoneOffset(),E=Math.floor(Math.abs(B/60)),f=Math.abs(B)-60*E,Q=(B>0?"-":"+")+(E.toString().length<2?"0"+E:E)+(f.toString().length<2?"0"+f:f);return I>12?I-=12:0===I&&(I=12),(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace("%a",i[s])).replace("%A",n[s])).replace("%b",a[c])).replace("%B",r[c])).replace("%d",g.toString().padStart(2,"0"))).replace("%e",g.toString())).replace("%-d",g.toString())).replace("%H",d.toString().padStart(2,"0"))).replace("%-H",d.toString())).replace("%k",d.toString())).replace("%I",I.toString().padStart(2,"0"))).replace("%-I",I.toString())).replace("%l",I.toString())).replace("%m",c.toString().padStart(2,"0"))).replace("%-m",c.toString())).replace("%M",u.toString().padStart(2,"0"))).replace("%-M",u.toString())).replace("%p",o[C])).replace("%P",o[C].toLowerCase())).replace("%S",h.toString().padStart(2,"0"))).replace("%-S",h.toString())).replace("%w",s.toString())).replace("%y",l.toString().padStart(2,"0").substr(-2))).replace("%-y",l.toString().padStart(2,"0").substr(-2).replace(/^0+/,""))).replace("%Y",l.toString())).replace(/%z/i,Q)}(A,e,Object.assign(Object.assign(Object.assign({},Ga(wr(this,"date"))),{meridian:{am:wr(this,"time.am")||"AM",pm:wr(this,"time.pm")||"PM"}}),t))}update(A,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!1};if(t.strict&&!At(this.translations,A))throw new Error(`The path "${A}" is not currently defined`);const i=Re(this.translations,A),n=Dr(i),a=Dr(e);if(t.strict&&n!==a)throw new Error(`The current type for "${A}" is "${n}", but you're trying to override it with "${a}"`);let r;r="object"===a?Object.assign(Object.assign({},i),e):e;const o=A.split(this.defaultSeparator),s=o.pop();let g=this.translations;for(const A of o)g[A]||(g[A]={}),g=g[A];g[s]=r,this.hasChanged()}toSentence(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{wordsConnector:t,twoWordsConnector:i,lastWordConnector:n}=Object.assign(Object.assign({wordsConnector:", ",twoWordsConnector:" and ",lastWordConnector:", and "},Ga(wr(this,"support.array"))),e),a=A.length;switch(a){case 0:return"";case 1:return`${A[0]}`;case 2:return A.join(i);default:return[A.slice(0,a-1).join(t),n,A[a-1]].join("")}}timeAgoInWords(A,e){return function(A,e,t){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=i.scope||"datetime.distance_in_words",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return A.t(e,{count:t,scope:n})};e=Ps(e),t=Ps(t);let r=e.getTime()/1e3,o=t.getTime()/1e3;r>o&&([e,t,r,o]=[t,e,o,r]);const s=Math.round(o-r),g=Math.round((o-r)/60),l=g/60/24,c=Math.round(g/60),d=Math.round(l),I=Math.round(d/30);if(Js(0,1,g))return i.includeSeconds?Js(0,4,s)?a("less_than_x_seconds",5):Js(5,9,s)?a("less_than_x_seconds",10):Js(10,19,s)?a("less_than_x_seconds",20):Js(20,39,s)?a("half_a_minute"):Js(40,59,s)?a("less_than_x_minutes",1):a("x_minutes",1):0===g?a("less_than_x_minutes",1):a("x_minutes",g);if(Js(2,44,g))return a("x_minutes",g);if(Js(45,89,g))return a("about_x_hours",1);if(Js(90,1439,g))return a("about_x_hours",c);if(Js(1440,2519,g))return a("x_days",1);if(Js(2520,43199,g))return a("x_days",d);if(Js(43200,86399,g))return a("about_x_months",Math.round(g/43200));if(Js(86400,525599,g))return a("x_months",I);let C=e.getFullYear();e.getMonth()+1>=3&&(C+=1);let h=t.getFullYear();t.getMonth()+1<3&&(h-=1);const u=525600,B=g-1440*(C>h?0:Us(C,h).filter((A=>1==new Date(A,1,29).getMonth())).length),E=Math.trunc(B/u),f=parseFloat((B/u-E).toPrecision(3));return f<.25?a("about_x_years",E):f<.75?a("over_x_years",E):a("almost_x_years",E+1)}(this,A,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}onChange(A){return this.onChangeHandlers.push(A),()=>{this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(A),1)}}get version(){return this._version}formatNumber(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _r(A,e=Object.assign(Object.assign({delimiter:",",precision:3,separator:".",unit:"",format:"%u%n",significant:!1,stripInsignificantZeros:!1},Ga(this.get("number.format"))),e))}get(A){return wr(this,A)}runCallbacks(){this.onChangeHandlers.forEach((A=>A(this)))}hasChanged(){this._version+=1,this.runCallbacks()}};var Zs,Xs,qs=function(){function A(A,e){this._i18n=new Ws(A,e)}var e=A.prototype;return e.t=function(A,e){return this._i18n.t(A,e)},e.appendTranslations=function(A){var e=this;Object.keys(A).forEach((function(t){e._i18n.translations[t]=Object.assign(e._i18n.translations[t]||{},A[t])}))},e.switchTranslation=function(A){this._i18n.locale=A},e.getCurrentLocale=function(){return this._i18n.locale},e.getCurrentTranslation=function(){return this._i18n.translations[this._i18n.locale]},e.getTranslations=function(){return this._i18n.translations},e.onChange=function(A){var e=this;return this._i18n.onChange((function(){return A(e)}))},e.getVersion=function(){return"1.0.1"},A}();var zs,$s,Ag=function(){if(Xs)return Zs;Xs=1;var A=function(A){return function(A){return!!A&&"object"==typeof A}(A)&&!function(A){var t=Object.prototype.toString.call(A);return"[object RegExp]"===t||"[object Date]"===t||function(A){return A.$$typeof===e}(A)}(A)},e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function t(A,e){return!1!==e.clone&&e.isMergeableObject(A)?o((t=A,Array.isArray(t)?[]:{}),A,e):A;var t}function i(A,e,i){return A.concat(e).map((function(A){return t(A,i)}))}function n(A){return Object.keys(A).concat(function(A){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(A).filter((function(e){return Object.propertyIsEnumerable.call(A,e)})):[]}(A))}function a(A,e){try{return e in A}catch(A){return!1}}function r(A,e,i){var r={};return i.isMergeableObject(A)&&n(A).forEach((function(e){r[e]=t(A[e],i)})),n(e).forEach((function(n){(function(A,e){return a(A,e)&&!(Object.hasOwnProperty.call(A,e)&&Object.propertyIsEnumerable.call(A,e))})(A,n)||(a(A,n)&&i.isMergeableObject(e[n])?r[n]=function(A,e){if(!e.customMerge)return o;var t=e.customMerge(A);return"function"==typeof t?t:o}(n,i)(A[n],e[n],i):r[n]=t(e[n],i))})),r}function o(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||A,a.cloneUnlessOtherwiseSpecified=t;var o=Array.isArray(n);return o===Array.isArray(e)?o?a.arrayMerge(e,n,a):r(e,n,a):t(n,a)}return o.all=function(A,e){if(!Array.isArray(A))throw new Error("first argument should be an array");return A.reduce((function(A,t){return o(A,t,e)}),{})},Zs=o}(),eg=h(Ag);var tg=($s||($s=1,zs=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,n=void 0,a=void 0,r=[];return function(){var s=function(A){return"function"==typeof A?A():A}(e),g=(new Date).getTime(),l=!i||g-i>s;i=g;for(var c=arguments.length,d=Array(c),I=0;I'),I.innerHTML=C,g.appendChild(I),g.appendChild(l),o.appendChild(g)},e.loadingStop=function(A){var e;null==(e=this.jSPlugin.logger)||e.info(ng,"loadingStop()");var t=document.getElementById(A+"-loading-item-0");t&&document.getElementById(A+"-loading-icon")&&t.removeChild(document.getElementById(A+"-loading-icon"))},e.loadingSetText=function(A){var e,t=this;if(null==(e=this.jSPlugin.logger)||e.info(ng,"loadingSetText()"),this.loadingClearText(),document.getElementById(this.id+"-loading-item-0")){var i=document.getElementById(this.id+"-loading-item-0"),n=document.getElementById(this.id+"-loading-item-0").childNodes[1];if(n||(i.style.height="100%",(n=document.createElement("div")).innerHTML=A.text,i.appendChild(n)),n.id=this.id+"-loading-item-txt",n.innerHTML=A.text,n.style.fontSize="14px",!this.jSPlugin.isMobile&&this.jSPlugin.isCall){var a=this.jSPlugin.width/1024;n.style.fontSize=28*a+"px",n.style.marginTop="16px"}if(this.jSPlugin.isCall&&1==A.type){var r=document.getElementById(this.id+"-loading-item-txt"),o=document.createElement("div");o.style="margin-bottom: 8px;width:24px;height:24px;",o.innerHTML='\n \n \n \n \n \n \n \n ',i.insertBefore(o,r)}if(n.style.color=A.color||"#FFFFFF",n.style.padding="0 6%",n.style.textAlign="center",this.state.text=A.text,A.delayClear)var s=setTimeout((function(){t.loadingClearText(),clearTimeout(s)}),parseInt(A.delayClear))}},e.loadingSetTextWithBtn=function(A){var e,t=this;null==(e=this.jSPlugin.logger)||e.info(ng,"loadingSetTextWithBtn()"),this.loadingClear();var i=!!this.jSPlugin.Theme.call&&this.jSPlugin.Theme.call.themeData||null;(i&&(0===i.customConfig.bellPoster||"onCall"===this.jSPlugin.Theme.call.bellStatus)||A.mask)&&document.getElementById(this.id+"-loading-id-0")&&(document.getElementById(this.id+"-loading-id-0").style.background=A.maskStyle||"rgba(0,0,0,0.7)");var n=document.getElementById(this.id+"-loading-item-0");if(n){n.style.height="100%",n.style["pointer-events"]="auto";var a=document.createElement("div");if(a.id=this.id+"-loading-item-txt",a.innerHTML=A.text,a.title=A.text,a.style.color=A.color||"#FFFFFF",A.isMobile){var r=14*(this.jSPlugin.width/375);a.style.fontSize=r+"px"}else{var o=28*(this.jSPlugin.width/1024);a.style.fontSize=o+"px"}if(this.jSPlugin.isInspect&&(a.style="text-align: center; color: white; font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: 70%;"),n.appendChild(a),A.type&&2==A.type){var s=8,g=24;if(A.isMobile){g=24*(this.jSPlugin.width/375)}else{var l=this.jSPlugin.width/1024;s=l<1?16*l:16,g=40*l}var c=document.getElementById(this.id+"-loading-item-txt");(C=document.createElement("div")).style="margin-bottom: "+s+"px;width:"+g+"px;height:"+g+"px;",C.innerHTML='\n \n \n \n \n \n \n \n ',n.insertBefore(C,c)}else{var d=document.createElement("div");if(d.id=this.id+"-loading-item-btn-wrap",d.innerHTML='\n
'+A.btnName+'
\n \n \n \n ',A.isMobile)1==A.type?d.style="color:white;width:100px;height:30px;border-radius: 10px;background: rgba(255,255,255,0.25);text-align:center;line-height:30px;margin-top:9px;font-size:14px;-webkit-tap-highlight-color: transparent;":d.style="border: 1px solid rgba(204,204,204,1);color:white;width:80px;height:24px;border-radius: 12px;background: rgba(255,255,255,0.1);text-align:center;line-height:24px;margin-top:20px;font-size:12px;-webkit-tap-highlight-color: transparent;";else{var I=this.jSPlugin.width/1024;d.style="color:#648FFC;margin-top:16px;cursor: pointer;font-size:"+24*I+"px;",this.jSPlugin.isInspect&&this.jSPlugin.Theme&&"video"==this.jSPlugin.Theme.inspectMode&&(d.style="border: 1px solid rgba(255,255,255,1);color:white; cursor: pointer;text-align: center;width:80px;height:32px;border-radius:2px; text-align:center;line-height:32px;margin-top:16px;font-size:14px;-webkit-tap-highlight-color: transparent;")}if(n.appendChild(d),A.isMobile&&1==A.type){var C,h=document.getElementById(this.id+"-loading-item-txt");(C=document.createElement("div")).style="margin-bottom: 8px;width:24px;height:24px;",C.innerHTML='\n \n \n \n \n \n \n \n ',n.insertBefore(C,h)}document.getElementById(this.id+"-loading-item-btn-wrap")&&(document.getElementById(this.id+"-loading-item-btn-wrap").onclick=function(){t.jSPlugin.play(),t.loadingClear(),t.loadingStart(t.id),t.loadingSetText({text:"视频加载中"})})}this.state.text=A.text,A.delayClear&&setTimeout((function(){t.loadingClearText()}),parseInt(A.delayClear))}},e.loadingClearText=function(){var A;if(null==(A=this.jSPlugin.logger)||A.info(ng,"loadingClearText()"),document.getElementById(this.id+"-loading-item-0")){var e=document.getElementById(this.id+"-loading-item-0").childNodes;e.length>1?e[1].parentNode.removeChild(e[1]):e[0]&&e[0].parentNode.removeChild(e[0])}},e.loadingClear=function(){var A;if(null==(A=this.jSPlugin.logger)||A.info(ng,"loadingClearText()"),document.getElementById(this.id+"-loading-item-0")){for(var e=document.getElementById(this.id+"-loading-item-0").childNodes,t=e.length-1;t>=0;t--)e[t].parentNode.removeChild(e[t]);document.getElementById(this.id+"-loading-id-0")&&(document.getElementById(this.id+"-loading-id-0").style.background="none"),document.getElementById(this.id+"-loading-icon")&&document.getElementById(this.id+"-loading-icon").parentNode.removeChild(document.getElementById(this.id+"-loading-icon"))}},e.loadingEnd=function(){var A;null==(A=this.jSPlugin.logger)||A.info(ng,"loadingClearText()");var e=document.getElementById(this.id+"-loading-item-0");if(e){e.parentNode.removeChild(e);var t=document.getElementById(this.id+"-loading-id-0");t&&0===t.children.length&&t.parentNode.removeChild(t)}document.getElementById(this.id+"-loading-item-0").style.background="none"},A._instanceStyle=function(){A._STYLE||(A._STYLE=document.createElement("style"),A._STYLE.id="ezuikit-status-style",A._STYLE.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}",document.getElementsByTagName("head")[0].appendChild(A._STYLE))},A}(),rg="[Message]",og=function(){function A(A,e){var t;this.id=e,this.jSPlugin=A,this.timer=null,this.state={play:!1,loading:!1},null==(t=A.logger)||t.log(rg,"init")}return A.prototype.default=function(A,e){var t,i,n=this;null==(i=this.jSPlugin)||null==(t=i.logger)||t.log(rg,"default()");var a="msgId",r=e||document.getElementById(this.id+"-wrap");document.getElementById(this.id+"-"+a)&&r.removeChild(document.getElementById(this.id+"-"+a));var o=document.createElement("div");o.id=this.id+"-"+a,o.style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);text-align: center;padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px;",o.innerHTML=A,r.appendChild(o),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){var A=document.getElementById(n.id+"-"+a);r&&A&&r.removeChild(A)}),2e3)},A}(),sg={391001:"取流地址或端口非法",395e3:"服务内部异常,请稍后重试",395400:"预览取流参数异常",395402:"设备当前时段无录像,请选择其他时间段",395403:"服务异常,请重试或联系客服",395404:"设备不在线,请优化网络后重启设备再试",395405:"设备侧网络问题,请检查优化网络后重启设备再试",395406:"token过期,请重试",395407:"客户端的URL格式错误",395409:"预览开启隐私保护",395410:"服务异常,请重试或联系客服",395411:"无权查看当前设备",395412:"服务异常,请重试或联系客服",395413:"服务异常,请重试或联系客服",395415:"设备通道错误",395416:"当前观看路数达到设备最大限制,请重启设备或联系设备售后处理",395451:"设备不支持该码流类型,请检查设备通道支持情况或联系硬件售后",395452:"设备侧网络较差,请检查优化网络后重启设备再试",395454:"设备侧网络较差,请检查优化网络后重启设备再试",395455:"设备通道异常,请检查通道配置后重试",395456:"设备通道异常,请检查通道配置后重试",395457:"服务异常,请重试或联系客服",395458:"服务异常,请重试或联系客服",395459:"服务异常,请重试或联系客服",395460:"服务异常,请重试或联系客服",395492:"服务异常,请重试或联系客服",395500:"服务异常,请重试或联系客服",395501:"服务异常,请重试或联系客服",395503:"服务异常,请重试或联系客服",395504:"服务异常,请重试或联系客服",395505:"服务异常,请重试或联系客服",395506:"暂不支持该设备直接取流,请连接NVR后重试或联系客服",395507:"设备4G无限流量套餐仅支持萤石云视频APP使用,请联系APP客服更换套餐",395530:"服务异常,请重试或联系客服",395544:"视频源不存在,请检查设备配置",395545:"服务异常,请重试或联系客服",395546:"同时观看人数达到账号最大限制,请联系客服",395547:"同时观看人数达到账号最大限制,请联系客服",395556:"服务异常,请重试或联系客服",395557:"设备取流失败,请联系硬件售后",395558:"查找录像开始时间错误",395560:"服务异常,请重试或联系客服",395561:"服务异常,请重试或联系客服",395562:"服务异常,请重试或联系客服",395563:"服务异常,请重试或联系客服",395564:"服务异常,请重试或联系客服",395566:"服务异常,请重试或联系客服",395567:"服务异常,请重试或联系客服",395568:"服务异常,请重试或联系客服",395569:"服务异常,请重试或联系客服",395600:"服务异常,请重试或联系客服",395601:"服务异常,请重试或联系客服",395602:"服务异常,请重试或联系客服",395610:"服务异常,请重试或联系客服",395620:"服务异常,请重试或联系客服",395701:"服务异常,请重试或联系客服",395702:"服务异常,请重试或联系客服",395703:"服务异常,请重试或联系客服",396001:"服务异常,请重试或联系客服",396099:"服务异常,请重试或联系客服",396101:"服务异常,请重试或联系客服",396102:"服务异常,请重试或联系客服",396103:"服务异常,请重试或联系客服",396104:"服务异常,请重试或联系客服",396105:"设备异常,请重试或联系客服",396106:"设备通道异常,请检查通道配置后重试",396107:"设备异常,请重试或联系客服",396108:"服务异常,请重试或联系客服",396109:"服务异常,请重试或联系客服",396110:"设备异常,请重试或联系客服",396501:"设备异常,请重试或联系客服",396502:"设备异常,请重试或联系客服",396503:"设备异常,请重试或联系客服",396504:"设备异常,请重试或联系客服",396505:"设备异常,请重试或联系客服",396506:"设备异常,请重试或联系客服",396508:"设备异常,请重试或联系客服",396509:"设备异常,请重试或联系客服",396510:"设备异常,请重试或联系客服",396511:"设备异常,请重试或联系客服",396512:"设备异常,请重试或联系客服",396513:"设备异常,请重试或联系客服",396514:"设备异常,请重试或联系客服",396515:"设备异常,请重试或联系客服",396516:"设备异常,请重试或联系客服",396517:"设备异常,请重试或联系客服",396518:"设备异常,请重试或联系客服",396519:"设备网络异常,请检查优化网络后重启设备再试",396520:"设备网络异常,请检查优化网络后重启设备再试",396700:"服务异常,请重试或联系客服",396701:"回放结束",397001:"服务异常,请重试或联系客服",397002:"服务异常,请重试或联系客服",397003:"服务异常,请重试或联系客服",397004:"服务异常,请重试或联系客服",397005:"设备取流连接断开,请检查网络后重试",397006:"服务异常,请重试或联系客服",397007:"服务异常,请重试或联系客服",399e3:"服务异常,请重试或联系客服",399001:"客户端网络超时",399002:"服务异常,请重试或联系客服",399016:"token失效,请更新并重试",399048:"同时观看人数达到账号最大限制,请联系客服",399049:"免费版并发数达到上限,请升级企业版使用多并发能力",3810001:"操作失败",3810002:"账号异常,操作失败",3810005:"账号异常,操作失败",3820002:"设备不存在,请检查设备连接情况",3820006:"操作失败,请检查设备网络情况",3820007:"操作失败,请检查设备网络情况",3820008:"操作过于频繁,稍后再试",3820014:"操作失败",3820032:"通道不存在请检查设备连接情况",3849999:"操作失败,请重试",386e4:"操作失败,设备不支持该操作",3860001:"操作失败,用户无权限",3860002:"设备已旋转到上限位",3860003:"设备已旋转到下限位",3860004:"设备已旋转到左限位",3860005:"设备已旋转到右限位",3860006:"操作失败,请重试",3860009:"设备正在操作中",3860020:"操作失败",BTN_RETRY:"重试",BTN_RELOAD:"重新加载",LOADING:"加载中,请稍后",TIMEFORMAT_ERROR:"时间格式有误,请确认",USE_MULTITHREADING_WARING:"您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见",OPEN_INSTRUCTIONS:"开启说明",INIT_FINSHED:"初始化播放器完成",INIT_SUCCESS:"初始化播放器成功",GET_PLAYURL_FAILED:"获取播放地址失败",VIDEO_LOADING:"视频加载中",DISCONNECT:"连接断开,请重试",DEVICE_ENCRYPTED:"设备已加密",NO_RECORD:"未找到录像片段",PLAY_FAILED:"播放失败,请检查设备及客户端网络",PLAY_SUCCESS:"播放成功",STOP_SUCCESS:"停止成功",CHANGE_PLAYURL_SUCCESS:"切换播放地址成功",CHANGE_PLAYURL_FAILED:"切换播放地址失败",GET_OSD_TIME:"获取OSD时间",GET_OSD_TIME_FAILED:"获取OSD时间失败",SET_POSTER:"设置播放器封面",RESIZE:"调整播放器尺寸",SPEED:"倍速",SPEED_RATE:"倍",SPEED_CANCEL:"取消",GET_SPEED:"获取当前播放速率",MAX_SPEED_LIMIT:"播放速度最大为4倍速度",MIN_SPEED_LIMIT:"播放速度最小为0.5倍速度",SEEK_CANNOT_CROSS_DAYS:"seek时间不能跨日期",SEEK_TIMEFORMAT_ERROR:"seek时间格式错误",PAUSE:"暂停",PAUSE_FAILED:"暂停失败",RESUME:"恢复播放",RESUME_FAILED:"恢复播放失败",CALL_END:"通话已结束",USER_DO_NOT_OWN_DEVICE:"loadingSetTextWithBtn",NO_CLOUD_RECORD:"该设备在当天没有云录制的录像",CHANGE_VIDEO_LEVEL:"切换清晰度",CHANGE_VIDEO_LEVEL_FAIL:"切换清晰度失败",GET_VIDEO_LEVEL_LIST:"获取设备支持的清晰度列表",PLEASE_INPUT_RIGHT_VIDEO_LEVEL:"请输入正确的清度",VIDEO_LEVEL_NOT_SUPPORT:"当前设备不支持该清晰度",VIDEO_LEVEL_FLUENT:"流畅",VIDEO_LEVEL_SATNDARD:"标清",VIDEO_LEVEL_HEIGH:"高清",VIDEO_LEVEL_SPUER:"超清",VIDEO_LEVEL_EXTREME:"极清",VIDEO_LEVEL_3K:"3K",VIDEO_LEVEL_4k:"4K",RESET_THEME:"重置主题",BTN_PLAY:"播放/结束播放",BTN_SOUND:"声音",BTN_RECORDVIDEO:"录屏",BTN_CAPTURE:"截图",BTN_TALK:"对讲",BTN_ZOOM:"电子放大",BTN_3D_ZOOM:"3D定位",BTN_PTZ:"云台控制",BTN_EXPEND:"全局全屏",BTN_WEBEXPEND:"网页全屏",BTN_HD:"画面清晰度",BTN_SPEED:"回放倍速",BTN_CLOUDREC:"云存储回放",BTN_CLOUDRECORD:"云录制",BTN_REC:"本地存储",DEVICE_NAME:"设备名称",DEVICE_ID:"设备序列号",CAPTURE_SUCCESS:"截图成功",CAPTURE_FAILED:"截图失败",START_RECORD_SUCCESS:"开始录制成功",START_RECORD_FAILED:"开始录制失败",STOP_RECORD_SUCCESS:"停止录制成功",STOP_RECORD_FAILED:"停止录制失败",RECORD_TIPS:"今日录像",RECORDS:"个录像",OPEN_SOUND:"开启声音",CLOSE_SOUND:"关闭声音",SOUND_OPENED:"当前已经有画面正在播放声音",ZOOM:"电子放大",START_ZOOM:"开启电子放大",CLOSE_ZOOM:"关闭电子放大",ZOOM_ADD:"+",ZOOM_SUB:"-",ZOOM_ADD_MAX:"已经放大到最大倍数8.0X",ZOOM_SUB_MIN:"已经缩小到最小倍数1.0X",ZOOM_LIMIT_MAX:"超出最大倍率8.0X",ZOOM_LIMIT_MIN:"超出最小倍率1.0X","3D_ZOOM":"3D定位","3D_ZOOM_DISABLE":"未启用3D定位功能","3D_ZOOM_FAILED":"3D定位失败,请重试",START_3D_ZOOM:"开启3D定位",CLOSE_3D_ZOOM:"关闭3D定位",DEVICE_NOT_SUPPORT_3D_ZOOM:"当前设备不支持3D定位功能","3D_ZOOM_ACTIVED":"3D定位已处于开启状态","3D_ZOOM_NOT_ACTIVED":"未启用3D定位功能","3D_ZOOM_CLOSED":"3D定位已处于关闭状态",CHANGE_ZOOM_TYPE:"改变缩放模式",FULLSCREEN:"全局全屏",FULLSCREEN_EXIT:"退出全局全屏",GET_WEB_FULLSCREEN_STATUS:"获取浏览器网页全屏状态",WEB_FULLSCREEN:"开启网页全屏",WEB_FULLSCREEN_EXIT:"退出网页全屏",DESTROY:"销毁",GET_CAPACITY:"获取设备能力级",GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距",NOT_SUPPORT_DEVICE_ZOOM:"当前设备不支持物理缩放",NOT_SUPPORT_FOCUS:"当前设备不支持变焦",MIRROR:"镜像翻转",MIRROR_TYPE_ERROR:"翻转参数类型错误",CHANGE_FEC_TYPE:"切换鱼眼矫正类型",DEVICE_NOT_SUPPORT:"设备不支持鱼眼模式",TYPE_NOT_SUPPORT:"鱼眼矫正类型暂时不支持",FEC_SUPPORT_VERSION:"当前只有V3软解支持鱼眼矫正",NO_CANVAS_ID:"鱼眼矫正类型需要分屏,但是没有传正确的分屏的canvas id",SET_FEC_PARAMS:"设置3D矫正视角参数",GET_FEC_PARAMS:"获取3D矫正视角参数",SET_FEC_PARAMS_FAILED:"该矫正类型不能设置3D矫正视角参数",GET_FEC_PARAMS_FAILED:"该矫正类型不能获取3D矫正视角参数",GET_FEC_PARAMS_SUPPORT_VERSION:"当前只有V3软解支持鱼眼矫正获取3D矫正视角参数",SET_WATERMARK:"设置水印"},gg={391001:"Illegal streaming address or port",395e3:"Internal service exception, please try again later",395400:"Preview streaming parameter exception",395402:"Device has no recording in the current time period, please select another time period",395403:"Service exception, please try again or contact customer service",395404:"The device is not online, Please optimize the network and restart the device to try again",395405:"Device side network is poor, please check and optimize the network and restart the device to try again",395406:"Token expired, please try again",395407:"Client URL format error",395409:"Service exception, please try again or contact customer service",395410:"Service exception, please try again or contact customer service",395411:"No permission to view the current device",395412:"Service exception, please try again or contact customer service",395413:"Service exception, please try again or contact customer service",395415:"Device channel error",395416:"The current number of viewing channels has reached the maximum limit of the device. Please restart the device or contact the device after-sales service",395451:"The device does not support this bitstream type. Please check the device channel support or contact the hardware after-sales service",395452:"The network on the device side is poor. Please check and optimize the network and restart the device to try again",395454:"The network on the device side is poor. Please check and optimize the network and restart the device to try again",395455:"The device channel is abnormal. Please check the channel configuration and try again",395456:"The device channel is abnormal. Please check the channel configuration and try again",395457:"Service exception, please try again or contact customer service",395458:"Service exception, please try again or contact customer service",395459:"Service exception, please try again or contact customer service",395460:"Service exception, please try again or contact customer service",395492:"Service exception, please try again or contact customer service",395500:"Service exception, please try again or contact customer service",395501:"Service exception, please try again or contact customer service",395503:"Service exception, please try again or contact customer service",395504:"Service exception, please try again or contact customer service",395505:"Service exception, please try again or contact customer service",395506:"Direct streaming of this device is not supported at present, please try again or contact customer service after connecting to NVR",395507:"Device 4G unlimited traffic package only supports EZVIZ Cloud Video APP, please contact APP customer service to change the package",395530:"Service exception, please try again or contact customer service",395544:"Video source does not exist, please check device configuration",395545:"Service exception, please try again or contact customer service",395546:"The number of simultaneous viewers has reached the maximum limit of the account, please contact customer service",395547:"The number of simultaneous viewers has reached the maximum limit of the account, please contact customer service",395556:"Service exception, please try again or contact customer service",395557:"Device streaming failed, please contact hardware after-sales",395558:"Error in finding the start time of recording",395560:"Service exception, please try again or contact customer service",395561:"Service exception, please try again or contact customer service",395562:"Service exception, please try again or contact customer service",395563:"Service exception, please try again or contact customer service",395564:"Service exception, please try again or contact customer service",395566:"Service exception, please try again or contact customer service",395567:"Service exception, please try again or contact customer service",395568:"Service exception, please try again or contact customer service",395569:"Service exception, please try again or contact customer service",395600:"Service exception, please try again or contact customer service",395601:"Service exception, please try again or contact customer service",395602:"Service exception, please try again or contact customer service",395610:"Service exception, please try again or contact customer service",395620:"Service exception, please try again or contact customer service",395701:"Service exception, please try again or contact customer service",395702:"Service exception, please try again or contact customer service",395703:"Service exception, please try again or contact customer service",396001:"Service exception, please try again or contact customer service",396099:"Service exception, please try again or contact customer service",396101:"Service exception, please try again or contact customer service",396102:"Service exception, please try again or contact customer service",396103:"Service exception, please try again or contact customer service",396104:"Service exception, please try again or contact customer service",396105:"Device abnormality, please try again or contact customer service",396106:"Device channel abnormality, please check the channel configuration and try again",396107:"Device abnormality, please try again or contact customer service",396108:"Service exception, please try again or contact customer service",396109:"Service exception, please try again or contact customer service",396110:"Device abnormality, please try again or contact customer service",396501:"Device abnormality, please try again or contact customer service",396502:"Device abnormality, please try again or contact customer service",396503:"Device abnormality, please try again or contact customer service",396504:"Device abnormality, please try again or contact customer service",396505:"Device abnormality, please try again or contact customer service",396506:"Device abnormality, please try again or contact customer service",396508:"Device abnormality, please try again or contact customer service",396509:"Device abnormality, please try again or contact customer service",396510:"Device abnormality, please try again or contact customer service",396511:"Device abnormality, please try again or contact customer service",396512:"Device abnormality, please try again or contact customer service",396513:"Device abnormality, please try again or contact customer service",396514:"Device abnormality, please try again or contact customer service",396515:"Device abnormality, please try again or contact customer service",396516:"Device abnormality, please try again or contact customer service",396517:"Device abnormality, please try again or contact customer service",396518:"Device abnormality, please try again or contact customer service",396519:"Device network abnormality, please check and optimize the network and restart the device to try again",396520:"Device network abnormality, please check and optimize the network and restart the device to try again",396700:"Service exception, please try again or contact customer service",396701:"Playback ends",397001:"Service exception, please try again or contact customer service",397002:"Service exception, please try again or contact customer service",397003:"Service exception, please try again or contact customer service",397004:"Service exception, please try again or contact customer service",397005:"Device streaming connection is disconnected, please check the network and try again",397006:"Service exception, please try again or contact customer service",397007:"Service exception, please try again or contact customer service",399e3:"Service exception, please try again or contact customer service",399001:"Client network timeout",399002:"Service exception, please try again or contact customer service",399016:"Token invalid, please update and retry",399048:"The number of simultaneous viewers has reached the maximum account limit, please contact customer service",399049:"The number of simultaneous viewers has reached the maximum account limit, please contact customer service",3810001:"Operation failed",3810002:"Account exception, operation failed",3810005:"Account exception, operation failed",3820002:"Device does not exist, please check the device connection status",3820006:"Operation failed, please check the network condition of the device",3820007:"Operation failed, please check the network condition of the device",3820008:"The operation is too frequent, please try again later",3820014:"Operation failed",3820032:"The channel does not exist. Please check the device connection status",3849999:"Operation failed, please try again",386e4:"Operation failed, the device does not support this operation",3860001:"Operation failed, user does not have permission",3860002:"The device has been rotated to the upper limit position",3860003:"The device has been rotated to the lower limit position",3860004:"The device has rotated to the left limit position",3860005:"The device has been rotated to the right limit position",3860006:"Operation failed, please try again",3860009:"The device is currently in operation",3860020:"Operation failed",BTN_RETRY:"Retry",BTN_RELOAD:"Reload",LOADING:"Loading, please wait",TIMEFORMAT_ERROR:"The time format is wrong, please confirm",USE_MULTITHREADING_WARING:"Your current browser can enable the multi-threaded feature of Google Labs to get a better playback experience and avoid browser freezes and crashes. For details, see:",OPEN_INSTRUCTIONS:"Enablement instructions",INIT_FINSHED:"Initialize the player completed",INIT_SUCCESS:"Initialize the player successfully",GET_PLAYURL_FAILED:"Failed to obtain the playback address",VIDEO_LOADING:"Video loading",DISCONNECT:"Connection disconnected, please try again",DEVICE_ENCRYPTED:"Device encrypted",NO_RECORD:"No video clips found",PLAY_FAILED:"Play failed, please check the device and client network",PLAY_SUCCESS:"Play successfully",STOP_SUCCESS:"Stop successfully",CHANGE_PLAYURL_SUCCESS:"Switch the playback address successfully",CHANGE_PLAYURL_FAILED:"Switch the playback address failed",GET_OSD_TIME:"Get OSD time",GET_OSD_TIME_FAILED:"Failed to get OSD time",SET_POSTER:"Set the player cover",RESIZE:"Adjust the player size",SPEED:"speeds",SPEED_RATE:"X",SPEED_CANCEL:"Cancel",GET_SPEED:"Get the current playback rate",MAX_SPEED_LIMIT:"The maximum playback speed is 4 times the speed",MIN_SPEED_LIMIT:"The minimum playback speed is 0.5 times the speed",SEEK_CANNOT_CROSS_DAYS:"The seek time cannot cross dates",SEEK_TIMEFORMAT_ERROR:"The seek time format is wrong",PAUSE:"Pause",PAUSE_FAILED:"Pause failed",RESUME:"Resume playback",RESUME_FAILED:"Resume playback failed",CALL_END:"Call ended",USER_DO_NOT_OWN_DEVICE:"loadingSetTextWithBtn",NO_CLOUD_RECORD:"The device has no cloud recorded video on that day",CHANGE_VIDEO_LEVEL:"Switch definition",CHANGE_VIDEO_LEVEL_FAIL:"Switch definition failed",GET_VIDEO_LEVEL_LIST:"Get the definition list supported by the device",PLEASE_INPUT_RIGHT_VIDEO_LEVEL:"Please enter the correct definition",VIDEO_LEVEL_NOT_SUPPORT:"The current device does not support this definition",VIDEO_LEVEL_FLUENT:"Fluent",VIDEO_LEVEL_SATNDARD:"Standard",VIDEO_LEVEL_HEIGH:"heigh",VIDEO_LEVEL_SPUER:"Super",VIDEO_LEVEL_EXTREME:"Extreme",VIDEO_LEVEL_3K:"3K",VIDEO_LEVEL_4k:"4K",RESET_THEME:"Reset theme",BTN_PLAY:"Play/end playback",BTN_SOUND:"Sound",BTN_RECORDVIDEO:"Screen recording",BTN_CAPTURE:"Screenshot",BTN_TALK:"Intercom",BTN_ZOOM:"Electronic zoom",BTN_3D_ZOOM:"3D positioning",BTN_PTZ:"PTZ control",BTN_EXPEND:"Global full screen",BTN_WEBEXPEND:"Web page full screen",BTN_HD:"Image definition",BTN_SPEED:"Playback speed",BTN_CLOUDREC:"Cloud storage playback",BTN_CLOUDRECORD:"Cloud recording",BTN_REC:"Local storage",DEVICE_NAME:"Device name",DEVICE_ID:"Device serial number",CAPTURE_SUCCESS:"Screenshot successful",CAPTURE_FAILED:"Screenshot failed",START_RECORD_SUCCESS:"Start recording successful",START_RECORD_FAILED:"Screenshot failed",STOP_RECORD_SUCCESS:"Stop recording successful",STOP_RECORD_FAILED:"Stop recording failed",RECORD_TIPS:"Today's recording",RECORDS:" in total",OPEN_SOUND:"Turn on sound",CLOSE_SOUND:"Turn off sound",SOUND_OPENED:"There is already a picture playing sound at the moment",ZOOM:"Electronic zoom",START_ZOOM:"Turn on electronic zoom",CLOSE_ZOOM:"Turn off electronic zoom",ZOOM_ADD:"+",ZOOM_SUB:"-",ZOOM_ADD_MAX:"It has been enlarged to a maximum magnification of 8.0X",ZOOM_SUB_MIN:"It has been reduced to the minimum multiple of 1.0X",ZOOM_LIMIT_MAX:"Exceeding maximum magnification of 8.0X",ZOOM_LIMIT_MIN:"Exceeding the minimum magnification of 1.0X","3D_ZOOM":"3D positioning","3D_ZOOM_DISABLE":"3D positioning function not enabled","3D_ZOOM_FAILED":"3D positioning failed, please try again",START_3D_ZOOM:"Turn on 3D positioning",CLOSE_3D_ZOOM:"Turn off 3D positioning",DEVICE_NOT_SUPPORT_3D_ZOOM:"Current device does not support 3D positioning function","3D_ZOOM_ACTIVED":"3D positioning is already enabled","3D_ZOOM_NOT_ACTIVED":"3D positioning function is not enabled","3D_ZOOM_CLOSED":"3D positioning is already disabled",CHANGE_ZOOM_TYPE:"Change zoom mode",FULLSCREEN:"Global full screen",FULLSCREEN_EXIT:"Exit global full screen",GET_WEB_FULLSCREEN_STATUS:"Get browser web page full screen status",WEB_FULLSCREEN:"Turn on web page full screen",WEB_FULLSCREEN_EXIT:"Exit full screen webpage",DESTROY:"Destroy",GET_CAPACITY:"Get device capability level",GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length",NOT_SUPPORT_DEVICE_ZOOM:"Device does not support physical zoom",NOT_SUPPORT_FOCUS:"Device does not support adjusting the focal length",MIRROR:"Mirror flip",MIRROR_TYPE_ERROR:"Flip parameter type error",CHANGE_FEC_TYPE:"Switch fisheye correction type",DEVICE_NOT_SUPPORT:"Device does not support fisheye mode",TYPE_NOT_SUPPORT:"Fisheye correction type is not supported temporarily",FEC_SUPPORT_VERSION:"Currently only V3 software solution supports fisheye correction",NO_CANVAS_ID:"Fisheye correction type requires split screen, but the correct split screen canvas id is not passed",SET_FEC_PARAMS:"Set 3D correction perspective parameters",GET_FEC_PARAMS:"Get 3D correction perspective parameters",SET_FEC_PARAMS_FAILED:"This correction type cannot set 3D correction perspective parameters",GET_FEC_PARAMS_FAILED:"This correction type cannot get 3D correction perspective parameters",GET_FEC_PARAMS_SUPPORT_VERSION:"Currently only V3 software solution supports fisheye correction Get 3D correction perspective parameters",SET_WATERMARK:"Set watermark"},lg="object"==typeof global&&global&&global.Object===Object&&global,cg="object"==typeof self&&self&&self.Object===Object&&self,dg=lg||cg||Function("return this")(),Ig=dg.Symbol,Cg=Object.prototype,hg=Cg.hasOwnProperty,ug=Cg.toString,Bg=Ig?Ig.toStringTag:void 0;var Eg=Object.prototype.toString;var fg=Ig?Ig.toStringTag:void 0;function Qg(A){return null==A?void 0===A?"[object Undefined]":"[object Null]":fg&&fg in Object(A)?function(A){var e=hg.call(A,Bg),t=A[Bg];try{A[Bg]=void 0;var i=!0}catch(A){}var n=ug.call(A);return i&&(e?A[Bg]=t:delete A[Bg]),n}(A):function(A){return Eg.call(A)}(A)}function xg(A){return null!=A&&"object"==typeof A}function pg(A){return"symbol"==typeof A||xg(A)&&"[object Symbol]"==Qg(A)}var mg=Array.isArray,yg=Ig?Ig.prototype:void 0,_g=yg?yg.toString:void 0;function Sg(A){if("string"==typeof A)return A;if(mg(A))return function(A,e){for(var t=-1,i=null==A?0:A.length,n=Array(i);++t-1&&A%1==0&&A-1&&A%1==0&&A<=9007199254740991}function nl(A){return null!=A&&il(A.length)&&!Gg(A)}var al=Object.prototype;function rl(A){return xg(A)&&"[object Arguments]"==Qg(A)}var ol=Object.prototype,sl=ol.hasOwnProperty,gl=ol.propertyIsEnumerable,ll=rl(function(){return arguments}())?rl:function(A){return xg(A)&&sl.call(A,"callee")&&!gl.call(A,"callee")};var cl="object"==typeof exports&&exports&&!exports.nodeType&&exports,dl=cl&&"object"==typeof module&&module&&!module.nodeType&&module,Il=dl&&dl.exports===cl?dg.Buffer:void 0,Cl=(Il?Il.isBuffer:void 0)||function(){return!1},hl={};hl["[object Float32Array]"]=hl["[object Float64Array]"]=hl["[object Int8Array]"]=hl["[object Int16Array]"]=hl["[object Int32Array]"]=hl["[object Uint8Array]"]=hl["[object Uint8ClampedArray]"]=hl["[object Uint16Array]"]=hl["[object Uint32Array]"]=!0,hl["[object Arguments]"]=hl["[object Array]"]=hl["[object ArrayBuffer]"]=hl["[object Boolean]"]=hl["[object DataView]"]=hl["[object Date]"]=hl["[object Error]"]=hl["[object Function]"]=hl["[object Map]"]=hl["[object Number]"]=hl["[object Object]"]=hl["[object RegExp]"]=hl["[object Set]"]=hl["[object String]"]=hl["[object WeakMap]"]=!1;var ul,Bl="object"==typeof exports&&exports&&!exports.nodeType&&exports,El=Bl&&"object"==typeof module&&module&&!module.nodeType&&module,fl=El&&El.exports===Bl&&lg.process,Ql=function(){try{var A=El&&El.require&&El.require("util").types;return A||fl&&fl.binding&&fl.binding("util")}catch(A){}}(),xl=Ql&&Ql.isTypedArray,pl=xl?(ul=xl,function(A){return ul(A)}):function(A){return xg(A)&&il(A.length)&&!!hl[Qg(A)]},ml=Object.prototype.hasOwnProperty;function yl(A,e){var t=mg(A),i=!t&&ll(A),n=!t&&!i&&Cl(A),a=!t&&!i&&!n&&pl(A),r=t||i||n||a,o=r?function(A,e){for(var t=-1,i=Array(A);++t-1},Ll.prototype.set=function(A,e){var t=this.__data__,i=Tl(t,A);return i<0?(++this.size,t.push([A,e])):t[i][1]=e,this};var Gl=zg(dg,"Map");function Yl(A,e){var t,i,n=A.__data__;return("string"==(i=typeof(t=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==t:null===t)?n["string"==typeof e?"string":"hash"]:n.map}function Ul(A){var e=-1,t=null==A?0:A.length;for(this.clear();++eo))return!1;var g=a.get(A),l=a.get(e);if(g&&l)return g==e&&l==A;var c=-1,d=!0,I=2&t?new hc:void 0;for(a.set(A,e),a.set(e,A);++c=e||t<0||c&&A-g>=a}function h(){var A=Lc();if(C(A))return u(A);o=setTimeout(h,function(A){var t=e-(A-s);return c?Yc(t,a-(A-g)):t}(A))}function u(A){return o=void 0,d&&i?I(A):(i=n=void 0,r)}function B(){var A=Lc(),t=C(A);if(i=arguments,n=this,s=A,t){if(void 0===o)return function(A){return g=A,o=setTimeout(h,e),l?I(A):r}(s);if(c)return clearTimeout(o),o=setTimeout(h,e),I(s)}return void 0===o&&(o=setTimeout(h,e)),r}return e=Ng(e)||0,bg(t)&&(l=!!t.leading,a=(c="maxWait"in t)?Gc(Ng(t.maxWait)||0,e):a,d="trailing"in t?!!t.trailing:d),B.cancel=function(){void 0!==o&&clearTimeout(o),g=0,i=s=n=o=void 0},B.flush=function(){return void 0===o?r:u(Lc())},B}var Jc=Math.max;function Hc(A,e,t){var i=null==A?0:A.length;if(!i)return-1;var n=null==t?0:Mg(t);return n<0&&(n=Jc(i+n,0)),function(A,e,t){for(var i=A.length,n=t+-1;++n-1?i[n?A[a]:a]:void 0});var Oc,jc={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},Wc={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},Zc=function(A){this.jsPlugin=A;var e={id:A.id,isMouseDown:!1,isOver:!1,mousePosition:null,oldTime:null,nowTime:A.nowTime||null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:!1,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null},t=this;Object.keys(e).forEach((function(A){t[A]=e[A]})),this.options={width:this.canvasWidth,height:48,time:(new Date).getTime(),timeSection:[],timeWidth:0},this.subTime=function(A){return A<10?"0"+A:A},this.tranTime=function(A){var e=A;if(A){var t=new Date(A);e=t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()+" "+this.subTime(t.getHours())+":"+this.subTime(t.getMinutes())+":"+this.subTime(t.getSeconds())}return e},this.init=function(A){var e=this.options;return new Promise((function(i,n){A.width&&document.getElementById(A.id).setAttribute("width",parseInt(A.width,10)+"px"),t.randomNum=(Math.random()+"").split(".").join(""),t.timeWidthTblIndex=e.timeWidth;var a=document.getElementById(t.jsPlugin.id+"-canvas");t.drawPen=a.getContext("2d"),t.nowTime=A.nowTime||(new Date).setHours(0,0,0,0),t.timeSection=e.timeSection||[],t.canvasWidth=a.offsetWidth,t.canvasHeight=a.offsetHeight,t.timeLineClickable=A.timeLineClickable,t.onTimeLineClick=A.onTimeLineClick,t.updata(),document.getElementById(t.jsPlugin.id+"-canvas").addEventListener("mousemove",(function(A){t.options.readOnly||t.mousemove(A)})),document.getElementById(t.jsPlugin.id+"-canvas").addEventListener("mouseover",(function(A){t.options.readOnly||t.mouseover(A)})),document.getElementById(t.jsPlugin.id+"-canvas").addEventListener("mouseleave",(function(A){t.options.readOnly||t.mouseleave(A)})),document.getElementById(t.jsPlugin.id+"-canvas").addEventListener("mousedown",(function(A){t.options.readOnly||t.mousedown(A)})),document.getElementById(t.jsPlugin.id+"-canvas").addEventListener("mouseup",(function(e){if(!t.options.readOnly){var i=A.onChange;t.mouseUpFn(e,i)}})),i()}))},this.setWidth=function(A){A.width&&(document.getElementById(A.id).width=A.width,document.getElementById(A.id+"-canvas").width=A.width,document.getElementById(A.id+"-canvas-container").width=A.width,t.canvasWidth=A.width,t.updata({time:t.nowTime||new Date}))},this.mousemove=function(A){if(this.isMouseDown&&this.isOver){var e=this.mousePosition-A.pageX;if(0===e)return;var t=0;switch(this.timeWidth){case 60:t=.1;break;case 1800:t=3;break;case 3600:t=90;break;case 86400:t=120}var i=new Date(this.oldTime).getTime()+e*t*1e3;this.updata({time:i}),this.moved=!0}else{var n=parseInt(document.getElementById(this.jsPlugin.id+"-canvas-container").offsetLeft,10);this.mousePosition=A.pageX-n,this.updata()}},this.mousedown=function(A){this.isMouseDown=!0,this.mousePosition=A.pageX,this.oldTime=this.nowTime},this.mouseover=function(A){this.isOver=!0},this.mouseleave=function(A){this.isOver=!1,this.isMouseDown=!1,this.updata()},this.changeSize=function(A){this.options.timeWidth=A,this.updata({timeWidth:A})},this.setTimeLineClickable=function(A){this.timeLineClickable=A},this.mouseUpFn=function(A,e){if(this.isMouseDown)if(this.isMouseDown=!1,this.moved){this.moved=!1;var t=new Date(this.nowTime).getFullYear()+"/"+(new Date(this.nowTime).getMonth()+1)+"/"+new Date(this.nowTime).getDate()+" "+this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds());this.nowTime=new Date(t),this.updata({time:this.nowTime}),this.oldTime=this.nowTime,e(this.nowTime)}else if(this.timeLineClickable){var i=0;switch(this.timeWidth){case 60:i=.1;break;case 1800:i=3;break;case 3600:i=90;break;case 86400:i=120}var n=this.canvasWidth/2,a=A.layerX-n>0?A.layerX-n:n-A.layerX,r=new Date(this.nowTime).getTime()+a*i*1e3;this.onTimeLineClick&&this.onTimeLineClick(r,this.nowTime)}},this.readOnly=function(A){this.options.readOnly=!0,document.getElementById(this.jsPlugin.id+"-canvas").style.cursor="not-allowed"},this.unReadOnly=function(A){this.options.readOnly=!1,document.getElementById(this.jsPlugin.id+"-canvas").style.cursor="pointer"},this.run=function(A){t.isMouseDown||t.updata(A)},this.getTime=function(A){},this.updata=function(A){A=A||{},t.nowTime=A.time||t.nowTime,t.timeSection=A.timeSection||t.timeSection,t.timeWidthTblIndex=A.timeWidth||t.timeWidthTblIndex,t.timeWidth=t.timeWidthTbls[A.timeWidth||t.timeWidthTblIndex],t.timeUnit=t.timeUnits[A.timeWidth||t.timeWidthTblIndex],0===A.timeWidth&&(t.timeWidthTblIndex=0,t.timeWidth=t.timeWidthTbls[0],t.timeUnit=t.timeUnits[0]),t.drawPen.fillStyle="#000000",t.drawPen.fillRect(0,0,t.canvasWidth,t.canvasHeight),t.drawScale(),t.drawRecord(),t.drawOtherMsg()},this.drawSolidLine=function(A,e,t,i,n,a){this.drawPen.save(),this.drawPen.strokeStyle=a,this.drawPen.lineWidth=n,this.drawPen.beginPath(),this.drawPen.moveTo(A,e),this.drawPen.lineTo(t,i),this.drawPen.stroke(),this.drawPen.restore()},this.drawString=function(A,e,t,i,n){this.drawPen.font="12px serif",this.drawPen.fillStyle="#ffffff",this.drawPen.textAlign=i||"left",this.drawPen.fillText(A,e,t+10)},this.drawScale=function(){var A=this,e="rgba(255,255,255)",t=new Date(A.nowTime),i=t.getSeconds(),n=t.getMinutes(),a=t.getHours(),r=t.getDate(),o=0;switch(A.timeWidth){case 60:var s=parseInt(A.canvasWidth/10);t.setSeconds(t.getSeconds()-parseInt(s/2,10)),r=t.getDate(),a=t.getHours(),n=t.getMinutes(),i=t.getSeconds();for(var g=0;ge.canvasWidth&&(i=e.canvasWidth),i<=0&&(i=0),i}},this.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF"),this.drawPen.shadowBlur=0,this.isOver&&!this.isMouseDown?(this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3,this.mouseString=this.tranTime(this.mouseTime),this.hoverTime=this.mouseString,this.hoverLeft=this.mousePosition-60,this.timeTipShow=!0):this.timeTipShow=!1}},Xc="https://open.ys7.com",qc="ezuikit_addressList",zc="ezuikit_reloadAddressList",$c={loggerOptions:{level:"INFO",showTime:!0,name:"ezuikit"},autoplay:!0,env:{domain:Xc},host:Xc.replace("https://",""),streamInfoCBType:1,videoLevelList:null},Ad=[4,2,1,.5],ed=[{videoLevel:1,streamTypeIn:1,type:"compatible"},{videoLevel:2,streamTypeIn:1,type:"compatible"}],td={0:"VIDEO_LEVEL_FLUENT",1:"VIDEO_LEVEL_SATNDARD",2:"VIDEO_LEVEL_HEIGH",3:"VIDEO_LEVEL_SPUER",4:"VIDEO_LEVEL_EXTREME",5:"VIDEO_LEVEL_3K",6:"VIDEO_LEVEL_4k"},id={init:"init",decoderLoad:"decoderLoad",decoderLoaded:"decoderLoaded",firstFrameDisplay:"firstFrameDisplay",streamInfoCB:"streamInfoCB",videoInfo:"videoInfo",audioInfo:"audioInfo",play:"play",stop:"stop",changeVideoLevel:"changeVideoLevel",reSetTheme:"reSetTheme",changePlayUrl:"changePlayUrl",getOSDTime:"getOSDTime",capturePicture:"capturePicture",startSave:"startSave",stopSave:"stopSave",openSound:"openSound",closeSound:"closeSound",enable3DZoom:"enable3DZoom",close3DZoom:"close3DZoom",changeZoomType:"changeZoomType",setPoster:"setPoster",resize:"resize",fast:"fast",slow:"slow",speedChange:"speedChange",seek:"seek",fullscreen:"fullscreen",exitFullscreen:"exitFullscreen",fullscreenChange:"fullscreenChange",destroy:"destroy",getDeviceCapacity:"getDeviceCapacity",pause:"pause",resume:"resume",getVideoLevelList:"getVideoLevelList",setVideoLevelList:"setVideoLevelList",currentVideoLevel:"currentVideoLevel",getVideoLevel:"getVideoLevel",getPtzStatus:"getPtzStatus",getPlayRate:"getPlayRate",setMirrorFlip:"setMirrorFlip",setFECCorrectType:"setFECCorrectType",setFEC3DViewParam:"setFEC3DViewParam",getFEC3DViewParam:"getFEC3DViewParam",setWaterMarkFont:"setWaterMarkFont",volumeChange:"volumeChange",startTalk:"startTalk",stopTalk:"stopTalk",talkSuccess:"talkSuccess",talkError:"talkError",recTypeChange:"recTypeChange",recTimeChange:"recTimeChange",setLoggerOptions:"setLoggerOptions",setDisplayRegion:"setDisplayRegion",setAllDayRecTimes:"setAllDayRecTimes",setRecTimes:"setRecTimes",changeTheme:"changeTheme",date:{openDatePanel:"openDatePanel",closeDatePanel:"closeDatePanel",recStartTimeChange:"recStartTimeChange"},ptz:{openPtz:"openPtz",closePtz:"closePtz",ptzDirection:"ptzDirection",ptzSpeedChange:"ptzSpeedChange",ptzBtnClick:"ptzBtnClick"},zoom:(Oc={startZoom:"startZoom",closeZoom:"closeZoom",onZoomChange:"onZoomChange",openZoom:"openZoom"},Oc.closeZoom="closeZoom",Oc),timeLine:{timeWidthChange:"timeWidthChange"},http:{getCloudRecordTimes:"getCloudRecordTimes",getLocalRecTimes:"getLocalRecTimes",getCloudRecTimes:"getCloudRecTimes",getDeviceInfo:"getDeviceInfo",getDeviceList:"getDeviceList",setVideoLevel:"setVideoLevel",getDeviceSupportQuality:"getDeviceSupportQuality",getStreamAddressList:"getStreamAddressList"}};var nd=Xc,ad=function(){function A(e){return A.instant?A.instant:(nd=e||nd,A.instant=this)}var e=A.prototype;return e.setDomain=function(A){nd=A||nd},e.fetch=function(A,e){return A="string"==typeof A?/^http/.test(A)?A:nd+A:A,new Promise((function(t,i){fetch(A,e).then((function(A){try{return A.json()}catch(A){i({code:-1,msg:"data json parse error"})}})).then((function(A){200==+A.code||A.meta&&200===A.meta.code?t(A):i(A)})).catch((function(A){i(A)}))}))},A}();function rd(A){var e=A.slice(0,4),t=A.slice(4,6),i=A.slice(6,8),n=A.slice(8,10),a=A.slice(10,12),r=A.slice(12,14);return new Date(e+"/"+t+"/"+i+" "+n+":"+a+":"+r)}function od(A,e){var t,i,n,a={startTime:e.startTime?new Date(e.startTime).Format("yyyy-MM-dd hh:mm:ss"):void 0,endTime:e.startTime?new Date(e.endTime).Format("yyyy-MM-dd hh:mm:ss"):void 0,spaceId:e.spaceId},r=Object.keys(a).reduce((function(A,e){return null==a[e]?A:A+="&"+e+"="+encodeURIComponent(a[e])}),"").replace("&",""),o=A.env.domain+"/api/service/cloudrecord/video/info/list?"+r;return null==A||null==(t=A.logger)||t.log("[https request] getCloudRecordTimes()",o),(i=o,n={method:"get",headers:{accessToken:A.accessToken||A.token.deviceToken.global,deviceSerial:e.deviceSerial,localIndex:e.channelNo}},new Promise((function(A,e){fetch(i,n).then((function(A){return A.json()})).then((function(t){200==+t.code||t.meta&&200===t.meta.code?A(t):e(t)})).catch((function(A){e(A)}))}))).then((function(e){var t;return e.data=(e.data||[]).map((function(A){return A.endTime=rd(A.stopTime).getTime(),A.startTime=rd(A.startTime).getTime(),A.busType=7,A})),null==A||null==(t=A.eventEmitter)||t.emit(id.http.getCloudRecordTimes,e.data),e}))}var sd=function(A,e){void 0===e&&(e=0),(e<=-24||e>=24)&&(e=0);var t=60*e*60*1e3,i=A.getTime()+t;return new Date(i)},gd=function(){function A(){}return A.formate=function(e,t,i){void 0===i&&(i=0);var n=e;"string"==typeof e?n=A.strToDate(e):"number"==typeof e&&(n=new Date(e));var a=(n=new Date(n.getTime()-3600*i*1e3)).getFullYear(),r=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),s=String(n.getHours()).padStart(2,"0"),g=String(n.getMinutes()).padStart(2,"0"),l=String(n.getSeconds()).padStart(2,"0");switch(t){case"YYYY-MM-DD hh:mm:ss":return a+"-"+r+"-"+o+" "+s+":"+g+":"+l;case"YYYYMMDDhhmmss":return""+a+r+o+s+g+l;case"YYYY/MM/DD hh:mm:ss":return a+"/"+r+"/"+o+" "+s+":"+g+":"+l;case"YYYYMMDDThhmmssZ":return""+a+r+o+"T"+s+g+l+"Z";case"YYYY/MM/DD":return a+"/"+r+"/"+o;case"YYYYMMDD":return""+a+r+o;case"YYYY-MM-DD":return a+"-"+r+"-"+o;case"YYYY":return""+a;case"MM":return""+r;case"DD":return""+o;case"hh:mm:ss":return s+":"+g+":"+l;case"hh":return""+s;case"mm":return""+g;case"ss":return""+l;default:throw new Error("Unsupported format type")}},A.diff=function(e,t,i){var n=e;"string"==typeof e?n=A.strToDate(e):"number"==typeof e&&(n=new Date(e));var a=t;"string"==typeof t?n=A.strToDate(t):"number"==typeof t&&(n=new Date(t));var r=n.getTime()-a.getTime();switch(i){case"year":return n.getFullYear()-a.getFullYear();case"month":var o=12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth());return n.getDate()=e.length)t&&t();else{var r=e[a];if(A.LoadedScripts.find((function(A){return A===r})))n(a+1);else{var o=document.querySelector('script[src="'+r+'"]');if(o)o.readyState?o.addEventListener("readystatechange",(function(){"complete"!=o.readyState&&"loaded"!=o.readyState||n(a+1)})):o.addEventListener("load",(function(){n(a+1)}));else{var s=document.createElement("script");s.src=r,s.setAttribute("crossorigin",!0),s.onload=function(){A.LoadedScripts.push(r),n(a+1),s=null},s.onerror=function(){i&&i(e[a]),s=null},document.head.appendChild(s)}}}}(0)},A.remove=function(e){void 0===e&&(e=[]),e.forEach((function(e){var t=document.querySelector('script[src="'+e+'"]');if(t)try{document.head.removeChild(t)}catch(A){}var i=A.LoadedScripts.indexOf(e);i>-1&&A.LoadedScripts.splice(i,1)}))},A.clear=function(){A.remove(A.LoadedScripts)},A}();function ud(){return ud=Object.assign||function(A){for(var e=1;e\n \n add\n \n \n \n \n \n \n \n \n \n \n \n \n \n reduce\n \n \n \n \n \n \n \n \n\n\n\n';d.innerHTML=I,o(d,l),this.timeLine=new Zc(this.jSPlugin),null==(e=this.jSPlugin)||null==(A=e.logger)||A.log("[TimeLine] init");var C=this;this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:s,nowTime:this.nowTime,timeLineClickable:this.jSPlugin.timeLineClickable,onTimeLineClick:this.jSPlugin.onTimeLineClick,onChange:function(A){if("rec"!==g(a.jSPlugin.url).type||new Date(A).Format("yyyy-MM-dd")==C.date){var e=new Date(A).Format("yyyyMMddhhmmss");if(a.jSPlugin.Theme&&a.jSPlugin.Theme.decoderState.state.recordvideo&&(a.jSPlugin.Theme.setDecoderState({recordvideo:!1}),"cloud.rec"===g(a.jSPlugin.url).type&&a.jSPlugin.stopSave()),"cloud.rec"===g(a.jSPlugin.url).type||a.jSPlugin.useSeek&&a.jSPlugin.capacity&&"1"==a.jSPlugin.capacity.support_seek_playback){if(!a.isSeeking)if(C.recList.length>0)if(new Date(A).valueOf()>=C.lastDate)a.jSPlugin.pluginStatus.loadingSetText({text:"seek回放未找到录像片段",color:"red",delayClear:2e3});else a.jSPlugin.Theme.decoderState.state.play?a.unSyncTimeLine().then((function(){a.isSeeking=!0,a.jSPlugin.pluginStatus.loadingStart(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),a.jSPlugin.pluginStatus.loadingSetText({text:a.jSPlugin.i18n.t("LOADING")}),a.jSPlugin.Theme.setDisabled(!0),a.jSPlugin._tempSeekTime=A,a.jSPlugin.seek(e.substr(8,6),"235959").then((function(){var e=setInterval((function(){a.jSPlugin._destroy?clearInterval(e):a.jSPlugin.getOSDTime().then((function(t){var i=new Date(A).valueOf()/1e3;if(t.data>=i-2){a.isSeeking=!1,a.syncTimeLine(),clearInterval(e),a.jSPlugin.pluginStatus.loadingStop(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),a.jSPlugin.pluginStatus.loadingClear(),a.jSPlugin.Theme.setDisabled(!1),a.jSPlugin._tempSeekTime=null,C.jSPlugin.waterMark_JSPlugin&&C.jSPlugin.setWaterMarkFont(C.jSPlugin.waterMark_JSPlugin);var n,r=a.jSPlugin.Theme.decoderState.state.sound,o=Cd.getInstance(a.jSPlugin.id);if(r&&o.getState().sound&&setTimeout((function(){a.jSPlugin.openSound()}),500),C.jSPlugin.eventEmitter)null==(n=C.jSPlugin.eventEmitter)||n.emit(id.recTimeChange,{code:0,data:{time:new Date(A).Format("yyyyMMddhhmmss")}})}}))}),1e3)}))})):a.unSyncTimeLine().then((function(){a.jSPlugin.pluginStatus.loadingStart(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),a.jSPlugin.pluginStatus.loadingSetText({text:a.jSPlugin.i18n.t("LOADING")}),a.jSPlugin.Theme.setDisabled(!0);var t=a.jSPlugin.url;t.indexOf("begin")>-1?t=t.replace(/(begin=)(\d+)/,(function(A,t,i){return t+e})):t+="?begin="+e,a.jSPlugin.play({url:t}).then((function(){var e;(a.syncTimeLine(),a.jSPlugin.pluginStatus.loadingStop(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),a.jSPlugin.pluginStatus.loadingClear(),a.jSPlugin.Theme.setDisabled(!1),C.jSPlugin.waterMark_JSPlugin&&C.jSPlugin.setWaterMarkFont(C.jSPlugin.waterMark_JSPlugin),C.jSPlugin.eventEmitter)&&(null==(e=C.jSPlugin.eventEmitter)||e.emit(id.recTimeChange,{code:0,data:{time:new Date(A).Format("yyyyMMddhhmmss")}}))})).catch((function(A){}))}))}else{var t=function(){setTimeout((function(){a.disabled=!1}),a.seekFrequency)},i=function(t){a.disabled=!0,a.unSyncTimeLine().then((function(){a.jSPlugin.pluginStatus.loadingStart(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),a.jSPlugin.pluginStatus.loadingSetText({text:a.jSPlugin.i18n.t("LOADING")}),a.jSPlugin.Theme.setDisabled(!0);var i=a.jSPlugin.url;i.indexOf("begin")>-1?i=i.replace(/(begin=)(\d+)/,(function(A,t,i){return t+e})):i+="?begin="+e,a.jSPlugin.play({url:i,unSaveUrl:!0,showPoster:!0}).then((function(){var e;(t&&t(),a.syncTimeLine(),a.jSPlugin.pluginStatus.loadingStop(a.jSPlugin.id),a.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),a.jSPlugin.pluginStatus.loadingClear(),a.jSPlugin.Theme.setDisabled(!1),C.jSPlugin.waterMark_JSPlugin&&C.jSPlugin.setWaterMarkFont(C.jSPlugin.waterMark_JSPlugin),a.jSPlugin.Theme.decoderState.state.sound&&a.jSPlugin.openSound(),C.jSPlugin.eventEmitter)&&(null==(e=C.jSPlugin.eventEmitter)||e.emit(id.recTimeChange,{code:0,data:{time:new Date(A).Format("yyyyMMddhhmmss")}}))})).catch((function(A){}))})),a.jSPlugin.Theme&&a.jSPlugin.Theme.decoderState&&a.jSPlugin.Theme.decoderState.state&&a.jSPlugin.Theme.decoderState.state.zoom&&(a.jSPlugin.Theme.setDecoderState({zoom:!1}),a.jSPlugin.Zoom.stopZoom())};a.disabled?(a.seekTimer&&clearTimeout(a.seekTimer),a.seekTimer=setTimeout((function(){i(t)}),a.seekFrequency)):i(t)}}else{var n;C.jSPlugin.eventEmitter&&(null==(n=C.jSPlugin.eventEmitter)||n.emit(id.recTimeChange,{code:-1,data:{time:new Date(A).Format("yyyyMMddhhmmss")},msg:"本地SD卡不支持跨天回放"}))}}}).then((function(){a.syncTimeLine()}));var h,u,B=null==(i=document.getElementById(this.jSPlugin.id+"-wrap"))||null==(t=i.classList)?void 0:t.contains("ezuikit-player-wrap-mobile-fullscreen");if(document.getElementById(this.jSPlugin.id+"-canvas-container")&&!this.jSPlugin._isCurrentBrowserFullscreen&&!B){var E=parseInt(document.getElementById(this.jSPlugin.id+"-canvas-container").clientHeight);this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-E,!0)}h=C.jSPlugin,u=document.getElementById(h.id+"-wrap"),n(h.staticPath+"/rec/datepicker.min.css"),hd.append([h.staticPath+"/rec/jquery.min.js",h.staticPath+"/rec/datepicker.js",h.staticPath+"/rec/datepicker."+C.datepickerLang[h.language]+".js"],(function(){var A=u.getElementsByClassName("datepicker-container")[0],e=new Date;try{var t,i,n,a;(null==(i=h.urlInfo)||null==(t=i.searchParams)?void 0:t.begin)&&(e=new Date(gd.formate(null==(a=h.urlInfo)||null==(n=a.searchParams)?void 0:n.begin,"YYYY/MM/DD hh:mm:ss")))}catch(A){}!A&&$("#"+h.id+"-datepicker").datepicker&&$("#"+h.id+"-datepicker").datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:C.datepickerLang[h.language],date:new Date(e),format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:u}),(A=u.getElementsByClassName("datepicker-container")[0])&&(A.style.display="none"),C.datepickerVisible=!1,$("#"+h.id+"-datepicker").off("pick.datepicker").on("pick.datepicker",(function(e){if(e.date>new Date||new Date(e.date).Format("yyyyMMddhhmmss")===new Date(document.getElementById(h.id+"-datepicker").value).Format("yyyyMMdd"))e.preventDefault();else{var t,i=new Date(e.date).Format("yyyy-MM-dd");document.getElementById(h.id+"-datepicker").value=i,null==(t=C.jSPlugin.eventEmitter)||t.emit(id.date.recStartTimeChange,{code:0,data:{time:i.replace(/-/gi,"/")}}),C.renderRec(new Date(e.date).Format("yyyy-MM-dd")),h.Theme.decoderState&&h.Theme.decoderState.state?h.Theme.decoderState.state.cloudRec?h.changePlayUrl({begin:new Date(e.date).Format("yyyyMMddhhmmss"),type:"cloud.rec"},(function(){}),!1).then((function(A){C.jSPlugin.Theme.decoderState.state.sound&&C.jSPlugin.openSound()})):h.Theme.decoderState.state.rec?h.changePlayUrl({begin:new Date(e.date).Format("yyyyMMddhhmmss"),type:"rec"},(function(){}),!1).then((function(A){C.jSPlugin.Theme.decoderState.state.sound&&C.jSPlugin.openSound()})):h.changePlayUrl({begin:new Date(e.date).Format("yyyyMMddhhmmss")},(function(){}),!1).then((function(A){C.jSPlugin.Theme.decoderState.state.sound&&C.jSPlugin.openSound()})):h.changePlayUrl({begin:new Date(e.date).Format("yyyyMMddhhmmss")},(function(){}),!1).then((function(A){C.jSPlugin.Theme.decoderState.state.sound&&C.jSPlugin.openSound()}))}A&&(A.style.display="none"),C.datepickerVisible=!1,h.Theme&&h.Theme.decoderState&&h.Theme.decoderState.state&&h.Theme.decoderState.state.zoom&&(h.Theme.setDecoderState({zoom:!1}),h.Zoom.stopZoom())})),$("#"+h.id+"-datepicker").off("click").on("click",(function(e){var t,i;C.datepickerVisible?A&&(A.style.display="none",null==h||null==(t=h.eventEmitter)||t.emit(id.date.closeDatePanel)):A&&(A.style.display="inline",null==h||null==(i=h.eventEmitter)||i.emit(id.date.openDatePanel)),C.datepickerVisible=!C.datepickerVisible}))}),(function(){})),document.getElementById(this.jSPlugin.id+"-timeline-scale-add").onclick=function(){a.unSyncTimeLine().then((function(){var A,e;a.currentTimeWidth<3&&(a.timeLine.changeSize(++a.currentTimeWidth),null==(e=a.jSPlugin)||null==(A=e.eventEmitter)||A.emit(id.timeLine.timeWidthChange,a.currentTimeWidth));a.syncTimeLine()}))},document.getElementById(this.jSPlugin.id+"-timeline-scale-sub").onclick=function(){a.unSyncTimeLine().then((function(){var A,e;a.currentTimeWidth>0&&(a.timeLine.changeSize(--a.currentTimeWidth),null==(e=a.jSPlugin)||null==(A=e.eventEmitter)||A.emit(id.timeLine.timeWidthChange,a.currentTimeWidth));a.syncTimeLine()}))};var f=r("begin",this.jSPlugin.url)||(new Date).Format("yyyyMMdd");f=function(A,e){void 0===e&&(e=0),(e<=-24||e>=24)&&(e=0);var t=A.slice(0,4),i=A.slice(4,6),n=A.slice(6,8),a=A.slice(8,10),r=A.slice(10,12),o=A.slice(12,14),s=new Date(t,i-1,n,a,r,o);s.setHours(s.getHours()+e),s>new Date&&(s=new Date);var g=s.getFullYear(),l=("0"+(s.getMonth()+1)).slice(-2),c=("0"+s.getDate()).slice(-2),d=("0"+s.getHours()).slice(-2),I=("0"+s.getMinutes()).slice(-2),C=("0"+s.getSeconds()).slice(-2);return new Date(g+"/"+l+"/"+c+" "+d+":"+I+":"+C)}(f,r("timeZone",this.jSPlugin.url)?parseInt(r("timeZone",this.jSPlugin.url)):0),this.renderRec(f.Format("yyyy-MM-dd")),this.observer=new MutationObserver((function(A,e){}));var Q=document.getElementById(""+this.jSPlugin.id);this.observer.observe(Q,{attributes:!0,attributeOldValue:!0,attributeFilter:["style"]})},e.destroy=function(){var A,e;Cd.listInstances().length<=1&&(a(this.jSPlugin.staticPath+"/rec/datepicker.min.css"),hd.remove([this.jSPlugin.staticPath+"/rec/jquery.min.js",this.jSPlugin.staticPath+"/rec/datepicker.js",this.jSPlugin.staticPath+"/rec/datepicker."+this.datepickerLang[this.jSPlugin.language]+".js"]),null==(e=this.jSPlugin)||null==(A=e.logger)||A.log("[Rec]","destroy"))},e.datepickerHide=function(){var A=document.getElementById(this.jSPlugin.id+"-wrap");if(A){var e=A.getElementsByClassName("datepicker-container")[0];e&&(e.style.display="none")}this.datepickerVisible=!1},e.datepickerShow=function(){var A=document.getElementById(this.jSPlugin.id+"-wrap");A&&(A.getElementsByClassName("datepicker-container")[0].style.display="inline");this.datepickerVisible=!0},e.recAutoSize=function(A){var e=this,t=this,i=parseInt(getComputedStyle(document.getElementById(t.jSPlugin.id)).width,10)-100;document.getElementById(this.jSPlugin.id+"-canvas")&&i!==parseInt(document.getElementById(t.jSPlugin.id+"-canvas").width)&&t.unSyncTimeLine().then((function(){t.timeLine.setWidth({id:""+e.jSPlugin.id,width:i}),t.syncTimeLine(),A&&A()}))},e.syncTimeLine=function(){var A=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),window.recTimer?Array.isArray(window.recTimer[this.jSPlugin.id])&&window.recTimer[this.jSPlugin.id].map((function(A){clearInterval(A)})):window.recTimer={},window.recTimer[this.jSPlugin.id]=[];var e=this;this.jSPlugin.recTimer=setInterval((function(){e.jSPlugin.getOSDTime().then((function(t){var i=t.data;if(-1===i);else if(i>0){var n=new Date(i>1e12?i:1e3*i);A.nowTime=n,e.timeLine.run({time:n})}})).catch((function(A){var t=e.jSPlugin.Theme.decoderState.state.pauseDate;e.timeLine.run({time:e.timeLine.nowTime||t})}))}),1e3),window.recTimer[this.jSPlugin.id].push(this.jSPlugin.recTimer)},e.unSyncTimeLine=function(){var A=this;return new Promise((function(e,t){A.jSPlugin.recTimer&&(clearInterval(A.jSPlugin.recTimer),A.jSPlugin.recTimer=null),window.recTimer?Array.isArray(window.recTimer[A.jSPlugin.id])&&(window.recTimer[A.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[A.jSPlugin.id]=[]):window.recTimer={},e()}))},e.renderRec=function(A){var e,t,i=this;this.date=A;var n=this,a=new Date(new Date(A).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),o=new Date(new Date(a).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();if(a=new Date(sd(new Date(a),this.jSPlugin.timeZone)).getTime(),o=new Date(sd(new Date(o),this.jSPlugin.timeZone)).getTime(),this.timeLine.getRecord([],a,o),this.jSPlugin._isCloudRecord&&-1!==this.jSPlugin.url.indexOf(".cloud")&&"7"===r("busType",this.jSPlugin.url)){var s={deviceSerial:g(this.jSPlugin.url).deviceSerial,channelNo:g(this.jSPlugin.url).channelNo,startTime:a,endTime:o,spaceId:this.jSPlugin._spaceId};od(this.jSPlugin,s).then((function(A){if(A.data&&A.data.length>0){var e=A.data;n.recList=e,n.lastDate=e[e.length-1].endTime,i.timeLine.getRecord(e,a,o)}}))}else{if(-1!==this.jSPlugin.url.indexOf(".cloud")){var l,d,I={accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,recType:1,deviceSerial:g(this.jSPlugin.url).deviceSerial,channelNo:g(this.jSPlugin.url).channelNo,startTime:a,endTime:o,version:"2.0"},C=this.jSPlugin.env.domain+"/api/lapp/video/by/time";return null==(d=this.jSPlugin)||null==(l=d.logger)||l.log("[https request] getCloudRecTimes()",JSON.stringify(I)),void c(C,"POST",I,"",(function(A){if(A.data&&A.data.files&&A.data.files.length>0){var e=A.data.files,t=(new Date).getTime(),r=A.data.isAll;if(n.recList=e,n.lastDate=e[e.length-1].endTime,r){var s,g;i.timeLine.getRecord(e,a,o),null==(g=n.jSPlugin)||null==(s=g.eventEmitter)||s.emit(id.http.getCloudRecTimes,e)}else{var l,d;I.startTime=t,c(i.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",I,"",(function(A){A.data&&A.data.files&&A.data.files.length>0&&0==A.data.isAll?(A.data.files&&(e=e.concat(A.data.files),n.recList=e,n.lastDate=e[e.length-1].endTime),t=A.data.nextFileTime>0?A.data.nextFileTime:(new Date).getTime(),recTransaction()):n.timeLine.getRecord(e,a,o)})),null==(d=n.jSPlugin)||null==(l=d.logger)||l.log("[https request] getCloudRecTimes()",JSON.stringify(I))}i.timeLine.run({time:new Date(a)})}else if(A.data&&A.data.length>0){var C=A.data.map((function(A){return{startTime:A.startTime-3600*n.jSPlugin.timeZone*1e3,endTime:A.endTime-3600*n.jSPlugin.timeZone*1e3}}));n.recList=C,n.lastDate=C[C.length-1].endTime,n.timeLine.getRecord(C,a,o),n.timeLine.run({time:new Date(a)})}}))}var h={accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,recType:"cloud.rec"===g(this.jSPlugin.url).type?1:2,deviceSerial:g(this.jSPlugin.url).deviceSerial,channelNo:g(this.jSPlugin.url).channelNo,startTime:a,endTime:o,version:"2.0",pageSize:200},u=[],B=function(A){if(A.meta&&200==A.meta.code){if(A.data&&Array.isArray(A.data.records)){var e=A.data.records.map((function(A){return A.startTime=1e3*(A.startTime-3600*n.jSPlugin.timeZone),A.endTime=1e3*(A.endTime-3600*n.jSPlugin.timeZone),A}));u=u.concat(e)}if(A.data&&A.data.hasMore){var t,r,s=i.jSPlugin.env.domain+"/api/v3/device/local/video/unify/query?accessToken="+(i.jSPlugin.accessToken||i.jSPlugin.token.deviceToken.video)+"&deviceSerial="+g(i.jSPlugin.url).deviceSerial+"&channelNo="+g(i.jSPlugin.url).channelNo+"&startTime="+A.data.nextFileTime+"&endTime="+o/1e3+"&pageSize=200";null==(r=i.jSPlugin)||null==(t=r.logger)||t.log("[https request] getLocalRecTimes()",s),fetch(s,{method:"GET",headers:ud({},h,{startTime:A.data.nextFileTime})}).then((function(A){return A.json()})).then((function(A){A&&A.meta&&200==A.meta.code&&B(A)})).catch((function(A){}))}else{var l;u.length>0&&(n.recList=u,n.lastDate=u[u.length-1].endTime,n.timeLine.getRecord(u,a,o)),n.timeLine.run({time:new Date(a)}),null==(l=n.jSPlugin)||l.eventEmitter.emit(id.http.getLocalRecTimes,u||[])}}},E=this.jSPlugin.env.domain+"/api/v3/device/local/video/unify/query?accessToken="+(this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video)+"&deviceSerial="+g(this.jSPlugin.url).deviceSerial+"&channelNo="+g(this.jSPlugin.url).channelNo+"&startTime="+a/1e3+"&endTime="+o/1e3+"&pageSize=200";null==(t=this.jSPlugin)||null==(e=t.logger)||e.log("[https request] getLocalRecTimes()",E),fetch(E,{method:"GET",headers:h}).then((function(A){return A.json()})).then((function(A){A&&A.meta&&200==A.meta.code&&B(A)})).catch((function(A){}))}},A}(),fd={exports:{}};var Qd=(Bd||(Bd=1,function(A){!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},t=A.exports,i=function(){for(var A,t=[["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"]],i=0,n=t.length,a={};i9?e:"0"+e)+":"+(t>9?t:"0"+t)},this.timeToMinute=function(A){var e=A.split(":");return 60*Number(e[0])+Number(e[1])},this.getPlayParam=A.getPlayParam,this.checkIsAppleDevice=function(){var A=navigator.userAgent,e=!!A.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),t=A.indexOf("iPad")>-1,i=A.indexOf("iPhone")>-1||A.indexOf("Mac")>-1;return!!(e||t||i)},this.checkIsHarmonyOS=function(){return navigator.userAgent.indexOf("ohos")>-1},this.checkIsHarmonyOS()?(document.getElementById("time-line-item")&&document.getElementById("time-line-item").parentNode.addEventListener("touchstart",(function(){if(e.state.disabled)return!1;A.ontouchstart()}),!1),document.getElementById("time-line-item")&&document.getElementById("time-line-item").parentNode.addEventListener("touchmove",(function(){if(e.state.disabled)return!1;A.ontouchmove()}),!1),document.getElementById("time-line-item")&&document.getElementById("time-line-item").parentNode.addEventListener("touchend",(function(){if(e.state.disabled)return!1;var t;new Promise((function(A,e){var i=-1;t=setInterval((function(){var e,n,a=null==(n=document.getElementById("time-line-item"))||null==(e=n.parentNode)?void 0:e.scrollTop;a!==i?i=a:(clearInterval(t),A(a))}),100)})).then((function(A){e.rectTopTotime(A),e.getPlayParam({current:e.state.current})})),A.ontouchend()}),!1)):(document.getElementById("time-line-item")&&(document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(e.state.disabled)return!1;A.ontouchstart()}),document.getElementById("time-line-item")&&(document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(e.state.disabled)return!1;A.ontouchmove()}),document.getElementById("time-line-item")&&(document.getElementById("time-line-item").parentNode.ontouchend=function(){if(e.state.disabled)return!1;var t;new Promise((function(A,e){var i=-1;t=setInterval((function(){var e,n,a=null==(n=document.getElementById("time-line-item"))||null==(e=n.parentNode)?void 0:e.scrollTop;a!==i?i=a:(clearInterval(t),A(a))}),100)})).then((function(A){e.rectTopTotime(A),e.getPlayParam({current:e.state.current})})),A.ontouchend()})),this.matchTimeDot()};pd.prototype.changeScale=function(A){this.setState({timelag:A}),this.matchTimeDot()},pd.prototype.setDateLine=function(A,e){A.length>0?(void 0===e&&(e=A.length-1),this.setState({availTimeLine:A,start:A[e].st,end:A[e].et,current:A[e].st}),this.matchRecTimeDot(),this.primaryOffsetH()):(this.setState({availTimeLine:[]}),this.matchRecTimeDot())},pd.prototype.matchTimeDot=function(){var A=this.state;A.start;var e=A.end,t=A.timelag;A.availTimeLine;for(var i=[],n=this.timeToMinute(e),a=n=Math.floor(n/t)*t;a>=0;){var r=0,o=0;a==n&&(r=70),0==a&&(o=230);var s=this.minuteToTime(a);i.push({id:a,current:s,label:"a"+a,marginTop:r,marginBottom:o,recArr:[]}),a-=t}this.setState({timeArr:i}),this.renderDateLine()},pd.prototype.matchRecTimeDot=function(){var A=this.state;A.start,A.end;var e=A.timelag,t=A.availTimeLine,i=A.timeArr,n=t.length;if(0===n)for(var a=0;as&&i[a].id'})),n+="
'+A.current+"
",i.innerHTML=n,t.appendChild(i)}))},pd.prototype.primaryOffsetH=function(){var A=this.state,e=A.start,t=A.timelag,i=A.timeArr[0].current,n=this.timeToSecond(i)-this.timeToSecond(e),a=Math.ceil(n/t)+60;this.setState({scrollTop:a})},pd.prototype.currentOffsetH=function(){var A=this.state,e=A.current,t=A.timelag,i=A.timeArr[0].current,n=this.timeToSecond(i)-this.timeToSecond(e),a=Math.ceil(n/t)+60;this.setState({scrollTop:a})},pd.prototype.rectTopTotime=function(A){var e,t,i=this.state.timelag,n=Math.floor(A/60),a=A-60*n;if(0==a)e=this.state.timeArr[n-1].current,t=0;else{var r=this.state.timeArr[n].current,o=this.timeToMinute(r),s=(60-a)*i,g=Math.floor(s/60)+o,l=60*Math.floor(s/60);t=Math.ceil(s-l),e=this.minuteToTime(g)}this.setState({current:e+":"+(t>9?t:"0"+t),scrollTop:A})},pd.prototype.stepScrollTimeLine=function(A){this.setState({current:A}),this.currentOffsetH()},pd.prototype.secondCountDown=function(A){var e=this.state.current.split(":"),t=60*Number(e[0])*60+60*Number(e[1])+Number(e[2])+1,i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),a=t-3600*i-60*n;this.setState({current:(i>9?i:"0"+i)+":"+(n>9?n:"0"+n)+":"+(a>9?a:"0"+a)})};var md=pd;function yd(A){10===(A+"").length&&(A*=1e3);var e=new Date(A),t=e.getHours(),i=e.getMinutes(),n=e.getSeconds();return(t>9?t:"0"+t)+":"+(i>9?i:"0"+i)+":"+(n>9?n:"0"+n)}Date.prototype.Format=function(A){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var t in/(y+)/.test(A)&&(A=A.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+t+")").test(A)&&(A=A.replace(RegExp.$1,1==RegExp.$1.length?e[t]:("00"+e[t]).substr((""+e[t]).length)));return A};var _d=function(){function A(e,t,i){var n;if(null==e||null==(n=e.logger)||n.log("[MobileRec] init"),this.changeRecSpeed=t,this.resetMobileZoomStatus=i,this.isMobile=!0,this.jSPlugin=e,this.date=(new Date).Format("yyyy-MM-dd"),this.begin=((new Date).Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/"),this.end=((new Date).Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/"),this.initBegin=null,this.initEnd=null,this.type=g(this.jSPlugin.url).type,this.operating=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.recList=[],this.isSeeking=!1,this.datepickerLang={zh:"zh-CN",en:"en-US"},this.datepickerVisible=!1,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency),A._instanceStyle(),r("begin",this.jSPlugin.url)){var a=r("begin",this.jSPlugin.url);this.date=a.slice(0,4)+"/"+a.slice(4,6)+"/"+a.slice(6,8),this.begin=this.date+" "+(a.slice(8,10)||"00")+":"+(a.slice(10,12)||"00")+":"+(a.slice(12,14)||"00"),this.end=this.date+" 23:59:59",this.initBegin=this.begin}if(r("end",this.jSPlugin.url)){var o=r("end",this.jSPlugin.url);this.end=this.date+" "+(o.slice(8,10)||"23")+":"+(o.slice(10,12)||"59")+":"+(o.slice(12,14)||"59"),this.initEnd=this.end}this.recInit()}var i=A.prototype;return i.recInit=function(){this.createDom(),this.initTimeLine(),this.fetchDeviceRec(),this.injectJsCss(this.jSPlugin),this.syncTimeLine(),this.bindEvent()},i.injectJsCss=function(A){this.unInjectJsCss();var t=this,i=document.getElementById(A.id+"-wrap");n(A.staticPath+"/rec/datepicker.min.css"),e(A.staticPath+"/rec/jquery.min.js",(function(A){e(A.staticPath+"/rec/datepicker.js",(function(A){e(A.staticPath+"/rec/datepicker."+t.datepickerLang[A.language]+".js",(function(A){var e=i.getElementsByClassName("datepicker-container")[0];!e&&$("#"+A.id+"-datepicker").datepicker&&$("#"+A.id+"-datepicker").datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:t.datepickerLang[A.language],date:new Date(r("begin",A.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:i}),(e=i.getElementsByClassName("datepicker-container")[0])&&(e.style.display="none",e.style.bottom="-314px",e.style.right="0px"),t.datepickerVisible=!1,$("#"+A.id+"-datepicker").on("pick.datepicker",(function(i){var n={begin:new Date(i.date).Format("yyyyMMddhhmmss")};if(t.begin=i.date,t.end=new Date(i.date).Format("yyyy-MM-dd")+" 23:59:59",i.date>new Date||new Date(i.date).Format("yyyyMMdd")===new Date(document.getElementById(A.id+"-datepicker").getAttribute("data-value")).Format("yyyyMMdd"))i.preventDefault();else{var a=new Date(i.date).Format("yyyy/MM/dd");document.getElementById(A.id+"-datepicker")&&document.getElementById(A.id+"-datepicker").setAttribute("data-value",a),t.date=a,A.eventEmitter.emit(id.date.recStartTimeChange,{code:0,data:{time:a}}),A.Theme.decoderState&&A.Theme.decoderState.state&&(A.Theme.decoderState.state.cloudRec?n={begin:new Date(i.date).Format("yyyyMMddhhmmss"),type:"cloud.rec"}:A.Theme.decoderState.state.rec&&(n={begin:new Date(i.date).Format("yyyyMMddhhmmss"),type:"rec"}))}A.changePlayUrl(n,(function(){}),!1).then((function(){setTimeout((function(){var A=document.getElementById("date");A&&(A.value=new Date(i.date).Format("yyyy-MM-dd"))}),0),t.fetchDeviceRec(),t.jSPlugin.Theme.decoderState.state.sound&&t.jSPlugin.openSound(),t.syncTimeLine()})),t.changeRecSpeed(1),t.resetMobileZoomStatus(),e&&(e.style.display="none"),t.datepickerVisible=!1})),$("#"+A.id+"-datepicker").off("click").on("click",(function(i){var n,a;t.datepickerVisible?e&&(e.style.display="none",null==A||null==(n=A.eventEmitter)||n.emit(id.date.closeDatePanel)):e&&(e.style.display="inline",null==A||null==(a=A.eventEmitter)||a.emit(id.date.openDatePanel));t.datepickerVisible=!t.datepickerVisible})),document.getElementById("date-picker")&&document.getElementById("date-picker").addEventListener("focus",(function(A){A.target.blur()}))}),(function(){}),A)}),(function(){}),A)}),(function(){}),A)},i.createDom=function(){var A=document.createElement("div");A.id="date-switch-container-wrap",A.className="date-switch-container-wrap",A.style="",A.innerHTML='\n
\n
'+this.jSPlugin.i18n.t("RECORD_TIPS")+'
\n
\n \n
\n
\n
\n ',o(A,document.getElementById(this.jSPlugin.id+"-wrap"));var e=document.createElement("div");e.id="rec-type-container-wrap",e.className="rec-type-container-wrap",e.style="",e.innerHTML='\n
\n
0'+this.jSPlugin.i18n.t("RECORDS")+'
\n
\n \n
\n
\n ',o(e,A);var t=document.createElement("div");t.id="mobile-rec-wrap",t.className="mobileRec-wrap",t.style="",t.innerHTML='\n
\n
\n
00:00:00
\n
\n
\n
\n
\n
\n
\n ',o(t,e)},i.initTimeLine=function(){var A,e,t=this;null==(e=this.jSPlugin)||null==(A=e.logger)||A.log("[TimeLine] init"),this.TimeLineOBJ=new md({id:"time-line-item",getPlayParam:function(A){var e=t,i=A.current,n=new Date(t.date).Format("yyyyMMdd").substr(0,8)+(A.current?i.replace(/:/g,""):A.current.replace(/:/g,""));if("cloud.rec"===t.type||t.jSPlugin.useSeek&&t.jSPlugin.capacity&&"1"==t.jSPlugin.capacity.support_seek_playback){if(!t.isSeeking)if(e.recList.length>0)if(new Date(t.date+" "+A.current).valueOf()>=e.lastDate)t.jSPlugin.pluginStatus.loadingSetText({text:"seek回放未找到录像片段",color:"red",delayClear:2e3}),t.syncTimeLine();else t.jSPlugin.Theme.decoderState.state.play?t.unSyncTimeLine().then((function(){t.isSeeking=!0,t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),t.jSPlugin.pluginStatus.loadingSetText({text:t.jSPlugin.i18n.t("LOADING")}),t.jSPlugin.Theme.setDisabled(!0),t.jSPlugin.seek(n.substr(8,6),"235959").then((function(){var A=setInterval((function(){t.jSPlugin.getOSDTime().then((function(i){new Date(1e3*i.data).Format("yyyyMMddhhmmss")>=n&&(t.isSeeking=!1,t.syncTimeLine(),clearInterval(A),t.jSPlugin.pluginStatus.loadingStop(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),t.jSPlugin.pluginStatus.loadingClear(),t.jSPlugin.Theme.setDisabled(!1),t.jSPlugin.waterMark_JSPlugin&&e.jSPlugin.setWaterMarkFont(e.jSPlugin.waterMark_JSPlugin),e.jSPlugin.Theme.decoderState.state.sound&&e.jSPlugin.openSound())}))}),500)}))})):t.unSyncTimeLine().then((function(){t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),t.jSPlugin.pluginStatus.loadingSetText({text:t.jSPlugin.i18n.t("LOADING")}),t.jSPlugin.Theme.setDisabled(!0);var A=t.jSPlugin.url;A.indexOf("begin")>-1?A=A.replace(/(begin=)(\d+)/,(function(A,e,t){return e+n})):A+="?begin="+n,t.jSPlugin.play({url:A}).then((function(){t.syncTimeLine(),t.jSPlugin.pluginStatus.loadingStop(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),t.jSPlugin.pluginStatus.loadingClear(),t.jSPlugin.Theme.setDisabled(!1),e.jSPlugin.waterMark_JSPlugin&&e.jSPlugin.setWaterMarkFont(e.jSPlugin.waterMark_JSPlugin)})).catch((function(A){}))}))}else{var a=function(){setTimeout((function(){t.disabled=!1}),t.seekFrequency)},r=function(A){t.disabled=!0,t.unSyncTimeLine().then((function(){t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!0}),t.jSPlugin.pluginStatus.loadingSetText({text:t.jSPlugin.i18n.t("LOADING")}),t.jSPlugin.Theme.setDisabled(!0);var i=t.jSPlugin.url;i.indexOf("begin")>-1?i=i.replace(/(begin=)(\d+)/,(function(A,e,t){return e+n})):i+="?begin="+n,t.jSPlugin.play({url:i,unSaveUrl:!0,showPoster:!0}).then((function(){A&&A(),t.syncTimeLine(),t.jSPlugin.pluginStatus.loadingStop(t.jSPlugin.id),t.jSPlugin.pluginStatus.setPlayStatus({loading:!1}),t.jSPlugin.pluginStatus.loadingClear(),t.jSPlugin.Theme.setDisabled(!1),e.jSPlugin.waterMark_JSPlugin&&e.jSPlugin.setWaterMarkFont(e.jSPlugin.waterMark_JSPlugin),t.jSPlugin.Theme.decoderState.state.sound&&t.jSPlugin.openSound()})).catch((function(A){}))})),t.jSPlugin.Theme&&t.jSPlugin.Theme.decoderState&&t.jSPlugin.Theme.decoderState.state&&t.jSPlugin.Theme.decoderState.state.zoom&&(t.jSPlugin.Theme.setDecoderState({zoom:!1}),t.jSPlugin.Zoom.stopZoom())};t.disabled?(t.seekTimer&&clearTimeout(t.seekTimer),t.seekTimer=setTimeout((function(){r(a)}),t.seekFrequency)):r(a)}},ontouchstart:function(){t.operating=!0,t.unSyncTimeLine()},ontouchmove:function(){0==t.operating&&(t.operating=!0,t.unSyncTimeLine())},ontouchend:function(){t.operating=!1}})},i.unInjectJsCss=function(){Cd.listInstances().length<=1&&(a(this.jSPlugin.staticPath+"/rec/datepicker.min.css"),t(this.jSPlugin.staticPath+"/rec/jquery.min.js"),t(this.jSPlugin.staticPath+"/rec/datepicker.js"),t(this.jSPlugin.staticPath+"/rec/datepicker."+this.datepickerLang[this.jSPlugin.language]+".js"))},i.destroy=function(){var A,e;null==(e=this.jSPlugin)||null==(A=e.logger)||A.log("[MobileRec] destroy"),this.unInjectJsCss()},i.fetchDeviceRec=function(){var A=this,e=function(e){var t=e.length;document.getElementById("recCount").innerHTML=t;for(var i=[],n=t-1;n>=0;n--){var a=e[n],r=yd(a.endTime),o=yd(a.startTime);i.push({st:o,et:r})}A.TimeLineOBJ.setDateLine(i)},t=new FormData,i=this;t.append("deviceSerial",g(this.jSPlugin.url).deviceSerial),t.append("channelNo",g(this.jSPlugin.url).channelNo),t.append("accessToken",this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video),t.append("recType","cloud.rec"===this.type?1:2);var n=r("timeZone",this.jSPlugin.url),a=null,o=null;if(n<=24&&n>=-24?(a=new Date(new Date(this.begin).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),o=new Date(new Date(a).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime(),a=new Date(sd(new Date(a),this.jSPlugin.timeZone)).getTime(),o=new Date(sd(new Date(o),this.jSPlugin.timeZone)).getTime(),t.append("startTime",a),t.append("endTime",o),this.date=new Date(this.begin).Format("yyyy/MM/dd")):(a=new Date(this.begin).getTime(),o=new Date(this.end).getTime(),t.append("startTime",a),t.append("endTime",o)),this.jSPlugin._isCloudRecord&&-1!==this.jSPlugin.url.indexOf(".cloud")&&"7"===r("busType",this.jSPlugin.url)){var s={deviceSerial:g(this.jSPlugin.url).deviceSerial,channelNo:g(this.jSPlugin.url).channelNo,startTime:a,endTime:o,spaceId:this.jSPlugin._spaceId};od(this.jSPlugin,s).then((function(A){if(A.data&&A.data.length>0){var t=A.data;i.recList=t,i.lastDate=t[t.length-1].endTime,e(t)}}))}else fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:t}).then((function(A){return A.json()})).then((function(A){if(200==A.code&&A.data){var t=(A.data||[]).map((function(A){var e,t;return{startTime:A.startTime-3600*((null==(e=i.jSPlugin)?void 0:e.timeZone)||0)*1e3,endTime:A.endTime-3600*((null==(t=i.jSPlugin)?void 0:t.timeZone)||0)*1e3}}));i.recList=t,i.lastDate=t[t.length-1].endTime,e(t)}else e([])}))},i.syncTimeLine=function(){var A=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),window.recTimer?Array.isArray(window.recTimer[this.jSPlugin.id])&&window.recTimer[this.jSPlugin.id].map((function(A){clearInterval(A)})):window.recTimer={},window.recTimer[this.jSPlugin.id]=[];var e=this;this.TimeLineOBJ&&(this.jSPlugin.recTimer=setInterval((function(){if(A.operating)return!1;A.jSPlugin.getOSDTime().then((function(A){A.data>0&&e.TimeLineOBJ.stepScrollTimeLine(function(A){var e=new Date(A),t=e.getHours(),i=e.getMinutes(),n=e.getSeconds();return(t>9?t:"0"+t)+":"+(i>9?i:"0"+i)+":"+(n>9?n:"0"+n)}(1e3*A.data))})).catch((function(A){}))}),500),window.recTimer[this.jSPlugin.id].push(this.jSPlugin.recTimer))},i.unSyncTimeLine=function(){var A=this;return new Promise((function(e,t){A.jSPlugin.recTimer&&(clearInterval(A.jSPlugin.recTimer),A.jSPlugin.recTimer=null),window.recTimer?Array.isArray(window.recTimer[A.jSPlugin.id])&&(window.recTimer[A.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[A.jSPlugin.id]=[]):window.recTimer={},e()}))},i.bindEvent=function(){var A=this;document.getElementById("cloudType").checked="rec"===this.type,document.getElementById("cloudType").addEventListener("change",(function(e){var t;e.target.checked,A.type=e.target.checked?"rec":"cloud.rec",null==(t=A.jSPlugin)||t.eventEmitter.emit(id.recTypeChange,{code:0,data:{type:A.jSPlugin._isCloudRecord&&"cloud.rec"===A.type?"cloudRecord":"rec"===A.type?"local":"cloud"}}),A.jSPlugin.changePlayUrl({type:A.type,begin:new Date(A.date).Format("yyyyMMdd")+"000000"},(function(){A.jSPlugin._isCloudRecord&&A.jSPlugin.Theme.changeTheme("mobileRec")})).then((function(){A.syncTimeLine(),A.changeRecSpeed(1),A.resetMobileZoomStatus(),A.jSPlugin.Theme.decoderState.state.sound&&A.jSPlugin.openSound()})).catch((function(A){}))}))},A._instanceStyle=function(){A._STYLE||(A._STYLE=document.createElement("style"),A._STYLE.id="ezuikit-mobile-rec-style",A._STYLE.innerHTML='\n body{\n padding: 0;\n margin: 0;\n }\n .time-line-container {\n text-align: left;\n height: 300px;\n /* outline: 1px solid red; */\n /* background: gray; */\n position: relative;\n /* padding-top: 60px; */\n margin-top: 20px;\n }\n\n .time-line-container .time-line-item-container {\n display: inline-block;\n /* height: 400px; */\n width: 30%;\n /* background: indianred; */\n overflow-y: scroll;\n overflow-x: hidden;\n /* padding-top: 60px; */\n height: 300px;\n box-sizing: border-box;\n white-space: nowrap;\n position: relative;\n }\n\n .time-line-container .time-line-item-container::-webkit-scrollbar {\n width: 0px;\n /*滚动条宽度*/\n height: 0px;\n /*滚动条高度*/\n }\n\n .time-line-item .time-item {\n position: relative;\n box-sizing: border-box;\n height: 60px;\n font-size: 12px;\n color: rgb(150, 150, 150);\n border-right: 6px solid;\n border-right-color: #ddd;\n }\n\n .time-line-item .time-item .scale {\n width: 6px;\n height: 9px;\n border-bottom: 1px solid #ccc;\n float: right;\n clear: both;\n }\n\n .time-line-item .time-item .item-unavail {\n width: 6px;\n position: absolute;\n left: 100%;\n background-color: #ddd;\n }\n\n .time-line-container .current-time {\n position: absolute;\n left: 0;\n top: 40px;\n height: 29px;\n /* line-height: 58px; */\n border-bottom: 1px solid #648FFC;\n width: 60%;\n margin-left: 26%;\n }\n\n .time-line-container .current-time .current-time-bg {\n position: relative;\n top: 15px;\n width: 100px;\n height: 29px;\n line-height: 29px;\n left: -70px;\n font-size: 12px;\n color: #2C2C2C;\n }\n\n .time-line-container .current-time .current-time-bg::before {\n content: \'\';\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 100%;\n background: #648FFC;\n top: 11px;\n position: absolute;\n right: 30px;\n }\n\n .date-switch-container {\n height: 40px;\n position: relative;\n text-align: center;\n margin: 20px 10px;\n }\n\n .date-switch-container .current-date {\n line-height: 40px;\n height: 22px;\n font-size: 16px;\n color: #2C2C2C;\n text-align: center;\n font-weight: bold;\n }\n\n .date-container {\n width: 40px;\n height: 40px;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n .rec-type-container {\n display: flex;\n justify-content: space-between;\n }\n\n .rec-type-container .rec-type-text {\n padding: 0 15px;\n font-size: 12px;\n color: #2C2C2C;\n }\n\n .rec-type-container .rec-type-switch {\n padding: 0 20px;\n }\n\n .date-container input {\n position: absolute;\n opacity: 0;\n display: inline-block;\n width: 40px;\n height: 40px;\n z-index: 10;\n left: 0;\n }\n\n .date-container label {\n position: absolute;\n left: 0;\n top: 0;\n /* display: none; */\n z-index: 0;\n }\n\n .date-icon {\n display: inline-block;\n width: 40px;\n height: 40px;\n background: url(\'https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png\') no-repeat 100% 100%;\n }\n .select-container {\n padding: 10px;\n display: flex;\n justify-content: space-between;\n }\n\n .advice {\n height: 24px;\n width: 70px;\n display: flex;\n justify-content: space-between;\n line-height: 24px;\n background: #F8F8F8;\n border-radius: 8px;\n }\n\n .advice span {\n width: 40px;\n display: inline-block;\n }\n\n input[type="checkbox"]:not(:checked)+.advice span:first-child {\n box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n border-radius: 8px;\n text-align: center;\n\n }\n\n input[type="checkbox"]:checked+.advice span:last-child {\n box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n border-radius: 8px;\n text-align: center;\n }\n\n input[type="checkbox"]:not(:checked)+.advice span:first-child svg {\n fill: #648FFC !important;\n }\n\n input[type="checkbox"]:checked+.advice span:last-child svg {\n fill: #648FFC !important;\n }',document.getElementsByTagName("head")[0].appendChild(A._STYLE))},A}(),Sd="[Ptz]",Dd=function(){function A(e){var t,i=this;if(this.jSPlugin=e,null==(t=this.jSPlugin.logger)||t.log(Sd,"init"),this.pluginStatus=this.jSPlugin.pluginStatus,this.showPtz=!1,document.getElementById(this.jSPlugin.id+"-ez-ptz-item"))return!1;var n=document.createElement("div");n.id=this.jSPlugin.id+"-ez-ptz-item",n.className="ez-ptz-wrap",n.style="display:none;",A._instanceStyle(),n.innerHTML='\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '+this.jSPlugin.i18n.t("PTZ_SLOW")+'\n
\n
\n '+this.jSPlugin.i18n.t("PTZ_MID")+'\n
\n
\n '+this.jSPlugin.i18n.t("PTZ_FAST")+'\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n ',document.getElementById(e.id+"-wrap").appendChild(n),document.getElementById(this.jSPlugin.id+"-ez-ptz-container").onmousedown=function(A){A.preventDefault(),A.stopPropagation(),i._handlePtzTouch(A,"start")},document.getElementById(this.jSPlugin.id+"-ez-ptz-container").onmouseup=function(A){A.preventDefault(),A.stopPropagation(),i._handlePtzTouch(A,"stop")},document.getElementById(this.jSPlugin.id+"-ez-ptz-container").ontouchstart=function(A){A.preventDefault(),A.stopPropagation(),i._handlePtzTouch(A,"start")},document.getElementById(this.jSPlugin.id+"-ez-ptz-container").ontouchend=function(A){A.preventDefault(),A.stopPropagation(),i._handlePtzTouch(A,"stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzspeed-container").onmouseup=function(A){var e;A.target.id&&(A.target.id.indexOf("slow")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.slow:1,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.add("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.remove("active")),A.target.id.indexOf("mid")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.mid:3,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.add("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.remove("active")),A.target.id.indexOf("fast")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.fast:7,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.add("active")),null==(e=i.jSPlugin)||e.eventEmitter.emit(id.ptz.ptzSpeedChange,i.jSPlugin.ptzSpeed))},document.getElementById(this.jSPlugin.id+"-ez-ptzspeed-container").ontouchend=function(A){var e,t;A.target.id&&(A.target.id.indexOf("slow")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.slow:1,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.add("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.remove("active")),A.target.id.indexOf("mid")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.mid:3,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.add("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.remove("active")),A.target.id.indexOf("fast")>-1&&(i.jSPlugin.ptzSpeed=i.jSPlugin.ptzSpeedOptions?i.jSPlugin.ptzSpeedOptions.fast:7,document.getElementById(i.jSPlugin.id+"-ptzspeed-slow-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-mid-dot").classList.remove("active"),document.getElementById(i.jSPlugin.id+"-ptzspeed-fast-dot").classList.add("active")),null==(t=i.jSPlugin)||null==(e=t.eventEmitter)||e.emit(id.ptz.ptzSpeedChange,i.jSPlugin.ptzSpeed))},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-add").onmousedown=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","add","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-add").onmouseup=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","add","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-sub").onmousedown=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","sub","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-sub").onmouseup=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","sub","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-add").onmousedown=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","add","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-add").onmouseup=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","add","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-sub").onmousedown=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","sub","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-sub").onmouseup=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","sub","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-add").ontouchstart=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","add","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-add").ontouchend=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","add","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-sub").ontouchstart=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","sub","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-zoom-sub").ontouchend=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("zoom","sub","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-add").ontouchstart=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","add","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-add").ontouchend=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","add","stop")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-sub").ontouchstart=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","sub","start")},document.getElementById(this.jSPlugin.id+"-ez-ptzbtn-focal-sub").ontouchend=function(A){A.preventDefault(),A.stopPropagation(),i._handleBtnTouch("focal","sub","stop")}}var e=A.prototype;return e.destroy=function(){},e.show=function(){document.getElementById(this.jSPlugin.id+"-ez-ptz-item")&&(document.getElementById(this.jSPlugin.id+"-ez-ptz-item").style="display: flex;box-sizing: content-box;"),this.showPtz=!0,this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit(id.ptz.openPtz,{eventType:"openPtz",code:0,target:this,msg:"开启云台"})},e.hide=function(){document.getElementById(this.jSPlugin.id+"-ez-ptz-item")&&(document.getElementById(this.jSPlugin.id+"-ez-ptz-item").style="display: none"),this.showPtz=!1,this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit(id.ptz.closePtz,{eventType:"closePtz",code:0,target:this,msg:"关闭云台"})},e._handlePtzTouch=function(A,e){var t,i,n=this,a=document.getElementById(this.jSPlugin.id+"-ez-ptz-container").getBoundingClientRect(),r=a.left+41,o=a.top+41,s=A.x||A.changedTouches[0].clientX,l=A.y||A.changedTouches[0].clientY,c=0,d=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start",I=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,C=0;function h(A,e){var t=Math.atan2(e,A);t<0&&(t+=2*Math.PI);var i=t*(180/Math.PI)-225-12.5;return i<0&&(i+=360),Math.floor(i/45)+1}var u=/^rotate\(90/.test(document.getElementById(this.jSPlugin.id+"-wrap").style.transform),B=s-r,E=l-o;if(u){var f,Q;switch(h(B,E)){case 1:c=2,C=90;break;case 2:c=4,C=135;break;case 3:c=0,C=180;break;case 4:c=6,C=225;break;case 5:c=3,C=270;break;case 6:c=7,C=315;break;case 7:c=1,C=0;break;case 8:c=5,C=45}null==(Q=this.jSPlugin)||null==(f=Q.logger)||f.log("[Ptz] getAreaId("+B+", "+E+") "+h(B,E)+", isRotate=true")}else{var x,p;switch(h(B,E)){case 1:c=0,C=180;break;case 2:c=6,C=225;break;case 3:c=3,C=270;break;case 4:c=7,C=315;break;case 5:c=1,C=0;break;case 6:c=5,C=45;break;case 7:c=2,C=90;break;case 8:c=4,C=135}null==(p=this.jSPlugin)||null==(x=p.logger)||x.log("[Ptz] getAreaId("+B+", "+E+") "+h(B,E)+", isRotate=false")}null==(i=this.jSPlugin)||null==(t=i.eventEmitter)||t.emit(id.ptz.ptzDirection,{areaId:h(B,E),direction:c,backDeg:C,isRotate:u,ptzSpeed:this.jSPlugin.ptzSpeed,type:e}),document.getElementById(this.jSPlugin.id+"-ez-ptz-container").style="background-image:linear-gradient("+C+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)","stop"===e&&(d=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",I=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,document.getElementById(this.jSPlugin.id+"-ez-ptz-container").style="");var m=new FormData;m.append("deviceSerial",g(this.jSPlugin.url).deviceSerial),m.append("channelNo",g(this.jSPlugin.url).channelNo),m.append("speed",this.jSPlugin.ptzSpeed),m.append("direction",c),m.append("accessToken",I),fetch(d,{method:"POST",body:m}).then((function(A){return A.json()})).then((function(A){if("start"===e&&200!=A.code){var t,i,a,r;null==(a=n.jSPlugin)||null==(i=a.logger)||i.error("[errors]",(null==(t=n.jSPlugin)?void 0:t.i18n.t("38"+A.code))+"("+A.code+")");var o=n.jSPlugin.i18n.t("38"+A.code)||A.msg;null==(r=n.pluginStatus)||r.loadingSetText({text:o,color:"red",delayClear:2e3})}60005!=A.code&&60002!=A.code&&60003!=A.code&&60004!=A.code&&60006!=A.code||(document.getElementById(n.jSPlugin.id+"-ez-ptz-container").style="background-image:linear-gradient("+C+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")})).catch((function(A){}))},e._handleBtnTouch=function(A,e,t){var i,n,a,r,o=this,s=8;s="zoom"===A?"add"===e?8:9:"add"===e?10:11;var l=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video;"stop"===t&&(l=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",c=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video),null==(n=this.jSPlugin)||null==(i=n.logger)||i.log(Sd,A,e,t),null==(r=this.jSPlugin)||null==(a=r.eventEmitter)||a.emit(id.ptz.ptzBtnClick,{btn:A,option:e,type:t});var d=new FormData;d.append("deviceSerial",g(this.jSPlugin.url).deviceSerial),d.append("channelNo",g(this.jSPlugin.url).channelNo),d.append("speed",this.jSPlugin.ptzSpeed),d.append("direction",s),d.append("accessToken",c),fetch(l,{method:"POST",body:d}).then((function(A){return A.json()})).then((function(e){if("start"===t&&200!=e.code){var i,n,a=6e4==e.code?"zoom"===A?o.jSPlugin.i18n.t("NOT_SUPPORT_DEVICE_ZOOM"):o.jSPlugin.i18n.t("NOT_SUPPORT_FOCUS"):e.msg;o.pluginStatus.loadingSetText({text:a,color:"red",delayClear:2e3}),null==(n=o.jSPlugin)||null==(i=n.logger)||i.error("[errors]",a)}})).catch((function(A){}))},A._instanceStyle=function(){if(!A._STYLE){A._STYLE=document.createElement("style"),A._STYLE.id="ezuikit-ptz-style";var e=d();A._STYLE.innerHTML="\n .ez-ptz-container {\n position: relative;\n width: 80px;\n height: 80px;\n background: rgba(255, 255, 255, 0.70);\n box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%);\n border: 1px solid rgba(255, 255, 255, 0.70);\n border-radius: 100%;\n cursor: pointer;\n overflow: hidden;\n user-select: none;\n }\n .ez-ptz-container .ez-ptz-icon.top {\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 8px solid #999999;\n position: absolute;\n display: inline-block;\n left: calc(50% - 4px);\n top: 2px;\n }\n\n .ez-ptz-container .ez-ptz-icon.top.active {\n border-bottom-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.bottom {\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 8px solid #999999;\n position: absolute;\n display: inline-block;\n left: calc(50% - 4px);\n bottom: 2px;\n }\n\n .ez-ptz-container .ez-ptz-icon.bottom.active {\n border-top-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.right {\n width: 0;\n height: 0;\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n border-left: 8px solid #999999;\n position: absolute;\n display: inline-block;\n top: calc(50% - 4px);\n right: 2px;\n }\n\n .ez-ptz-container .ez-ptz-icon.right.active {\n border-left-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.left {\n width: 0;\n height: 0;\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n border-right: 8px solid #999999;\n position: absolute;\n display: inline-block;\n top: calc(50% - 4px);\n left: 2px;\n }\n\n .ez-ptz-container .ez-ptz-icon.left.active {\n border-right-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.top-left {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n position: absolute;\n display: inline-block;\n top: calc(25% - 4px);\n left: 16px;\n background: #999999;\n }\n\n .ez-ptz-container .ez-ptz-icon.top-left.active {\n border-right-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.left-bottom {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n position: absolute;\n display: inline-block;\n bottom: calc(25% - 4px);\n left: 16px;\n background: #999999;\n }\n\n .ez-ptz-container .ez-ptz-icon.left-bottom.active {\n border-right-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.bottom-right {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n position: absolute;\n display: inline-block;\n bottom: calc(25% - 4px);\n right: 16px;\n background: #999999;\n }\n\n .ez-ptz-container .ez-ptz-icon.bottom-right.active {\n border-right-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-icon.right-top {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n position: absolute;\n display: inline-block;\n top: calc(25% - 4px);\n right: 16px;\n background: #999999;\n }\n\n .ez-ptz-container .ez-ptz-icon.right-top.active {\n border-right-color: #407AFF;\n }\n\n .ez-ptz-container .ez-ptz-main.center {\n width: 23px;\n height: 23px;\n background: #407AFF;\n border-radius: 100%;\n top: calc(50% - 12.4px);\n left: calc(50% - 12.4px);\n position: absolute;\n }\n\n .ez-ptz-wrap {\n position: absolute;\n right: 0px;\n top: 0;\n width: 85px;\n height: 100%;\n padding: 0 20px;\n flex-direction: column;\n justify-content: center;\n background: rgba(0,0,0,0.9);\n box-sizing: content-box !important;\n }\n\n .ez-ptz-close {\n position: absolute;\n color: #FFFFFF;\n top: 0;\n right: 0px;\n }\n\n .ez-ptzspeed-progress-line{\n height: 1px;\n background: #ffffff;\n margin: 16px 0 8px;\n display: flex;\n justify-content: space-between;\n }\n\n .ez-ptzspeed-progress-line-dot{\n width: 5px;\n height: 5px;\n border: 2px solid #ffffff;\n border-radius: 50%;\n background: #ffffff;\n margin: -3px 0;\n cursor: pointer;\n }\n\n .ez-ptzspeed-progress-line-dot.active{\n border-color: #407AFF;\n }\n\n .ez-ptzspeed-progress-points{\n display: flex;\n justify-content: space-between;\n }\n\n .ez-ptzspeed-progress-points-slow{\n cursor: pointer;\n color: #ffffff;\n }\n\n .ez-ptzspeed-progress-points-mid{\n cursor: pointer;\n color: #ffffff;\n }\n\n .ez-ptzspeed-progress-points-fast{\n cursor: pointer;\n color: #ffffff;\n }\n\n .ez-ptzbtn-container{\n width: 100%;\n height:"+(e?"60px":"18px")+";\n margin-top: 14px;\n display: "+(e?"block":"flex")+";\n }\n\n .ez-ptzbtn-focal,\n .ez-ptzbtn-zoom{\n width: "+(e?"100%":"50%")+";\n height: 20px;\n display: flex;\n border: 1px solid rgba(255,255,255,0.5);\n border-radius: 10px;\n padding-bottom: 0px;\n box-sizing: content-box;\n }\n\n .ez-ptzbtn-zoom-add,\n .ez-ptzbtn-zoom-sub,\n .ez-ptzbtn-focal-add,\n .ez-ptzbtn-focal-sub{\n width: "+(e?"50%":"24px")+";\n height: 20px;\n cursor: pointer;\n text-align: center;\n }\n\n .ez-ptzbtn-zoom{\n margin: "+(e?"0 0 8px":"0 4px 0 0")+";\n }\n\n .ez-ptzbtn-zoom-add{\n border-right: 1px solid rgba(255,255,255,0.5);\n }\n\n .ez-ptzbtn-focal-add{\n border-right: 1px solid rgba(255,255,255,0.5);\n }\n ",document.getElementsByTagName("head")[0].appendChild(A._STYLE)}},A}();function vd(A){throw new Error('Could not dynamically require "'+A+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wd,bd={exports:{}}; +/* + The MIT License (MIT) + + Copyright (c) 2016 Meetecho + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + */ +function Fd(A,e,t,i,n,a,r){try{var o=A[a](r),s=o.value}catch(A){return void t(A)}o.done?e(s):Promise.resolve(s).then(i,n)}function Rd(A){return A&&"undefined"!=typeof Symbol&&A.constructor===Symbol?"symbol":typeof A}function kd(A,e){var t,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(n=r.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{},e=A.window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},g=i.log,l=i.detectBrowser(e),c={browserDetails:l,commonShim:s,extractVersion:i.extractVersion,disableLog:i.disableLog,disableWarnings:i.disableWarnings};switch(l.browser){case"chrome":if(!n||!n.shimPeerConnection||!t.shimChrome)return g("Chrome shim is not included in this adapter release."),c;g("adapter.js shimming chrome."),c.browserShim=n,n.shimGetUserMedia(e),n.shimMediaStream(e),n.shimPeerConnection(e),n.shimOnTrack(e),n.shimAddTrackRemoveTrack(e),n.shimGetSendersWithDtmf(e),n.shimGetStats(e),n.shimSenderReceiverGetStats(e),n.fixNegotiationNeeded(e),s.shimRTCIceCandidate(e),s.shimConnectionState(e),s.shimMaxMessageSize(e),s.shimSendThrowTypeError(e),s.removeAllowExtmapMixed(e);break;case"firefox":if(!r||!r.shimPeerConnection||!t.shimFirefox)return g("Firefox shim is not included in this adapter release."),c;g("adapter.js shimming firefox."),c.browserShim=r,r.shimGetUserMedia(e),r.shimPeerConnection(e),r.shimOnTrack(e),r.shimRemoveStream(e),r.shimSenderGetStats(e),r.shimReceiverGetStats(e),r.shimRTCDataChannel(e),r.shimAddTransceiver(e),r.shimCreateOffer(e),r.shimCreateAnswer(e),s.shimRTCIceCandidate(e),s.shimConnectionState(e),s.shimMaxMessageSize(e),s.shimSendThrowTypeError(e);break;case"edge":if(!a||!a.shimPeerConnection||!t.shimEdge)return g("MS edge shim is not included in this adapter release."),c;g("adapter.js shimming edge."),c.browserShim=a,a.shimGetUserMedia(e),a.shimGetDisplayMedia(e),a.shimPeerConnection(e),a.shimReplaceTrack(e),s.shimMaxMessageSize(e),s.shimSendThrowTypeError(e);break;case"safari":if(!o||!t.shimSafari)return g("Safari shim is not included in this adapter release."),c;g("adapter.js shimming safari."),c.browserShim=o,o.shimRTCIceServerUrls(e),o.shimCreateOfferLegacy(e),o.shimCallbacksAPI(e),o.shimLocalStreamsAPI(e),o.shimRemoteStreamsAPI(e),o.shimTrackEventTransceiver(e),o.shimGetUserMedia(e),s.shimRTCIceCandidate(e),s.shimMaxMessageSize(e),s.shimSendThrowTypeError(e),s.removeAllowExtmapMixed(e);break;default:g("Unsupported browser!")}return c};var i=g(A("./utils")),n=g(A("./chrome/chrome_shim")),a=g(A("./edge/edge_shim")),r=g(A("./firefox/firefox_shim")),o=g(A("./safari/safari_shim")),s=g(A("./common_shim"));function g(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(A,e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var a="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)},r=A("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var o=A("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return o.shimGetDisplayMedia}}),n.shimMediaStream=function(A){A.MediaStream=A.MediaStream||A.webkitMediaStream},n.shimOnTrack=function(A){if("object"===(void 0===A?"undefined":a(A))&&A.RTCPeerConnection&&!("ontrack"in A.RTCPeerConnection.prototype)){Object.defineProperty(A.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(A){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=A)},enumerable:!0,configurable:!0});var e=A.RTCPeerConnection.prototype.setRemoteDescription;A.RTCPeerConnection.prototype.setRemoteDescription=function(){var t=this;return this._ontrackpoly||(this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",(function(i){var n=void 0;n=A.RTCPeerConnection.prototype.getReceivers?t.getReceivers().find((function(A){return A.track&&A.track.id===i.track.id})):{track:i.track};var a=new Event("track");a.track=i.track,a.receiver=n,a.transceiver={receiver:n},a.streams=[e.stream],t.dispatchEvent(a)})),e.stream.getTracks().forEach((function(i){var n=void 0;n=A.RTCPeerConnection.prototype.getReceivers?t.getReceivers().find((function(A){return A.track&&A.track.id===i.id})):{track:i};var a=new Event("track");a.track=i,a.receiver=n,a.transceiver={receiver:n},a.streams=[e.stream],t.dispatchEvent(a)}))},this.addEventListener("addstream",this._ontrackpoly)),e.apply(this,arguments)}}else s.wrapPeerConnectionEvent(A,"track",(function(A){return A.transceiver||Object.defineProperty(A,"transceiver",{value:{receiver:A.receiver}}),A}))},n.shimGetSendersWithDtmf=function(A){if("object"===(void 0===A?"undefined":a(A))&&A.RTCPeerConnection&&!("getSenders"in A.RTCPeerConnection.prototype)&&"createDTMFSender"in A.RTCPeerConnection.prototype){var e=function(A,e){return{track:e,get dtmf(){return void 0===this._dtmf&&("audio"===e.kind?this._dtmf=A.createDTMFSender(e):this._dtmf=null),this._dtmf},_pc:A}};if(!A.RTCPeerConnection.prototype.getSenders){A.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var t=A.RTCPeerConnection.prototype.addTrack;A.RTCPeerConnection.prototype.addTrack=function(A,i){var n=t.apply(this,arguments);return n||(n=e(this,A),this._senders.push(n)),n};var i=A.RTCPeerConnection.prototype.removeTrack;A.RTCPeerConnection.prototype.removeTrack=function(A){i.apply(this,arguments);var e=this._senders.indexOf(A);-1!==e&&this._senders.splice(e,1)}}var n=A.RTCPeerConnection.prototype.addStream;A.RTCPeerConnection.prototype.addStream=function(A){var t=this;this._senders=this._senders||[],n.apply(this,[A]),A.getTracks().forEach((function(A){t._senders.push(e(t,A))}))};var r=A.RTCPeerConnection.prototype.removeStream;A.RTCPeerConnection.prototype.removeStream=function(A){var e=this;this._senders=this._senders||[],r.apply(this,[A]),A.getTracks().forEach((function(A){var t=e._senders.find((function(e){return e.track===A}));t&&e._senders.splice(e._senders.indexOf(t),1)}))}}else if("object"===(void 0===A?"undefined":a(A))&&A.RTCPeerConnection&&"getSenders"in A.RTCPeerConnection.prototype&&"createDTMFSender"in A.RTCPeerConnection.prototype&&A.RTCRtpSender&&!("dtmf"in A.RTCRtpSender.prototype)){var o=A.RTCPeerConnection.prototype.getSenders;A.RTCPeerConnection.prototype.getSenders=function(){var A=this,e=o.apply(this,[]);return e.forEach((function(e){return e._pc=A})),e},Object.defineProperty(A.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},n.shimGetStats=function(A){if(A.RTCPeerConnection){var e=A.RTCPeerConnection.prototype.getStats;A.RTCPeerConnection.prototype.getStats=function(){var A=this,t=Array.prototype.slice.call(arguments),i=t[0],n=t[1],a=t[2];if(arguments.length>0&&"function"==typeof i)return e.apply(this,arguments);if(0===e.length&&(0===arguments.length||"function"!=typeof i))return e.apply(this,[]);var r=function(A){var e={};return A.result().forEach((function(A){var t={id:A.id,timestamp:A.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[A.type]||A.type};A.names().forEach((function(e){t[e]=A.stat(e)})),e[t.id]=t})),e},o=function(A){return new Map(Object.keys(A).map((function(e){return[e,A[e]]})))};return arguments.length>=2?e.apply(this,[function(A){n(o(r(A)))},i]):new Promise((function(t,i){e.apply(A,[function(A){t(o(r(A)))},i])})).then(n,a)}}},n.shimSenderReceiverGetStats=function(A){if("object"===(void 0===A?"undefined":a(A))&&A.RTCPeerConnection&&A.RTCRtpSender&&A.RTCRtpReceiver){if(!("getStats"in A.RTCRtpSender.prototype)){var e=A.RTCPeerConnection.prototype.getSenders;e&&(A.RTCPeerConnection.prototype.getSenders=function(){var A=this,t=e.apply(this,[]);return t.forEach((function(e){return e._pc=A})),t});var i=A.RTCPeerConnection.prototype.addTrack;i&&(A.RTCPeerConnection.prototype.addTrack=function(){var A=i.apply(this,arguments);return A._pc=this,A}),A.RTCRtpSender.prototype.getStats=function(){var A=this;return this._pc.getStats().then((function(e){return s.filterStats(e,A.track,!0)}))}}if(!("getStats"in A.RTCRtpReceiver.prototype)){var n=A.RTCPeerConnection.prototype.getReceivers;n&&(A.RTCPeerConnection.prototype.getReceivers=function(){var A=this,e=n.apply(this,[]);return e.forEach((function(e){return e._pc=A})),e}),s.wrapPeerConnectionEvent(A,"track",(function(A){return A.receiver._pc=A.srcElement,A})),A.RTCRtpReceiver.prototype.getStats=function(){var A=this;return this._pc.getStats().then((function(e){return s.filterStats(e,A.track,!1)}))}}if("getStats"in A.RTCRtpSender.prototype&&"getStats"in A.RTCRtpReceiver.prototype){var r=A.RTCPeerConnection.prototype.getStats;A.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&t(arguments[0],A.MediaStreamTrack)){var e=arguments[0],i=void 0,n=void 0,a=void 0;return this.getSenders().forEach((function(A){A.track===e&&(i?a=!0:i=A)})),this.getReceivers().forEach((function(A){return A.track===e&&(n?a=!0:n=A),A.track===e})),a||i&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):i?i.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return r.apply(this,arguments)}}}},n.shimAddTrackRemoveTrackWithNative=l,n.shimAddTrackRemoveTrack=function(A){if(A.RTCPeerConnection){var e=s.detectBrowser(A);if(A.RTCPeerConnection.prototype.addTrack&&e.version>=65)return l(A);var t=A.RTCPeerConnection.prototype.getLocalStreams;A.RTCPeerConnection.prototype.getLocalStreams=function(){var A=this,e=t.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((function(e){return A._reverseStreams[e.id]}))};var i=A.RTCPeerConnection.prototype.addStream;A.RTCPeerConnection.prototype.addStream=function(e){var t=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},e.getTracks().forEach((function(A){var e=t.getSenders().find((function(e){return e.track===A}));if(e)throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[e.id]){var n=new A.MediaStream(e.getTracks());this._streams[e.id]=n,this._reverseStreams[n.id]=e,e=n}i.apply(this,[e])};var n=A.RTCPeerConnection.prototype.removeStream;A.RTCPeerConnection.prototype.removeStream=function(A){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},n.apply(this,[this._streams[A.id]||A]),delete this._reverseStreams[this._streams[A.id]?this._streams[A.id].id:A.id],delete this._streams[A.id]},A.RTCPeerConnection.prototype.addTrack=function(e,t){var i=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var n=[].slice.call(arguments,1);if(1!==n.length||!n[0].getTracks().find((function(A){return A===e})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var a=this.getSenders().find((function(A){return A.track===e}));if(a)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var r=this._streams[t.id];if(r)r.addTrack(e),Promise.resolve().then((function(){i.dispatchEvent(new Event("negotiationneeded"))}));else{var o=new A.MediaStream([e]);this._streams[t.id]=o,this._reverseStreams[o.id]=t,this.addStream(o)}return this.getSenders().find((function(A){return A.track===e}))},["createOffer","createAnswer"].forEach((function(e){var t=A.RTCPeerConnection.prototype[e],i=g({},e,(function(){var A=this,e=arguments;return arguments.length&&"function"==typeof arguments[0]?t.apply(this,[function(t){var i=o(A,t);e[0].apply(null,[i])},function(A){e[1]&&e[1].apply(null,A)},arguments[2]]):t.apply(this,arguments).then((function(e){return o(A,e)}))}));A.RTCPeerConnection.prototype[e]=i[e]}));var a=A.RTCPeerConnection.prototype.setLocalDescription;A.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(A,e){var t=e.sdp;return Object.keys(A._reverseStreams||[]).forEach((function(e){var i=A._reverseStreams[e],n=A._streams[i.id];t=t.replace(new RegExp(i.id,"g"),n.id)})),new RTCSessionDescription({type:e.type,sdp:t})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};var r=Object.getOwnPropertyDescriptor(A.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(A.RTCPeerConnection.prototype,"localDescription",{get:function(){var A=r.get.apply(this);return""===A.type?A:o(this,A)}}),A.RTCPeerConnection.prototype.removeTrack=function(A){var e=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!A._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(A._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var t=void 0;Object.keys(this._streams).forEach((function(i){e._streams[i].getTracks().find((function(e){return A.track===e}))&&(t=e._streams[i])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(A.track),this.dispatchEvent(new Event("negotiationneeded")))}}function o(A,e){var t=e.sdp;return Object.keys(A._reverseStreams||[]).forEach((function(e){var i=A._reverseStreams[e],n=A._streams[i.id];t=t.replace(new RegExp(n.id,"g"),i.id)})),new RTCSessionDescription({type:e.type,sdp:t})}},n.shimPeerConnection=function(A){var e=s.detectBrowser(A);if(!A.RTCPeerConnection&&A.webkitRTCPeerConnection&&(A.RTCPeerConnection=A.webkitRTCPeerConnection),A.RTCPeerConnection){e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(e){var t=A.RTCPeerConnection.prototype[e],i=g({},e,(function(){return arguments[0]=new("addIceCandidate"===e?A.RTCIceCandidate:A.RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}));A.RTCPeerConnection.prototype[e]=i[e]}));var t=A.RTCPeerConnection.prototype.addIceCandidate;A.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}},n.fixNegotiationNeeded=function(A){s.wrapPeerConnectionEvent(A,"negotiationneeded",(function(A){if("stable"===A.target.signalingState)return A}))};var s=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils.js"));function g(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}function l(A){A.RTCPeerConnection.prototype.getLocalStreams=function(){var A=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(e){return A._shimmedLocalStreams[e][0]}))};var e=A.RTCPeerConnection.prototype.addTrack;A.RTCPeerConnection.prototype.addTrack=function(A,t){if(!t)return e.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var i=e.apply(this,arguments);return this._shimmedLocalStreams[t.id]?-1===this._shimmedLocalStreams[t.id].indexOf(i)&&this._shimmedLocalStreams[t.id].push(i):this._shimmedLocalStreams[t.id]=[t,i],i};var t=A.RTCPeerConnection.prototype.addStream;A.RTCPeerConnection.prototype.addStream=function(A){var e=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},A.getTracks().forEach((function(A){var t=e.getSenders().find((function(e){return e.track===A}));if(t)throw new DOMException("Track already exists.","InvalidAccessError")}));var i=this.getSenders();t.apply(this,arguments);var n=this.getSenders().filter((function(A){return-1===i.indexOf(A)}));this._shimmedLocalStreams[A.id]=[A].concat(n)};var i=A.RTCPeerConnection.prototype.removeStream;A.RTCPeerConnection.prototype.removeStream=function(A){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[A.id],i.apply(this,arguments)};var n=A.RTCPeerConnection.prototype.removeTrack;A.RTCPeerConnection.prototype.removeTrack=function(A){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},A&&Object.keys(this._shimmedLocalStreams).forEach((function(t){var i=e._shimmedLocalStreams[t].indexOf(A);-1!==i&&e._shimmedLocalStreams[t].splice(i,1),1===e._shimmedLocalStreams[t].length&&delete e._shimmedLocalStreams[t]})),n.apply(this,arguments)}}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetDisplayMedia=function(A,e){A.navigator.mediaDevices&&"getDisplayMedia"in A.navigator.mediaDevices||A.navigator.mediaDevices&&"function"==typeof e&&(A.navigator.mediaDevices.getDisplayMedia=function(t){return e(t).then((function(e){var i=t.video&&t.video.width,n=t.video&&t.video.height,a=t.video&&t.video.frameRate;return t.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxFrameRate:a||3}},i&&(t.video.mandatory.maxWidth=i),n&&(t.video.mandatory.maxHeight=n),A.navigator.mediaDevices.getUserMedia(t)}))})}},{}],5:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)};t.shimGetUserMedia=function(A){var e=A&&A.navigator;if(e.mediaDevices){var t=a.detectBrowser(A),i=function(A){if("object"!==(void 0===A?"undefined":n(A))||A.mandatory||A.optional)return A;var e={};return Object.keys(A).forEach((function(t){if("require"!==t&&"advanced"!==t&&"mediaSource"!==t){var i="object"===n(A[t])?A[t]:{ideal:A[t]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);var a=function(A,e){return A?A+e.charAt(0).toUpperCase()+e.slice(1):"deviceId"===e?"sourceId":e};if(void 0!==i.ideal){e.optional=e.optional||[];var r={};"number"==typeof i.ideal?(r[a("min",t)]=i.ideal,e.optional.push(r),(r={})[a("max",t)]=i.ideal,e.optional.push(r)):(r[a("",t)]=i.ideal,e.optional.push(r))}void 0!==i.exact&&"number"!=typeof i.exact?(e.mandatory=e.mandatory||{},e.mandatory[a("",t)]=i.exact):["min","max"].forEach((function(A){void 0!==i[A]&&(e.mandatory=e.mandatory||{},e.mandatory[a(A,t)]=i[A])}))}})),A.advanced&&(e.optional=(e.optional||[]).concat(A.advanced)),e},o=function(A,a){if(t.version>=61)return a(A);if((A=JSON.parse(JSON.stringify(A)))&&"object"===n(A.audio)){var o=function(A,e,t){e in A&&!(t in A)&&(A[t]=A[e],delete A[e])};o((A=JSON.parse(JSON.stringify(A))).audio,"autoGainControl","googAutoGainControl"),o(A.audio,"noiseSuppression","googNoiseSuppression"),A.audio=i(A.audio)}if(A&&"object"===n(A.video)){var s=A.video.facingMode;s=s&&("object"===(void 0===s?"undefined":n(s))?s:{ideal:s});var g=t.version<66;if(s&&("user"===s.exact||"environment"===s.exact||"user"===s.ideal||"environment"===s.ideal)&&(!e.mediaDevices.getSupportedConstraints||!e.mediaDevices.getSupportedConstraints().facingMode||g)){delete A.video.facingMode;var l=void 0;if("environment"===s.exact||"environment"===s.ideal?l=["back","rear"]:"user"!==s.exact&&"user"!==s.ideal||(l=["front"]),l)return e.mediaDevices.enumerateDevices().then((function(e){e=e.filter((function(A){return"videoinput"===A.kind}));var t=e.find((function(A){return l.some((function(e){return A.label.toLowerCase().includes(e)}))}));return!t&&e.length&&l.includes("back")&&(t=e[e.length-1]),t&&(A.video.deviceId=s.exact?{exact:t.deviceId}:{ideal:t.deviceId}),A.video=i(A.video),r("chrome: "+JSON.stringify(A)),a(A)}))}A.video=i(A.video)}return r("chrome: "+JSON.stringify(A)),a(A)},s=function(A){return t.version>=64?A:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[A.name]||A.name,message:A.message,constraint:A.constraint||A.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(e.getUserMedia=function(A,t,i){o(A,(function(A){e.webkitGetUserMedia(A,t,(function(A){i&&i(s(A))}))}))}.bind(e),e.mediaDevices.getUserMedia){var g=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(A){return o(A,(function(A){return g(A).then((function(e){if(A.audio&&!e.getAudioTracks().length||A.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((function(A){A.stop()})),new DOMException("","NotFoundError");return e}),(function(A){return Promise.reject(s(A))}))}))}}}};var a=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils.js")),r=a.log},{"../utils.js":15}],6:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)};t.shimRTCIceCandidate=function(A){if(!(!A.RTCIceCandidate||A.RTCIceCandidate&&"foundation"in A.RTCIceCandidate.prototype)){var e=A.RTCIceCandidate;A.RTCIceCandidate=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.candidate&&0===A.candidate.indexOf("a=")&&((A=JSON.parse(JSON.stringify(A))).candidate=A.candidate.substr(2)),A.candidate&&A.candidate.length){var t=new e(A),i=o.default.parseCandidate(A.candidate),a=Object.assign(t,i);return a.toJSON=function(){return{candidate:a.candidate,sdpMid:a.sdpMid,sdpMLineIndex:a.sdpMLineIndex,usernameFragment:a.usernameFragment}},a}return new e(A)},A.RTCIceCandidate.prototype=e.prototype,s.wrapPeerConnectionEvent(A,"icecandidate",(function(e){return e.candidate&&Object.defineProperty(e,"candidate",{value:new A.RTCIceCandidate(e.candidate),writable:"false"}),e}))}},t.shimMaxMessageSize=function(A){if(A.RTCPeerConnection){var e=s.detectBrowser(A);"sctp"in A.RTCPeerConnection.prototype||Object.defineProperty(A.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var t=A.RTCPeerConnection.prototype.setRemoteDescription;A.RTCPeerConnection.prototype.setRemoteDescription=function(){var A,i;if(this._sctp=null,"chrome"===e.browser&&e.version>=76&&"plan-b"===this.getConfiguration().sdpSemantics&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0}),function(A){if(!A||!A.sdp)return!1;var e=o.default.splitSections(A.sdp);return e.shift(),e.some((function(A){var e=o.default.parseMLine(A);return e&&"application"===e.kind&&-1!==e.protocol.indexOf("SCTP")}))}(arguments[0])){var n=function(A){var e=A.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===e||e.length<2)return-1;var t=parseInt(e[1],10);return t!=t?-1:t}(arguments[0]),a=(A=n,i=65536,"firefox"===e.browser&&(i=e.version<57?-1===A?16384:2147483637:e.version<60?57===e.version?65535:65536:2147483637),i),r=function(A,t){var i=65536;"firefox"===e.browser&&57===e.version&&(i=65535);var n=o.default.matchPrefix(A.sdp,"a=max-message-size:");return n.length>0?i=parseInt(n[0].substr(19),10):"firefox"===e.browser&&-1!==t&&(i=2147483637),i}(arguments[0],n),s=void 0;s=0===a&&0===r?Number.POSITIVE_INFINITY:0===a||0===r?Math.max(a,r):Math.min(a,r);var g={};Object.defineProperty(g,"maxMessageSize",{get:function(){return s}}),this._sctp=g}return t.apply(this,arguments)}}},t.shimSendThrowTypeError=function(A){if(A.RTCPeerConnection&&"createDataChannel"in A.RTCPeerConnection.prototype){var e=A.RTCPeerConnection.prototype.createDataChannel;A.RTCPeerConnection.prototype.createDataChannel=function(){var A=e.apply(this,arguments);return t(A,this),A},s.wrapPeerConnectionEvent(A,"datachannel",(function(A){return t(A.channel,A.target),A}))}function t(A,e){var t=A.send;A.send=function(){var i=arguments[0],n=i.length||i.size||i.byteLength;if("open"===A.readyState&&e.sctp&&n>e.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+e.sctp.maxMessageSize+" bytes)");return t.apply(A,arguments)}}},t.shimConnectionState=function(A){if(A.RTCPeerConnection&&!("connectionState"in A.RTCPeerConnection.prototype)){var e=A.RTCPeerConnection.prototype;Object.defineProperty(e,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(e,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(A){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),A&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=A)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(A){var t=e[A];e[A]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(A){var e=A.target;if(e._lastConnectionState!==e.connectionState){e._lastConnectionState=e.connectionState;var t=new Event("connectionstatechange",A);e.dispatchEvent(t)}return A},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),t.apply(this,arguments)}}))}},t.removeAllowExtmapMixed=function(A){if(A.RTCPeerConnection){var e=s.detectBrowser(A);if(!("chrome"===e.browser&&e.version>=71)){var t=A.RTCPeerConnection.prototype.setRemoteDescription;A.RTCPeerConnection.prototype.setRemoteDescription=function(A){return A&&A.sdp&&-1!==A.sdp.indexOf("\na=extmap-allow-mixed")&&(A.sdp=A.sdp.split("\n").filter((function(A){return"a=extmap-allow-mixed"!==A.trim()})).join("\n")),t.apply(this,arguments)}}}};var a,r=A("sdp"),o=(a=r)&&a.__esModule?a:{default:a},s=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("./utils"))},{"./utils":15,sdp:17}],7:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetDisplayMedia=t.shimGetUserMedia=void 0;var i=A("./getusermedia");Object.defineProperty(t,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}});var n=A("./getdisplaymedia");Object.defineProperty(t,"shimGetDisplayMedia",{enumerable:!0,get:function(){return n.shimGetDisplayMedia}}),t.shimPeerConnection=function(A){var e=r.detectBrowser(A);if(A.RTCIceGatherer&&(A.RTCIceCandidate||(A.RTCIceCandidate=function(A){return A}),A.RTCSessionDescription||(A.RTCSessionDescription=function(A){return A}),e.version<15025)){var t=Object.getOwnPropertyDescriptor(A.MediaStreamTrack.prototype,"enabled");Object.defineProperty(A.MediaStreamTrack.prototype,"enabled",{set:function(A){t.set.call(this,A);var e=new Event("enabled");e.enabled=A,this.dispatchEvent(e)}})}A.RTCRtpSender&&!("dtmf"in A.RTCRtpSender.prototype)&&Object.defineProperty(A.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new A.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),A.RTCDtmfSender&&!A.RTCDTMFSender&&(A.RTCDTMFSender=A.RTCDtmfSender);var i=(0,g.default)(A,e.version);A.RTCPeerConnection=function(A){return A&&A.iceServers&&(A.iceServers=(0,o.filterIceServers)(A.iceServers,e.version),r.log("ICE servers after filtering:",A.iceServers)),new i(A)},A.RTCPeerConnection.prototype=i.prototype},t.shimReplaceTrack=function(A){A.RTCRtpSender&&!("replaceTrack"in A.RTCRtpSender.prototype)&&(A.RTCRtpSender.prototype.replaceTrack=A.RTCRtpSender.prototype.setTrack)};var a,r=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils")),o=A("./filtericeservers"),s=A("rtcpeerconnection-shim"),g=(a=s)&&a.__esModule?a:{default:a}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filterIceServers=function(A,e){var t=!1;return(A=JSON.parse(JSON.stringify(A))).filter((function(A){if(A&&(A.urls||A.url)){var e=A.urls||A.url;A.url&&!A.urls&&i.deprecated("RTCIceServer.url","RTCIceServer.urls");var n="string"==typeof e;return n&&(e=[e]),e=e.filter((function(A){if(0===A.indexOf("stun:"))return!1;var e=A.startsWith("turn")&&!A.startsWith("turn:[")&&A.includes("transport=udp");return e&&!t?(t=!0,!0):e&&!t})),delete A.url,A.urls=n?e[0]:e,!!e.length}}))};var i=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils"))},{"../utils":15}],9:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetDisplayMedia=function(A){"getDisplayMedia"in A.navigator&&A.navigator.mediaDevices&&(A.navigator.mediaDevices&&"getDisplayMedia"in A.navigator.mediaDevices||(A.navigator.mediaDevices.getDisplayMedia=A.navigator.getDisplayMedia.bind(A.navigator)))}},{}],10:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetUserMedia=function(A){var e=A&&A.navigator,t=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(A){return t(A).catch((function(A){return Promise.reject(function(A){return{name:{PermissionDeniedError:"NotAllowedError"}[A.name]||A.name,message:A.message,constraint:A.constraint,toString:function(){return this.name}}}(A))}))}}},{}],11:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetDisplayMedia=t.shimGetUserMedia=void 0;var n="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)},a=A("./getusermedia");Object.defineProperty(t,"shimGetUserMedia",{enumerable:!0,get:function(){return a.shimGetUserMedia}});var r=A("./getdisplaymedia");Object.defineProperty(t,"shimGetDisplayMedia",{enumerable:!0,get:function(){return r.shimGetDisplayMedia}}),t.shimOnTrack=function(A){"object"===(void 0===A?"undefined":n(A))&&A.RTCTrackEvent&&"receiver"in A.RTCTrackEvent.prototype&&!("transceiver"in A.RTCTrackEvent.prototype)&&Object.defineProperty(A.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},t.shimPeerConnection=function(A){var e=o.detectBrowser(A);if("object"===(void 0===A?"undefined":n(A))&&(A.RTCPeerConnection||A.mozRTCPeerConnection)){if(!A.RTCPeerConnection&&A.mozRTCPeerConnection&&(A.RTCPeerConnection=A.mozRTCPeerConnection),e.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(e){var t,i,n,a=A.RTCPeerConnection.prototype[e],r=(n=function(){return arguments[0]=new("addIceCandidate"===e?A.RTCIceCandidate:A.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)},(i=e)in(t={})?Object.defineProperty(t,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[i]=n,t);A.RTCPeerConnection.prototype[e]=r[e]})),e.version<68){var t=A.RTCPeerConnection.prototype.addIceCandidate;A.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=A.RTCPeerConnection.prototype.getStats;A.RTCPeerConnection.prototype.getStats=function(){var A=Array.prototype.slice.call(arguments),t=A[0],n=A[1],r=A[2];return a.apply(this,[t||null]).then((function(A){if(e.version<53&&!n)try{A.forEach((function(A){A.type=i[A.type]||A.type}))}catch(e){if("TypeError"!==e.name)throw e;A.forEach((function(e,t){A.set(t,Object.assign({},e,{type:i[e.type]||e.type}))}))}return A})).then(n,r)}}},t.shimSenderGetStats=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection&&A.RTCRtpSender&&(!A.RTCRtpSender||!("getStats"in A.RTCRtpSender.prototype))){var e=A.RTCPeerConnection.prototype.getSenders;e&&(A.RTCPeerConnection.prototype.getSenders=function(){var A=this,t=e.apply(this,[]);return t.forEach((function(e){return e._pc=A})),t});var t=A.RTCPeerConnection.prototype.addTrack;t&&(A.RTCPeerConnection.prototype.addTrack=function(){var A=t.apply(this,arguments);return A._pc=this,A}),A.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}},t.shimReceiverGetStats=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection&&A.RTCRtpSender&&(!A.RTCRtpSender||!("getStats"in A.RTCRtpReceiver.prototype))){var e=A.RTCPeerConnection.prototype.getReceivers;e&&(A.RTCPeerConnection.prototype.getReceivers=function(){var A=this,t=e.apply(this,[]);return t.forEach((function(e){return e._pc=A})),t}),o.wrapPeerConnectionEvent(A,"track",(function(A){return A.receiver._pc=A.srcElement,A})),A.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},t.shimRemoveStream=function(A){A.RTCPeerConnection&&!("removeStream"in A.RTCPeerConnection.prototype)&&(A.RTCPeerConnection.prototype.removeStream=function(A){var e=this;o.deprecated("removeStream","removeTrack"),this.getSenders().forEach((function(t){t.track&&A.getTracks().includes(t.track)&&e.removeTrack(t)}))})},t.shimRTCDataChannel=function(A){A.DataChannel&&!A.RTCDataChannel&&(A.RTCDataChannel=A.DataChannel)},t.shimAddTransceiver=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection){var e=A.RTCPeerConnection.prototype.addTransceiver;e&&(A.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var A=arguments[1],t=A&&"sendEncodings"in A;t&&A.sendEncodings.forEach((function(A){if("rid"in A&&!/^[a-z0-9]{0,16}$/i.test(A.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in A&&!(parseFloat(A.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in A&&!(parseFloat(A.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var i=e.apply(this,arguments);if(t){var n=i.sender,a=n.getParameters();"encodings"in a||(a.encodings=A.sendEncodings,this.setParametersPromises.push(n.setParameters(a).catch((function(){}))))}return i})}},t.shimCreateOffer=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection){var e=A.RTCPeerConnection.prototype.createOffer;A.RTCPeerConnection.prototype.createOffer=function(){var A=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return e.apply(A,t)})).finally((function(){A.setParametersPromises=[]})):e.apply(this,arguments)}}},t.shimCreateAnswer=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection){var e=A.RTCPeerConnection.prototype.createAnswer;A.RTCPeerConnection.prototype.createAnswer=function(){var A=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return e.apply(A,t)})).finally((function(){A.setParametersPromises=[]})):e.apply(this,arguments)}}};var o=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils"))},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetDisplayMedia=function(A,e){A.navigator.mediaDevices&&"getDisplayMedia"in A.navigator.mediaDevices||A.navigator.mediaDevices&&(A.navigator.mediaDevices.getDisplayMedia=function(t){if(!t||!t.video){var i=new DOMException("getDisplayMedia without video constraints is undefined");return i.name="NotFoundError",i.code=8,Promise.reject(i)}return!0===t.video?t.video={mediaSource:e}:t.video.mediaSource=e,A.navigator.mediaDevices.getUserMedia(t)})}},{}],13:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)};t.shimGetUserMedia=function(A){var e=a.detectBrowser(A),t=A&&A.navigator,i=A&&A.MediaStreamTrack;if(t.getUserMedia=function(A,e,i){a.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),t.mediaDevices.getUserMedia(A).then(e,i)},!(e.version>55&&"autoGainControl"in t.mediaDevices.getSupportedConstraints())){var r=function(A,e,t){e in A&&!(t in A)&&(A[t]=A[e],delete A[e])},o=t.mediaDevices.getUserMedia.bind(t.mediaDevices);if(t.mediaDevices.getUserMedia=function(A){return"object"===(void 0===A?"undefined":n(A))&&"object"===n(A.audio)&&(A=JSON.parse(JSON.stringify(A)),r(A.audio,"autoGainControl","mozAutoGainControl"),r(A.audio,"noiseSuppression","mozNoiseSuppression")),o(A)},i&&i.prototype.getSettings){var s=i.prototype.getSettings;i.prototype.getSettings=function(){var A=s.apply(this,arguments);return r(A,"mozAutoGainControl","autoGainControl"),r(A,"mozNoiseSuppression","noiseSuppression"),A}}if(i&&i.prototype.applyConstraints){var g=i.prototype.applyConstraints;i.prototype.applyConstraints=function(A){return"audio"===this.kind&&"object"===(void 0===A?"undefined":n(A))&&(A=JSON.parse(JSON.stringify(A)),r(A,"autoGainControl","mozAutoGainControl"),r(A,"noiseSuppression","mozNoiseSuppression")),g.apply(this,[A])}}}};var a=function(A){if(A&&A.__esModule)return A;var e={};if(null!=A)for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t]);return e.default=A,e}(A("../utils"))},{"../utils":15}],14:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(A){return void 0===A?"undefined":i(A)}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":void 0===A?"undefined":i(A)};t.shimLocalStreamsAPI=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection){if("getLocalStreams"in A.RTCPeerConnection.prototype||(A.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in A.RTCPeerConnection.prototype)){var e=A.RTCPeerConnection.prototype.addTrack;A.RTCPeerConnection.prototype.addStream=function(A){var t=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(A)||this._localStreams.push(A),A.getAudioTracks().forEach((function(i){return e.call(t,i,A)})),A.getVideoTracks().forEach((function(i){return e.call(t,i,A)}))},A.RTCPeerConnection.prototype.addTrack=function(A){var t=arguments[1];return t&&(this._localStreams?this._localStreams.includes(t)||this._localStreams.push(t):this._localStreams=[t]),e.apply(this,arguments)}}"removeStream"in A.RTCPeerConnection.prototype||(A.RTCPeerConnection.prototype.removeStream=function(A){var e=this;this._localStreams||(this._localStreams=[]);var t=this._localStreams.indexOf(A);if(-1!==t){this._localStreams.splice(t,1);var i=A.getTracks();this.getSenders().forEach((function(A){i.includes(A.track)&&e.removeTrack(A)}))}})}},t.shimRemoteStreamsAPI=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection&&("getRemoteStreams"in A.RTCPeerConnection.prototype||(A.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in A.RTCPeerConnection.prototype))){Object.defineProperty(A.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(A){var e=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=A),this.addEventListener("track",this._onaddstreampoly=function(A){A.streams.forEach((function(A){if(e._remoteStreams||(e._remoteStreams=[]),!e._remoteStreams.includes(A)){e._remoteStreams.push(A);var t=new Event("addstream");t.stream=A,e.dispatchEvent(t)}}))})}});var e=A.RTCPeerConnection.prototype.setRemoteDescription;A.RTCPeerConnection.prototype.setRemoteDescription=function(){var A=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(A._remoteStreams||(A._remoteStreams=[]),!(A._remoteStreams.indexOf(e)>=0)){A._remoteStreams.push(e);var t=new Event("addstream");t.stream=e,A.dispatchEvent(t)}}))}),e.apply(A,arguments)}}},t.shimCallbacksAPI=function(A){if("object"===(void 0===A?"undefined":n(A))&&A.RTCPeerConnection){var e=A.RTCPeerConnection.prototype,t=e.createOffer,i=e.createAnswer,a=e.setLocalDescription,r=e.setRemoteDescription,o=e.addIceCandidate;e.createOffer=function(A,e){var i=arguments.length>=2?arguments[2]:arguments[0],n=t.apply(this,[i]);return e?(n.then(A,e),Promise.resolve()):n},e.createAnswer=function(A,e){var t=arguments.length>=2?arguments[2]:arguments[0],n=i.apply(this,[t]);return e?(n.then(A,e),Promise.resolve()):n};var s=function(A,e,t){var i=a.apply(this,[A]);return t?(i.then(e,t),Promise.resolve()):i};e.setLocalDescription=s,s=function(A,e,t){var i=r.apply(this,[A]);return t?(i.then(e,t),Promise.resolve()):i},e.setRemoteDescription=s,s=function(A,e,t){var i=o.apply(this,[A]);return t?(i.then(e,t),Promise.resolve()):i},e.addIceCandidate=s}},t.shimGetUserMedia=function(A){var e=A&&A.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){var t=e.mediaDevices,i=t.getUserMedia.bind(t);e.mediaDevices.getUserMedia=function(A){return i(r(A))}}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=function(A,t,i){e.mediaDevices.getUserMedia(A).then(t,i)}.bind(e))},t.shimConstraints=r,t.shimRTCIceServerUrls=function(A){var e=A.RTCPeerConnection;A.RTCPeerConnection=function(A,t){if(A&&A.iceServers){for(var i=[],n=0;n=t&&parseInt(i[t],10)}function o(A){return"[object Object]"===Object.prototype.toString.call(A)}function s(A,e,t){e&&!t.has(e.id)&&(t.set(e.id,e),Object.keys(e).forEach((function(i){i.endsWith("Id")?s(A,A.get(e[i]),t):i.endsWith("Ids")&&e[i].forEach((function(e){s(A,A.get(e),t)}))})))}},{}],16:[function(A,e,i){var n=A("sdp");function a(A,e,t,i,a){var r=n.writeRtpDescription(A.kind,e);if(r+=n.writeIceParameters(A.iceGatherer.getLocalParameters()),r+=n.writeDtlsParameters(A.dtlsTransport.getLocalParameters(),"offer"===t?"actpass":a||"active"),r+="a=mid:"+A.mid+"\r\n",A.rtpSender&&A.rtpReceiver?r+="a=sendrecv\r\n":A.rtpSender?r+="a=sendonly\r\n":A.rtpReceiver?r+="a=recvonly\r\n":r+="a=inactive\r\n",A.rtpSender){var o=A.rtpSender._initialTrackId||A.rtpSender.track.id;A.rtpSender._initialTrackId=o;var s="msid:"+(i?i.id:"-")+" "+o+"\r\n";r+="a="+s,r+="a=ssrc:"+A.sendEncodingParameters[0].ssrc+" "+s,A.sendEncodingParameters[0].rtx&&(r+="a=ssrc:"+A.sendEncodingParameters[0].rtx.ssrc+" "+s,r+="a=ssrc-group:FID "+A.sendEncodingParameters[0].ssrc+" "+A.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return r+="a=ssrc:"+A.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",A.rtpSender&&A.sendEncodingParameters[0].rtx&&(r+="a=ssrc:"+A.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),r}function r(A,e){var t={codecs:[],headerExtensions:[],fecMechanisms:[]},i=function(A,e){A=parseInt(A,10);for(var t=0;t=14393&&-1===A.indexOf("?transport=udp"):(t=!0,!0)})),delete A.url,A.urls=n?i[0]:i,!!i.length}}))}(t.iceServers||[],e),this._iceGatherers=[],t.iceCandidatePoolSize)for(var r=t.iceCandidatePoolSize;r>0;r--)this._iceGatherers.push(new A.RTCIceGatherer({iceServers:t.iceServers,gatherPolicy:t.iceTransportPolicy}));else t.iceCandidatePoolSize=0;this._config=t,this.transceivers=[],this._sdpSessionId=n.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(c.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(c.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),c.prototype.onicecandidate=null,c.prototype.onaddstream=null,c.prototype.ontrack=null,c.prototype.onremovestream=null,c.prototype.onsignalingstatechange=null,c.prototype.oniceconnectionstatechange=null,c.prototype.onconnectionstatechange=null,c.prototype.onicegatheringstatechange=null,c.prototype.onnegotiationneeded=null,c.prototype.ondatachannel=null,c.prototype._dispatchEvent=function(A,e){this._isClosed||(this.dispatchEvent(e),"function"==typeof this["on"+A]&&this["on"+A](e))},c.prototype._emitGatheringStateChange=function(){var A=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",A)},c.prototype.getConfiguration=function(){return this._config},c.prototype.getLocalStreams=function(){return this.localStreams},c.prototype.getRemoteStreams=function(){return this.remoteStreams},c.prototype._createTransceiver=function(A,e){var t=this.transceivers.length>0,i={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:A,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&t)i.iceTransport=this.transceivers[0].iceTransport,i.dtlsTransport=this.transceivers[0].dtlsTransport;else{var n=this._createIceAndDtlsTransports();i.iceTransport=n.iceTransport,i.dtlsTransport=n.dtlsTransport}return e||this.transceivers.push(i),i},c.prototype.addTrack=function(e,t){if(this._isClosed)throw g("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var i,n=this.transceivers.find((function(A){return A.track===e}));if(n)throw g("InvalidAccessError","Track already exists.");for(var a=0;a=15025)A.getTracks().forEach((function(e){t.addTrack(e,A)}));else{var i=A.clone();A.getTracks().forEach((function(A,e){var t=i.getTracks()[e];A.addEventListener("enabled",(function(A){t.enabled=A.enabled}))})),i.getTracks().forEach((function(A){t.addTrack(A,i)}))}},c.prototype.removeTrack=function(e){if(this._isClosed)throw g("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!t(e,A.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var i=this.transceivers.find((function(A){return A.rtpSender===e}));if(!i)throw g("InvalidAccessError","Sender was not created by this connection.");var n=i.stream;i.rtpSender.stop(),i.rtpSender=null,i.track=null,i.stream=null;var a=this.transceivers.map((function(A){return A.stream}));-1===a.indexOf(n)&&this.localStreams.indexOf(n)>-1&&this.localStreams.splice(this.localStreams.indexOf(n),1),this._maybeFireNegotiationNeeded()},c.prototype.removeStream=function(A){var e=this;A.getTracks().forEach((function(A){var t=e.getSenders().find((function(e){return e.track===A}));t&&e.removeTrack(t)}))},c.prototype.getSenders=function(){return this.transceivers.filter((function(A){return!!A.rtpSender})).map((function(A){return A.rtpSender}))},c.prototype.getReceivers=function(){return this.transceivers.filter((function(A){return!!A.rtpReceiver})).map((function(A){return A.rtpReceiver}))},c.prototype._createIceGatherer=function(e,t){var i=this;if(t&&e>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var n=new A.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(n,"state",{value:"new",writable:!0}),this.transceivers[e].bufferedCandidateEvents=[],this.transceivers[e].bufferCandidates=function(A){var t=!A.candidate||0===Object.keys(A.candidate).length;n.state=t?"completed":"gathering",null!==i.transceivers[e].bufferedCandidateEvents&&i.transceivers[e].bufferedCandidateEvents.push(A)},n.addEventListener("localcandidate",this.transceivers[e].bufferCandidates),n},c.prototype._gather=function(e,t){var i=this,a=this.transceivers[t].iceGatherer;if(!a.onlocalcandidate){var r=this.transceivers[t].bufferedCandidateEvents;this.transceivers[t].bufferedCandidateEvents=null,a.removeEventListener("localcandidate",this.transceivers[t].bufferCandidates),a.onlocalcandidate=function(A){if(!(i.usingBundle&&t>0)){var r=new Event("icecandidate");r.candidate={sdpMid:e,sdpMLineIndex:t};var o=A.candidate,s=!o||0===Object.keys(o).length;if(s)"new"!==a.state&&"gathering"!==a.state||(a.state="completed");else{"new"===a.state&&(a.state="gathering"),o.component=1,o.ufrag=a.getLocalParameters().usernameFragment;var g=n.writeCandidate(o);r.candidate=Object.assign(r.candidate,n.parseCandidate(g)),r.candidate.candidate=g,r.candidate.toJSON=function(){return{candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex,usernameFragment:r.candidate.usernameFragment}}}var l=n.getMediaSections(i._localDescription.sdp);l[r.candidate.sdpMLineIndex]+=s?"a=end-of-candidates\r\n":"a="+r.candidate.candidate+"\r\n",i._localDescription.sdp=n.getDescription(i._localDescription.sdp)+l.join("");var c=i.transceivers.every((function(A){return A.iceGatherer&&"completed"===A.iceGatherer.state}));"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),s||i._dispatchEvent("icecandidate",r),c&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},A.setTimeout((function(){r.forEach((function(A){a.onlocalcandidate(A)}))}),0)}},c.prototype._createIceAndDtlsTransports=function(){var e=this,t=new A.RTCIceTransport(null);t.onicestatechange=function(){e._updateIceConnectionState(),e._updateConnectionState()};var i=new A.RTCDtlsTransport(t);return i.ondtlsstatechange=function(){e._updateConnectionState()},i.onerror=function(){Object.defineProperty(i,"state",{value:"failed",writable:!0}),e._updateConnectionState()},{iceTransport:t,dtlsTransport:i}},c.prototype._disposeIceAndDtlsTransports=function(A){var e=this.transceivers[A].iceGatherer;e&&(delete e.onlocalcandidate,delete this.transceivers[A].iceGatherer);var t=this.transceivers[A].iceTransport;t&&(delete t.onicestatechange,delete this.transceivers[A].iceTransport);var i=this.transceivers[A].dtlsTransport;i&&(delete i.ondtlsstatechange,delete i.onerror,delete this.transceivers[A].dtlsTransport)},c.prototype._transceive=function(A,t,i){var a=r(A.localCapabilities,A.remoteCapabilities);t&&A.rtpSender&&(a.encodings=A.sendEncodingParameters,a.rtcp={cname:n.localCName,compound:A.rtcpParameters.compound},A.recvEncodingParameters.length&&(a.rtcp.ssrc=A.recvEncodingParameters[0].ssrc),A.rtpSender.send(a)),i&&A.rtpReceiver&&a.codecs.length>0&&("video"===A.kind&&A.recvEncodingParameters&&e<15019&&A.recvEncodingParameters.forEach((function(A){delete A.rtx})),A.recvEncodingParameters.length?a.encodings=A.recvEncodingParameters:a.encodings=[{}],a.rtcp={compound:A.rtcpParameters.compound},A.rtcpParameters.cname&&(a.rtcp.cname=A.rtcpParameters.cname),A.sendEncodingParameters.length&&(a.rtcp.ssrc=A.sendEncodingParameters[0].ssrc),A.rtpReceiver.receive(a))},c.prototype.setLocalDescription=function(A){var e,t,i=this;if(-1===["offer","answer"].indexOf(A.type))return Promise.reject(g("TypeError",'Unsupported type "'+A.type+'"'));if(!o("setLocalDescription",A.type,i.signalingState)||i._isClosed)return Promise.reject(g("InvalidStateError","Can not set local "+A.type+" in state "+i.signalingState));if("offer"===A.type)e=n.splitSections(A.sdp),t=e.shift(),e.forEach((function(A,e){var t=n.parseRtpParameters(A);i.transceivers[e].localCapabilities=t})),i.transceivers.forEach((function(A,e){i._gather(A.mid,e)}));else if("answer"===A.type){e=n.splitSections(i._remoteDescription.sdp),t=e.shift();var a=n.matchPrefix(t,"a=ice-lite").length>0;e.forEach((function(A,e){var o=i.transceivers[e],s=o.iceGatherer,g=o.iceTransport,l=o.dtlsTransport,c=o.localCapabilities,d=o.remoteCapabilities;if(!(n.isRejected(A)&&0===n.matchPrefix(A,"a=bundle-only").length||o.rejected)){var I=n.getIceParameters(A,t),C=n.getDtlsParameters(A,t);a&&(C.role="server"),i.usingBundle&&0!==e||(i._gather(o.mid,e),"new"===g.state&&g.start(s,I,a?"controlling":"controlled"),"new"===l.state&&l.start(C));var h=r(c,d);i._transceive(o,h.codecs.length>0,!1)}}))}return i._localDescription={type:A.type,sdp:A.sdp},"offer"===A.type?i._updateSignalingState("have-local-offer"):i._updateSignalingState("stable"),Promise.resolve()},c.prototype.setRemoteDescription=function(t){var a=this;if(-1===["offer","answer"].indexOf(t.type))return Promise.reject(g("TypeError",'Unsupported type "'+t.type+'"'));if(!o("setRemoteDescription",t.type,a.signalingState)||a._isClosed)return Promise.reject(g("InvalidStateError","Can not set remote "+t.type+" in state "+a.signalingState));var c={};a.remoteStreams.forEach((function(A){c[A.id]=A}));var d=[],I=n.splitSections(t.sdp),C=I.shift(),h=n.matchPrefix(C,"a=ice-lite").length>0,u=n.matchPrefix(C,"a=group:BUNDLE ").length>0;a.usingBundle=u;var B=n.matchPrefix(C,"a=ice-options:")[0];return a.canTrickleIceCandidates=!!B&&B.substr(14).split(" ").indexOf("trickle")>=0,I.forEach((function(o,g){var l=n.splitLines(o),I=n.getKind(o),B=n.isRejected(o)&&0===n.matchPrefix(o,"a=bundle-only").length,E=l[0].substr(2).split(" ")[2],f=n.getDirection(o,C),Q=n.parseMsid(o),x=n.getMid(o)||n.generateIdentifier();if(B||"application"===I&&("DTLS/SCTP"===E||"UDP/DTLS/SCTP"===E))a.transceivers[g]={mid:x,kind:I,protocol:E,rejected:!0};else{var p,m,y,_,S,D,v,w,b;!B&&a.transceivers[g]&&a.transceivers[g].rejected&&(a.transceivers[g]=a._createTransceiver(I,!0));var F,R,k=n.parseRtpParameters(o);B||(F=n.getIceParameters(o,C),(R=n.getDtlsParameters(o,C)).role="client"),v=n.parseRtpEncodingParameters(o);var P=n.parseRtcpParameters(o),N=n.matchPrefix(o,"a=end-of-candidates",C).length>0,T=n.matchPrefix(o,"a=candidate:").map((function(A){return n.parseCandidate(A)})).filter((function(A){return 1===A.component}));if(("offer"===t.type||"answer"===t.type)&&!B&&u&&g>0&&a.transceivers[g]&&(a._disposeIceAndDtlsTransports(g),a.transceivers[g].iceGatherer=a.transceivers[0].iceGatherer,a.transceivers[g].iceTransport=a.transceivers[0].iceTransport,a.transceivers[g].dtlsTransport=a.transceivers[0].dtlsTransport,a.transceivers[g].rtpSender&&a.transceivers[g].rtpSender.setTransport(a.transceivers[0].dtlsTransport),a.transceivers[g].rtpReceiver&&a.transceivers[g].rtpReceiver.setTransport(a.transceivers[0].dtlsTransport)),"offer"!==t.type||B){if("answer"===t.type&&!B){m=(p=a.transceivers[g]).iceGatherer,y=p.iceTransport,_=p.dtlsTransport,S=p.rtpReceiver,D=p.sendEncodingParameters,w=p.localCapabilities,a.transceivers[g].recvEncodingParameters=v,a.transceivers[g].remoteCapabilities=k,a.transceivers[g].rtcpParameters=P,T.length&&"new"===y.state&&(!h&&!N||u&&0!==g?T.forEach((function(A){s(p.iceTransport,A)})):y.setRemoteCandidates(T)),u&&0!==g||("new"===y.state&&y.start(m,F,"controlling"),"new"===_.state&&_.start(R));var M=r(p.localCapabilities,p.remoteCapabilities).codecs.filter((function(A){return"rtx"===A.name.toLowerCase()})).length;!M&&p.sendEncodingParameters[0].rtx&&delete p.sendEncodingParameters[0].rtx,a._transceive(p,"sendrecv"===f||"recvonly"===f,"sendrecv"===f||"sendonly"===f),!S||"sendrecv"!==f&&"sendonly"!==f?delete p.rtpReceiver:(b=S.track,Q?(c[Q.stream]||(c[Q.stream]=new A.MediaStream),i(b,c[Q.stream]),d.push([b,S,c[Q.stream]])):(c.default||(c.default=new A.MediaStream),i(b,c.default),d.push([b,S,c.default])))}}else{(p=a.transceivers[g]||a._createTransceiver(I)).mid=x,p.iceGatherer||(p.iceGatherer=a._createIceGatherer(g,u)),T.length&&"new"===p.iceTransport.state&&(!N||u&&0!==g?T.forEach((function(A){s(p.iceTransport,A)})):p.iceTransport.setRemoteCandidates(T)),w=A.RTCRtpReceiver.getCapabilities(I),e<15019&&(w.codecs=w.codecs.filter((function(A){return"rtx"!==A.name}))),D=p.sendEncodingParameters||[{ssrc:1001*(2*g+2)}];var L,G=!1;"sendrecv"===f||"sendonly"===f?(G=!p.rtpReceiver,S=p.rtpReceiver||new A.RTCRtpReceiver(p.dtlsTransport,I),G&&(b=S.track,Q&&"-"===Q.stream||(Q?(c[Q.stream]||(c[Q.stream]=new A.MediaStream,Object.defineProperty(c[Q.stream],"id",{get:function(){return Q.stream}})),Object.defineProperty(b,"id",{get:function(){return Q.track}}),L=c[Q.stream]):(c.default||(c.default=new A.MediaStream),L=c.default)),L&&(i(b,L),p.associatedRemoteMediaStreams.push(L)),d.push([b,S,L]))):p.rtpReceiver&&p.rtpReceiver.track&&(p.associatedRemoteMediaStreams.forEach((function(e){var t=e.getTracks().find((function(A){return A.id===p.rtpReceiver.track.id}));t&&function(e,t){t.removeTrack(e),t.dispatchEvent(new A.MediaStreamTrackEvent("removetrack",{track:e}))}(t,e)})),p.associatedRemoteMediaStreams=[]),p.localCapabilities=w,p.remoteCapabilities=k,p.rtpReceiver=S,p.rtcpParameters=P,p.sendEncodingParameters=D,p.recvEncodingParameters=v,a._transceive(a.transceivers[g],!1,G)}}})),void 0===a._dtlsRole&&(a._dtlsRole="offer"===t.type?"active":"passive"),a._remoteDescription={type:t.type,sdp:t.sdp},"offer"===t.type?a._updateSignalingState("have-remote-offer"):a._updateSignalingState("stable"),Object.keys(c).forEach((function(e){var t=c[e];if(t.getTracks().length){if(-1===a.remoteStreams.indexOf(t)){a.remoteStreams.push(t);var i=new Event("addstream");i.stream=t,A.setTimeout((function(){a._dispatchEvent("addstream",i)}))}d.forEach((function(A){var e=A[0],i=A[1];t.id===A[2].id&&l(a,e,i,[t])}))}})),d.forEach((function(A){A[2]||l(a,A[0],A[1],[])})),A.setTimeout((function(){a&&a.transceivers&&a.transceivers.forEach((function(A){A.iceTransport&&"new"===A.iceTransport.state&&A.iceTransport.getRemoteCandidates().length>0&&A.iceTransport.addRemoteCandidate({})}))}),4e3),Promise.resolve()},c.prototype.close=function(){this.transceivers.forEach((function(A){A.iceTransport&&A.iceTransport.stop(),A.dtlsTransport&&A.dtlsTransport.stop(),A.rtpSender&&A.rtpSender.stop(),A.rtpReceiver&&A.rtpReceiver.stop()})),this._isClosed=!0,this._updateSignalingState("closed")},c.prototype._updateSignalingState=function(A){this.signalingState=A;var e=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",e)},c.prototype._maybeFireNegotiationNeeded=function(){var e=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,A.setTimeout((function(){if(e.needNegotiation){e.needNegotiation=!1;var A=new Event("negotiationneeded");e._dispatchEvent("negotiationneeded",A)}}),0))},c.prototype._updateIceConnectionState=function(){var A,e={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(A){A.iceTransport&&!A.rejected&&e[A.iceTransport.state]++})),A="new",e.failed>0?A="failed":e.checking>0?A="checking":e.disconnected>0?A="disconnected":e.new>0?A="new":e.connected>0?A="connected":e.completed>0&&(A="completed"),A!==this.iceConnectionState){this.iceConnectionState=A;var t=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",t)}},c.prototype._updateConnectionState=function(){var A,e={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(A){A.iceTransport&&A.dtlsTransport&&!A.rejected&&(e[A.iceTransport.state]++,e[A.dtlsTransport.state]++)})),e.connected+=e.completed,A="new",e.failed>0?A="failed":e.connecting>0?A="connecting":e.disconnected>0?A="disconnected":e.new>0?A="new":e.connected>0&&(A="connected"),A!==this.connectionState){this.connectionState=A;var t=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",t)}},c.prototype.createOffer=function(){var t=this;if(t._isClosed)return Promise.reject(g("InvalidStateError","Can not call createOffer after close"));var i=t.transceivers.filter((function(A){return"audio"===A.kind})).length,r=t.transceivers.filter((function(A){return"video"===A.kind})).length,o=arguments[0];if(o){if(o.mandatory||o.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==o.offerToReceiveAudio&&(i=!0===o.offerToReceiveAudio?1:!1===o.offerToReceiveAudio?0:o.offerToReceiveAudio),void 0!==o.offerToReceiveVideo&&(r=!0===o.offerToReceiveVideo?1:!1===o.offerToReceiveVideo?0:o.offerToReceiveVideo)}for(t.transceivers.forEach((function(A){"audio"===A.kind?--i<0&&(A.wantReceive=!1):"video"===A.kind&&--r<0&&(A.wantReceive=!1)}));i>0||r>0;)i>0&&(t._createTransceiver("audio"),i--),r>0&&(t._createTransceiver("video"),r--);var s=n.writeSessionBoilerplate(t._sdpSessionId,t._sdpSessionVersion++);t.transceivers.forEach((function(i,a){var r=i.track,o=i.kind,s=i.mid||n.generateIdentifier();i.mid=s,i.iceGatherer||(i.iceGatherer=t._createIceGatherer(a,t.usingBundle));var g=A.RTCRtpSender.getCapabilities(o);e<15019&&(g.codecs=g.codecs.filter((function(A){return"rtx"!==A.name}))),g.codecs.forEach((function(A){"H264"===A.name&&void 0===A.parameters["level-asymmetry-allowed"]&&(A.parameters["level-asymmetry-allowed"]="1"),i.remoteCapabilities&&i.remoteCapabilities.codecs&&i.remoteCapabilities.codecs.forEach((function(e){A.name.toLowerCase()===e.name.toLowerCase()&&A.clockRate===e.clockRate&&(A.preferredPayloadType=e.payloadType)}))})),g.headerExtensions.forEach((function(A){(i.remoteCapabilities&&i.remoteCapabilities.headerExtensions||[]).forEach((function(e){A.uri===e.uri&&(A.id=e.id)}))}));var l=i.sendEncodingParameters||[{ssrc:1001*(2*a+1)}];r&&e>=15019&&"video"===o&&!l[0].rtx&&(l[0].rtx={ssrc:l[0].ssrc+1}),i.wantReceive&&(i.rtpReceiver=new A.RTCRtpReceiver(i.dtlsTransport,o)),i.localCapabilities=g,i.sendEncodingParameters=l})),"max-compat"!==t._config.bundlePolicy&&(s+="a=group:BUNDLE "+t.transceivers.map((function(A){return A.mid})).join(" ")+"\r\n"),s+="a=ice-options:trickle\r\n",t.transceivers.forEach((function(A,e){s+=a(A,A.localCapabilities,"offer",A.stream,t._dtlsRole),s+="a=rtcp-rsize\r\n",!A.iceGatherer||"new"===t.iceGatheringState||0!==e&&t.usingBundle||(A.iceGatherer.getLocalCandidates().forEach((function(A){A.component=1,s+="a="+n.writeCandidate(A)+"\r\n"})),"completed"===A.iceGatherer.state&&(s+="a=end-of-candidates\r\n"))}));var l=new A.RTCSessionDescription({type:"offer",sdp:s});return Promise.resolve(l)},c.prototype.createAnswer=function(){var t=this;if(t._isClosed)return Promise.reject(g("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==t.signalingState&&"have-local-pranswer"!==t.signalingState)return Promise.reject(g("InvalidStateError","Can not call createAnswer in signalingState "+t.signalingState));var i=n.writeSessionBoilerplate(t._sdpSessionId,t._sdpSessionVersion++);t.usingBundle&&(i+="a=group:BUNDLE "+t.transceivers.map((function(A){return A.mid})).join(" ")+"\r\n"),i+="a=ice-options:trickle\r\n";var o=n.getMediaSections(t._remoteDescription.sdp).length;t.transceivers.forEach((function(A,n){if(!(n+1>o)){if(A.rejected)return"application"===A.kind?"DTLS/SCTP"===A.protocol?i+="m=application 0 DTLS/SCTP 5000\r\n":i+="m=application 0 "+A.protocol+" webrtc-datachannel\r\n":"audio"===A.kind?i+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===A.kind&&(i+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(i+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+A.mid+"\r\n");var s;A.stream&&("audio"===A.kind?s=A.stream.getAudioTracks()[0]:"video"===A.kind&&(s=A.stream.getVideoTracks()[0]),s&&e>=15019&&"video"===A.kind&&!A.sendEncodingParameters[0].rtx&&(A.sendEncodingParameters[0].rtx={ssrc:A.sendEncodingParameters[0].ssrc+1}));var g=r(A.localCapabilities,A.remoteCapabilities),l=g.codecs.filter((function(A){return"rtx"===A.name.toLowerCase()})).length;!l&&A.sendEncodingParameters[0].rtx&&delete A.sendEncodingParameters[0].rtx,i+=a(A,g,"answer",A.stream,t._dtlsRole),A.rtcpParameters&&A.rtcpParameters.reducedSize&&(i+="a=rtcp-rsize\r\n")}}));var s=new A.RTCSessionDescription({type:"answer",sdp:i});return Promise.resolve(s)},c.prototype.addIceCandidate=function(A){var e,t=this;return A&&void 0===A.sdpMLineIndex&&!A.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(i,a){if(!t._remoteDescription)return a(g("InvalidStateError","Can not add ICE candidate without a remote description"));if(A&&""!==A.candidate){var r=A.sdpMLineIndex;if(A.sdpMid)for(var o=0;o0?n.parseCandidate(A.candidate):{};if("tcp"===c.protocol&&(0===c.port||9===c.port))return i();if(c.component&&1!==c.component)return i();if((0===r||r>0&&l.iceTransport!==t.transceivers[0].iceTransport)&&!s(l.iceTransport,c))return a(g("OperationError","Can not add ICE candidate"));var d=A.candidate.trim();0===d.indexOf("a=")&&(d=d.substr(2)),(e=n.getMediaSections(t._remoteDescription.sdp))[r]+="a="+(c.type?d:"end-of-candidates")+"\r\n",t._remoteDescription.sdp=n.getDescription(t._remoteDescription.sdp)+e.join("")}else for(var I=0;I0?e[0].split("/")[1]:"sendrecv",uri:e[1]}},n.writeExtmap=function(A){return"a=extmap:"+(A.id||A.preferredId)+(A.direction&&"sendrecv"!==A.direction?"/"+A.direction:"")+" "+A.uri+"\r\n"},n.parseFmtp=function(A){for(var e,t={},i=A.substr(A.indexOf(" ")+1).split(";"),n=0;n-1?(t.attribute=A.substr(e+1,i-e-1),t.value=A.substr(i+1)):t.attribute=A.substr(e+1),t},n.parseSsrcGroup=function(A){var e=A.substr(13).split(" ");return{semantics:e.shift(),ssrcs:e.map((function(A){return parseInt(A,10)}))}},n.getMid=function(A){var e=n.matchPrefix(A,"a=mid:")[0];if(e)return e.substr(6)},n.parseFingerprint=function(A){var e=A.substr(14).split(" ");return{algorithm:e[0].toLowerCase(),value:e[1]}},n.getDtlsParameters=function(A,e){return{role:"auto",fingerprints:n.matchPrefix(A+e,"a=fingerprint:").map(n.parseFingerprint)}},n.writeDtlsParameters=function(A,e){var t="a=setup:"+e+"\r\n";return A.fingerprints.forEach((function(A){t+="a=fingerprint:"+A.algorithm+" "+A.value+"\r\n"})),t},n.getIceParameters=function(A,e){var t=n.splitLines(A);return{usernameFragment:(t=t.concat(n.splitLines(e))).filter((function(A){return 0===A.indexOf("a=ice-ufrag:")}))[0].substr(12),password:t.filter((function(A){return 0===A.indexOf("a=ice-pwd:")}))[0].substr(10)}},n.writeIceParameters=function(A){return"a=ice-ufrag:"+A.usernameFragment+"\r\na=ice-pwd:"+A.password+"\r\n"},n.parseRtpParameters=function(A){for(var e={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},t=n.splitLines(A)[0].split(" "),i=3;i0?"9":"0",t+=" UDP/TLS/RTP/SAVPF ",t+=e.codecs.map((function(A){return void 0!==A.preferredPayloadType?A.preferredPayloadType:A.payloadType})).join(" ")+"\r\n",t+="c=IN IP4 0.0.0.0\r\n",t+="a=rtcp:9 IN IP4 0.0.0.0\r\n",e.codecs.forEach((function(A){t+=n.writeRtpMap(A),t+=n.writeFmtp(A),t+=n.writeRtcpFb(A)}));var i=0;return e.codecs.forEach((function(A){A.maxptime>i&&(i=A.maxptime)})),i>0&&(t+="a=maxptime:"+i+"\r\n"),t+="a=rtcp-mux\r\n",e.headerExtensions&&e.headerExtensions.forEach((function(A){t+=n.writeExtmap(A)})),t},n.parseRtpEncodingParameters=function(A){var e,t=[],i=n.parseRtpParameters(A),a=-1!==i.fecMechanisms.indexOf("RED"),r=-1!==i.fecMechanisms.indexOf("ULPFEC"),o=n.matchPrefix(A,"a=ssrc:").map((function(A){return n.parseSsrcMedia(A)})).filter((function(A){return"cname"===A.attribute})),s=o.length>0&&o[0].ssrc,g=n.matchPrefix(A,"a=ssrc-group:FID").map((function(A){return A.substr(17).split(" ").map((function(A){return parseInt(A,10)}))}));g.length>0&&g[0].length>1&&g[0][0]===s&&(e=g[0][1]),i.codecs.forEach((function(A){if("RTX"===A.name.toUpperCase()&&A.parameters.apt){var i={ssrc:s,codecPayloadType:parseInt(A.parameters.apt,10)};s&&e&&(i.rtx={ssrc:e}),t.push(i),a&&((i=JSON.parse(JSON.stringify(i))).fec={ssrc:s,mechanism:r?"red+ulpfec":"red"},t.push(i))}})),0===t.length&&s&&t.push({ssrc:s});var l=n.matchPrefix(A,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,t.forEach((function(A){A.maxBitrate=l}))),t},n.parseRtcpParameters=function(A){var e={},t=n.matchPrefix(A,"a=ssrc:").map((function(A){return n.parseSsrcMedia(A)})).filter((function(A){return"cname"===A.attribute}))[0];t&&(e.cname=t.value,e.ssrc=t.ssrc);var i=n.matchPrefix(A,"a=rtcp-rsize");e.reducedSize=i.length>0,e.compound=0===i.length;var a=n.matchPrefix(A,"a=rtcp-mux");return e.mux=a.length>0,e},n.parseMsid=function(A){var e,t=n.matchPrefix(A,"a=msid:");if(1===t.length)return{stream:(e=t[0].substr(7).split(" "))[0],track:e[1]};var i=n.matchPrefix(A,"a=ssrc:").map((function(A){return n.parseSsrcMedia(A)})).filter((function(A){return"msid"===A.attribute}));return i.length>0?{stream:(e=i[0].value.split(" "))[0],track:e[1]}:void 0},n.parseSctpDescription=function(A){var e,t=n.parseMLine(A),i=n.matchPrefix(A,"a=max-message-size:");i.length>0&&(e=parseInt(i[0].substr(19),10)),isNaN(e)&&(e=65536);var a=n.matchPrefix(A,"a=sctp-port:");if(a.length>0)return{port:parseInt(a[0].substr(12),10),protocol:t.fmt,maxMessageSize:e};if(n.matchPrefix(A,"a=sctpmap:").length>0){var r=n.matchPrefix(A,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(r[0],10),protocol:r[1],maxMessageSize:e}}},n.writeSctpDescription=function(A,e){var t=[];return t="DTLS/SCTP"!==A.protocol?["m="+A.kind+" 9 "+A.protocol+" "+e.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+e.port+"\r\n"]:["m="+A.kind+" 9 "+A.protocol+" "+e.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+e.port+" "+e.protocol+" 65535\r\n"],void 0!==e.maxMessageSize&&t.push("a=max-message-size:"+e.maxMessageSize+"\r\n"),t.join("")},n.generateSessionId=function(){return Math.random().toString().substr(2,21)},n.writeSessionBoilerplate=function(A,e,t){var i=void 0!==e?e:2;return"v=0\r\no="+(t||"thisisadapterortc")+" "+(A||n.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(A,e,t,i){var a=n.writeRtpDescription(A.kind,e);if(a+=n.writeIceParameters(A.iceGatherer.getLocalParameters()),a+=n.writeDtlsParameters(A.dtlsTransport.getLocalParameters(),"offer"===t?"actpass":"active"),a+="a=mid:"+A.mid+"\r\n",A.direction?a+="a="+A.direction+"\r\n":A.rtpSender&&A.rtpReceiver?a+="a=sendrecv\r\n":A.rtpSender?a+="a=sendonly\r\n":A.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",A.rtpSender){var r="msid:"+i.id+" "+A.rtpSender.track.id+"\r\n";a+="a="+r,a+="a=ssrc:"+A.sendEncodingParameters[0].ssrc+" "+r,A.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+A.sendEncodingParameters[0].rtx.ssrc+" "+r,a+="a=ssrc-group:FID "+A.sendEncodingParameters[0].ssrc+" "+A.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+A.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",A.rtpSender&&A.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+A.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),a},n.getDirection=function(A,e){for(var t=n.splitLines(A),i=0;i=26&&A<=e||Nd.extension.isInstalled()}return!0};var Pd={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(A){var e=window.setTimeout((function(){var e=new Error("NavigatorUserMediaError");return e.name='The required Chrome extension is not installed: click here to install it. (NOTE: this will need you to refresh the page)',A(e)}),1e3);this.cache[e]=A,window.postMessage({type:"janusGetScreen",id:e},"*")},init:function(){var A={};this.cache=A,window.addEventListener("message",(function(e){if(e.origin==window.location.origin)if("janusGotScreen"==e.data.type&&A[e.data.id]){var t=A[e.data.id];if(delete A[e.data.id],""===e.data.sourceId){var i=new Error("NavigatorUserMediaError");i.name="You cancelled the request for permission, giving up...",t(i)}else t(null,e.data.sourceId)}else"janusGetScreenPending"==e.data.type&&window.clearTimeout(e.data.id)}))}};function Nd(A){if(void 0===Nd.initDone)return A.error("Library not initialized"),{};if(!Nd.isWebrtcSupported())return A.error("WebRTC not supported by this browser"),{};if(Nd.log("Library initialized: "+Nd.initDone),(A=A||{}).success="function"==typeof A.success?A.success:Nd.noop,A.error="function"==typeof A.error?A.error:Nd.noop,A.destroyed="function"==typeof A.destroyed?A.destroyed:Nd.noop,null===A.server||void 0===A.server)return A.error("Invalid server url"),{};var e=!1,t=null,i={},n=null,a=null,r=0,o=A.server;Nd.isArray(o)?(Nd.log("Multiple servers provided ("+o.length+"), will use the first that works"),o=null,a=A.server,Nd.debug(a)):0===o.indexOf("ws")?(e=!0,Nd.log("Using WebSockets to contact Janus: "+o)):(e=!1,Nd.log("Using REST API to contact Janus: "+o));var s=A.iceServers;null==s&&(s=[{urls:"stun:stun.l.google.com:19302"}]);var g=A.iceTransportPolicy,l=A.bundlePolicy,c=A.ipv6;null==c&&(c=!1);var d=!1;void 0!==A.withCredentials&&null!==A.withCredentials&&(d=!0===A.withCredentials);var I=10;void 0!==A.max_poll_events&&null!==A.max_poll_events&&(I=A.max_poll_events),I<1&&(I=1);var C=null;void 0!==A.token&&null!==A.token&&(C=A.token);var h=null;void 0!==A.apisecret&&null!==A.apisecret&&(h=A.apisecret),this.destroyOnUnload=!0,void 0!==A.destroyOnUnload&&null!==A.destroyOnUnload&&(this.destroyOnUnload=!0===A.destroyOnUnload);var u=25e3;void 0!==A.keepAlivePeriod&&null!==A.keepAlivePeriod&&(u=A.keepAlivePeriod),isNaN(u)&&(u=25e3);var B=6e4;function E(A){var e={high:9e5,medium:3e5,low:1e5};return null!=A&&(A.high&&(e.high=A.high),A.medium&&(e.medium=A.medium),A.low&&(e.low=A.low)),e}void 0!==A.longPollTimeout&&null!==A.longPollTimeout&&(B=A.longPollTimeout),isNaN(B)&&(B=6e4);var f=!1,Q=null,x={},p=this,m=0,y={};function _(){if(null!=Q)if(Nd.debug("Long poll..."),f){var e=o+"/"+Q+"?rid="+(new Date).getTime();null!=I&&(e=e+"&maxev="+I),null!=C&&(e=e+"&token="+encodeURIComponent(C)),null!=h&&(e=e+"&apisecret="+encodeURIComponent(h)),Nd.httpAPICall(e,{verb:"GET",withCredentials:d,success:S,timeout:B,error:function(e,t){if(Nd.error(e+":",t),++m>3)return f=!1,void A.error("Lost connection to the server (is it down?)");_()}})}else Nd.warn("Is the server down? (connected=false)")}function S(A,i){if(m=0,e||null==Q||!0===i||_(),e||!Nd.isArray(A))if("keepalive"!==A.rtcgw)if("ack"!==A.rtcgw)if("success"!==A.rtcgw)if("trickle"===A.rtcgw){if(null==(s=A.sender))return void Nd.warn("Missing sender...");if(null==(l=x[s]))return void Nd.debug("This handle is not attached to this session");var n=A.candidate;Nd.debug("Got a trickled candidate on session "+Q),Nd.debug(n);var a=l.webrtcStuff;a.pc&&a.remoteSdp?(Nd.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(Nd.endOfCandidates)):(Nd.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(n),Nd.debug(a.candidates))}else{if("webrtcup"===A.rtcgw)return Nd.debug("Got a webrtcup event on session "+Q),Nd.debug(A),null==(s=A.sender)?void Nd.warn("Missing sender..."):null==(l=x[s])?void Nd.debug("This handle is not attached to this session"):void l.webrtcState(!0);if("hangup"===A.rtcgw){if(Nd.debug("Got a hangup event on session "+Q),Nd.debug(A),null==(s=A.sender))return void Nd.warn("Missing sender...");if(null==(l=x[s]))return void Nd.debug("This handle is not attached to this session");l.webrtcState(!1,A.reason),l.hangup()}else if("detached"===A.rtcgw){if(Nd.debug("Got a detached event on session "+Q),Nd.debug(A),null==(s=A.sender))return void Nd.warn("Missing sender...");if(null==(l=x[s]))return;l.detached=!0,l.ondetached(),l.detach()}else if("media"===A.rtcgw){if(Nd.debug("Got a media event on session "+Q),Nd.debug(A),null==(s=A.sender))return void Nd.warn("Missing sender...");if(null==(l=x[s]))return void Nd.debug("This handle is not attached to this session");l.mediaState(A.type,A.receiving)}else if("slowlink"===A.rtcgw){if(Nd.debug("Got a slowlink event on session "+Q),Nd.debug(A),null==(s=A.sender))return void Nd.warn("Missing sender...");if(null==(l=x[s]))return void Nd.debug("This handle is not attached to this session");l.slowLink(A.uplink,A.lost)}else{if("error"===A.rtcgw){var r,o;if(Nd.error("Ooops: "+A.error.code+" "+A.error.reason),Nd.debug(A),null!=(r=A.transaction))null!=(o=y[r])&&o(A),delete y[r];return}if("event"===A.rtcgw){var s;if(Nd.debug("Got a plugin event on session "+Q),Nd.debug(A),null==(s=A.sender))return void Nd.warn("Missing sender...");var g=A.plugindata;if(null==g)return void Nd.warn("Missing plugindata...");Nd.debug(" -- Event is coming from "+s+" ("+g.plugin+")");var l,c=g.data;if(Nd.debug(c),null==(l=x[s]))return void Nd.warn("This handle is not attached to this session");var d=A.jsep;null!=d&&(Nd.debug("Handling SDP as well..."),Nd.debug(d));var I=l.onmessage;null!=I?(Nd.debug("Notifying application..."),I(c,d)):Nd.debug("No provided notification callback")}else{if("timeout"===A.rtcgw)return Nd.error("Timeout on session "+Q),Nd.debug(A),void(e&&t.close(3504,"Gateway timeout"));Nd.warn("Unknown message/event '"+A.rtcgw+"' on session "+Q),Nd.debug(A)}}}else Nd.debug("Got a success on session "+Q),Nd.debug(A),null!=(r=A.transaction)&&(null!=(o=y[r])&&o(A),delete y[r]);else Nd.debug("Got an ack on session "+Q),Nd.debug(A),null!=(r=A.transaction)&&(null!=(o=y[r])&&o(A),delete y[r]);else Nd.vdebug("Got a keepalive on session "+Q);else for(var C=0;C data channel: "+t),"open"===t){if(a.dataChannel[e].pending&&a.dataChannel[e].pending.length>0){for(var i in Nd.log("Sending pending messages on <"+e+">:",a.dataChannel[e].pending.length),a.dataChannel[e].pending){var r=a.dataChannel[e].pending[i];Nd.log("Sending string on data channel <"+e+">: "+r),a.dataChannel[e].send(r)}a.dataChannel[e].pending=[]}n.ondataopen(e)}};a.dataChannel[e]=t||a.pc.createDataChannel(e,{ordered:!1}),a.dataChannel[e].onmessage=function(A){Nd.log("Received message on data channel:",A);var e=A.target.label;n.ondata(A.data,e)},a.dataChannel[e].onopen=r,a.dataChannel[e].onclose=r,a.dataChannel[e].onerror=function(A){Nd.error("Got error on data channel:",A)},a.dataChannel[e].pending=[],i&&a.dataChannel[e].pending.push(i)}else Nd.warn("Invalid handle")}function R(A,e){(e=e||{}).success="function"==typeof e.success?e.success:Nd.noop,e.error="function"==typeof e.error?e.error:Nd.noop;var t=x[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return Nd.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff,n=e.text;if(null==n)return Nd.warn("Invalid text"),void e.error("Invalid text");var a=e.label?e.label:Nd.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(n),void e.success()):(Nd.log("Sending string on data channel <"+a+">: "+n),i.dataChannel[a].send(n),void e.success()):(F(A,a,!1,n),void e.success())}function k(A,e){(e=e||{}).success="function"==typeof e.success?e.success:Nd.noop,e.error="function"==typeof e.error?e.error:Nd.noop;var t=x[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return Nd.warn("Invalid handle"),void e.error("Invalid handle");var i=t.webrtcStuff;if(null===i.dtmfSender||void 0===i.dtmfSender){if(void 0!==i.pc&&null!==i.pc){var n=i.pc.getSenders().find((function(A){return A.track&&"audio"===A.track.kind}));if(!n)return Nd.warn("Invalid DTMF configuration (no audio track)"),void e.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=n.dtmf,i.dtmfSender&&(Nd.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(A){Nd.debug("Sent DTMF tone: "+A.tone)})}if(null===i.dtmfSender||void 0===i.dtmfSender)return Nd.warn("Invalid DTMF configuration"),void e.error("Invalid DTMF configuration")}var a=e.dtmf;if(null==a)return Nd.warn("Invalid DTMF parameters"),void e.error("Invalid DTMF parameters");var r=a.tones;if(null==r)return Nd.warn("Invalid DTMF string"),void e.error("Invalid DTMF string");var o=a.duration;null==o&&(o=500);var s=a.gap;null==s&&(s=50),Nd.debug("Sending DTMF string "+r+" (duration "+o+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(r,o,s),e.success()}function P(A,i){(i=i||{}).success="function"==typeof i.success?i.success:Nd.noop,i.error="function"==typeof i.error?i.error:Nd.noop;var n=!0;void 0!==i.asyncRequest&&null!==i.asyncRequest&&(n=!0===i.asyncRequest);var a=!0;void 0!==i.noRequest&&null!==i.noRequest&&(a=!0===i.noRequest),Nd.log("Destroying handle "+A+" (async="+n+")"),K(A);var r=x[A];if(null==r||r.detached)return delete x[A],void i.success();if(a)return delete x[A],void i.success();if(!f)return Nd.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");var s={rtcgw:"detach",transaction:Nd.randomString(12)};if(null!==r.token&&void 0!==r.token&&(s.token=r.token),null!=h&&(s.apisecret=h),e)return s.session_id=Q,s.handle_id=A,t.send(JSON.stringify(s)),delete x[A],void i.success();Nd.httpAPICall(o+"/"+Q+"/"+A,{verb:"POST",async:n,withCredentials:d,body:s,success:function(e){Nd.log("Destroyed handle:"),Nd.debug(e),"success"!==e.rtcgw&&Nd.error("Ooops: "+e.error.code+" "+e.error.reason),delete x[A],i.success()},error:function(e,t){Nd.error(e+":",t),delete x[A],i.success()}})}function N(A,e,t,i,n){return T.apply(this,arguments)}function T(){return T=function(A){return function(){var e=this,t=arguments;return new Promise((function(i,n){var a=A.apply(e,t);function r(A){Fd(a,i,n,r,o,"next",A)}function o(A){Fd(a,i,n,r,o,"throw",A)}r(void 0)}))}}((function(A,e,t,i,n){var a,r,o,d,I,C,h,u,B,f,Q,p,m,y,_,S,D,v,w,R,k,P,N,T;return kd(this,(function(M){switch(M.label){case 0:return null==(a=x[A])||null===a.webrtcStuff||void 0===a.webrtcStuff?(Nd.warn("Invalid handle"),i.error("Invalid handle"),[2]):(r=a.webrtcStuff,Nd.debug("streamsDone:",n),n&&(Nd.debug(" -- Audio tracks:",n.getAudioTracks()),Nd.debug(" -- Video tracks:",n.getVideoTracks())),o=!1,r.myStream&&t.update&&!r.streamExternal?[3,1]:(r.myStream=n,o=!0,[3,8]));case 1:if(!((!t.update&&V(t)||t.update&&(t.addAudio||t.replaceAudio))&&n.getAudioTracks()&&n.getAudioTracks().length))return[3,7];if(r.myStream.addTrack(n.getAudioTracks()[0]),!Nd.unifiedPlan)return[3,6];if(Nd.log((t.replaceAudio?"Replacing":"Adding")+" audio track:",n.getAudioTracks()[0]),d=null,(p=r.pc.getTransceivers())&&p.length>0)for(var L in p)if((m=p[L]).sender&&m.sender.track&&"audio"===m.sender.track.kind||m.receiver&&m.receiver.track&&"audio"===m.receiver.track.kind){d=m;break}I=null,M.label=2;case 2:return M.trys.push([2,4,,5]),[4,i.customizeStream(n)];case 3:return I=M.sent(),[3,5];case 4:return C=M.sent(),i.error(C),[3,5];case 5:return d&&d.sender?d.sender.replaceTrack((null==I||null==(u=I.getAudioTracks)||null==(h=u.call(I))?void 0:h[0])||n.getAudioTracks()[0]):r.pc.addTrack((null==I||null==(f=I.getAudioTracks)||null==(B=f.call(I))?void 0:B[0])||n.getAudioTracks()[0],I||n),[3,7];case 6:Nd.log((t.replaceAudio?"Replacing":"Adding")+" audio track:",n.getAudioTracks()[0]),r.pc.addTrack(n.getAudioTracks()[0],n),M.label=7;case 7:if((!t.update&&j(t)||t.update&&(t.addVideo||t.replaceVideo))&&n.getVideoTracks()&&n.getVideoTracks().length)if(r.myStream.addTrack(n.getVideoTracks()[0]),Nd.unifiedPlan){if(Nd.log((t.replaceVideo?"Replacing":"Adding")+" video track:",n.getVideoTracks()[0]),Q=null,(p=r.pc.getTransceivers())&&p.length>0)for(var L in p)if((m=p[L]).sender&&m.sender.track&&"video"===m.sender.track.kind||m.receiver&&m.receiver.track&&"video"===m.receiver.track.kind){Q=m;break}Q&&Q.sender?Q.sender.replaceTrack(n.getVideoTracks()[0]):r.pc.addTrack(n.getVideoTracks()[0],n)}else Nd.log((t.replaceVideo?"Replacing":"Adding")+" video track:",n.getVideoTracks()[0]),r.pc.addTrack(n.getVideoTracks()[0],n);M.label=8;case 8:if(!r.pc){if(y={iceServers:s,iceTransportPolicy:g,bundlePolicy:l},"chrome"===Nd.webRTCAdapter.browserDetails.browser&&(y.sdpSemantics=Nd.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan"),_={optional:[{DtlsSrtpKeyAgreement:!0}]},!0===c&&_.optional.push({googIPv6:!0}),i.rtcConstraints&&"object"===Rd(i.rtcConstraints))for(var L in Nd.debug("Adding custom PeerConnection constraints:",i.rtcConstraints),i.rtcConstraints)_.optional.push(i.rtcConstraints[L]);"edge"===Nd.webRTCAdapter.browserDetails.browser&&(y.bundlePolicy="max-bundle"),Nd.log("Creating PeerConnection"),Nd.debug(_),r.pc=new RTCPeerConnection(y,_),Nd.debug(r.pc),r.pc.getStats&&(r.volume={},r.bitrate.value="0 kbits/sec"),Nd.log("Preparing local SDP and gathering candidates (trickle="+r.trickle+")"),r.pc.oniceconnectionstatechange=function(A){r.pc&&a.iceState(r.pc.iceConnectionState)},r.pc.onicecandidate=function(e){if(null==e.candidate||"edge"===Nd.webRTCAdapter.browserDetails.browser&&e.candidate.candidate.indexOf("endOfCandidates")>0)Nd.log("End of candidates."),r.iceDone=!0,!0===r.trickle?b(A,{completed:!0}):function(A,e){e=e||{},e.success="function"==typeof e.success?e.success:Nd.noop,e.error="function"==typeof e.error?e.error:Nd.noop;var t=x[A];if(null==t||null===t.webrtcStuff||void 0===t.webrtcStuff)return void Nd.warn("Invalid handle, not sending anything");var i=t.webrtcStuff;if(Nd.log("Sending offer/answer SDP..."),null===i.mySdp||void 0===i.mySdp)return void Nd.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);Nd.debug(e),i.sdpSent=!0,e.success(i.mySdp)}(A,i);else{var t={candidate:e.candidate.candidate,sdpMid:e.candidate.sdpMid,sdpMLineIndex:e.candidate.sdpMLineIndex};!0===r.trickle&&b(A,t)}},r.pc.ontrack=function(A){Nd.log("Handling Remote Track"),Nd.debug(A),A.streams&&(r.remoteStream=A.streams[0],a.onremotestream(r.remoteStream),A.track.onended||(Nd.log("Adding onended callback to track:",A.track),A.track.onended=function(A){Nd.log("Remote track muted/removed:",A),r.remoteStream&&(r.remoteStream.removeTrack(A.target),a.onremotestream(r.remoteStream))},A.track.onmute=A.track.onended,A.track.onunmute=function(A){try{r.remoteStream.addTrack(A.target),a.onremotestream(r.remoteStream)}catch(A){Nd.error(A)}}))}}if(!o||null==n)return[3,18];Nd.log("Adding local stream"),S=!0===i.simulcast2,D=n.getTracks(),v=0,M.label=9;case 9:if(!(v0)for(var l in g){var c=g[l];c.sender&&c.sender.track&&"audio"===c.sender.track.kind||c.receiver&&c.receiver.track&&"audio"===c.receiver.track.kind?o||(o=c):(c.sender&&c.sender.track&&"video"===c.sender.track.kind||c.receiver&&c.receiver.track&&"video"===c.receiver.track.kind)&&(s||(s=c))}var d=V(e),I=O(e);d||I?d&&I?o&&(o.setDirection?o.setDirection("sendrecv"):o.direction="sendrecv",Nd.log("Setting audio transceiver to sendrecv:",o)):d&&!I?o&&(o.setDirection?o.setDirection("sendonly"):o.direction="sendonly",Nd.log("Setting audio transceiver to sendonly:",o)):!d&&I&&(o?(o.setDirection?o.setDirection("recvonly"):o.direction="recvonly",Nd.log("Setting audio transceiver to recvonly:",o)):(o=n.pc.addTransceiver("audio",{direction:"recvonly"}),Nd.log("Adding recvonly audio transceiver:",o))):e.removeAudio&&o&&(o.setDirection?o.setDirection("inactive"):o.direction="inactive",Nd.log("Setting audio transceiver to inactive:",o));var C=j(e),h=W(e);C||h?C&&h?s&&(s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",Nd.log("Setting video transceiver to sendrecv:",s)):C&&!h?s&&(s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",Nd.log("Setting video transceiver to sendonly:",s)):!C&&h&&(s?(s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",Nd.log("Setting video transceiver to recvonly:",s)):(s=n.pc.addTransceiver("video",{direction:"recvonly"}),Nd.log("Adding recvonly video transceiver:",s))):e.removeVideo&&s&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive",Nd.log("Setting video transceiver to inactive:",s))}else r.offerToReceiveAudio=O(e),r.offerToReceiveVideo=W(e);var u=!0===t.iceRestart;u&&(r.iceRestart=!0);Nd.debug(r);var B=j(e);if(B&&a&&"firefox"===Nd.webRTCAdapter.browserDetails.browser){Nd.log("Enabling Simulcasting for Firefox (RID)");var f=n.pc.getSenders().find((function(A){return"video"==A.track.kind}));if(f){var Q=f.getParameters();Q||(Q={});var p=E(t.simulcastMaxBitrates);Q.encodings=[{rid:"h",active:!0,maxBitrate:p.high},{rid:"m",active:!0,maxBitrate:p.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:p.low,scaleResolutionDownBy:4}],f.setParameters(Q)}}n.pc.createOffer(r).then((function(A){Nd.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,Nd.log("Setting local description"),B&&a&&("chrome"===Nd.webRTCAdapter.browserDetails.browser||"safari"===Nd.webRTCAdapter.browserDetails.browser?(Nd.log("Enabling Simulcasting for Chrome (SDP munging)"),A.sdp=function(A){for(var e=A.split("\r\n"),t=!1,i=[-1],n=[-1],a=null,r=null,o=null,s=null,g=-1,l=0;l-1){g=l;break}}else if(t){var c=e[l].match(/a=ssrc-group:FID (\d+) (\d+)/);if(c)i[0]=c[1],n[0]=c[2],e.splice(l,1),l--;else{if(i[0]){if((C=e[l].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(r=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(o=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=C[1]),0===e[l].indexOf("a=ssrc:"+n[0])){e.splice(l,1),l--;continue}if(0===e[l].indexOf("a=ssrc:"+i[0])){e.splice(l,1),l--;continue}}0!=e[l].length||(e.splice(l,1),l--)}}}if(i[0]<0){g=-1,t=!1;for(l=0;l-1){g=l;break}}else if(t){if(i[0]<0){var I=e[l].match(/a=ssrc:(\d+)/);if(I){i[0]=I[1],e.splice(l,1),l--;continue}}else{var C;if((C=e[l].match("a=ssrc:"+i[0]+" cname:(.+)"))&&(a=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" msid:(.+)"))&&(r=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" mslabel:(.+)"))&&(o=C[1]),(C=e[l].match("a=ssrc:"+i[0]+" label:(.+)"))&&(s=C[1]),0===e[l].indexOf("a=ssrc:"+n[0])){e.splice(l,1),l--;continue}if(0===e[l].indexOf("a=ssrc:"+i[0])){e.splice(l,1),l--;continue}}0!=e[l].length||(e.splice(l,1),l--)}}}if(i[0]<0)return Nd.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),A;g<0&&(g=e.length);i[1]=Math.floor(4294967295*Math.random()),i[2]=Math.floor(4294967295*Math.random()),n[1]=Math.floor(4294967295*Math.random()),n[2]=Math.floor(4294967295*Math.random());for(l=0;l0){for(var n=0;n0)for(var l in g){var c=g[l];c.sender&&c.sender.track&&"audio"===c.sender.track.kind||c.receiver&&c.receiver.track&&"audio"===c.receiver.track.kind?o||(o=c):(c.sender&&c.sender.track&&"video"===c.sender.track.kind||c.receiver&&c.receiver.track&&"video"===c.receiver.track.kind)&&(s||(s=c))}var d=V(e),I=O(e);if(d||I){if(d&&I){if(o)try{o.setDirection?o.setDirection("sendrecv"):o.direction="sendrecv",Nd.log("Setting audio transceiver to sendrecv:",o)}catch(A){Nd.error(A)}}else if(d&&!I)try{o&&(o.setDirection?o.setDirection("sendonly"):o.direction="sendonly",Nd.log("Setting audio transceiver to sendonly:",o))}catch(A){Nd.error(A)}else if(!d&&I)if(o)try{o.setDirection?o.setDirection("recvonly"):o.direction="recvonly",Nd.log("Setting audio transceiver to recvonly:",o)}catch(A){Nd.error(A)}else o=n.pc.addTransceiver("audio",{direction:"recvonly"}),Nd.log("Adding recvonly audio transceiver:",o)}else if(e.removeAudio&&o)try{o.setDirection?o.setDirection("inactive"):o.direction="inactive",Nd.log("Setting audio transceiver to inactive:",o)}catch(A){Nd.error(A)}var C=j(e),h=W(e);if(C||h){if(C&&h){if(s)try{s.setDirection?s.setDirection("sendrecv"):s.direction="sendrecv",Nd.log("Setting video transceiver to sendrecv:",s)}catch(A){Nd.error(A)}}else if(C&&!h){if(s)try{s.setDirection?s.setDirection("sendonly"):s.direction="sendonly",Nd.log("Setting video transceiver to sendonly:",s)}catch(A){Nd.error(A)}}else if(!C&&h)if(s)try{s.setDirection?s.setDirection("recvonly"):s.direction="recvonly",Nd.log("Setting video transceiver to recvonly:",s)}catch(A){Nd.error(A)}else s=n.pc.addTransceiver("video",{direction:"recvonly"}),Nd.log("Adding recvonly video transceiver:",s)}else if(e.removeVideo&&s)try{s.setDirection?s.setDirection("inactive"):s.direction="inactive",Nd.log("Setting video transceiver to inactive:",s)}catch(A){Nd.error(A)}}else r="firefox"==Nd.webRTCAdapter.browserDetails.browser||"edge"==Nd.webRTCAdapter.browserDetails.browser?{offerToReceiveAudio:O(e),offerToReceiveVideo:W(e)}:{mandatory:{OfferToReceiveAudio:O(e),OfferToReceiveVideo:W(e)}};Nd.debug(r);var u=j(e);if(u&&a&&"firefox"===Nd.webRTCAdapter.browserDetails.browser){Nd.log("Enabling Simulcasting for Firefox (RID)");var B=n.pc.getSenders()[1];Nd.log(B);var f=B.getParameters();Nd.log(f);var Q=E(t.simulcastMaxBitrates);B.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:Q.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:Q.medium},{rid:"low",active:!0,priority:"low",maxBitrate:Q.low}]})}n.pc.createAnswer(r).then((function(A){Nd.debug(A);var e={type:A.type,sdp:A.sdp};t.customizeSdp(e),A.sdp=e.sdp,Nd.log("Setting local description"),u&&a&&("chrome"===Nd.webRTCAdapter.browserDetails.browser?Nd.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):"firefox"!==Nd.webRTCAdapter.browserDetails.browser&&Nd.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),n.mySdp=A.sdp,n.pc.setLocalDescription(A).catch(t.error),n.mediaConstraints=r,n.iceDone||n.trickle?t.success(A):Nd.log("Waiting for all candidates...")}),t.error)}(A,t,i)}),i.error),[2]}}))})),T.apply(this,arguments)}function M(A,e,t){(t=t||{}).success="function"==typeof t.success?t.success:Nd.noop,t.error="function"==typeof t.error?t.error:H,t.customizeStream="function"==typeof t.customizeStream?t.customizeStream:Nd.noop;var i=t.jsep;if(e&&i)return Nd.error("Provided a JSEP to a createOffer"),void t.error("Provided a JSEP to a createOffer");if(!(e||i&&i.type&&i.sdp))return Nd.error("A valid JSEP is required for createAnswer"),void t.error("A valid JSEP is required for createAnswer");t.media=t.media||{audio:!0,video:!0};var n=t.media,a=x[A];if(null==a||null===a.webrtcStuff||void 0===a.webrtcStuff)return Nd.warn("Invalid handle"),void t.error("Invalid handle");var r,o=a.webrtcStuff;if(o.trickle=(r=t.trickle,Nd.debug("isTrickleEnabled:",r),null==r||!0===r),void 0===o.pc||null===o.pc)n.update=!1,n.keepAudio=!1,n.keepVideo=!1;else if(void 0!==o.pc&&null!==o.pc){if(Nd.log("Updating existing media session"),n.update=!0,null!==t.stream&&void 0!==t.stream)t.stream!==o.myStream&&Nd.log("Renegotiation involves a new external stream");else{if(n.addAudio){if(n.keepAudio=!1,n.replaceAudio=!1,n.removeAudio=!1,n.audioSend=!0,o.myStream&&o.myStream.getAudioTracks()&&o.myStream.getAudioTracks().length)return Nd.error("Can't add audio stream, there already is one"),void t.error("Can't add audio stream, there already is one")}else n.removeAudio?(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!1,n.audioSend=!1):n.replaceAudio&&(n.keepAudio=!1,n.addAudio=!1,n.removeAudio=!1,n.audioSend=!0);if(null===o.myStream||void 0===o.myStream?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),V(n)&&(n.keepAudio=!1,n.addAudio=!0)):null===o.myStream.getAudioTracks()||void 0===o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length?(n.replaceAudio&&(n.keepAudio=!1,n.replaceAudio=!1,n.addAudio=!0,n.audioSend=!0),V(n)&&(n.keepVideo=!1,n.addAudio=!0)):!V(n)||n.removeAudio||n.replaceAudio||(n.keepAudio=!0),n.addVideo){if(n.keepVideo=!1,n.replaceVideo=!1,n.removeVideo=!1,n.videoSend=!0,o.myStream&&o.myStream.getVideoTracks()&&o.myStream.getVideoTracks().length)return Nd.error("Can't add video stream, there already is one"),void t.error("Can't add video stream, there already is one")}else n.removeVideo?(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!1,n.videoSend=!1):n.replaceVideo&&(n.keepVideo=!1,n.addVideo=!1,n.removeVideo=!1,n.videoSend=!0);null===o.myStream||void 0===o.myStream||null===o.myStream.getVideoTracks()||void 0===o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length?(n.replaceVideo&&(n.keepVideo=!1,n.replaceVideo=!1,n.addVideo=!0,n.videoSend=!0),j(n)&&(n.keepVideo=!1,n.addVideo=!0)):!j(n)||n.removeVideo||n.replaceVideo||(n.keepVideo=!0),n.addData&&(n.data=!0)}if(V(n)&&n.keepAudio&&j(n)&&n.keepVideo)return a.consentDialog(!1),void N(A,i,n,t,o.myStream)}if(n.update&&!o.streamExternal){if(n.removeAudio||n.replaceAudio){if(o.myStream&&o.myStream.getAudioTracks()&&o.myStream.getAudioTracks().length){var s=o.myStream.getAudioTracks()[0];Nd.log("Removing audio track:",s),o.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(o.pc.getSenders()&&o.pc.getSenders().length){var g=!0;if(n.replaceAudio&&Nd.unifiedPlan&&(g=!1),g)for(var l in o.pc.getSenders()){(s=o.pc.getSenders()[l])&&s.track&&"audio"===s.track.kind&&(Nd.log("Removing audio sender:",s),o.pc.removeTrack(s))}}}if(n.removeVideo||n.replaceVideo){if(o.myStream&&o.myStream.getVideoTracks()&&o.myStream.getVideoTracks().length){s=o.myStream.getVideoTracks()[0];Nd.log("Removing video track:",s),o.myStream.removeTrack(s);try{s.stop()}catch(A){}}if(o.pc.getSenders()&&o.pc.getSenders().length){var c=!0;if(n.replaceVideo&&Nd.unifiedPlan&&(c=!1),c)for(var l in o.pc.getSenders()){(s=o.pc.getSenders()[l])&&s.track&&"video"===s.track.kind&&(Nd.log("Removing video sender:",s),o.pc.removeTrack(s))}}}}if(null!==t.stream&&void 0!==t.stream){var d=t.stream;if(Nd.log("MediaStream provided by the application"),Nd.debug(d),n.update&&o.myStream&&o.myStream!==t.stream&&!o.streamExternal){try{var I=o.myStream.getTracks();for(var C in I){var h=I[C];Nd.log(h),null!=h&&h.stop()}}catch(A){}o.myStream=null}return o.streamExternal=!0,a.consentDialog(!1),void N(A,i,n,t,d)}if(V(n)||j(n)){if(!Nd.isGetUserMediaAvailable())return void t.error("getUserMedia not available");var u={mandatory:{},optional:[]};a.consentDialog(!0);var B=V(n);!0===B&&null!=n&&null!=n&&"object"===Rd(n.audio)&&(B=n.audio);var E=j(n);if(!0===E&&null!=n&&null!=n){var f=!0===t.simulcast,Q=!0===t.simulcast2;if(!f&&!Q||i||void 0!==n.video&&!1!==n.video||(n.video="hires"),n.video&&"screen"!=n.video&&"window"!=n.video)if("object"===Rd(n.video))E=n.video;else{var p=0,m=0;"lowres"===n.video?(m=240,p=320):"lowres-16:9"===n.video?(m=180,p=320):"hires"===n.video||"hires-16:9"===n.video||"hdres"===n.video?(m=720,p=1280):"fhdres"===n.video?(m=1080,p=1920):"4kres"===n.video?(m=2160,p=3840):"stdres"===n.video?(m=480,p=640):"stdres-16:9"===n.video?(m=360,p=640):(Nd.log("Default video setting is stdres 4:3"),m=480,p=640),Nd.log("Adding media constraint:",n.video),E={height:{ideal:m},width:{ideal:p}},Nd.log("Adding video constraint:",E)}else if("screen"===n.video||"window"===n.video){var y=function(e,r){a.consentDialog(!1),e?t.error(e):N(A,i,n,t,r)},_=function(A,e,t){Nd.log("Adding media constraint (screen capture)"),Nd.debug(A),navigator.mediaDevices.getUserMedia(A).then((function(A){t?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){A.addTrack(t.getAudioTracks()[0]),e(null,A)})):e(null,A)})).catch((function(A){a.consentDialog(!1),e(A)}))};if(n.screenshareFrameRate||(n.screenshareFrameRate=3),navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return void navigator.mediaDevices.getDisplayMedia({video:!0}).then((function(e){a.consentDialog(!1),V(n)&&!n.keepAudio?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(a){e.addTrack(a.getAudioTracks()[0]),N(A,i,n,t,e)})):N(A,i,n,t,e)}),(function(A){a.consentDialog(!1),t.error(A)}));if("chrome"===Nd.webRTCAdapter.browserDetails.browser){var S=Nd.webRTCAdapter.browserDetails.version,D=33;window.navigator.userAgent.match("Linux")&&(D=35),S>=26&&S<=D?(u={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate,chromeMediaSource:"screen"}},audio:V(n)&&!n.keepAudio},_(u,y)):Nd.extension.getScreen((function(A,e){if(A)return a.consentDialog(!1),t.error(A);(u={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:n.screenshareFrameRate,maxFrameRate:n.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}}).video.mandatory.chromeMediaSourceId=e,_(u,y,V(n)&&!n.keepAudio)}))}else if("firefox"===Nd.webRTCAdapter.browserDetails.browser){if(!(Nd.webRTCAdapter.browserDetails.version>=33)){var v=new Error("NavigatorUserMediaError");return v.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",a.consentDialog(!1),void t.error(v)}u={video:{mozMediaSource:n.video,mediaSource:n.video},audio:V(n)&&!n.keepAudio},_(u,(function(A,e){if(y(A,e),!A)var t=e.currentTime,i=window.setInterval((function(){e||window.clearInterval(i),e.currentTime==t&&(window.clearInterval(i),e.onended&&e.onended()),t=e.currentTime}),500)}))}return}}null!=n&&"screen"===n.video||navigator.mediaDevices.enumerateDevices().then((function(e){var r=e.some((function(A){return"audioinput"===A.kind})),o=function(A){if(Nd.debug("isScreenSendEnabled:",A),null==A)return!1;if("object"!==Rd(A.video)||"object"!==Rd(A.video.mandatory))return!1;var e=A.video.mandatory;if(e.chromeMediaSource)return"desktop"===e.chromeMediaSource||"screen"===e.chromeMediaSource;if(e.mozMediaSource)return"window"===e.mozMediaSource||"screen"===e.mozMediaSource;if(e.mediaSource)return"window"===e.mediaSource||"screen"===e.mediaSource;return!1}(n)||e.some((function(A){return"videoinput"===A.kind})),s=V(n),g=j(n),l=function(A){return Nd.debug("isAudioSendRequired:",A),null!=A&&(!1!==A.audio&&!1!==A.audioSend&&(void 0!==A.failIfNoAudio&&null!==A.failIfNoAudio&&!0===A.failIfNoAudio))}(n),c=function(A){return Nd.debug("isVideoSendRequired:",A),null!=A&&(!1!==A.video&&!1!==A.videoSend&&(void 0!==A.failIfNoVideo&&null!==A.failIfNoVideo&&!0===A.failIfNoVideo))}(n);if(s||g||l||c){var I=!!s&&r,C=!!g&&o;if(!I&&!C)return a.consentDialog(!1),t.error("No capture device found"),!1;if(!I&&l)return a.consentDialog(!1),t.error("Audio capture is required, but no capture device found"),!1;if(!C&&c)return a.consentDialog(!1),t.error("Video capture is required, but no capture device found"),!1}var h={audio:!(!r||n.keepAudio)&&B,video:!(!o||n.keepVideo)&&E};Nd.debug("getUserMedia constraints",h),h.audio||h.video?navigator.mediaDevices.getUserMedia(h).then((function(e){a.consentDialog(!1),N(A,i,n,t,e)})).catch((function(A){a.consentDialog(!1),t.error({code:A.code,name:A.name,message:A.message})})):(a.consentDialog(!1),N(A,i,n,t,d))})).catch((function(A){a.consentDialog(!1),t.error("enumerateDevices error",A)}))}else N(A,i,n,t)}function L(A,e){(e=e||{}).success="function"==typeof e.success?e.success:Nd.noop,e.error="function"==typeof e.error?e.error:H;var t=e.jsep,i=x[A];if(null==i||null===i.webrtcStuff||void 0===i.webrtcStuff)return Nd.warn("Invalid handle"),void e.error("Invalid handle");var n=i.webrtcStuff;if(null!=t){if(null===n.pc)return Nd.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void e.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.pc.setRemoteDescription(t).then((function(){if(Nd.log("Remote description accepted!"),n.remoteSdp=t.sdp,n.candidates&&n.candidates.length>0){for(var A=0;A-1)&&"inbound-rtp"===A.type&&A.id.indexOf("rtcp")<0?e=!0:"ssrc"!=A.type||!A.bytesReceived||"VP8"!==A.googCodecName&&""!==A.googCodecName||(e=!0),e)if(t.bitrate.bsnow=A.bytesReceived,t.bitrate.tsnow=A.timestamp,null===t.bitrate.bsbefore||null===t.bitrate.tsbefore)t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow;else{var i=t.bitrate.tsnow-t.bitrate.tsbefore;"safari"==Nd.webRTCAdapter.browserDetails.browser&&(i/=1e3);var n=Math.round(8*(t.bitrate.bsnow-t.bitrate.bsbefore)/i);"safari"===Nd.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),t.bitrate.value=n+" kbits/sec",t.bitrate.bsbefore=t.bitrate.bsnow,t.bitrate.tsbefore=t.bitrate.tsnow}}}))}))}),1e3),"0 kbits/sec"):t.bitrate.value:(Nd.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function H(A){Nd.error("WebRTC error:",A)}function K(A,i){Nd.log("Cleaning WebRTC stuff");var n=x[A];if(null!=n){var a=n.webrtcStuff;if(null!=a){if(!0===i){var r={rtcgw:"hangup",transaction:Nd.randomString(12)};null!==n.token&&void 0!==n.token&&(r.token=n.token),null!=h&&(r.apisecret=h),Nd.debug("Sending hangup request (handle="+A+"):"),Nd.debug(r),e?(r.session_id=Q,r.handle_id=A,t.send(JSON.stringify(r))):Nd.httpAPICall(o+"/"+Q+"/"+A,{verb:"POST",withCredentials:d,body:r})}a.remoteStream=null,a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer)),a.volume={},a.bitrate.timer&&clearInterval(a.bitrate.timer),a.bitrate.timer=null,a.bitrate.bsnow=null,a.bitrate.bsbefore=null,a.bitrate.tsnow=null,a.bitrate.tsbefore=null,a.bitrate.value=null;try{if(!a.streamExternal&&null!==a.myStream&&void 0!==a.myStream){Nd.log("Stopping local stream tracks");var s=a.myStream.getTracks();for(var g in s){var l=s[g];Nd.log(l),null!=l&&l.stop()}}}catch(A){}a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(A){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null}n.oncleanup()}}function V(A){return Nd.debug("isAudioSendEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioSend||null===A.audioSend||!0===A.audioSend)}function O(A){return Nd.debug("isAudioRecvEnabled:",A),null==A||!1!==A.audio&&(void 0===A.audioRecv||null===A.audioRecv||!0===A.audioRecv)}function j(A){return Nd.debug("isVideoSendEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoSend||null===A.videoSend||!0===A.videoSend)}function W(A){return Nd.debug("isVideoRecvEnabled:",A),null==A||!1!==A.video&&(void 0===A.videoRecv||null===A.videoRecv||!0===A.videoRecv)}v(A),this.getServer=function(){return o},this.isConnected=function(){return f},this.reconnect=function(A){(A=A||{}).success="function"==typeof A.success?A.success:Nd.noop,A.error="function"==typeof A.error?A.error:Nd.noop,A.reconnect=!0,v(A)},this.getSessionId=function(){return Q},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:Nd.noop;var r=!0;void 0!==a.asyncRequest&&null!==a.asyncRequest&&(r=!0===a.asyncRequest);var s=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(s=!0===a.notifyDestroyed);var g=!1;void 0!==a.cleanupHandles&&null!==a.cleanupHandles&&(g=!0===a.cleanupHandles);if(Nd.log("Destroying session "+Q+" (async="+r+")"),!f)return Nd.warn("Is the server down? (connected=false)"),void a.success();if(null==Q)return Nd.warn("No session to destroy"),a.success(),void(s&&A.destroyed());if(g)for(var l in x)P(l,{noRequest:!0});var c={rtcgw:"destroy",transaction:Nd.randomString(12)};null!=C&&(c.token=C);null!=h&&(c.apisecret=h);if(e){c.session_id=Q;var I=function(){for(var A in i)t.removeEventListener(A,i[A]);t.removeEventListener("message",u),t.removeEventListener("error",B),n&&clearTimeout(n),t.close()},u=function(e){var t=JSON.parse(e.data);t.session_id==c.session_id&&t.transaction==c.transaction&&(I(),a.success(),s&&A.destroyed())},B=function(e){I(),a.error("Failed to destroy the server: Is the server down?"),s&&A.destroyed()};return t.addEventListener("message",u),t.addEventListener("error",B),void t.send(JSON.stringify(c))}Nd.httpAPICall(o+"/"+Q,{verb:"POST",async:r,withCredentials:d,body:c,success:function(e){Nd.log("Destroyed session:"),Nd.debug(e),Q=null,f=!1,"success"!==e.rtcgw&&Nd.error("Ooops: "+e.error.code+" "+e.error.reason),a.success(),s&&A.destroyed()},error:function(e,t){Nd.error(e+":",t),Q=null,f=!1,a.success(),s&&A.destroyed()}})}(a)},this.attach=function(A){!function(A){if(A=A||{},A.success="function"==typeof A.success?A.success:Nd.noop,A.error="function"==typeof A.error?A.error:Nd.noop,A.consentDialog="function"==typeof A.consentDialog?A.consentDialog:Nd.noop,A.iceState="function"==typeof A.iceState?A.iceState:Nd.noop,A.mediaState="function"==typeof A.mediaState?A.mediaState:Nd.noop,A.webrtcState="function"==typeof A.webrtcState?A.webrtcState:Nd.noop,A.slowLink="function"==typeof A.slowLink?A.slowLink:Nd.noop,A.onmessage="function"==typeof A.onmessage?A.onmessage:Nd.noop,A.onlocalstream="function"==typeof A.onlocalstream?A.onlocalstream:Nd.noop,A.onremotestream="function"==typeof A.onremotestream?A.onremotestream:Nd.noop,A.ondata="function"==typeof A.ondata?A.ondata:Nd.noop,A.ondataopen="function"==typeof A.ondataopen?A.ondataopen:Nd.noop,A.oncleanup="function"==typeof A.oncleanup?A.oncleanup:Nd.noop,A.ondetached="function"==typeof A.ondetached?A.ondetached:Nd.noop,!f)return Nd.warn("Is the server down? (connected=false)"),void A.error("Is the server down? (connected=false)");var i=A.plugin;if(null==i)return Nd.error("Invalid plugin"),void A.error("Invalid plugin");var n=A.opaqueId,a=A.token?A.token:C,r=Nd.randomString(12),s={rtcgw:"attach",plugin:i,opaque_id:n,transaction:r};null!=a&&(s.token=a);null!=h&&(s.apisecret=h);if(e)return y[r]=function(e){if(Nd.debug(e),"success"!==e.rtcgw)return Nd.error("Ooops: "+e.error.code+" "+e.error.reason),void A.error("Ooops: "+e.error.code+" "+e.error.reason);var t=e.data.id;Nd.log("Created handle: "+t);var n={session:p,plugin:i,id:t,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return t},getPlugin:function(){return i},getVolume:function(){return G(t,!0)},getRemoteVolume:function(){return G(t,!0)},getLocalVolume:function(){return G(t,!1)},isAudioMuted:function(){return Y(t,!1)},muteAudio:function(){return U(t,!1,!0)},unmuteAudio:function(){return U(t,!1,!1)},isVideoMuted:function(){return Y(t,!0)},muteVideo:function(){return U(t,!0,!0)},unmuteVideo:function(){return U(t,!0,!1)},getBitrate:function(){return J(t)},send:function(A){w(t,A)},data:function(A){R(t,A)},dtmf:function(A){k(t,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){M(t,!0,A)},createAnswer:function(A){M(t,!1,A)},handleRemoteJsep:function(A){L(t,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){K(t,!0===A)},detach:function(A){P(t,A)}};x[t]=n,A.success(n)},s.session_id=Q,void t.send(JSON.stringify(s));Nd.httpAPICall(o+"/"+Q,{verb:"POST",withCredentials:d,body:s,success:function(e){if(Nd.debug(e),"success"!==e.rtcgw)return Nd.error("Ooops: "+e.error.code+" "+e.error.reason),void A.error("Ooops: "+e.error.code+" "+e.error.reason);var t=e.data.id;Nd.log("Created handle: "+t);var n={session:p,plugin:i,id:t,token:a,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return t},getPlugin:function(){return i},getVolume:function(){return G(t,!0)},getRemoteVolume:function(){return G(t,!0)},getLocalVolume:function(){return G(t,!1)},isAudioMuted:function(){return Y(t,!1)},muteAudio:function(){return U(t,!1,!0)},unmuteAudio:function(){return U(t,!1,!1)},isVideoMuted:function(){return Y(t,!0)},muteVideo:function(){return U(t,!0,!0)},unmuteVideo:function(){return U(t,!0,!1)},getBitrate:function(){return J(t)},send:function(A){w(t,A)},data:function(A){R(t,A)},dtmf:function(A){k(t,A)},consentDialog:A.consentDialog,iceState:A.iceState,mediaState:A.mediaState,webrtcState:A.webrtcState,slowLink:A.slowLink,onmessage:A.onmessage,createOffer:function(A){M(t,!0,A)},createAnswer:function(A){M(t,!1,A)},handleRemoteJsep:function(A){L(t,A)},onlocalstream:A.onlocalstream,onremotestream:A.onremotestream,ondata:A.ondata,ondataopen:A.ondataopen,oncleanup:A.oncleanup,ondetached:A.ondetached,hangup:function(A){K(t,!0===A)},detach:function(A){P(t,A)}};x[t]=n,A.success(n)},error:function(A,e){Nd.error(A+":",e)}})}(A)}}Nd.useDefaultDependencies=function(A){var e=A&&A.fetch||fetch,t=A&&A.Promise||Promise,i=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new i(A,e)},extension:A&&A.extension||Pd,isArray:function(A){return Array.isArray(A)},webRTCAdapter:A&&A.adapter||window.adapter,httpAPICall:function(A,i){var n={method:i.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===i.verb&&(n.headers["Content-Type"]="application/json"),void 0!==i.withCredentials&&(n.credentials=!0===i.withCredentials?"include":i.withCredentials?i.withCredentials:"omit"),void 0!==i.body&&(n.body=JSON.stringify(i.body));var a=e(A,n).catch((function(A){return t.reject({message:"Probably a network error, is the server down?",error:A})}));if(void 0!==i.timeout){var r=new t((function(A,e){var t=setTimeout((function(){return clearTimeout(t),e({message:"Request timed out",timeout:i.timeout})}),i.timeout)}));a=t.race([a,r])}return a.then((function(A){return A.ok?Rd(i.success)===Rd(Nd.noop)?A.json().then((function(A){i.success(A)})).catch((function(e){return t.reject({message:"Failed to parse response body",error:e,response:A})})):void 0:t.reject({message:"API call failed",response:A})})).catch((function(A){Rd(i.error)===Rd(Nd.noop)&&i.error(A.message||"<< internal error >>",A)})),a}}},Nd.useOldDependencies=function(A){var e=A&&A.jQuery||jQuery,t=A&&A.WebSocket||WebSocket;return{newWebSocket:function(A,e){return new t(A,e)},isArray:function(A){return e.isArray(A)},extension:A&&A.extension||Pd,webRTCAdapter:A&&A.adapter||adapter,httpAPICall:function(A,t){var i=void 0!==t.body?{contentType:"application/json",data:JSON.stringify(t.body)}:{},n=void 0!==t.withCredentials?{xhrFields:{withCredentials:t.withCredentials}}:{};return e.ajax(e.extend(i,n,{url:A,type:t.verb,cache:!1,dataType:"json",async:t.async,timeout:t.timeout,success:function(A){Rd(t.success)===Rd(Nd.noop)&&t.success(A)},error:function(A,e,i){Rd(t.error)===Rd(Nd.noop)&&t.error(e,i)}}))}}},Nd.noop=function(){},Nd.dataChanDefaultLabel="JanusDataChannel",Nd.endOfCandidates=null,Nd.init=function(A){if((A=A||{}).callback="function"==typeof A.callback?A.callback:Nd.noop,!0===Nd.initDone)A.callback();else{if("undefined"!=typeof console&&void 0!==console.log||(console={log:function(){}}),Nd.trace=Nd.noop,Nd.debug=Nd.noop,Nd.vdebug=Nd.noop,Nd.log=Nd.noop,Nd.warn=Nd.noop,Nd.error=Nd.noop,!0===A.debug||"all"===A.debug)Nd.trace=console.trace.bind(console)||Nd.noop,Nd.debug=console.debug.bind(console)||Nd.noop,Nd.vdebug=console.debug.bind(console)||Nd.noop,Nd.log=console.log.bind(console)||Nd.noop,Nd.warn=console.warn.bind(console)||Nd.noop,Nd.error=console.error.bind(console)||Nd.noop;else if(Array.isArray(A.debug))for(var e in A.debug){switch(A.debug[e]){case"trace":Nd.trace=console.trace.bind(console)||Nd.noop;break;case"debug":Nd.debug=console.debug.bind(console)||Nd.noop;break;case"vdebug":Nd.vdebug=console.debug.bind(console)||Nd.noop;break;case"log":Nd.log=console.log.bind(console)||Nd.noop;break;case"warn":Nd.warn=console.warn.bind(console)||Nd.noop;break;case"error":Nd.error=console.error.bind(console)||Nd.noop}}var t=A.dependencies||Nd.useDefaultDependencies();Nd.isArray=t.isArray,Nd.webRTCAdapter=t.webRTCAdapter,Nd.httpAPICall=t.httpAPICall,Nd.newWebSocket=t.newWebSocket,Nd.extension=t.extension,Nd.extension.init(),Nd.listDevices=function(A,e){A="function"==typeof A?A:Nd.noop,null==e&&(e={audio:!0,video:!0}),Nd.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(e).then((function(e){navigator.mediaDevices.enumerateDevices().then((function(t){Nd.debug(t),A(t);try{var i=e.getTracks();for(var n in i){var a=i[n];null!=a&&a.stop()}}catch(A){}}))})).catch((function(e){Nd.error(e),A([])})):(Nd.warn("navigator.mediaDevices unavailable"),A([]))},Nd.attachMediaStream=function(A,e){"chrome"===Nd.webRTCAdapter.browserDetails.browser?Nd.webRTCAdapter.browserDetails.version>=52?A.srcObject=e:Nd.error("Error attaching stream to element"):A.srcObject=e},Nd.reattachMediaStream=function(A,e){"chrome"===Nd.webRTCAdapter.browserDetails.browser?Nd.webRTCAdapter.browserDetails.version>=52?A.srcObject=e.srcObject:void 0!==A.src?A.src=e.src:Nd.error("Error reattaching stream to element"):A.srcObject=e.srcObject};var i=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",n=window["on"+i];if(window.addEventListener(i,(function(A){for(var e in Nd.log("Closing window"),Nd.sessions)null!==Nd.sessions[e]&&void 0!==Nd.sessions[e]&&Nd.sessions[e].destroyOnUnload&&(Nd.log("Destroying session "+e),Nd.sessions[e].destroy({asyncRequest:!1,notifyDestroyed:!1}));n&&"function"==typeof n&&n()})),Nd.safariVp8=!1,"safari"===Nd.webRTCAdapter.browserDetails.browser&&Nd.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var e in RTCRtpSender.getCapabilities("video").codecs){var a=RTCRtpSender.getCapabilities("video").codecs[e];if(a&&a.mimeType&&"video/vp8"===a.mimeType.toLowerCase()){Nd.safariVp8=!0;break}}Nd.safariVp8?Nd.log("This version of Safari supports VP8"):Nd.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var r=new RTCPeerConnection({},{});r.createOffer({offerToReceiveVideo:!0}).then((function(A){Nd.safariVp8=-1!==A.sdp.indexOf("VP8"),Nd.safariVp8?Nd.log("This version of Safari supports VP8"):Nd.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),r.close(),r=null}))}if(Nd.unifiedPlan=!1,"firefox"===Nd.webRTCAdapter.browserDetails.browser&&Nd.webRTCAdapter.browserDetails.version>=59)Nd.unifiedPlan=!0;else if("chrome"===Nd.webRTCAdapter.browserDetails.browser&&Nd.webRTCAdapter.browserDetails.version<72)Nd.unifiedPlan=!1;else if("undefined"==typeof RTCRtpTransceiver||"currentDirection"in RTCRtpTransceiver.prototype){var o=new RTCPeerConnection;try{o.addTransceiver("audio"),Nd.unifiedPlan=!0}catch(A){}o.close()}else Nd.unifiedPlan=!1;Nd.initDone=!0,A.callback()}},Nd.isWebrtcSupported=function(){return void 0!==window.RTCPeerConnection&&null!==window.RTCPeerConnection},Nd.isGetUserMediaAvailable=function(){return void 0!==navigator.mediaDevices&&null!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia&&null!==navigator.mediaDevices.getUserMedia},Nd.randomString=function(A){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",i=0;i-1&&(window.EZUIKit.opt.talkType="gb28181"),A&&A(n.ttsUrl.indexOf("gb28181")>-1||-1!==window.EZUIKit.opt.deviceSerial.indexOf(":")),window.EZUIKit.opt.stream=e.jSPlugin.accessToken?n.stream:e.jSPlugin.token.streamToken.talk,window.startTalk({customizeStream:t._customizeStream.bind(t),audio:!e.microphoneId||{deviceId:e.microphoneId}}),e.observeVolumeChange(),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:0,target:e,msg:"开启对讲"})}}else e.pluginStatus.loadingSetText({text:i.msg||e.jSPlugin.i18n.t("38"+i.code),color:"red",delayClear:2e3}),e.jSPlugin.eventEmitter&&e.jSPlugin.eventEmitter.emit("startTalk",{eventType:"startTalk",code:-1,target:e,msg:i.msg||e.jSPlugin.i18n.t("38"+i.code)}),"function"==typeof e.jSPlugin.params.handleError&&e.jSPlugin.params.handleError({msg:i.msg||e.jSPlugin.i18n.t("38"+i.code),retcode:i.code,id:e.jSPlugin.params.id,type:"handleError"})})).catch((function(A){}))})).catch((function(A){}))},e.stopTalk=function(){var A=this;try{window.stopTalk()}catch(A){var e,t,i,n;null==(t=this.jSPlugin)||null==(e=t.logger)||e.error(Gd,"[errors]","stopTalk error:",A),null==(n=this.jSPlugin)||null==(i=n.eventEmitter)||i.emit(id.stopTalk,{eventType:id.stopTalk,code:-1,msg:"结束对讲"})}this.gainNode=null,this.volumeChangeInterval&&(clearInterval(this.volumeChangeInterval),this.volumeChangeInterval=null),this.jSPlugin.eventEmitter&&setTimeout((function(){var e;null==(e=A.jSPlugin.eventEmitter)||e.emit(id.volumeChange,{eventType:id.volumeChange,code:0,target:A,data:0,msg:"音量变化"})}),200);var a,r=document.getElementById("myaudio");r&&r.srcObject&&(r.srcObject.getTracks()[0].stop(),null==(a=this.jSPlugin.eventEmitter)||a.emit(id.stopTalk,{eventType:id.stopTalk,code:0,target:this,msg:"结束对讲"}))},e.changeTalkChannelNo=function(A){window.EZUIKit.opt&&window.EZUIKit.opt.channelNo&&(this.talkChannelNo=A,window.EZUIKit.opt.channelNo=A)},e._customizeStream=function(A){var e=this;return new Promise((function(t,i){var n=new window.AudioContext;e.gainNode=n.createGain();var a,r=n.createMediaStreamSource(A);e.gainNode.gain.value=null!=(a=e.volumeGain)?a:1;var o=n.createMediaStreamDestination();r.connect(e.gainNode),e.gainNode.connect(o),t(o.stream)}))},e.setVolumeGain=function(A){var e=["",null].includes(A)?1:Number(A);return"number"==typeof e&&e>=0?(this.volumeGain=Math.min(e,10),this.gainNode&&(this.gainNode.gain.value=this.volumeGain),{code:0,msg:"成功",res:null}):{code:-1,msg:"参数格式有误",res:null}},e.observeVolumeChange=function(A){var e=this;void 0===A&&(A={});var t=A.interval,i=void 0===t?100:t;this.volumeChangeInterval&&(clearInterval(this.volumeChangeInterval),this.volumeChangeInterval=null),this.volumeChangeInterval=setInterval((function(){var A,t,i,n,a;null==(a=window.tts)||null==(n=a.webrtcStuff)||null==(i=n.pc)||null==(t=i.getStats)||null==(A=t.call(i))||A.then((function(A){A.forEach((function(A){var t,i;"media-source"===A.type&&(null==(i=e.jSPlugin)||null==(t=i.eventEmitter)||t.emit("volumeChange",{eventType:"volumeChange",code:0,target:e,data:A.audioLevel,msg:"音量变化"}))}))}))}),i)},e.getMicrophonePermission=function(){return new Promise((function(A,e){navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){e.getTracks().forEach((function(A){A.stop()})),A({code:0,msg:"成功",res:null})})).catch((function(e){A({code:-1,msg:"获取麦克风权限失败",res:e})}))}))},e.getMicrophonesList=function(){return new Promise((function(A,e){navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then((function(e){var t=[];e.map((function(A){"audioinput"==A.kind&&t.push(A)})),A({code:0,msg:"成功",res:t})})):A({code:-1,msg:"未查询到相关设备",res:null})}))},e.setProfile=function(A){var e=this,t=A.microphoneId;t!==this.microphoneId&&(this.microphoneId=t,this.gainNode&&(window.stopTalk(),setTimeout((function(){window.startTalk({customizeStream:e._customizeStream.bind(e),audio:!e.microphoneId||{deviceId:e.microphoneId}})}),200)))},A}(),Ud=function(){function A(e){var t,i,n=this;this.jSPlugin=e,this.pluginStatus=new ag(this,this.jSPlugin.id),null==(i=this.jSPlugin)||null==(t=i.logger)||t.log("[MobilePtz] init"),A._instanceStyle();var a=document.createElement("div");a.className="mobile-ez-ptz-container",a.id="mobile-ez-ptz-container";var r=window.innerHeight;a.style="display:inline-block;width: "+this.jSPlugin.width+"px;text-align:center;height: "+(r-this.jSPlugin.height-5)+"px";var s=document.createElement("div");s.className="live-ptz-title",s.id="live-ptz-title",s.innerHTML=this.jSPlugin.i18n.t("BTN_PTZ"),document.getElementById("live-ptz-title")||a.appendChild(s);var g=document.createElement("div");g.className="live-ptz-intro",g.id="live-ptz-intro",g.innerHTML=this.jSPlugin.i18n.t("MOBILE_PTZ_TIPS"),document.getElementById("live-ptz-intro")||a.appendChild(g);var l=document.createElement("div");l.id="mobile-ez-ptz-item",l.className="mobile-ez-ptz-wrap",l.innerHTML='\n
\n
\n
\n
\n
\n
\n
\n ',document.getElementById("mobile-ez-ptz-item")||a.appendChild(l),o(a,document.getElementById(this.jSPlugin.id+"-wrap")),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(A){A.preventDefault(),n._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(A){A.preventDefault(),n._handlePtzTouch(A,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(A){A.preventDefault(),n._handlePtzTouch(A,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(A){A.preventDefault(),n._handlePtzTouch(A,"stop")}}var e=A.prototype;return e.show=function(){document.getElementById("mobile-ez-ptz-container").style="display: inline-block"},e.hide=function(){document.getElementById("mobile-ez-ptz-container").style="display: none"},e._handlePtzTouch=function(A,e){var t,i,n=this,a=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),r=a.left+130,o=a.top+130,s=(A.x||A.changedTouches[0].clientX)-r,l=(A.y||A.changedTouches[0].clientY)-o,c=0,d=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start",I=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video;Math.abs(s)>Math.abs(l)?s>0?(c=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(c=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):l>0?(c=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(c=0,document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")),document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient("+(0===c?180:1===c?0:2===c?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===e&&(d=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",I=this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,document.getElementById("mobile-ez-ptz-item").style="",document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default")),null==(i=this.jSPlugin)||null==(t=i.eventEmitter)||t.emit(id.ptz.ptzDirection,{type:e,direction:c,isRotate:!1,ptzSpeed:1});var C=new FormData;C.append("deviceSerial",g(this.jSPlugin.url).deviceSerial),C.append("channelNo",g(this.jSPlugin.url).channelNo),C.append("speed",1),C.append("direction",c),C.append("accessToken",I),fetch(d,{method:"POST",body:C}).then((function(A){return A.json()})).then((function(A){if(200==A.code);else{var e,t;null==(t=n.jSPlugin)||null==(e=t.logger)||e.error("[errors]",n.jSPlugin.i18n.t("38"+A.code)+"("+A.code+")");var i=n.jSPlugin.i18n.t("38"+A.code)||A.msg;n.pluginStatus.loadingSetText({text:i,color:"red",delayClear:2e3}),60005!=A.code&&60002!=A.code&&60003!=A.code&&60004!=A.code||(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient("+(0===c?180:1===c?0:2===c?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)")}})).catch((function(A){}))},A._instanceStyle=function(){A._STYLE||(A._STYLE=document.createElement("style"),A._STYLE.innerHTML="\n body{\n padding: 0;\n margin: 0;\n }\n #mobile-ez-ptz-container {\n display: inline-block;\n width: 375px;\n text-align: center;\n }\n .live-ptz-title{\n height: 25px;\n font-size: 18px;\n color: #2c2c2c;\n text-align: center;\n font-weight: 700;\n margin: 24px 0 12px;\n }\n .live-ptz-intro {\n margin-bottom: 24px;\n color: #aaaaaa;\n }\n .mobile-ez-ptz-wrap {\n background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)\n }\n #mobile-ez-ptz-container .mobile-ez-ptz-container {\n position: relative;\n width: 260px;\n height: 260px;\n background: rgba(255, 255, 255, 0.80);\n border: 1px solid rgba(255, 255, 255, 0.80);\n border-radius: 100%;\n cursor: pointer;\n overflow: hidden;\n margin: auto;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n top: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {\n border-bottom-color: #1890FF;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n left: calc(50% - 6px);\n bottom: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {\n border-top-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n right: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {\n border-left-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #aaaaaa;\n position: absolute;\n display: inline-block;\n top: calc(50% - 6px);\n left: 10px;\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {\n border-right-color: #1890FF;\n\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {\n width: 52px;\n height: 52px;\n background: #FFFFFF;\n border: 2px solid #eee;\n border-radius: 100%;\n top: calc(50% - 26px);\n left: calc(50% - 26px);\n position: absolute;\n /* box-shadow: 0px -39px 40px 6px #1890ff; */\n }\n\n #mobile-ez-ptz-container .mobile-ez-ptz-wrap {\n display: inline-block;\n padding: 24px 24px;\n border-radius: 100%;\n overflow: hidden;\n }\n\n #mobile-ez-ptz-container .ez-ptz-close {\n position: absolute;\n color: #FFFFFF;\n top: 0;\n right: 0px;\n }",document.getElementsByTagName("head")[0].appendChild(A._STYLE))},A}(),Jd={header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}},Hd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},Kd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},Vd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},Od={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},jd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}}},Wd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},Zd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"cloudRecord",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}}},Xd={data:{header:{color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}}},qd=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Vd.data.header,footer:Vd.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Od.data.header,footer:Od.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Wd.data.header,footer:Wd.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:jd.data.header,footer:jd.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Zd.data.header,footer:Zd.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Hd.data.header,footer:Hd.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Kd.data.header,footer:Kd.data.footer},{autoFocus:0,createTime:"2021-06-14T08:04:37.000Z",themeId:"miniRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"",header:Xd.data.header,footer:Xd.data.footer}]; +/* + * ZoomControl v0.0.1 + * zoom + * Copyright (c) 2025-05-16 Ezviz-OpenBiz + * Released under the MIT License. + */ +const zd={initialZoom:1,defaultCursor:"auto",scrollVelocity:.1,animDuration:.25,defaultPos:[0,0],allowZoom:!0,allowMove:!0,allowPan:!0,onZoomChange:()=>{},onPanChange:(A,e)=>{},maxZoom:8,minZoom:1,zoomStep:.1,allowTouchEvents:!1,allowWheel:!0,ignoredMouseButtons:[],doubleTouchMaxDelay:300,decelerationDuration:750};let $d=class{constructor(A,e){var t=this;this.destroy=()=>{this.removeEventListeners()},this.setTransform=A=>{this.transform=A},this.getTransform=()=>this.transform,this.updateTranslate=()=>{let A=0,e=0;A=this.percentPos[0]<0?this.percentPos[0]<-.5*(this.zoom-1)?-.5*(this.zoom-1):this.percentPos[0]:this.percentPos[0]>.5*(this.zoom-1)?.5*(this.zoom-1):this.percentPos[0],e=this.percentPos[1]<0?this.percentPos[1]<-.5*(this.zoom-1)?-.5*(this.zoom-1):this.percentPos[1]:this.percentPos[1]>.5*(this.zoom-1)?.5*(this.zoom-1):this.percentPos[1],this.percentPos=[A,e]},this.update=()=>{this.container&&(this.updateTranslate(),this.container.style.transition=`transform ease-out ${this.transition}s`,this.container.style.transform=`translate3d(${100*this.percentPos[0]}%, ${100*this.percentPos[1]}%, 0) scale(${this.zoom})`)},this.setAllowZoom=A=>{this.options.allowZoom=A},this.setZoom=(A,e)=>{this.zoom=parseFloat(A.toFixed(this.getPrecision(this.options.zoomStep))),this.update(),this.options.onZoomChange&&this.options.onZoomChange(this.zoom.toFixed(this.getPrecision(this.options.zoomStep)),e)},this.getZoom=()=>this.zoom,this.setPos=A=>{var e,t;const i=null===(e=this.container)||void 0===e?void 0:e.clientWidth,n=null===(t=this.container)||void 0===t?void 0:t.clientHeight;this.percentPos=[A[0]/i,A[1]/n],this.pos=A,this.update(),this.options.onPanChange&&this.options.onPanChange({posX:A[0],posY:A[1]})},this.setTransitionDuration=A=>{this.transition=A,this.update()},this.setCursor=A=>{this.container&&(this.cursor=A)},this.zoomIn=A=>{var e,t;let i=this.pos[0],n=this.pos[1];const a=this.zoom,r=a+A<(null!==(e=this.options.maxZoom)&&void 0!==e?e:8)?a+A:null!==(t=this.options.maxZoom)&&void 0!==t?t:8;r!==a&&(i=i*(r-1)/(a>1?a-1:a),n=n*(r-1)/(a>1?a-1:a)),this.setZoom(r),this.setPos([i,n]),this.setTransitionDuration(this.options.animDuration)},this.zoomOut=A=>{var e,t;let i=this.pos[0],n=this.pos[1];const a=this.zoom,r=a-A>(null!==(e=this.options.minZoom)&&void 0!==e?e:1)?a-A:null!==(t=this.options.minZoom)&&void 0!==t?t:1;r!==a&&(i=i*(r-1)/(a-1),n=n*(r-1)/(a-1)),this.setZoom(r),this.setPos([i,n]),this.setTransitionDuration(this.options.animDuration)},this.zoomToZone=(A,e,t,i)=>{var n,a;if(!this.container)return;let r=this.pos[0],o=this.pos[1];const s=(null===(n=this.container)||void 0===n?void 0:n.parentNode).getBoundingClientRect(),g=this.zoom,l=s.width/t,c=s.height/i,d=Math.min(l,c,null!==(a=this.options.maxZoom)&&void 0!==a?a:8),I=this.container.getBoundingClientRect(),[C,h]=[I.width/g/2,I.height/g/2],[u,B]=[A+t/2,e+i/2];r=(C-u)*d,o=(h-B)*d,this.setZoom(d),this.setPos([r,o]),this.setTransitionDuration(this.options.animDuration)},this.getNewPosition=(A,e,t)=>{const[i,n,a]=[this.zoom,this.pos[0],this.pos[1]];if(1===t||!this)return[0,0];if(t>i){const r=this.container.getBoundingClientRect(),[o,s]=[r.width/2,r.height/2],[g,l]=[A-r.left-window.pageXOffset,e-r.top-window.pageYOffset],[c,d]=[(o-g)/i,(s-l)/i],I=t-i;return[n+c*I,a+d*I]}return[n*(t-1)/(i-1),a*(t-1)/(i-1)]},this.fullZoomInOnPosition=(A,e)=>{var t;const i=null!==(t=this.options.maxZoom)&&void 0!==t?t:8;this.setPos(this.getNewPosition(A,e,i)),this.setZoom(null!=i?i:8),this.setTransitionDuration(this.options.animDuration)},this.getLimitedShift=(A,e,t,i,n)=>{if(A>0){if(i>e)return 0;if(i+A>e)return e-i}else if(A<0){if(nA&&e?"move":A?"ew-resize":e?"ns-resize":"auto",this.move=function(A,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t.container)return;let n,a,r=t.pos[0],o=t.pos[1];const s=t.container.getBoundingClientRect(),g=t.container.parentNode.getBoundingClientRect(),l=t.transform?e:A,c=t.transform?A:e,[d,I,C]=t.transform?[s.height>g.bottom-g.top,c>0&&s.top-g.top<0,c<0&&s.bottom-g.bottom>0]:[s.width>g.right-g.left,l>0&&s.left-g.left<0,l<0&&s.right-g.right>0];n=d||I||C,n&&(t.transform?r+=t.getLimitedShift(c,g.top,g.bottom,s.top,s.bottom):r+=t.getLimitedShift(l,g.left,g.right,s.left,s.right));const[h,u,B]=t.transform?[s.width>g.right-g.left,l>0&&s.right-g.right<0,l<0&&s.left-g.left>0]:[s.height>g.bottom-g.top,c>0&&s.top-g.top<0,c<0&&s.bottom-g.bottom>0];if(a=h||u||B,a)if(t.transform){function f(A,e,t,i,n){if(A>0){if(ne)return 0;if(i+1+A>e)return e-i}return A}o+=f(l,g.left,g.right,s.left,s.right)}else o+=t.getLimitedShift(c,g.top,g.bottom,s.top,s.bottom);const E=t.getCursor(n,a);t.setPos([r,o]),t.setCursor(E),t.setTransitionDuration(i)},this.isDoubleTapping=()=>{var A,e,t,i;const n=(new Date).getTime();return n-(null!==(A=this.lastTouchTime)&&void 0!==A?A:0)<(null!==(e=this.options.doubleTouchMaxDelay)&&void 0!==e?e:300)&&n-(null!==(t=this.lastDoubleTapTime)&&void 0!==t?t:0)>(null!==(i=this.options.doubleTouchMaxDelay)&&void 0!==i?i:750)?(this.lastDoubleTapTime=n,!0):(this.lastTouchTime=n,!1)},this.startDeceleration=(A,e)=>{let t=null;const i=n=>{var a,r,o;null===t&&(t=n);const s=n-t,g=((null!==(a=this.options.decelerationDuration)&&void 0!==a?a:750)-s)/(null!==(r=this.options.decelerationDuration)&&void 0!==r?r:750),[l,c]=[A*g,e*g];s<(null!==(o=this.options.decelerationDuration)&&void 0!==o?o:750)&&Math.max(Math.abs(l),Math.abs(c))>1?(this.move(l,c,0),this.lastRequestAnimationId=requestAnimationFrame(i)):this.lastRequestAnimationId=null};this.lastRequestAnimationId=requestAnimationFrame(i)},this.reset=()=>{this.setZoom(this.options.initialZoom,!0),this.cursor=this.options.defaultCursor,this.setTransitionDuration(this.options.animDuration),this.setPos(this.options.defaultPos)},this.handleDoubleClick=A=>{var e;A.preventDefault(),this.options.allowZoom&&(this.zoom===(null!==(e=this.options.minZoom)&&void 0!==e?e:1)?this.fullZoomInOnPosition(A.pageX,A.pageY):this.reset())},this.addScale=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.handleZoomAdd(A)},this.handleZoomAdd=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;var e;if(!t.options.allowZoom||!t.options.allowWheel)return;let i=parseFloat((t.zoom+A).toFixed(t.getPrecision(t.options.zoomStep)));i>(null!==(e=t.options.maxZoom)&&void 0!==e?e:8)&&(i=8),t.setZoom(i),t.setPos(t.pos),t.setTransitionDuration(.05)},this.subScale=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.handleZoomSub(A)},this.handleZoomSub=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;var e,i;if(!t.options.allowZoom||!t.options.allowWheel)return;let n=parseFloat((t.zoom-A).toFixed(t.getPrecision(t.options.zoomStep))),a=t.pos;n<(null!==(e=t.options.minZoom)&&void 0!==e?e:1)?(n=1,a=t.options.defaultPos):n!==t.zoom&&(a=n!==(null!==(i=t.options.minZoom)&&void 0!==i?i:1)?t.getNewPosition(t.pos[0],t.pos[1],n):t.options.defaultPos),t.setZoom(n),t.setPos(a),t.setTransitionDuration(.05)},this.handleMouseWheel=A=>{var e,t;if(A.preventDefault(),!this.options.allowZoom||!this.options.allowWheel)return;const i=A.deltaY<0?this.options.scrollVelocity:0-this.options.scrollVelocity,n=parseFloat(Math.max(Math.min(this.zoom+i,null!==(e=this.options.maxZoom)&&void 0!==e?e:8),null!==(t=this.options.minZoom)&&void 0!==t?t:1).toFixed(this.getPrecision(this.options.zoomStep)));this.setZoom(n),this.setPos(this.pos),this.setTransitionDuration(.05)},this.handleMouseStart=A=>{var e;A.preventDefault(),this.options.allowPan&&!(null===(e=this.options.ignoredMouseButtons)||void 0===e?void 0:e.includes(A.button))&&(this.lastRequestAnimationId&&cancelAnimationFrame(this.lastRequestAnimationId),this.lastCursor=[A.pageX,A.pageY])},this.handleMouseMove=A=>{if(A.preventDefault(),!this.options.allowPan||!this.lastCursor)return;const[e,t]=[A.pageX,A.pageY],i=e-this.lastCursor[0],n=t-this.lastCursor[1];this.move(i,n,0),this.lastCursor=[e,t],this.lastShift=[i,n]},this.handleMouseStop=A=>{A.preventDefault(),this.lastShift&&(this.startDeceleration(this.lastShift[0],this.lastShift[1]),this.lastShift=null),this.lastCursor=null,this.setCursor("auto")},this.getCoordinates=A=>this.transform?[A.pageY,window.innerWidth-A.pageX]:[A.pageX,A.pageY],this.handleTouchStart=A=>{const e=this.isDoubleTapping();this.isMultiTouch=A.touches.length,this.options.allowTouchEvents||A.preventDefault(),this.lastRequestAnimationId&&cancelAnimationFrame(this.lastRequestAnimationId);const[t,i]=this.getCoordinates(A.touches[0]);this.isMultiTouch>1?this.lastTouch=[t,i]:e&&this.options.allowZoom?1===this.zoom?this.fullZoomInOnPosition(t,i):this.reset():this.options.allowPan&&(this.lastTouch=[t,i])},this.handleTouchMove=A=>{var e,t,i,n;if(this.options.allowTouchEvents||A.preventDefault(),this.lastTouch)if(1===this.isMultiTouch){const[e,t]=this.getCoordinates(A.touches[0]);let i=e-this.lastTouch[0],n=t-this.lastTouch[1];this.move(i,n),this.lastShift=[i,n],this.lastTouch=[e,t],this.lastTouchDistance=null}else if(this.isMultiTouch>1){let a=this.zoom;const[r,o]=this.getCoordinates(A.touches[0]),[s,g]=this.getCoordinates(A.touches[1]),l=Math.sqrt(Math.pow(s-r,2)+Math.pow(g-o,2));if(this.lastTouchDistance&&l&&l!==this.lastTouchDistance){this.options.allowZoom&&(a+=(l-this.lastTouchDistance)/100,a>(null!==(e=this.options.maxZoom)&&void 0!==e?e:8)?a=null!==(t=this.options.maxZoom)&&void 0!==t?t:8:a<(null!==(i=this.options.minZoom)&&void 0!==i?i:1)&&(a=null!==(n=this.options.minZoom)&&void 0!==n?n:1));const[A,c]=[(r+s)/2,(o+g)/2],d=this.getNewPosition(A,c,a);this.setZoom(a),this.setPos(d),this.setTransitionDuration(0)}this.lastTouch=[r,o],this.lastTouchDistance=l}},this.handleTouchStop=()=>{this.lastShift&&(this.startDeceleration(this.lastShift[0],this.lastShift[1]),this.lastShift=null),this.lastTouch=null,this.lastTouchDistance=null,this.isMultiTouch=0},this.container=A,this.options=Object.assign({},zd,e||{}),this.pos=[0,0],this.percentPos=[0,0],this.transition=this.options.animDuration,this.zoom=1,this.cursor="auto",this.lastCursor=[0,0],this.lastShift=null,this.lastTouch=null,this.lastTouchDistance=null,this.lastRequestAnimationId=null,this.lastTouchTime=(new Date).getTime(),this.lastDoubleTapTime=(new Date).getTime(),this.transform=!1,this.isMultiTouch=1,this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseStart=this.handleMouseStart.bind(this),this.handleMouseStop=this.handleMouseStop.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchStop=this.handleTouchStop.bind(this),this.getZoom=this.getZoom.bind(this),this.setZoom=this.setZoom.bind(this),this.containerResizeObserver=new ResizeObserver((A=>{for(let e of A)this.pos=[e.contentRect.width*this.percentPos[0],e.contentRect.height*this.percentPos[1]]}))}setUpEventListeners(){const A=this.container,e=window.matchMedia("(pointer: fine)").matches;null==A||A.addEventListener("wheel",this.handleMouseWheel,{passive:!1}),this.containerResizeObserver.observe(A),e?(null==A||A.addEventListener("mousedown",this.handleMouseStart,{passive:!1}),null==A||A.addEventListener("mousemove",this.handleMouseMove,{passive:!1}),null==A||A.addEventListener("mouseup",this.handleMouseStop,{passive:!1}),null==A||A.addEventListener("mouseleave",this.handleMouseStop,{passive:!1})):(null==A||A.addEventListener("touchstart",this.handleTouchStart,{passive:!1}),null==A||A.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),null==A||A.addEventListener("touchend",this.handleTouchStop,{passive:!1}),null==A||A.addEventListener("touchcancel",this.handleTouchStop,{passive:!1}))}removeEventListeners(){const A=this.container,e=window.matchMedia("(pointer: fine)").matches;null==A||A.removeEventListener("wheel",this.handleMouseWheel),this.containerResizeObserver.unobserve(A),e?(null==A||A.removeEventListener("mousedown",this.handleMouseStart),null==A||A.removeEventListener("mousemove",this.handleMouseMove),null==A||A.removeEventListener("mouseup",this.handleMouseStop),null==A||A.removeEventListener("mouseleave",this.handleMouseStop)):(null==A||A.removeEventListener("touchstart",this.handleTouchStart),null==A||A.removeEventListener("touchmove",this.handleTouchMove),null==A||A.removeEventListener("touchend",this.handleTouchStop),null==A||A.removeEventListener("touchcancel",this.handleTouchStop))}getPrecision(){var A=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1).toString();return-1!==A.indexOf(".")?A.split(".")[1].length:1}};const AI={maxZoom:8,minZoom:1,onZoomChange:()=>{}};let eI=class{constructor(A,e){var t=this;this.setTransform=A=>{this.Zoom.setTransform(A)},this.startZoom=()=>{const A=document.getElementById(`${this.options.id}-zoom-container`);A&&(A.style.display="block"),this.Zoom.setAllowZoom(!0),this.Zoom.setUpEventListeners()},this.stopZoom=()=>{const A=document.getElementById(`${this.options.id}-zoom-container`);A&&(A.style.display="none"),this.Zoom.setAllowZoom(!1),this.Zoom.reset(),this.Zoom.removeEventListeners()},this.addScale=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.Zoom.handleZoomAdd(A)},this.subScale=function(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.Zoom.handleZoomSub(A)},this.container=A,this.options=Object.assign({},AI,e||{}),this.Zoom=new $d(this.container,Object.assign(Object.assign({},this.options),{allowZoom:!1,onZoomChange:(A,e)=>{this.renderDot(A),this.options.onZoomChange&&this.options.onZoomChange(A,e)}}));const i=document.createElement("div");i.id=`${this.options.id}-zoom-container`;const n=document.getElementById(`${this.options.id}-audioControls`);let a=48;n&&(a=n.offsetHeight);const r=this.options.isMobile?"\n -webkit-transform: scale(0.8);\n -moz-transform: scale(0.8);\n -ms-transform: scale(0.8);\n transform: scale(0.8);\n transform-origin: left bottom;":"";i.style.cssText=`position: absolute;\n display:none;\n left: 12px;\n bottom: ${this.options.isMobile?`${a+6}px`:"102px"};\n ${r}\n `;const o=`\n \n
1.0X
\n
\n \n \n ${this.options.i18n.t("ZOOM_ADD")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n \n ${this.options.i18n.t("ZOOM_SUB")}\n \n \n \n \n \n \n \n \n \n \n
\n \n `;i.innerHTML=o;const s=document.getElementById(`${this.options.id}-audioControls`);if(s){s.parentNode&&s.parentNode.appendChild(i);const A=document.getElementById(`${this.options.id}-addScale`);A&&(A.onclick=()=>{this.addScale()});const e=document.getElementById(`${this.options.id}-subScale`);e&&(e.onclick=()=>{this.subScale()})}this.startZoom=this.startZoom.bind(this),this.stopZoom=this.stopZoom.bind(this),this.addScale=this.addScale.bind(this),this.subScale=this.subScale.bind(this),this.setTransform=this.setTransform.bind(this)}renderDot(A){const e=document.getElementById(`${this.options.id}-scale-value`);e&&(e.innerHTML=`${parseFloat(A).toFixed(1)}X`);const t=document.getElementById(`${this.options.id}-line-dot`);t&&(t.style.height=(parseFloat(A)-1)/7*100+"%");const i=document.getElementById(`${this.options.id}-scale-body-line-dot`);i&&(i.style.bottom=`calc(${(parseFloat(A)-1)/7*100}% - 3px)`)}};var tI={0:"VIDEO_LEVEL_FLUENT",1:"VIDEO_LEVEL_SATNDARD",2:"VIDEO_LEVEL_HEIGH",3:"VIDEO_LEVEL_SPUER",4:"VIDEO_LEVEL_EXTREME",5:"VIDEO_LEVEL_3K",6:"VIDEO_LEVEL_4k"},iI=function(A,e,t,i){var n=A.env.domain+"/api/service/media/template/getDetail?accessToken="+(A.accessToken||A.token.httpToken.url)+"&id="+e;A.logger.log("[https request] templateDetailApi()",n),fetch(n,{method:"GET"}).then((function(A){return A.json()})).then((function(e){try{var i,n;null==(n=A.logger)||null==(i=n.log)||i.call(n,"[https response] templateDetailApi()",JSON.stringify(e))}catch(A){}var a;(a=e).meta&&t(a)})).catch((function(A){i(A)}))};function nI(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,i=new Array(e);t=A.length?{done:!0}:{done:!1,value:A[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var oI=function(A){var e="";return Object.keys(A).map((function(t,i){e+=t+":"+A[t]+(i0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById(this.jSPlugin.id+"-wrap").addEventListener("click",(function(){document.getElementById(t.jSPlugin.id+"-audioControls")&&(document.getElementById(t.jSPlugin.id+"-audioControls").style.opacity=1,document.getElementById(t.jSPlugin.id+"-audioControls").style.pointerEvents="all"),document.getElementById(t.jSPlugin.id+"-headControl")&&(document.getElementById(t.jSPlugin.id+"-headControl").style.opacity=1,document.getElementById(t.jSPlugin.id+"-headControl").style.pointerEvents="all"),t.startAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===g(this.jSPlugin.url).type,rec:"rec"===g(this.jSPlugin.url).type,type:g(this.jSPlugin.url).type});else if(!this.themeInited)var r=setInterval((function(){window.EZUIKit[t.jSPlugin.id].state.EZUIKitPlayer.init&&t.jSPlugin.autoplay&&(clearInterval(r),t.themeInited=!0)}),50);Hc(this.themeData.footer.btnList,(function(A){return"zoom"===A.iconId&&A.isrender>0}))>=0&&(this.isMobile&&!this.jSPlugin.use3DZoom&&(this.jSPlugin.beforeMobileZoomVerify=function(){return!!t.decoderState.state.play}),this.jSPlugin.logger.log("[Zoom]","init"),this.jSPlugin.Zoom=new eI(document.getElementById(this.jSPlugin.id+"-container-0"),aI({},this.jSPlugin,{onZoomChange:function(A,e){A<=8&&A>=1&&t.jSPlugin.eventEmitter.emit(id.zoom.onZoomChange,{zoom:A,reset:e}),A>=8&&!e&&t.jSPlugin.Message&&t.jSPlugin.Message.default(t.jSPlugin.i18n.t("ZOOM_ADD_MAX"),document.getElementById(""+t.jSPlugin.id)),A<=1&&!e&&t.jSPlugin.Message&&t.jSPlugin.Message.default(t.jSPlugin.i18n.t("ZOOM_SUB_MIN"),document.getElementById(""+t.jSPlugin.id))}})));var o,s=0;document.getElementById(this.jSPlugin.id+"-canvas-container")&&(s=parseInt((null==(o=document.getElementById(this.jSPlugin.id+"-canvas-container"))?void 0:o.clientHeight)+"",10));null==(e=this.jSPlugin)||null==(A=e.jSPlugin)||A.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-s,!0)},e.setDecoderState=function(A,e){var t=this;void 0===e&&(e=!0);var i=this.themeData,n=i.header,a=i.footer;Object.keys(A).map((function(i,r){var o="#FFFFFF",s="#FFFFFF";switch(-1===n.btnList.findIndex((function(A){return A.iconId===i}))?(o=a.color.replace("-diy",""),s=a.activeColor.replace("-diy","")):(o=n.color.replace("-diy",""),s=a.activeColor.replace("-diy","")),i){case"play":A[i]?document.getElementById(t.jSPlugin.id+"-play")&&(document.getElementById(t.jSPlugin.id+"-play-content").children[0].children[0].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-play-content").children[0].children[1].style="display:none",document.getElementById(t.jSPlugin.id+"-play").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-play-content").childNodes[0].children[0].style.fill=A[i]?s:o):document.getElementById(t.jSPlugin.id+"-play")&&(document.getElementById(t.jSPlugin.id+"-play-content").children[0].children[1].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-play-content").children[0].children[0].style="display:none",document.getElementById(t.jSPlugin.id+"-play").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-play-content").childNodes[0].children[1].style.fill=A[i]?s:o);break;case"sound":document.getElementById(t.jSPlugin.id+"-sound")&&(A[i]?(document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[1].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[0].style="display:none",document.getElementById(t.jSPlugin.id+"-sound").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-sound-content").childNodes[0].children[1].style.fill=A[i]?s:o):(document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[0].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[1].style="display:none",document.getElementById(t.jSPlugin.id+"-sound").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-sound-content").childNodes[0].children[0].style.fill=A[i]?s:o));break;case"recordvideo":document.getElementById(t.jSPlugin.id+"-recordvideo")&&(document.getElementById(t.jSPlugin.id+"-recordvideo").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-recordvideo-content").childNodes[0].style.fill=A[i]?s:o,A[i]?t.countTime("add",0):t.countTime("destroy",0));break;case"talk":document.getElementById(t.jSPlugin.id+"-talk")&&(document.getElementById(t.jSPlugin.id+"-talk").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-talk-content").childNodes[1].style.fill=A[i]?s:o);break;case"zoom":document.getElementById(t.jSPlugin.id+"-zoom")&&(document.getElementById(t.jSPlugin.id+"-zoom").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-zoom-content").childNodes[1].style.fill=A[i]?s:o);break;case"pantile":document.getElementById(t.jSPlugin.id+"-pantile")&&(document.getElementById(t.jSPlugin.id+"-pantile").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-pantile-content").childNodes[0].style.fill=A[i]?s:o);break;case"webExpend":A[i]?(document.getElementById(t.jSPlugin.id+"-webExpend")&&(document.getElementById(t.jSPlugin.id+"-webExpend-content").children[0].children[1].style="display:inline-flex",document.getElementById(t.jSPlugin.id+"-webExpend-content").children[0].children[0].style="display:none"),document.getElementById(t.jSPlugin.id+"-expend")&&(document.getElementById(t.jSPlugin.id+"-expend").className="disabled")):(document.getElementById(t.jSPlugin.id+"-webExpend")&&(document.getElementById(t.jSPlugin.id+"-webExpend-content").children[0].children[0].style="display:inline-flex",document.getElementById(t.jSPlugin.id+"-webExpend-content").children[0].children[1].style="display:none"),document.getElementById(t.jSPlugin.id+"-expend")&&(document.getElementById(t.jSPlugin.id+"-expend").className="")),document.getElementById(t.jSPlugin.id+"-webExpend")&&(document.getElementById(t.jSPlugin.id+"-webExpend").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-webExpend-content").childNodes[0].childNodes[0].style.fill=A[i]?s:o,document.getElementById(t.jSPlugin.id+"-webExpend-content").childNodes[0].childNodes[1].style.fill=A[i]?s:o);break;case"capturePicture":document.getElementById(t.jSPlugin.id+"-capturePicture")&&(document.getElementById(t.jSPlugin.id+"-capturePicture").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-capturePicture-content").childNodes[0].style.fill=A[i]?s:o);break;case"expend":A[i]?(document.getElementById(t.jSPlugin.id+"-expend")&&(document.getElementById(t.jSPlugin.id+"-expend-content").children[0].children[1].style="display:inline-flex",document.getElementById(t.jSPlugin.id+"-expend-content").children[0].children[0].style="display:none"),document.getElementById(t.jSPlugin.id+"-webExpend")&&(document.getElementById(t.jSPlugin.id+"-webExpend").className="disabled")):(document.getElementById(t.jSPlugin.id+"-expend")&&(document.getElementById(t.jSPlugin.id+"-expend-content").children[0].children[0].style="display:inline-flex",document.getElementById(t.jSPlugin.id+"-expend-content").children[0].children[1].style="display:none"),document.getElementById(t.jSPlugin.id+"-webExpend")&&(document.getElementById(t.jSPlugin.id+"-webExpend").className="")),document.getElementById(t.jSPlugin.id+"-expend")&&(document.getElementById(t.jSPlugin.id+"-expend").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-expend-content").childNodes[0].childNodes[0].style.fill=A[i]?s:o,document.getElementById(t.jSPlugin.id+"-expend-content").childNodes[0].childNodes[1].style.fill=A[i]?s:o);break;case"hd":break;case"speed":if(document.getElementById(t.jSPlugin.id+"-speed")){var g=document.getElementById(t.jSPlugin.id+"-speed-content").children[1].children[0];"not-allowed"!==g.style.cursor&&(g.style.color=A[i]?s:o,g.style.borderColor=A[i]?s:o)}document.getElementById(t.jSPlugin.id+"-select-mask")&&(t.isMobile&&A[i]?document.getElementById(t.jSPlugin.id+"-select-mask").style.display="block":document.getElementById(t.jSPlugin.id+"-select-mask").style.display="none");break;case"cloudRec":document.getElementById(t.jSPlugin.id+"-cloudRec")&&(document.getElementById(t.jSPlugin.id+"-cloudRec").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-cloudRec-content").children[0].children[0].style.fill=A[i]?s:o),document.getElementById(t.jSPlugin.id+"-rec")&&(document.getElementById(t.jSPlugin.id+"-rec").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-rec-content").children[0].children[0].style.fill=A[i]?o:s);break;case"cloudRecord":var l=document.getElementById(t.jSPlugin.id+"-cloudRecord");l&&(l.className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-cloudRecord-content").children[0].children[0].style.fill=A[i]?s:o),document.getElementById(t.jSPlugin.id+"-rec")&&(document.getElementById(t.jSPlugin.id+"-rec").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-rec-content").children[0].children[0].style.fill=A[i]?o:s);break;case"rec":document.getElementById(t.jSPlugin.id+"-cloudRec")&&(document.getElementById(t.jSPlugin.id+"-cloudRec").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-cloudRec-content").children[0].children[0].style.fill=A[i]?o:s),document.getElementById(t.jSPlugin.id+"-cloudRecord")&&(document.getElementById(t.jSPlugin.id+"-cloudRecord").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-cloudRecord-content").children[0].children[0].style.fill=A[i]?o:s),document.getElementById(t.jSPlugin.id+"-rec")&&(document.getElementById(t.jSPlugin.id+"-rec").className=A[i]?"active":"",document.getElementById(t.jSPlugin.id+"-rec-content").children[0].children[0].style.fill=A[i]?s:o)}e&&(t.decoderState.state=Object.assign(t.decoderState.state,A))}))},e.startAutoFocus=function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById(A.jSPlugin.id+"-audioControls")&&(document.getElementById(A.jSPlugin.id+"-audioControls").style.opacity=0,document.getElementById(A.jSPlugin.id+"-audioControls").style.pointerEvents="none"),document.getElementById(A.jSPlugin.id+"-headControl")&&(document.getElementById(A.jSPlugin.id+"-headControl").style.opacity=0,document.getElementById(A.jSPlugin.id+"-headControl").style.pointerEvents="none")}),1e3*e)},e.stopAutoFocus=function(){document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.opacity=1,document.getElementById(this.jSPlugin.id+"-audioControls").style.pointerEvents="all"),document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-headControl").style.opacity=1,document.getElementById(this.jSPlugin.id+"-headControl").style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer)},e.hideFooter=function(){document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.display="none")},e.showFooter=function(){document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.display="block")},e.toString=function(){return this.coreX+"-"+this.coreY},e.renderFooter=function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.innerHTML='
'+t.domString+"
",i.onclick=function(A){t.onclick(A)},t.onmouseenter&&(i.onmouseenter=function(A){t.onmouseenter(A)}),t.onmouseleave&&(i.onmouseleave=function(A){t.onmouseleave(A)}),"left"===e?document.getElementById(this.jSPlugin.id+"-audioControls").childNodes[0].appendChild(i):document.getElementById(this.jSPlugin.id+"-audioControls").childNodes[1].appendChild(i)},e.renderHeader=function(A,e){var t=this.matchBtn(A),i=document.createElement("div");i.className="theme-icon-item",i.style="max-width:50%;",i.innerHTML=''+t.domString+"",i.onclick=function(A){t.onclick(A)},"left"===e?document.getElementById(this.jSPlugin.id+"-headControl").childNodes[0].appendChild(i):document.getElementById(this.jSPlugin.id+"-headControl").childNodes[1].appendChild(i)},e.countTime=function(A,e){void 0===e&&(e=0);var t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='00:00',document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",r="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),r=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?r+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))},e.setDisabled=function(A){var e=this.decoderState.state,t=e.sound,i=e.expend,n=A?"cursor: not-allowed; color: gray; fill: gray; ":"cursor: default";null!=document.getElementById(t?this.jSPlugin.id+"-sound-icon":this.jSPlugin.id+"-nosound-icon")&&document.getElementById(t?this.jSPlugin.id+"-sound-icon":this.jSPlugin.id+"-nosound-icon").setAttribute("style",A?"cursor: not-allowed; color: gray; fill: gray;":"cursor: default"),null!=document.getElementById(this.jSPlugin.id+"-recordvideo-icon")&&document.getElementById(this.jSPlugin.id+"-recordvideo-icon").setAttribute("style",n),null!=document.getElementById(this.jSPlugin.id+"-capturePicture-icon")&&document.getElementById(this.jSPlugin.id+"-capturePicture-icon").setAttribute("style",n),null!=document.getElementById(this.jSPlugin.id+"-talk-icon")&&document.getElementById(this.jSPlugin.id+"-talk-icon").setAttribute("style",n),null!=document.getElementById(i?this.jSPlugin.id+"-unexpend-icon":this.jSPlugin.id+"-expend-icon")&&document.getElementById(i?this.jSPlugin.id+"-unexpend-icon":this.jSPlugin.id+"-expend-icon").setAttribute("style",n),document.getElementById(this.jSPlugin.id+"-pantile-icon")&&"none"!=document.getElementById(this.jSPlugin.id+"-pantile-icon").style.display&&document.getElementById(this.jSPlugin.id+"-pantile-icon").setAttribute("style",n);var a=document.getElementsByClassName(this.jSPlugin.id+"-select-quality-btn");if(a.length)for(var r=0;r',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.rec,n=A.cloudRec,a=A.recordvideo,r=A.pantile,o=A.expend,s=A.talk,g=Cd.getGlobalState(),l=Cd.getInstance(e.jSPlugin.id);window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),t?(i||n?e.jSPlugin.pause():(e.jSPlugin.stop((function(){}),!0),s&&(e.setDecoderState({talk:!1}),document.getElementById(e.jSPlugin.id+"-volume-column")&&(document.getElementById(e.jSPlugin.id+"-volume-column").style.display="none"),e.jSPlugin.Talk.stopTalk(),g.talk&&Cd.setGlobalState({talk:!1}),l.getState().talk&&l.setState({talk:!1}))),a&&e.setDecoderState({recordvideo:!1})):(i||n?e.jSPlugin.resume().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:o})})):e.jSPlugin.play().then((function(){e.setDisabled(t),e.setDecoderState({play:!t,expend:o})})),e.jSPlugin.use3DZoom&&e.resetMobileZoomStatus()),e.jSPlugin.use3DZoom?(e.setDecoderState({zoom:!1}),e.allowZoom=!1):e.allowZoom=i||n,r&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),document.getElementById(e.jSPlugin.id+"-speedSelect")&&(document.getElementById(e.jSPlugin.id+"-speedSelect").style.display="none"),e.setDecoderState({speed:!1})};break;case"sound":a.title=this.jSPlugin.i18n.t("BTN_SOUND"),a.id=A,a.domString='\n \n \n \n \n ',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.sound,n=A.talk,a=A.pantile;t&&!n&&(i?(e.jSPlugin.closeSound(),e.setDecoderState({sound:!1})):e.jSPlugin.openSound(),a&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})))};break;case"recordvideo":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_RECORDVIDEO"),a.id=A,a.domString='',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.recordvideo;t&&(i?e.jSPlugin.stopSave(e.jSPlugin.downloadRecord):e.jSPlugin.startSave(""+(new Date).getTime()))};break;case"capturePicture":a.title=this.jSPlugin.i18n.t("BTN_CAPTURE"),a.id=A,a.domString='',a.onclick=function(){e.decoderState.state.play&&e.jSPlugin.capturePicture(""+(new Date).getTime(),(function(){}),e.jSPlugin.download)};break;case"talk":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_TALK"),a.id=A,a.domString='
sI?8:5)+"px; position: absolute; left: "+(this.jSPlugin.width>sI?20:13)+"px; top: "+(this.jSPlugin.width>sI?14:9)+'px; border-radius: 50%; overflow:hidden;">
',this.jSPlugin.eventEmitter.on("volumeChange",(function(A){var t=A.data;document.getElementById(e.jSPlugin.id+"-volume-column")&&(document.getElementById(e.jSPlugin.id+"-volume-column").style.height=100*t+"%")})),a.onclick=function(){var A=e.decoderState.state,t=A.talk;A.play&&(t?e.jSPlugin.stopTalk():e.jSPlugin.startTalk())};break;case"zoom":if(o)break;a.title=this.jSPlugin.use3DZoom?this.jSPlugin.i18n.t("BTN_3D_ZOOM"):this.jSPlugin.i18n.t("BTN_ZOOM"),a.id=A,a.domString='
\n \n \n \n \n ',a.onclick=function(){var A=e.decoderState.state,t=A.zoom,i=A.play;if(e.jSPlugin.use3DZoom){if(!i)return!1;t?e.jSPlugin.close3DZoom():e.jSPlugin.enable3DZoom()}else{if(e.zoomDisable)return!1;t?e._stopZoom():e._startZoom()}e.setDecoderState({zoom:!t})};break;case"pantile":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_PTZ"),a.id=A,a.domString='',a.onclick=function(){var A=e.decoderState.state,t=A.play,i=A.pantile,n=A.expend;if(t)if(i)e.Ptz.hide(),e.setDecoderState({pantile:!1});else{if(e.isMobile&&!n)return!1;e.Ptz.show(),e.setDecoderState({pantile:!0})}};break;case"expend":a.title=this.jSPlugin.i18n.t("BTN_EXPEND"),a.id=A,a.domString='\n ',a.onclick=function(){var A=e.decoderState.state,t=A.expend,i=A.pantile;if(A.play)if(t)if(e.isMobile){var n=e._extendHeadeTimeLinrHight(!0);document.getElementById(e.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(e.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop="-32px"),document.getElementById(e.jSPlugin.id+"-select-speed")&&(document.getElementById(e.jSPlugin.id+"-select-speed").style.background="#ffffff"),function(A,e,t){var i="";i+="width:"+e+"px;",i+="height:"+t+"px;",i+="-webkit-transform: none; transform: none;",i+="-webkit-transform-origin: 0 0;",i+="transform-origin: 0 0;",i+="position: relative;",A.style.cssText=i}(document.getElementById(e.jSPlugin.id+"-wrap"),e.jSPlugin.width,e.jSPlugin.height),document.getElementById(e.jSPlugin.id+"-wrap").classList.remove("ezuikit-player-wrap-mobile-fullscreen"),e.jSPlugin.jSPlugin.JS_Resize(e.jSPlugin.width,e.jSPlugin.height-n),i&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1})),e.jSPlugin.fullScreenWidth=e.jSPlugin.width,e.jSPlugin.fullScreenHeight=e.jSPlugin.height,e.jSPlugin.Zoom&&e.jSPlugin.Zoom.setTransform(!t),document.getElementById(e.jSPlugin.id+"-pantile-icon")&&(document.getElementById(e.jSPlugin.id+"-pantile-icon").style.display="none"),document.getElementById(e.jSPlugin.id+"-hdSelect")&&(document.getElementById(e.jSPlugin.id+"-hdSelect").style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById(e.jSPlugin.id+"-hdSelect").style.bottom="calc(env(safe-area-inset-bottom) + 100px)",document.getElementById(e.jSPlugin.id+"-hdSelect").style.height=45*(e.jSPlugin.videoLevelList||[]).length+"px"),e.setDecoderState({expend:!1})}else e.jSPlugin.exitFullscreen();else if(e.isMobile){var a,r=e._extendHeadeTimeLinrHight(!0);s(document.getElementById(e.jSPlugin.id+"-wrap")),document.getElementById(e.jSPlugin.id+"-wrap").classList.add("ezuikit-player-wrap-mobile-fullscreen");var o=document.documentElement.clientWidth,g=document.documentElement.clientHeight;document.getElementById(""+e.jSPlugin.id)&&(document.getElementById(""+e.jSPlugin.id).style["backface-visibility"]="hidden"),document.getElementById(e.jSPlugin.id+"-select-speed")&&(document.getElementById(e.jSPlugin.id+"-select-speed").style.background="none"),e.jSPlugin.jSPlugin.JS_Resize(g,o-r,!0),e.jSPlugin.fullScreenWidth=g,e.jSPlugin.fullScreenHeight=o-r,e.jSPlugin.Zoom&&(null==(a=e.jSPlugin.Zoom)||a.setTransform(!t)),document.getElementById(e.jSPlugin.id+"-pantile-icon")&&(document.getElementById(e.jSPlugin.id+"-pantile-icon").style.display="block"),document.getElementById(e.jSPlugin.id+"-hdSelect")&&(document.getElementById(e.jSPlugin.id+"-hdSelect").style.bottom=0,document.getElementById(e.jSPlugin.id+"-hdSelect").style.height="100%"),e.setDecoderState({expend:!0})}else e.jSPlugin.fullscreen()};break;case"webExpend":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_WEBEXPEND"),a.id=A,a.domString='',a.onclick=function(){var A,t=e.decoderState.state,i=t.webExpend;if(t.expend)return!1;window.recTimer&&Array.isArray(window.recTimer[e.jSPlugin.id])&&(window.recTimer[e.jSPlugin.id].map((function(A){clearInterval(A)})),window.recTimer[e.jSPlugin.id]=[]),i?e.jSPlugin.exitBrowserFullscreen():e.jSPlugin.browserFullscreen(),(null==(A=e.jSPlugin.Theme)?void 0:A.Rec)&&setTimeout((function(){e.jSPlugin.Theme.Rec.recAutoSize()}),100)};break;case"hd":if(o)break;var l=this.jSPlugin.id+"-select-quality";return a.title=this.jSPlugin.i18n.t("BTN_HD"),a.id=A,a.onclick=function(A){var t=e.decoderState.state,i=t.expend,n=t.recordvideo,a=t.play,r=t.zoom,o=t.pantile,s=t.sound,g=t.talk;if(A.stopPropagation(),a){var c=A.target.id,d=A.target.getAttribute("data-type");if(0===c.indexOf(l)){if(e.jSPlugin.videoLevel+""!==d){if(g){var I=Cd.getGlobalState(),C=Cd.getInstance(e.jSPlugin.id);e.setDecoderState({talk:!1}),document.getElementById(e.jSPlugin.id+"-volume-column")&&(document.getElementById(e.jSPlugin.id+"-volume-column").style.display="none"),e.jSPlugin.Talk.stopTalk(),I.talk&&Cd.setGlobalState({talk:!1}),C.getState().talk&&C.setState({talk:!1})}var h=(e.jSPlugin.videoLevelList||[]).find((function(A){return A.level+""===d}));!h||h.streamTypeIn===e.jSPlugin.streamTypeIn&&h.level+""==e.jSPlugin.videoLevel+""||(e.jSPlugin.changeVideoLevel(h).then((function(A){s&&e.jSPlugin.openSound()})),r&&(e._stopZoom(),e.setDecoderState({zoom:!1})))}e.resetMobileZoomStatus(),n&&e.setDecoderState({recordvideo:!1})}e.showHD=!e.showHD,document.getElementById(e.jSPlugin.id+"-hdSelect")&&(document.getElementById(e.jSPlugin.id+"-hdSelect").style.display="none"===document.getElementById(e.jSPlugin.id+"-hdSelect").style.display?"block":"none",e.isMobile&&(document.getElementById(e.jSPlugin.id+"-select-hd-mask").style.display="none"===document.getElementById(e.jSPlugin.id+"-select-hd-mask").style.display?"block":"none"),e.themeData.autoFocus>0&&("none"===document.getElementById(e.jSPlugin.id+"-hdSelect").style.display?e.startAutoFocus():e.stopAutoFocus())),e.isMobile&&i&&e.showHD?document.getElementById(e.jSPlugin.id+"-hdSelect").className="hd speed-select mobile expend":document.getElementById(e.jSPlugin.id+"-hdSelect").className=e.isMobile?"hd speed-select mobile":"speed-select",o&&e.Ptz&&(e.Ptz.hide(),e.setDecoderState({pantile:!1}))}},setTimeout((function(){e.___renderVideoLevelList(e.jSPlugin.videoLevelList),e.__renderCurrentVideoLevel(e.jSPlugin.videoLevel)}),1e3),a;case"speed":if(o)break;a.title=this.jSPlugin.i18n.t("BTN_SPEED"),a.id=A,a.domString='\n
'+(1===this.nextRate?this.jSPlugin.i18n.t("SPEED"):(""+this.nextRate+this.jSPlugin.i18n.t("SPEED_RATE")).replace("3","0.5"))+'
\n
',a.onclick=function(A){var t=e.decoderState.state,i=t.speed,n=t.expend,a=t.play;if(A.stopPropagation(),!a)return!1;if(!i&&e.isMobile&&(document.getElementById(e.jSPlugin.id+"-speedSelect").className=n?"speed speed-select mobile expend":"speed speed-select mobile"),e.isMobile&&(n?(document.getElementById(e.jSPlugin.id+"-speedSelect").style.bottom="constant(safe-area-inset-bottom)",document.getElementById(e.jSPlugin.id+"-speedSelect").style.bottom="env(safe-area-inset-bottom)"):(document.getElementById(e.jSPlugin.id+"-speedSelect").style.bottom="calc(constant(safe-area-inset-bottom) + 100px)",document.getElementById(e.jSPlugin.id+"-speedSelect").style.bottom="calc(env(safe-area-inset-bottom) + 100px)")),e.nextRate=1,A.target.id)switch(A.target.id){case e.jSPlugin.id+"-select-speed1":e.nextRate=1,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(1),e.jSPlugin.speed=1,e.setDecoderState({speed:!i});break;case e.jSPlugin.id+"-select-speed2":e.nextRate=2,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(2),e.jSPlugin.speed=2,e.setDecoderState({speed:!i});break;case e.jSPlugin.id+"-select-speed4":e.nextRate=4,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(4),e.jSPlugin.speed=4,e.setDecoderState({speed:!i});break;case e.jSPlugin.id+"-select-speed05":e.nextRate=3,e.jSPlugin.jSPlugin.JS_Speed(e.nextRate),e.changeRecSpeed(.5),e.jSPlugin.speed=.5,e.setDecoderState({speed:!i});break;default:e.isMobile?e.setDecoderState({speed:!i}):e.setDecoderState({speed:!0})}e.isMobile&&A.target.id===e.jSPlugin.id+"-speed-text"?document.getElementById(e.jSPlugin.id+"-speedSelect").style.display="block":document.getElementById(e.jSPlugin.id+"-speedSelect")&&(document.getElementById(e.jSPlugin.id+"-speedSelect").style.display="none"===document.getElementById(e.jSPlugin.id+"-speedSelect").style.display?"block":"none"),e.setDecoderState({speed:!i}),e.themeData.autoFocus>0&&("none"===document.getElementById(e.jSPlugin.id+"-speedSelect").style.display?e.startAutoFocus():e.stopAutoFocus())};break;case"deviceName":a.title=this.jSPlugin.i18n.t("DEVICE_NAME"),a.id=A,a.domString=""+this.jSPlugin.i18n.t("DEVICE_NAME")+"",a.onclick=function(){};break;case"deviceID":a.title=this.jSPlugin.i18n.t("DEVICE_ID"),a.id=A,a.domString=""+this.jSPlugin.i18n.t("DEVICE_ID")+"",a.onclick=function(){};break;case"cloudRec":if(this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDREC"),a.id=A,a.domString='\n \n \n\t\n\t\n\t\n \n \n ',a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit(id.recTypeChange,{eventType:"cloud",code:0,data:{type:"cloud"}}),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e._stopZoom(),e.jSPlugin.close3DZoom()),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){var A,t,i=r("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");null==(t=e.Rec)||null==(A=t.renderRec)||A.call(t,i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8)),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"cloudRecord":var c=this.jSPlugin.width>sI?48:32,d=this.jSPlugin.width>sI?56:39,I=this.jSPlugin.width>sI?24:18;if(!this.jSPlugin._isCloudRecord)break;a.title=this.jSPlugin.i18n.t("BTN_CLOUDRECORD"),a.id=A,a.domString='\n\n\n\t\n\t\n\t\n\t',a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),e.jSPlugin.eventEmitter.emit(id.recTypeChange,{eventType:"cloudRecord",code:0,data:{type:"cloudRecord"}}),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e._stopZoom(),e.jSPlugin.close3DZoom()),e.jSPlugin.changePlayUrl({type:"cloud.rec"},(function(){var A,t;e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var i=r("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");null==(t=e.Rec)||null==(A=t.renderRec)||A.call(t,i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8)),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))};break;case"rec":a.title=this.jSPlugin.i18n.t("BTN_REC"),a.id=A,a.domString='\n \n \n \n\n\n\n \n \n ',a.onclick=function(){var A=e.decoderState.state.sound;e.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),e.jSPlugin.eventEmitter.emit(id.recTypeChange,{eventType:"local",code:0,data:{type:"local"}}),e.decoderState.state.zoom&&(e.setDecoderState({zoom:!1}),e._stopZoom(),e.jSPlugin.close3DZoom()),e.jSPlugin.changePlayUrl({type:"rec"},(function(){var A,t;e.jSPlugin._isCloudRecord&&e.changeTheme("pcRec");var i=r("begin",e.jSPlugin.url)||(new Date).Format("yyyyMMdd");null==(t=e.Rec)||null==(A=t.renderRec)||A.call(t,i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8)),e.Rec&&e.Rec.syncTimeLine()}),!1).then((function(){A&&e.jSPlugin.openSound()}))}}return a},e._videoLevelIcon=function(A,e,t,i,n){return'\n i?48:32)+"px;line-height: "+(t>i?48:30)+'px;text-align: center; font-size: 14px;">\n '+(Object.values(tI).includes(n.name)?this.jSPlugin.i18n.t(tI[n.level]):n.name)+"\n \n "},e.___renderVideoLevelList=function(A){var e=this,t=this.jSPlugin.id+"-select-quality",i=t+"-item";if(0!==(null==A?void 0:A.length)||!document.getElementById(this.jSPlugin.id+"-hd")){var n=this.isMobile?45:32,a='\n \n \n ';document.getElementById(this.jSPlugin.id+"-hd-content")&&(document.getElementById(this.jSPlugin.id+"-hd-content").innerHTML=a)}},e.__renderCurrentVideoLevel=function(A){var e=this.jSPlugin.id+"-select-quality",t=this.jSPlugin.videoLevelList.find((function(e){return e.level===A||e.level===(null==A?void 0:A.level)}));t||(t=this.jSPlugin.videoLevelList[0]);var i=document.getElementById(this.jSPlugin.id+"-videoLevel-icon"),n=document.getElementById(this.jSPlugin.id+"-hdSelect-icon-warp");if(i&&n&&n.removeChild(i),n){var a=this.jSPlugin.width>sI?16:13;n.innerHTML='\n sI?48:32)+"px;line-height: "+(this.jSPlugin.width>sI?48:32)+"px;text-align: center; font-size: "+a+'px;text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-all;\n white-space: nowrap;">\n '+(Object.values(tI).includes(t.name)?this.jSPlugin.i18n.t(tI[t.level]):t.name)+"\n \n "}},e._renderVideoLevelListEvent=function(){var A,e,t=this;null==(A=this.jSPlugin.eventEmitter)||A.on(id.setVideoLevelList,(function(A){return t.___renderVideoLevelList(A)})),null==(e=this.jSPlugin.eventEmitter)||e.on(id.currentVideoLevel,(function(A){return t.__renderCurrentVideoLevel(A)}))},e._fullScreenChangeEvent=function(){var A=this,e=this;this._fullscreenchange=function(t){A.jSPlugin.isCurrentBrowserFullscreen?e.setDecoderState({webExpend:!0}):e.setDecoderState({webExpend:!1}),e.Rec&&window.randomNum==e.jSPlugin.randomNum&&setTimeout((function(){e.Rec.recAutoSize((function(){if(e.jSPlugin.Zoom.currentScale>1){var A=e.jSPlugin.Zoom.currentScale;e._stopZoom(),setTimeout((function(){e._startZoom(),e.jSPlugin.Zoom.currentScale=A,e.jSPlugin.Zoom.doScale(A)}),200)}}))}),100),document.getElementById(e.jSPlugin.id+"-hdSelect")&&(document.getElementById(e.jSPlugin.id+"-hdSelect").style.display="none"),document.getElementById(e.jSPlugin.id+"-speedSelect")&&(document.getElementById(e.jSPlugin.id+"-speedSelect").style.display="none"),e.isMobile&&(document.getElementById(e.jSPlugin.id+"-select-hd-mask")&&(document.getElementById(e.jSPlugin.id+"-select-hd-mask").style.display="none"),document.getElementById(e.jSPlugin.id+"-select-mask")&&(document.getElementById(e.jSPlugin.id+"-select-mask").style.display="none")),e.themeData.autoFocus>0&&e.startAutoFocus(),A.setDecoderState({speed:!1})},xd.isEnabled&&this.jSPlugin.eventEmitter.on(id.fullscreenChange,this._fullscreenchange)},e.changeRecSpeed=function(A){var e,t,i=this,n=function(A){if(!document.getElementById(i.jSPlugin.id+"-speedSelect"))return!1;document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[0].className=document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[0].className.replace("active","default"),document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[1].className=document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[1].className.replace("active","default"),document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[2].className=document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[2].className.replace("active","default"),document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[3].className=document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[3].className.replace("active","default"),document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[A].className=document.getElementById(i.jSPlugin.id+"-speedSelect").childNodes[A].className.replace("default","active")},a="1";switch(A){case 1:n(2),a=this.jSPlugin.i18n.t("SPEED");break;case 2:n(1),a=""+A+this.jSPlugin.i18n.t("SPEED_RATE");break;case 4:n(0),a=""+A+this.jSPlugin.i18n.t("SPEED_RATE");break;case.5:n(3),a=""+A+this.jSPlugin.i18n.t("SPEED_RATE");break;default:n(2),a=""+A+this.jSPlugin.i18n.t("SPEED_RATE")}null==(t=this.jSPlugin)||null==(e=t.eventEmitter)||e.emit(id.speedChange,A),document.getElementById(this.jSPlugin.id+"-speed-text")&&(document.getElementById(this.jSPlugin.id+"-speed-text").innerHTML=a)},e.initThemeData=function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.jSPlugin.id;if(this.header=jc,this.footer=Wc,this.isNeedRenderHeader=Hc(t.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isMobile&&(this.isNeedRenderHeader=Hc(t.btnList,(function(A){return A.isrender>0&&"deviceID"===A.iconId||A.isrender>0&&"deviceName"===A.iconId}))>=0&&"miniRec"!=this.jSPlugin.id),this.isNeedRenderFooter=Hc(i.btnList,(function(A){return A.isrender>0}))>=0&&"miniRec"!=this.jSPlugin.id,this.isNeedRenderTimeLine=Hc(t.btnList,(function(A){return"cloudRec"===A.iconId&&1===A.isrender||"rec"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledTimeLine&&"miniRec"!=this.jSPlugin.id,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach((function(A,e){document.getElementById(A)&&document.getElementById(A).parentElement.removeChild(document.getElementById(A))})),this.isNeedRenderHeader){if(document.getElementById(this.jSPlugin.id+"-headControl"))document.getElementById(this.jSPlugin.id+"-headControl").innerHTML="
";else{var a=document.createElement("div");a.setAttribute("id",this.jSPlugin.id+"-headControl"),a.setAttribute("class","header-controls"),a.innerHTML="
";var r={height:this.jSPlugin.width>sI?"48px":"32px","line-height":this.jSPlugin.width>sI?"48px":"32px",display:"flex","justify-content":"space-between",top:0,left:0,right:0,"z-index":999,"background-color":"rgba(0,0,0,.8)",color:"#FFFFFF",width:"100%",position:"absolute"};a.style=oI(r),document.getElementById(n+"-wrap").insertBefore(a,document.getElementById(n))}var s=document.getElementById(n+"-wrap").classList.contains("ezuikit-player-wrap-mobile-fullscreen");!document.getElementById(this.jSPlugin.id+"-headControl")||this.jSPlugin._isCurrentBrowserFullscreen||s||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0)}else document.getElementById(this.jSPlugin.id+"-headControl")&&document.getElementById(this.jSPlugin.id+"-headControl").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-headControl")),!document.getElementById(this.jSPlugin.id+"-headControl")||this.jSPlugin._isCurrentBrowserFullscreen||isMobileFullscreen||this.jSPlugin.jSPlugin.JS_Resize(this.jSPlugin.width,this.jSPlugin.height-this._extendHeadeTimeLinrHight(!1),!0);if(this.isNeedRenderFooter)if(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"))document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop="-"+(this.jSPlugin.width>sI?48:32)+"px",document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").innerHTML='");else{var l=document.createElement("div");l.setAttribute("id",this.jSPlugin.id+"-ez-iframe-footer-container"),l.setAttribute("class","ez-iframe-footer-container");l.style=oI({position:"absolute",bottom:0,left:0,right:0,display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,color:"#FFFFFF",width:"100%"}),l.innerHTML='",o(l,document.getElementById(n))}else document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"));if(this.isNeedRenderHeader&&document.getElementById(this.jSPlugin.id+"-headControl")){document.getElementById(this.jSPlugin.id+"-headControl").style.background=t.backgroundColor,document.getElementById(this.jSPlugin.id+"-headControl").style.color=t.color;for(var c,d=rI(t.btnList);!(c=d()).done;){var I=c.value;if(I.isrender)try{this.renderHeader(I.iconId,I.part)}catch(A){}}}if(this.isNeedRenderFooter&&document.getElementById(this.jSPlugin.id+"-audioControls")){document.getElementById(this.jSPlugin.id+"-audioControls").style.background=i.backgroundColor,document.getElementById(this.jSPlugin.id+"-audioControls").style.color=i.color;for(var C,h=rI(i.btnList);!(C=h()).done;){var u=C.value;if(u.isrender)try{this.renderFooter(u.iconId,u.part)}catch(A){}}}if(this.isNeedRenderTimeLine)if(this.isMobile)document.getElementById(this.jSPlugin.id+"-headControl-right")&&(document.getElementById(this.jSPlugin.id+"-headControl-right").style.display="none"),this.Rec?this.Rec.recInit():this.Rec=new _d(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?this.Rec.recInit():(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new Ed(this.jSPlugin));var B=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(B)}),50)}if(Hc(this.themeData.footer.btnList,(function(A){return"pantile"===A.iconId&&1===A.isrender}))>=0&&!this.jSPlugin.disabledPTZ&&(this.isMobile&&(this.MobilePtz=new Ud(this.jSPlugin)),this.Ptz=new Dd(this.jSPlugin)),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var E=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(E),A.jSPlugin.setPoster(A.themeData.poster))}),50)}this.inited=!0,this.jSPlugin.deviceInfo&&(document.getElementById(this.jSPlugin.id+"-deviceName-content")&&(document.getElementById(this.jSPlugin.id+"-deviceName-content").style.maxWidth="100%",document.getElementById(this.jSPlugin.id+"-deviceName-content").style.overflow="hidden",document.getElementById(this.jSPlugin.id+"-deviceName-content").style.textOverflow="ellipsis",document.getElementById(this.jSPlugin.id+"-deviceName-content").style.whiteSpace="nowrap",document.getElementById(this.jSPlugin.id+"-deviceName-content").innerHTML=this.jSPlugin.deviceInfo.deviceName||""),document.getElementById(this.jSPlugin.id+"-deviceID-content")&&(document.getElementById(this.jSPlugin.id+"-deviceID-content").style.maxWidth="100%",document.getElementById(this.jSPlugin.id+"-deviceID-content").style.overflow="hidden",document.getElementById(this.jSPlugin.id+"-deviceID-content").style.textOverflow="ellipsis",document.getElementById(this.jSPlugin.id+"-deviceID-content").style.whiteSpace="nowrap",document.getElementById(this.jSPlugin.id+"-deviceID-content").innerHTML=g(this.jSPlugin.url).deviceSerial||"")),this.renderThemeData()},e.resetMobileZoomStatus=function(){if(this.isMobile){var A=document.getElementById(this.jSPlugin.id+"-zoom-container");A&&A.style&&"none"!=A.style.display&&(A.style.display="none"),this.jSPlugin.jSPlugin.Zoom&&this.jSPlugin.jSPlugin.Zoom.resetZoom()}},e.webExpend=function(){var A=this.decoderState.state;A.webExpend;var e=A.expend;return!!A.play&&(!e&&void this.jSPlugin.browserFullscreen())},e.expend=function(){var A=this.decoderState.state,e=A.webExpend;return!!A.play&&(!e&&void(this.isMobile?(s(document.getElementById(this.jSPlugin.id+"-wrap")),this.jSPlugin.Zoom&&this.jSPlugin.Zoom.setTransform(!0),document.getElementById(""+this.jSPlugin.id).style["backface-visibility"]="hidden"):this.jSPlugin.fullscreen()))},e._extendHeadeTimeLinrHight=function(A){var e=0,t=document.getElementById(this.jSPlugin.id+"-canvas-container");return t&&!A&&(e=parseInt(window.getComputedStyle(t).height,10)),e},e.disabledFECBtn=function(){var A=[this.jSPlugin.id+"-capturePicture",this.jSPlugin.id+"-capturePicture-content",this.jSPlugin.id+"-capturePicture-icon",this.jSPlugin.id+"-recordvideo",this.jSPlugin.id+"-recordvideo-content",this.jSPlugin.id+"-recordvideo-icon",this.jSPlugin.id+"-zoom",this.jSPlugin.id+"-zoom-content",this.jSPlugin.id+"-zoom-icon"],e=document.getElementById(this.jSPlugin.id+"-wrap");if(this.jSPlugin.use3DZoom?this.jSPlugin.close3DZoom():this._stopZoom(),this.setDecoderState({zoom:!1}),e)for(var t,i=rI(A);!(t=i()).done;){var n=t.value,a=e.querySelector("#"+n);a&&(a.style.display="none")}},e.resumeFECBtn=function(){var A=[this.jSPlugin.id+"-capturePicture",this.jSPlugin.id+"-capturePicture-content",this.jSPlugin.id+"-capturePicture-icon",this.jSPlugin.id+"-recordvideo",this.jSPlugin.id+"-recordvideo-content",this.jSPlugin.id+"-recordvideo-icon",this.jSPlugin.id+"-zoom",this.jSPlugin.id+"-zoom-content",this.jSPlugin.id+"-zoom-icon"],e=document.getElementById(this.jSPlugin.id+"-wrap");if(e)for(var t,i=rI(A);!(t=i()).done;){var n=t.value,a=e.querySelector("#"+n);a&&(a.style.display="")}},e.destroy=function(){var A=document.getElementById(this.jSPlugin.id+"-headControl");this.Rec&&this.Rec.destroy&&this.Rec.destroy(),this.Ptz&&this.Ptz.destroy&&this.Ptz.destroy(),A&&(A.innerHTML="");var e=document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container");this._removeElement(e);var t=document.getElementById(this.jSPlugin.id+"-ez-ptz-item");this._removeElement(t);var i=document.getElementById("mobile-ez-ptz-container");this._removeElement(i);var n=document.getElementById("date-switch-container-wrap");this._removeElement(n);var r=document.getElementById("rec-type-container-wrap");this._removeElement(r);var o=document.getElementById("mobile-rec-wrap");this._removeElement(o),xd.isEnabled&&this._fullscreenchange&&xd.off("change",this._fullscreenchange),Cd.listInstances().length<=1&&(a(this.jSPlugin.staticPath+"/speed/speed.css"),a(this.jSPlugin.staticPath+"/css/theme.css"))},e._removeElement=function(A){A&&A.parentNode&&A.parentNode.removeChild(A)},e._stopZoom=function(){var A,e,t,i,n;null==(t=this.jSPlugin)||null==(e=t.Zoom)||null==(A=e.stopZoom)||A.call(e),null==(n=this.jSPlugin)||null==(i=n.eventEmitter)||i.emit(id.zoom.closeZoom)},e._startZoom=function(){var A,e,t,i,n;null==(t=this.jSPlugin)||null==(e=t.Zoom)||null==(A=e.startZoom)||A.call(e),null==(n=this.jSPlugin)||null==(i=n.eventEmitter)||i.emit(id.zoom.openZoom)},A}(),cI=function(){function A(A,e){this.jSPlugin=A,this.isMobile=e,this.timer=null,this.initToastCustom()}var e=A.prototype;return e.initToastCustom=function(){document.getElementById(this.jSPlugin.id+"-wrap-Toast-custom")?document.getElementById(this.jSPlugin.id+"-wrap-Toast-custom").style.display="none":this.randerToast()},e.randerToast=function(){var A=this.jSPlugin.width,e=1;e=this.isMobile?A/375||1:A/1024||1;var t=document.getElementById(this.jSPlugin.id+"-wrap"),i=document.createElement("div");i.style="display:none;position:absolute;top:0;width: 100%;align-items: center;justify-content: center;",i.id=this.jSPlugin.id+"-wrap-Toast-custom",this.isMobile?i.innerHTML='
\n
\n ':i.innerHTML='
\n
\n ',t.insertBefore(i,document.getElementById(this.jSPlugin.id))},e.initToastContent=function(A,e){var t=this;void 0===e&&(e=2e3),this.timer=null,document.getElementById(this.jSPlugin.id+"-wrap-Toast-custom")?(document.getElementById(this.jSPlugin.id+"-wrap-Toast-custom").style.display="flex",document.getElementById(this.jSPlugin.id+"-wrap-Toast-custom-content").innerText=A||"",this.timer=setTimeout((function(){document.getElementById(t.jSPlugin.id+"-wrap")&&document.getElementById(t.jSPlugin.id+"-wrap-Toast-custom")&&document.getElementById(t.jSPlugin.id+"-wrap").removeChild(document.getElementById(t.jSPlugin.id+"-wrap-Toast-custom"))}),e)):(this.randerToast(),this.initToastContent(A))},A}(),dI=function(A,e,t,i,n,a){void 0===e&&(e="GET"),void 0===t&&(t={}),void 0===a&&(a={});var r={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},o="";r=Object.assign(r,a);var s=new Headers;Object.keys(r).map((function(A){s.append(A,r[A])})),r=s,Object.keys(Object.assign({},t)).forEach((function(A){var e=t[A];"string"==typeof t[A]&&(e=t[A].replace("%","%25")),void 0!==t[A]&&(o+="&"+A+"="+encodeURIComponent(e))})),o.length>0&&(o=-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?"?"+o.slice(1):o.slice(1));var g=A+(-1!==["GET","PUT","DELETE"].indexOf(e.toUpperCase())?o:""),l={headers:r,method:e};"POST"===e&&(l.body=o),"POST"===e&&a&&"application/json"===a["Content-Type"]&&(l.body=JSON.stringify(t)),"GET"===e&&(-1===g.indexOf("?")?g+="?_r="+Math.random():g+="&_r="+Math.random()),fetch(g,l).then((function(A){var e=A.headers.get("content-type");return e&&-1!==e.indexOf("application/json")?A.json():A.text()})).then((function(A){i&&i(A)})).catch((function(A){n&&n(A)}))},II=function(A,e,t){var i=new FormData;i.append("deviceSerial",g(A.url).deviceSerial),i.append("cmd","open"),fetch(domain+"/api/v3/device/acs/remote/door?accessToken="+(A.accessToken||A.token.deviceToken.globalAll),{method:"POST",body:i}).then((function(A){return A.json()})).then((function(A){e(A)})).catch((function(A){t(A)}))},CI=function(A,e,t){var i={accessToken:A.accessToken||A.token.httpToken.url,pageStart:0,pageSize:4,default:!0,voiceName:"轻应用语音文件"},n=A.env.domain+"/api/lapp/voice/query";dI(n,"POST",i,(function(A){e(A)}),(function(A){t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},hI=function(A,e,t,i){var n=A.env.domain+"/api/lapp/voice/send",a=new FormData;a.append("deviceSerial",g(A.url).deviceSerial),a.append("accessToken",A.accessToken||A.token.deviceToken.video),a.append("channelNo",g(A.url).channelNo||1),a.append("fileUrl",e),fetch(n,{method:"POST",body:a}).then((function(A){return A.json()})).then((function(A){!function(A){t(A)}(A)})).catch((function(A){i(A)}))},uI=function(){function A(A,e){this.jSPlugin=A,this.videoWidth=A.width,this.switchFooter=e,this.sendLoadingStats=!1,this.toastCustom=new cI(A,!1),this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.initQuickReply()}var e=A.prototype;return e.initQuickReply=function(){document.getElementById("pc-quickReply-back")||this.renderQuickReply(),document.getElementById("pc-quickReply-back-item-0")||this.getQuickReplyList()},e.renderQuickReply=function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.innerHTML='
\n
\n
\n \n 返回\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n 返回\n
\n
\n \n \n
',document.getElementById(this.jSPlugin.id+"-audioControls-quickReply").appendChild(t),document.getElementById("pc-quickReply-back").onclick=function(){A.switchFooter("onBell")}},e.matchQuickReplyBtn=function(){var A=this,e=this.videoWidth/1024||1,t=document.getElementById("pc-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="pc-quickReply-back-item-"+n,a.style="margin: "+8*e+"px 0 "+8*e+"px "+8*e+"px;cursor: pointer;\n padding: 0 "+20*e+"px;min-height: "+64*e+"px;width:calc(50% - "+16*e+"px);\n display: inline-block;background: rgba(0,0,0,0.70);border-radius: 8px;text-align: center;\n box-sizing: border-box;font-size:"+24*e+"px;color: rgba(255,255,255,0.90);",a.innerHTML='
\n '+i.voiceName+"\n
",a.onclick=function(){A.sendLoadingStats||A.sendQuickReply(i,n)},t.appendChild(a)}))},e.setBtnCheckLoading=function(A,e){var t=this.videoWidth/1024||1;if(e>-1){document.getElementById("pc-quickReply-back-item-"+e);var i=document.getElementById("pc-quickReply-back-item-box-"+e),n=document.getElementById("pc-quickReply-name-"+e);if(1==A){var a=document.getElementById("pc-quickReply-icon-loading-"+e);a&&n&&i.removeChild(a)}else if(n){var r=document.createElement("span");r.id="pc-quickReply-icon-loading-"+e,r.style="vertical-align: middle;margin-right:"+16*t+"px;",r.innerHTML='',i.insertBefore(r,n)}}},e.getQuickReplyList=function(){var A=this;this.madeLoadingDom(0);CI(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){A.madeLoadingDom(1)}))},e.madeLoadingDom=function(A){var e=this,t=this.videoWidth/1024||1;if(0==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-loading").style.display="block",!document.getElementById("pc-quickReply-loading-box")){var i=document.createElement("div");i.id="pc-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",i.innerHTML='
\n \n
\n
加载中…
',document.getElementById("pc-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("pc-quickReply-content").style.display="none",document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="block",!document.getElementById("pc-quickReply-loaderror-box")){var n=document.createElement("div");n.id="pc-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='
快速回复加载失败
\n
重新加载
',document.getElementById("pc-quickReply-loaderror").appendChild(n),document.getElementById("pc-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("pc-quickReply-loading").style.display="none",document.getElementById("pc-quickReply-loaderror").style.display="none",document.getElementById("pc-quickReply-content").style.display="block",this.matchQuickReplyBtn()},e.sendQuickReply=function(A,e){var t=this;this.sendLoadingStats=!0,this.setBtnCheckLoading(0,e);hI(this.jSPlugin,A.fileUrl,(function(A){t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),A&&200==A.code?t.toastCustom.initToastContent("快捷回复成功"):t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}),(function(A){t.sendLoadingStats=!1,t.setBtnCheckLoading(1,e),t.toastCustom.initToastContent("快捷回复失败,请重试"),t.switchFooter("onBell")}))},A}(),BI=function(){function A(A,e){this.jSPlugin=A,this.videoWidth=A.width,this.switchFooter=e,this.toastCustom=new cI(A,!1),this.lockStatus=!1,this.initRemoteUnlock()}var e=A.prototype;return e.initRemoteUnlock=function(){document.getElementById("pc-remoteUnlock-back")?this.madeSlideEvent():this.renderRemoteUnlock()},e.renderRemoteUnlock=function(){var A=this,e=this.videoWidth/1024||1,t=document.createElement("div");t.style="width:100%;",t.id="pc-remoteUnlock-box",t.innerHTML='
\n
\n
\n \n 返回\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n 返回\n
\n
\n
',document.getElementById(this.jSPlugin.id+"-audioControls-remoteUnlock").appendChild(t),document.getElementById("pc-remoteUnlock-back").onclick=function(){A.goback()},this.renderRemoteUnlockSlide()},e.renderRemoteUnlockSlide=function(){var A=this.videoWidth/1024||1,e=document.getElementById("pc-remoteUnlock-content"),t=document.createElement("div");t.id="pc-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;cursor: pointer;",t.innerHTML='
\n
\n
右滑开锁
\n
\n \n \n \n \n \n \n \n \n \n
\n
',e.appendChild(t),this.madeSlideEvent()},e.getOffsetLeft=function(A){var e=0;do{e+=A.offsetLeft,A=A.parentNode}while(A.parentNode);return e},e.madeSlideEvent=function(){var A=this.videoWidth/1024||1,e=document.getElementById(""+this.jSPlugin.id),t=this.getOffsetLeft(e),i=document.getElementById("pc-remoteUnlock-slide-box"),n=document.getElementById("pc-remoteUnlock-slide-bgColor"),a=document.getElementById("pc-remoteUnlock-slide-tips"),r=document.getElementById("pc-remoteUnlock-slide-ball"),o=this;r.onmousedown=function(e){var s=(e=e||window.event).offsetX;r.style.transition="",n.style.transition="",document.onmouseup=function(){o.lockStatus||(n.style.width="0px",r.style.left=8*A+"px",r.style.transition="left 0.6s linear",n.style.transition="width 0.6s linear"),document.onmouseup=null,document.onmousemove=null},document.onmousemove=function(e){var g=(e=e||window.event).pageX-i.offsetLeft-s-t,l=i.clientWidth-r.clientWidth-8*A;g<=0&&(g=0),g>=l&&(g=l),r.style.left=g+"px",g!=l||o.lockStatus||o.lockStatus||(o.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",n.style.width=i.clientWidth+"px",n.style.backgroundColor="#598FFF",i.style.border="0",r.style.backgroundColor="#ffffff",a.textContent="正在开锁",r.onmousedown=null,document.onmousemove=null,o.sendRemoteUnlockApi())}}},e.resetRemoteUnlockSlide=function(){var A=document.getElementById("pc-remoteUnlock-box"),e=document.getElementById(this.jSPlugin.id+"-audioControls-remoteUnlock");A&&e&&e.removeChild(A)},e.sendRemoteUnlockApi=function(){var A=this;II(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}),(function(e){A.toastCustom.initToastContent("开锁失败,请重试"),A.goback()}))},e.goback=function(){this.switchFooter("onCall"),this.resetRemoteUnlockSlide()},A}(),EI={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#ffffff",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}};function fI(A){var e=new ad,t=new FormData;for(var i in A)t.append(i,A[i]);return e.fetch("/api/lapp/device/info",{method:"POST",body:t})}var QI=function(A){var e="";return Object.keys(A).map((function(t,i){e+=t+":"+A[t]+(i\n \n ',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(o)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon"));else{var s=(this.videoHeight-180*n)/2,g=document.createElement("div");g.id="bellring-icon",g.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: "+s+"px;display: flex;align-items: center;justify-content: center;",g.innerHTML='
\n
\n \n icon/响铃\n \n \n \n \n \n
\n
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(g),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}},e.removeBellRing=function(){document.getElementById("bellring")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon"))},e.matchBtn=function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,r=this.decoderState.state,o=r.mute,s=r.rejection,g={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(g.color=a[this.bellStatus].color,g.backgroundColor=a[this.bellStatus].backgroundColor,g.activeColor=a[this.bellStatus].activeColor):(g.color=n[this.bellStatus].color,g.backgroundColor=n[this.bellStatus].backgroundColor,g.activeColor=n[this.bellStatus].activeColor);var l=this.videoWidth/6;this.videoWidth;var c=this.videoWidth/1024||1;switch(A){case"ringStatus":return g.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,g.id=A,g.domString=''+(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt)+"",g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString=''+(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称")+"",g.onclick=function(){},g;case"callStatus":return g.title="通话中",g.id=A,g.domString='通话中',g.onclick=function(){},g;case"deviceCategory":return g.title="设备名称",g.id=A,g.domString=''+(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称")+"",g.onclick=function(){},g;case"rejection":return g.title="拒绝",g.id=A,g.domString='
\n
\n \n 拒绝\n \n \n \n \n \n
\n
拒绝
\n
',g.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.isEditing,n=A.rejection;if(i||n)return!1;e&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},g;case"quickReply":return g.title="快捷回复",g.id=A,g.domString='
\n
\n \n 快捷回复\n \n \n \n \n \n
\n
快捷回复
\n
',g.onclick=function(){if(t.decoderState.state.rejection)return!1;t.switchFooter("quickReply"),t.quickReplyEle=new uI(t.jSPlugin,t.switchFooter)},g;case"answer":return g.title="接听",g.id=A,g.domString='
\n
\n \n 接听\n \n \n \n \n \n
\n
接听
\n
',g.onclick=function(){var A=t,i=t.decoderState.state,r=i.play,o=i.isEditing,s=i.talk,g=i.sound,l=i.rejection;if(o||l)return!1;t.jSPlugin.pluginStatus.loadingClear(),r||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!r})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var c=document.getElementById(t.jSPlugin.id+"-header-onBell");c&&c.parentElement.removeChild(c),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById(t.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.removeBellRing(),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),r&&(A.jSPlugin.stop(),A.setDecoderState({play:!r})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.goback(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},g;case"remoteUnlock":return g.title="远程开锁",g.id=A,g.domString='
\n
\n \n 开锁\n \n \n \n \n \n
\n
远程开锁
\n
',g.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new BI(t.jSPlugin,t.switchFooter)},g;case"mute":return g.title="静音",g.id=A,g.domString='
\n
\n \n 静音\n \n \n \n \n \n
\n
静音
\n
',g.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;i?(t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},g;case"hangUp":return g.title="挂断",g.id=A,g.domString='
\n
\n \n 挂断\n \n \n \n \n \n
\n
挂断
\n
',g.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.play,n=A.sound;if(A.rejection)return!1;e&&(t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),i&&(t.jSPlugin.stop(),t.setDecoderState({play:!i})),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),(i||e)&&(t.removeBellRing(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},g;default:return g}},e.answerOvertime=function(){this.toastCustom.initToastContent("应答超时"),this.decoderState.state.play&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.rejectionStatusDispose(),this.switchFooter("onBell"),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")},e.rejectionStatusDispose=function(){var A=this,e=this.themeData.footer,t=document.getElementById(this.jSPlugin.id+"-audioControls"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall"),n=document.getElementById("header-"+this.bellStatus+"-ringStatus");"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),n.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!1,type:2})},e.userNoDevice=function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById(this.jSPlugin.id+"-audioControls"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall");"onBell"==this.bellStatus?(t.innerHTML="",t.style.color="#ffffff"):(i.innerHTML="",i.style.color="#ffffff"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!1,type:2})},e.renderHeader=function(A,e){var t=this,i=this.videoWidth/1024||1,n=this.matchBtn(A,e);if(document.getElementById(this.jSPlugin.id+"-header-"+this.bellStatus+"-content")){var a=document.createElement("span");a.innerHTML=""+n.domString,document.getElementById(this.jSPlugin.id+"-header-"+this.bellStatus+"-content").appendChild(a)}else{var r=document.createElement("div");r.id=this.jSPlugin.id+"-header-"+this.bellStatus,r.style="max-width:50%;position:relative;",r.innerHTML='\n '+n.domString+"\n ",r.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},document.getElementById(this.jSPlugin.id+"-headControl").childNodes[0].appendChild(r)}},e.renderFooter=function(A,e){var t=this,i=this.decoderState.state.mute;if("remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/6,r=document.createElement("div");r.className="theme-icon-item",this.jSPlugin.isWebConsole?r.style="padding:0 "+.1*a+"px;":r.style="padding:0 "+.1*a+"px;cursor: pointer;",r.innerHTML='
'+n.domString+"
",r.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(r.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(r.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)});var o=this.videoWidth/597,s=document.createElement("span");s.className="icon-move left",s.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',s.onclick=function(){t.editIcon(n.id,"left","footer")},r.appendChild(s);var g=document.createElement("span");if(g.className="icon-move right",g.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',g.onclick=function(){t.editIcon(n.id,"right","footer")},r.appendChild(g),"answer"==A||"rejection"==A||"hangUp"==A);else{var l=document.createElement("span");l.className="icon-move close",l.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',l.onclick=function(){t.editIcon(n.id,"delete","footer")},r.appendChild(l)}"onCall"==this.bellStatus?document.getElementById(this.jSPlugin.id+"-audioControls-onCall").appendChild(r):document.getElementById(this.jSPlugin.id+"-audioControls").appendChild(r),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))},e.switchFooter=function(A){var e={};switch(this.themeData&&(e=this.themeData.footer),A){case"onBell":document.getElementById(this.jSPlugin.id+"-audioControls-quickReply")&&(document.getElementById(this.jSPlugin.id+"-audioControls-quickReply").style.display="none"),document.getElementById(this.jSPlugin.id+"-audioControls-onCall")?"none"==document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.display&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.display="flex"):document.getElementById(this.jSPlugin.id+"-audioControls").style.display="flex";break;case"onCall":document.getElementById(this.jSPlugin.id+"-audioControls-remoteUnlock").style.display="none",document.getElementById(this.jSPlugin.id+"-audioControls").style.display="none",document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.display="flex",this.themeData&&(document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.color=e[this.bellStatus].color);break;case"quickReply":document.getElementById(this.jSPlugin.id+"-audioControls-quickReply").style.display="flex",document.getElementById(this.jSPlugin.id+"-audioControls").style.display="none";break;case"remoteUnlock":document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.display="none",document.getElementById(this.jSPlugin.id+"-audioControls").style.display="none",document.getElementById(this.jSPlugin.id+"-audioControls-remoteUnlock").style.display="flex"}},e.initThemeData=function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer,a=this.jSPlugin.id,r=this.videoWidth/1024;if(this.isNeedRenderHeader=Hc(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=Hc(n[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById(this.jSPlugin.id+"-headControl"))document.getElementById(this.jSPlugin.id+"-headControl").innerHTML="
";else{var s=document.createElement("div");s.setAttribute("id",this.jSPlugin.id+"-headControl"),s.setAttribute("class","header-controls"),s.innerHTML="
";var g=.2*this.jSPlugin.height+"px",l={height:g,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":"-"+g,"align-items":"center",background:"transparent linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)"};s.style=QI(l),document.getElementById(a+"-wrap").insertBefore(s,document.getElementById(a));var c=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(c)}),50)}else document.getElementById(this.jSPlugin.id+"-headControl")&&document.getElementById(this.jSPlugin.id+"-headControl").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-headControl"));var d=.3*this.jSPlugin.height;if(this.isNeedRenderFooter)if(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"))document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop="-"+d+"px","onCall"==this.bellStatus?document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").innerHTML='\n \n \n \n \n ':document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").innerHTML='\n \n \n \n \n ');else{var I=document.createElement("div");I.setAttribute("id",this.jSPlugin.id+"-ez-iframe-footer-container"),I.setAttribute("class","ez-iframe-footer-container");var C={"min-height":d+"px","max-height":d+"px",position:"relative","margin-top":"-"+d+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","background-image":"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.60) 100%)","font-size":24*r+"px"};I.style=QI(C),I.innerHTML='\n \n \n \n \n ',o(I,document.getElementById(a))}else document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"));if(this.isNeedRenderHeader&&document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-headControl").style.background=i[this.bellStatus].backgroundColor,document.getElementById(this.jSPlugin.id+"-headControl").style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.background=n[this.bellStatus].backgroundColor,document.getElementById(this.jSPlugin.id+"-audioControls").style.color=n[this.bellStatus].color,n[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1==this.themeData.customConfig.bellPoster&&!e){this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var h=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(h),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),window.addEventListener("click",this.autoPlayRing)),this.inited=!0,this.getCallDeviceInfo()},e.renderThemeData=function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.header,n=t.footer;if(this.isNeedRenderHeader&&i&&(document.getElementById(this.jSPlugin.id+"-headControl").style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-headControl").style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){var i;e.isrender&&A.setDecoderState(((i={})[e.iconId]=A.decoderState.state[e.iconId],i))}))),this.isNeedRenderFooter&&n)document.getElementById(this.jSPlugin.id+"-audioControls").style.background=n[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-audioControls").style.color=n[this.bellStatus].color.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.color=n[this.bellStatus].color.replace("-diy",""),n[this.bellStatus].btnList.map((function(t,i){var n;t.isrender&&A.setDecoderState(((n={})[t.iconId]=A.decoderState.state[t.iconId],n));if(0==i&&!A.themeInited&&A.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById(this.jSPlugin.id+"-wrap").addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===g(this.jSPlugin.url).type,rec:"rec"===g(this.jSPlugin.url).type,type:g(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var r=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(r),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50)},e.setThemeData=function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")},e.startAutoFocus=function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById(A.jSPlugin.id+"-audioControls")&&(document.getElementById(A.jSPlugin.id+"-audioControls").style.opacity=0,document.getElementById(A.jSPlugin.id+"-audioControls").style.pointerEvents="none")}),1e3*e)},e.stopAutoFocus=function(){document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.opacity=1,document.getElementById(this.jSPlugin.id+"-audioControls").style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()},e.editIcon=function(A,e,t){var i=this.themeData,n=this.themeData[t][this.bellStatus].btnList,a=Hc(n,(function(e){return e.iconId===A})),r=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var o=-1,s=a+1;s=0;l--)if(n[l].part===n[a].part&&1==n[l].isrender){g=l;break}-1!==g&&(n[a]=n[g],n[g]=r)}i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)},e.countTime=function(A,e){void 0===e&&(e=0);var t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='00:00',document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",r="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),r=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?r+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))},e.editStart=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-audioControls-onCall");document.getElementById(this.jSPlugin.id+"-headControl"),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})},e.editEnd=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-headControl"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall");t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")},e.fetchThemeData=function(A){var e=this;iI(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff"}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff"}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff"}),e.activeThemeStatusTxt="模板未激活"),e.themeData=EI,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))},e.getCallDeviceInfo=function(){var A=this;this.videoWidth,fI({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:g(this.jSPlugin.url).deviceSerial}).then((function(e){A.deviceInfoData=e.data,e.data.isEncrypt&&setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),500),document.getElementById("header-"+A.bellStatus+"-deviceCategory")&&(document.getElementById("header-"+A.bellStatus+"-deviceCategory").innerText=""+e.data.deviceName)})).catch((function(e){20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice()}))},e.setHeaderText=function(A){var e=this.videoWidth/1024||1;document.getElementById(this.jSPlugin.id+"-deviceCategory-content")&&(document.getElementById(this.jSPlugin.id+"-deviceCategory-content").innerHTML=''+A+''+(this.deviceInfoData&&this.deviceInfoData.deviceName||"")+"")},A}(),pI=function(){function A(e,t){this.jSPlugin=e,this.heightPop=t||366,A._instanceStyle(),this.initPopupCustom()}var e=A.prototype;return e.initPopupCustom=function(){document.getElementById(this.jSPlugin.id+"-wrap-popup-custom")?document.getElementById(this.jSPlugin.id+"-wrap-popup-custom").style.display="flex":this.randerPopup()},e.randerPopup=function(){var A=this,e=document.documentElement.clientWidth/375||1,t=document.getElementById(this.jSPlugin.id+"-wrap"),i=document.createElement("div");i.style="display:flex;",i.id=this.jSPlugin.id+"-wrap-popup-custom",i.innerHTML='
\n
\n
\n
\n
\n \n icon/close\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n ',t.appendChild(i),document.getElementById(this.jSPlugin.id+"-wrap-popup-custom-mask").onclick=function(){A.closePopupCustom()},document.getElementById(this.jSPlugin.id+"-popup-board-close").onclick=function(){A.closePopupCustom()}},e.closePopupCustom=function(A){void 0===A&&(A=function(){}),A();var e=document.getElementById(this.jSPlugin.id+"-wrap"),t=document.getElementById(this.jSPlugin.id+"-wrap-popup-custom");e&&t&&e.removeChild(t)},e.initPopupContent=function(A,e){document.getElementById("popup-board-title-content").innerText=A||"",e&&document.getElementById(this.jSPlugin.id+"-popup-board-content").appendChild(e)},A._instanceStyle=function(){if(!A._STYLE){var e=document.documentElement.clientWidth/375||1;A._STYLE=document.createElement("style"),A._STYLE.innerHTML="@keyframes slideContentUp {0% {bottom: -"+366*e+"px;}\n 25% {bottom: -"+244*e+"px;}\n 50% {bottom: -"+122*e+"px;}\n 100% {bottom:0;}} .open-popup{animation:slideContentUp 0.3s 1 linear; -webkit-animation: slideContentUp 0.3s 1 linear;}",document.getElementsByTagName("head")[0].appendChild(A._STYLE)}},A}(),mI=function(){function A(A,e,t){this.jSPlugin=A,this.videoWidth=t,this.switchFooter=e,this.toastCustom=new cI(A,!0),this.sendLoadingStats=!1,this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"],this.popupCustom=new pI(A,366),document.getElementById("mobile-quickReply-list")||(this.popupCustom.initPopupContent("快捷回复",this.renderQuickReply()),this.initQuickReply())}var e=A.prototype;return e.initQuickReply=function(){document.getElementById("mobile-quickReply-list-item-0")||this.getQuickReplyList()},e.renderQuickReply=function(){document.documentElement.clientWidth;var A=document.createElement("div");return A.style="width:100%;",A.id="mobile-quickReply-list",A.innerHTML='
\n \n ',A},e.matchQuickReplyBtn=function(){var A=this,e=this.videoWidth/375||1,t=document.getElementById("mobile-quickReply-content");this.quickReplyList&&this.quickReplyList.length>0&&this.quickReplyList.forEach((function(i,n){var a=document.createElement("div");a.id="mobile-quickReply-list-item-"+n,a.style="margin: "+14*e+"px 0;\n padding: "+12*e+"px "+15*e+"px;min-height: "+50*e+"px;width:100%;\n background: #ffffff;border-radius: "+25*e+"px;display: flex;align-items: center;\n box-sizing: border-box;font-size:"+16*e+"px;color: #2c2c2c;",a.innerHTML='\n \n icon/快捷回复播放\n \n \n \n \n \n '+i.voiceName+"",a.onclick=function(){A.sendLoadingStats||(A.setBtnCheckStatus(n),A.sendQuickReply(i))},t.appendChild(a)}))},e.setBtnCheckStatus=function(A){var e=this,t="";this.quickReplyList.forEach((function(i,n){t=document.getElementById("mobile-quickReply-list-item-"+n),n==A?(t.style.background="#F4F6FC",t.style.color="#648FFC",e.setBtnCheckLoding(0,n)):(t.style.background="#ffffff",t.style.color="#2c2c2c")}))},e.setBtnCheckLoding=function(A,e){var t=this.videoWidth/375||1;if(e>-1){var i=document.getElementById("mobile-quickReply-list-item-"+e),n=document.getElementById("mobile-quickReply-name-"+e),a=document.getElementById("mobile-quickReply-icon-"+e);if(1==A){if(document.getElementById("mobile-quickReply-icon-loading-"+e)&&n){var r=document.createElement("span");r.id="mobile-quickReply-icon-"+e,r.style="height:"+24*t+"px;",r.innerHTML='\n \n icon/快捷回复播放\n \n \n \n \n \n ',i.insertBefore(r,n)}}else if(a&&n){i.removeChild(a);var o=document.createElement("span");o.id="mobile-quickReply-icon-loading-"+e,o.style="height:"+20*t+"px;width: "+24*t+"px;",o.innerHTML='',i.insertBefore(o,n)}}},e.getQuickReplyList=function(){var A=this;this.madeLoadingDom(0);CI(this.jSPlugin,(function(e){if(e&&200==e.code){var t=e.data||[],i=[];e.data.forEach((function(A,e){i=A.voiceName.split("_"),t[e].voiceName=i[1]})),A.quickReplyList=t,setTimeout((function(){A.madeLoadingDom(2)}),500)}else A.madeLoadingDom(1)}),(function(e){A.madeLoadingDom(1)}))},e.madeLoadingDom=function(A){var e=this,t=this.videoWidth/375||1;if(0==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="block",!document.getElementById("mobile-quickReply-loading-box")){var i=document.createElement("div");i.id="mobile-quickReply-loading-box",i.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: row;",i.innerHTML='
\n \n
\n
正在加载,请稍候
',document.getElementById("mobile-quickReply-loading").appendChild(i)}}else if(1==A){if(document.getElementById("mobile-quickReply-content").style.display="none",document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="block",!document.getElementById("mobile-quickReply-loaderror-box")){var n=document.createElement("div");n.id="mobile-quickReply-loaderror-box",n.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;",n.innerHTML='
\n \n
\n
\n 加载失败 \n 点击重试\n
',document.getElementById("mobile-quickReply-loaderror").appendChild(n),document.getElementById("mobile-quickReply-loaderror-reload").onclick=function(){e.getQuickReplyList()}}}else document.getElementById("mobile-quickReply-loading").style.display="none",document.getElementById("mobile-quickReply-loaderror").style.display="none",document.getElementById("mobile-quickReply-content").style.display="block",this.matchQuickReplyBtn()},e.sendQuickReply=function(A){var e=this;this.sendLoadingStats=!0;hI(this.jSPlugin,A.fileUrl,(function(A){e.sendLoadingStats=!1,A&&200==A.code?e.toastCustom.initToastContent("快捷回复成功"):e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}),(function(A){e.sendLoadingStats=!1,e.toastCustom.initToastContent("快捷回复失败,请重试"),e.popupCustom.closePopupCustom()}))},e.closeQuickReplyEle=function(){this.popupCustom.closePopupCustom()},A}(),yI=function(){function A(A,e,t){this.jSPlugin=A,this.videoWidth=t,this.switchFooter=e,this.toastCustom=new cI(A,!0),this.lockStatus=!1,this.popupCustom=new pI(A,265),this.popupCustom.initPopupContent("远程开锁",this.renderRemoteUnlock()),this.renderRemoteUnlockSlide()}var e=A.prototype;return e.initRemoteUnlock=function(){document.getElementById("mobile-remoteUnlock-content")?this.madeSlideEvent():this.renderRemoteUnlock()},e.renderRemoteUnlock=function(){var A=this.videoWidth/1024||1,e=document.createElement("div");return e.style="width:100%;",e.id="mobile-remoteUnlock-box",e.innerHTML='
\n
\n
',e},e.renderRemoteUnlockSlide=function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-content"),t=document.createElement("div");t.id="mobile-remoteUnlock-content-slide",t.style="width: 100%;display: flex;justify-content: center;padding: 0 "+15*A+"px",t.innerHTML='
\n
\n
右滑开锁
\n
\n \n icon/箭头向右\n \n \n \n \n \n \n
\n
',e.appendChild(t),this.madeSlideEvent()},e.madeSlideEvent=function(){var A=this.videoWidth/375||1,e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball"),a=this;n.ontouchstart=function(r){var o=(r=r||window.event).touches[0].pageX;n.style.transition="",t.style.transition="",document.ontouchmove=function(r){var s=(r=r||window.event).touches[0].pageX-e.offsetLeft-o,g=e.clientWidth-n.clientWidth-8*A;s<=0&&(s=0),s>=g&&(s=g),n.style.left=s+"px",s!=g||a.lockStatus||(a.lockStatus=!0,document.getElementById("slide-ball-start").style.display="none",document.getElementById("slide-ball-end").style.display="inline",t.style.width=e.clientWidth+"px",t.style.backgroundColor="#598FFF",e.style.border="0",n.style.backgroundColor="#ffffff",i.textContent="正在开锁",i.style.color="#ffffff",n.ontouchstart=null,a.sendRemoteUnlockApi())},document.ontouchend=function(){a.lockStatus||(t.style.width="0px",n.style.left=8*A+"px",n.style.transition="left 0.6s linear",t.style.transition="width 0.6s linear"),document.ontouchend=null,document.ontouchmove=null}}},e.resetRemoteUnlockSlide=function(){var A=this.videoWidth/1024||1;this.lockStatus=!1;var e=document.getElementById("mobile-remoteUnlock-slide-box"),t=document.getElementById("mobile-remoteUnlock-slide-bgColor"),i=document.getElementById("mobile-remoteUnlock-slide-tips"),n=document.getElementById("mobile-remoteUnlock-slide-ball");t.style.width="0px",n.style.left=8*A+"px",i.textContent="右滑开锁",i.style.color="#666666",document.getElementById("slide-ball-start").style.display="inline",document.getElementById("slide-ball-end").style.display="none",t.style.backgroundColor="#FFFFFF",e.style.border="1px solid rgba(255,255,255,1)",n.style.backgroundColor="#598FFF"},e.sendRemoteUnlockApi=function(){var A=this;II(this.jSPlugin,(function(e){e&&200==e.code?A.toastCustom.initToastContent("开锁成功"):A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}),(function(e){A.toastCustom.initToastContent("开锁失败,请重试"),A.popupCustom.closePopupCustom()}))},e.closeRemoteUnlock=function(){this.popupCustom.closePopupCustom()},A}(),_I={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000080",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}},SI=function(A){var e="";return Object.keys(A).map((function(t,i){e+=t+":"+A[t]+(i\n \n ',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(s)}if(1!=this.themeData.customConfig.bellPoster||i)document.getElementById("bellring-icon")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon"));else{var g=1.8*n,l=6;document.getElementById(this.jSPlugin.id+"-headControl")&&(l=document.getElementById(this.jSPlugin.id+"-headControl").offsetHeight+.1*g+6);var c=l+(this.videoHeight-130*a)/2,d=document.createElement("div");d.id="bellring-icon",d.style="position: absolute;pointer-events: none;background: none;width: 100%;\n position: absolute;top: "+c+"px;display: flex;align-items: center;justify-content: center;",d.innerHTML='
\n
\n \n icon/响铃\n \n \n \n \n \n
\n
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(d),t&&"onBell"==this.bellStatus&&this.jSPlugin.pause()}setTimeout((function(){var e=A.decoderState.state,t=e.isEditing,i=e.rejection;"onBell"!=A.bellStatus||i||(A.removeBellRing(),t||A.answerOvertime())}),this.maxBellTime)}},e.removeBellRing=function(){document.getElementById("bellring")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring")),document.getElementById("bellring-icon")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon"))},e.getMiniCallTimeUrl=function(){if(-1!==this.jSPlugin.url.indexOf("hd.live")?this.recUrl=this.jSPlugin.url.replace("hd.live","rec"):this.recUrl=this.jSPlugin.url.replace("live","rec"),this.jSPlugin.callTime){var A=parseInt(this.jSPlugin.callTime),e=A+5e3,t=new Date(A-1e4).Format("yyyyMMddhhmmss"),i=new Date(e).Format("yyyyMMddhhmmss");this.recUrl=this.recUrl+"?begin="+t+"&end="+i}},e.initMiniRec=function(){var A=this,e=this,t=this.videoWidth,i=t/375,n=1.8*t,a=6;document.getElementById(this.jSPlugin.id+"-headControl")&&(a=document.getElementById(this.jSPlugin.id+"-headControl").offsetHeight+.1*n+6);var r=a+this.videoHeight+10*i;if(document.getElementById("miniRecbox"))document.getElementById("miniRecbox")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("miniRecbox")),document.getElementById("miniClose")&&document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("miniClose")),this.initMiniRec();else{var o=document.createElement("div");o.id="miniRecbox",o.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;top: "+r+"px;right: "+9*i+"px;",o.innerHTML='
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(o),this.getMiniCallTimeUrl();var s={domain:Xc};this.miniRecPlayer=new Wf({id:"miniRec",width:160*i,height:90*i,template:"miniRec",url:this.recUrl,token:this.jSPlugin.token,handleError:function(t){t&&6701==t.retcode?(A.miniRecNum=A.miniRecNum+1,A.miniRecNum<5?e.miniRecPlayer.changePlayUrl({type:"miniRec"}):e.miniRecCloseClick()):e.miniRecCloseClick()},env:this.jSPlugin.env||s});var g=document.createElement("div");g.id="miniClose",g.style="position: absolute;top: "+(r+8)+"px;right: "+16*i+"px;",g.innerHTML='
\n \n close\n \n \n \n \n \n \n \n
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(g),document.getElementById("miniClose-btn").onclick=function(){e.miniRecCloseClick()}}},e.initMiniImageRec=function(){var A=this.videoWidth/375,e=6;document.getElementById(this.jSPlugin.id+"-headControl")&&(e=document.getElementById(this.jSPlugin.id+"-headControl").offsetHeight+26);var t=e+this.videoHeight+10*A;if(document.getElementById("miniRecbox"))document.getElementById("miniRecbox").style.top=t+"px",document.getElementById("miniClose").style.top=t+8+"px";else{var i=document.createElement("div");i.id="miniRecbox",i.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;\n top: "+t+"px;\n right: "+9*A+"px;\n user-select: none;\n ",i.innerHTML='
\n \n
示意小窗位置
\n
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(i);var n=document.createElement("div");n.id="miniClose",n.style="z-index: 4;position: absolute;top: "+(t+8)+"px;right: "+16*A+"px;",n.innerHTML='
\n \n close\n \n \n \n \n \n \n \n
',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(n),document.getElementById("miniClose-btn").onclick=function(){}}},e.miniRecCloseClick=function(){document.getElementById("miniRecbox")&&"rec"==this.miniRecStatus&&(this.miniRecPlayer&&this.miniRecPlayer.stop(),document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("miniClose")),document.getElementById(this.jSPlugin.id+"-wrap").removeChild(document.getElementById("miniRecbox")))},e.miniRecSwitchClick=function(){var A=this.decoderState.state.isEditing,e=this.videoWidth,t=e/375,i=1.8*e,n=6;document.getElementById(this.jSPlugin.id+"-headControl")&&(n=document.getElementById(this.jSPlugin.id+"-headControl").offsetHeight+.1*i+6);var a=n+this.videoHeight+10*t;if("rec"==this.miniRecStatus){this.miniRecStatus="live",A?(document.getElementById("miniRec-embed").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec-embed").style.height=this.jSPlugin.height+"px",document.getElementById("miniRec").style.width=this.jSPlugin.width+"px",document.getElementById("miniRec").style.height=this.jSPlugin.height+"px"):this.miniRecPlayer.reSize(this.jSPlugin.width,this.jSPlugin.height),this.jSPlugin.reSize(160*t,90*t);var r=this.videoHeight+10*t,o=.2*i-90*t-10*t;document.getElementById(this.jSPlugin.id+"-wrap").style.width=this.videoWidth+"px",document.getElementById(""+this.jSPlugin.id).style.marginTop=r+"px",document.getElementById(""+this.jSPlugin.id).style.marginLeft=e-160*t-9+"px",document.getElementById(""+this.jSPlugin.id).style.overflow="hidden",document.getElementById(""+this.jSPlugin.id).style.borderRadius="8px",document.getElementById("miniRecbox").style.top=n+"px",document.getElementById("miniRecbox").style.left="0",document.getElementById("miniRecbox").style.right="0",document.getElementById("miniRecbox").style.borderRadius="0px",document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop=o+"px"}else this.miniRecStatus="rec",A?(document.getElementById("miniRec-embed").style.width=160*t+"px",document.getElementById("miniRec-embed").style.height=90*t+"px",document.getElementById("miniRec").style.width=160*t+"px",document.getElementById("miniRec").style.height=90*t+"px"):this.miniRecPlayer.reSize(160*t,90*t),this.jSPlugin.reSize(this.videoWidth,this.videoHeight),document.getElementById(this.jSPlugin.id+"-wrap").style.width=this.videoWidth+NaN,document.getElementById(""+this.jSPlugin.id).style.marginTop="0",document.getElementById(""+this.jSPlugin.id).style.marginLeft="0",document.getElementById(""+this.jSPlugin.id).style.overflow="hidden",document.getElementById(""+this.jSPlugin.id).style.borderRadius="0px",document.getElementById("miniRecbox").style.top=a+"px",document.getElementById("miniRecbox").style.right="9px",document.getElementById("miniRecbox").style.left="auto",document.getElementById("miniRecbox").style.borderRadius="8px",document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop=.2*i+"px"},e.matchBtn=function(A,e){var t=this,i=this.themeData,n=i.header,a=i.footer,r=this.decoderState.state,o=r.mute,s=r.rejection;document.documentElement.clientHeight;var g=this.videoWidth/375,l=this.videoWidth/375||1,c={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}};-1===n[this.bellStatus].btnList.findIndex((function(e){return e.iconId===A}))?(c.color=a[this.bellStatus].color,c.backgroundColor=a[this.bellStatus].backgroundColor,c.activeColor=a[this.bellStatus].activeColor):(c.color=n[this.bellStatus].color,c.backgroundColor=n[this.bellStatus].backgroundColor,c.activeColor=n[this.bellStatus].activeColor);var d=this.videoWidth/4;switch(A){case"ringStatus":return c.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,c.id=A,c.domString=''+(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt)+"",c.onclick=function(){},c;case"deviceCategory":return c.title="设备名称",c.id=A,c.domString=''+(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称")+"",c.onclick=function(){},c;case"callStatus":return c.title="通话中",c.id=A,c.domString='通话中',c.onclick=function(){},c;case"deviceCategory":return c.title="设备名称",c.id=A,c.domString=''+(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称")+"",c.onclick=function(){},c;case"rejection":return c.title="拒绝",c.id=A,c.domString='
\n
\n \n 拒绝\n \n \n \n \n \n
\n
拒绝
\n
',c.onclick=function(){var A=t,e=t.decoderState.state,i=e.play,n=e.isEditing,a=e.rejection;if(n||a)return!1;i&&t.jSPlugin.stop(),t.removeBellRing(),t.setDecoderState({play:!1,rejection:!0}),A.miniRecCloseClick(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("rejection")},c;case"quickReply":return c.title="快捷回复",c.id=A,c.domString='
\n
\n \n 快捷回复\n \n \n \n \n \n
\n
快捷回复
\n
',c.onclick=function(){var A=t.decoderState.state,e=A.isEditing,i=A.rejection;if(e||i)return!1;t.switchFooter("quickReply"),t.quickReplyEle=new mI(t.jSPlugin,t.switchFooter,t.videoWidth)},c;case"answer":return c.title="接听",c.id=A,c.domString='
\n
\n \n 接听\n \n \n \n \n \n
\n
接听
\n
',c.onclick=function(){var A=t,i=t.decoderState.state,r=i.play,o=i.isEditing,s=i.talk,g=i.sound,l=i.rejection;if(o||l)return!1;t.jSPlugin.pluginStatus.loadingClear(),t.bellStatus="onCall",t.switchFooter("onCall"),a[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderFooter(A.iconId,A)})),n[t.bellStatus].btnList.map((function(A,e){A.isrender&&t.renderHeader(A.iconId,A)}));var c=document.getElementById(t.jSPlugin.id+"-header-onBell");c&&c.parentElement.removeChild(c),1==t.themeData.customConfig.bellPoster&&(document.getElementById("bellring-icon")&&document.getElementById(t.jSPlugin.id+"-wrap").removeChild(document.getElementById("bellring-icon")),t.jSPlugin.setPoster("")),t.removeBellRing(),t.miniRecCloseClick(),r||(t.jSPlugin.pluginStatus.loadingStart(t.jSPlugin.id),t.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),t.jSPlugin.play(),t.setDecoderState({play:!r})),s||1!=t.themeData.customConfig.defaultMicro||(t.setDecoderState({talk:!0,mute:!1}),g&&t.jSPlugin.closeSound(),t.jSPlugin.Talk.startTalk()),t.setDecoderState({sound:!1}),0==t.themeData.customConfig.defaultMicro&&(t.muteCommon(e),t.jSPlugin.openSound()),t.maxTalkTime=1e3*t.themeData.customConfig.maxTalkTime*60,setTimeout((function(){s&&(A.setDecoderState({talk:!1}),A.jSPlugin.Talk.stopTalk()),r&&(A.jSPlugin.stop(),A.setDecoderState({play:!r})),t.rejectionStatusDispose(),t.remoteUnlockEle&&t.remoteUnlockEle.closeRemoteUnlock(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp")}),t.maxTalkTime)},c;case"remoteUnlock":return c.title="远程开锁",c.id=A,c.domString='
\n
\n \n 开锁\n \n \n \n \n \n
\n
远程开锁
\n
',c.onclick=function(){var A=t.decoderState.state,e=A.isEditing;A.play;var i=A.rejection;if(e||"onBell"==t.bellStatus||i)return!1;t.switchFooter("remoteUnlock"),t.remoteUnlockEle=new yI(t.jSPlugin,t.switchFooter,t.videoWidth)},c;case"mute":return c.title="静音",c.id=A,c.domString='
\n
\n \n icon/静音\n \n \n \n \n \n
\n
静音
\n
',c.onclick=function(){var A=t.decoderState.state,i=A.talk,n=A.sound;if(A.play,A.rejection)return!1;i?(t.setDecoderState({talk:!1,mute:!0},e.backgroundColor),t.jSPlugin.Talk.stopTalk(),t.jSPlugin.openSound()):(t.setDecoderState({talk:!0,mute:!1},e.backgroundColor),n&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})),t.jSPlugin.Talk.startTalk())},c;case"hangUp":return c.title="挂断",c.id=A,c.domString='
\n
\n \n 挂断\n \n \n \n \n \n
\n
挂断
\n
',c.onclick=function(){var A=t,e=t.decoderState.state,i=e.talk,n=e.play;if(e.rejection)return!1;i&&(t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk()),n&&(t.jSPlugin.stop(),t.setDecoderState({play:!n})),(n||i)&&(A.miniRecCloseClick(),t.rejectionStatusDispose(),"function"==typeof t.jSPlugin.hangUpCallback&&t.jSPlugin.hangUpCallback("hangUp"))},c;default:return c}},e.answerOvertime=function(){this.toastCustom.initToastContent("应答超时"),this.decoderState.state.play&&this.jSPlugin.stop(),this.setDecoderState({play:!1,rejection:!0}),this.miniRecCloseClick(),this.rejectionStatusDispose(),this.quickReplyEle&&this.quickReplyEle.closeQuickReplyEle(),"function"==typeof this.jSPlugin.hangUpCallback&&this.jSPlugin.hangUpCallback("rejection")},e.rejectionStatusDispose=function(){var A=this,e=this.themeData.footer,t=document.getElementById(this.jSPlugin.id+"-audioControls"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall"),n=document.getElementById(this.jSPlugin.id+"-audioControls-quickReplyBtn"),a=document.getElementById("header-"+this.bellStatus+"-ringStatus");"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),a.innerText="通话已结束",this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:!0,type:2})},e.userNoDevice=function(){var A=this;this.removeBellRing(),this.setDecoderState({rejection:!0});var e=this.themeData.footer,t=document.getElementById(this.jSPlugin.id+"-audioControls"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall"),n=document.getElementById(this.jSPlugin.id+"-audioControls-quickReplyBtn");"onBell"==this.bellStatus?(t.innerHTML="",n.innerHTML="",t.style.color="#2C2C2C"):(i.innerHTML="",i.style.color="#2C2C2C"),this.setDecoderState({rejection:!0}),e[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)})),this.jSPlugin.pluginStatus.loadingClear(),this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:!0,type:2})},e.renderHeader=function(A,e){var t=this,i=this.matchBtn(A,e);if(document.getElementById(this.jSPlugin.id+"-header-"+this.bellStatus+"-content")){var n=document.createElement("span");n.innerHTML=""+i.domString,document.getElementById(this.jSPlugin.id+"-header-"+this.bellStatus+"-content").appendChild(n)}else{var a=document.createElement("div");a.id=this.jSPlugin.id+"-header-"+this.bellStatus,a.style="max-width:50%;position:relative;",a.innerHTML='\n '+i.domString+"\n ",a.onclick=function(A){if(t.decoderState.state.isEditing)return!1;i.onclick(A)},document.getElementById(this.jSPlugin.id+"-headControl").childNodes[0].appendChild(a)}},e.renderFooter=function(A,e){var t=this,i=this.decoderState.state.mute;if("remoteUnlock"==A&&this.jSPlugin.capacity&&(!this.jSPlugin.capacity.support_unlock||0==this.jSPlugin.capacity.support_unlock))return!1;var n=this.matchBtn(A,e),a=this.videoWidth/4,r=document.createElement("div");if(r.className="theme-icon-item","quickReply"!==n.id&&(r.style="width:"+.66*a+"px;padding:0 "+.12*a+"px;box-sizing: content-box;-webkit-tap-highlight-color:transparent;"),r.innerHTML='
'+n.domString+"
",r.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onclick(A)},n.onmouseenter&&(r.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseenter(A)}),n.onmouseleave&&(r.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;n.onmouseleave(A)}),"quickReply"!=A){var o=document.createElement("span");o.className="icon-move left",o.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',o.onclick=function(){t.editIcon(n.id,"left","footer")},r.appendChild(o);var s=document.createElement("span");s.className="icon-move right",s.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',s.onclick=function(){t.editIcon(n.id,"right","footer")},r.appendChild(s)}if("answer"==A||"rejection"==A||"hangUp"==A);else{var g=document.createElement("span");g.className="icon-move close",g.innerHTML='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',g.onclick=function(){t.editIcon(n.id,"delete","footer")},r.appendChild(g)}"onCall"==this.bellStatus?document.getElementById(this.jSPlugin.id+"-audioControls-onCall").appendChild(r):(document.getElementById(this.jSPlugin.id+"-audioControls").appendChild(r),"quickReply"===n.id&&document.getElementById(this.jSPlugin.id+"-audioControls-quickReplyBtn").appendChild(r)),this.decoderState.state.isEditing&&"mute"==A&&"onCall"==this.bellStatus&&(0!=this.themeData.customConfig.defaultMicro||i?this.setDecoderState({mute:!1},e.backgroundColor):this.setDecoderState({mute:!0},e.backgroundColor))},e.switchFooter=function(A){var e=this.themeData.footer;switch(A){case"onBell":document.getElementById(this.jSPlugin.id+"-audioControls-onCall")?"none"==document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.display&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.display="flex",document.getElementById(this.jSPlugin.id+"-audioControls-quickReplyBtn").style.display="flex",document.getElementById(this.jSPlugin.id+"-btn-quickReply").style.display="flex"):(document.getElementById(this.jSPlugin.id+"-audioControls").style.display="flex",document.getElementById(this.jSPlugin.id+"-audioControls-quickReplyBtn").style.display="flex",document.getElementById(this.jSPlugin.id+"-btn-quickReply").style.display="flex");break;case"onCall":document.getElementById(this.jSPlugin.id+"-audioControls").style.display="none",document.getElementById(this.jSPlugin.id+"-btn-quickReply").style.display="none",document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.display="flex",this.themeData&&(document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.color=e[this.bellStatus].color)}},e.initThemeData=function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing,a=this.videoWidth,r=a/375,s=1.8*a,g=this.jSPlugin.id;if(this.isNeedRenderHeader=Hc(t[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=Hc(i[this.bellStatus].btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader)if(document.getElementById(this.jSPlugin.id+"-headControl"))document.getElementById(this.jSPlugin.id+"-headControl").innerHTML="
";else{var l,c=document.createElement("div");c.setAttribute("id",this.jSPlugin.id+"-headControl"),c.setAttribute("class","header-controls"),c.innerHTML="
",this.jSPlugin.height;var d=((l={display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":.1*s+"px","align-items":"center","text-align":"center","font-size":"24ox"}).color="#2c2c2c",l["margin-top"]="6px",l);c.style=SI(d),document.getElementById(g+"-wrap").insertBefore(c,document.getElementById(g));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),50)}else document.getElementById(this.jSPlugin.id+"-headControl")&&document.getElementById(this.jSPlugin.id+"-headControl").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-headControl"));if(this.jSPlugin.height,this.isNeedRenderFooter)if(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"))document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop=.2*s+"px","onCall"==this.bellStatus?document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").innerHTML='\n \n \n \n \n \n ':document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").innerHTML='\n \n \n \n \n \n ');else{var C=document.createElement("div");C.setAttribute("id",this.jSPlugin.id+"-ez-iframe-footer-container"),C.setAttribute("class","ez-iframe-footer-container");var h={position:"relative","margin-top":.2*s+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","font-size":"12px"};C.style=SI(h),C.innerHTML='\n \n \n \n \n \n ',o(C,document.getElementById(g))}else document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"));if(this.isNeedRenderHeader&&document.getElementById(this.jSPlugin.id+"-headControl")&&t[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)})),this.isNeedRenderFooter&&document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.background=i[this.bellStatus].backgroundColor,document.getElementById(this.jSPlugin.id+"-audioControls").style.color=i[this.bellStatus].color,i[this.bellStatus].btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),1!=this.themeData.customConfig.bellPoster||n)this.jSPlugin.setPoster("");else{this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var u=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(u),A.jSPlugin.setPoster(A.jSPlugin.poster))}),50)}this.activeThemeStatus&&(this.initBellRing(),this.checkIsAppleDevice()||!1?window.addEventListener("touchstart",this.autoPlayRing):window.addEventListener("click",this.autoPlayRing));this.inited=!0,this.getCallDeviceInfo()},e.checkIsAppleDevice=function(){var A=navigator.userAgent,e=!!A.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),t=A.indexOf("iPad")>-1,i=A.indexOf("iPhone")>-1||A.indexOf("Mac")>-1;return!!(e||t||i)},e.renderThemeData=function(){var A=this,e=this.themeData,t=e.header,i=e.footer,n=this.decoderState.state.isEditing;if(this.isNeedRenderHeader&&t&&(document.getElementById(this.jSPlugin.id+"-headControl").style.color=t[this.bellStatus].color.replace("-diy",""),t[this.bellStatus].btnList.map((function(e,t){var i;e.isrender&&A.setDecoderState(((i={})[e.iconId]=A.decoderState.state[e.iconId],i))}))),this.isNeedRenderFooter&&i)document.getElementById(this.jSPlugin.id+"-audioControls").style.background=i[this.bellStatus].backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-audioControls").style.color=i[this.bellStatus].color.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-audioControls-onCall").style.color=i[this.bellStatus].color.replace("-diy",""),i[this.bellStatus].btnList.map((function(e,t){var i;e.isrender&&A.setDecoderState(((i={})[e.iconId]=A.decoderState.state[e.iconId],i));if(0==t&&!A.themeInited&&A.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),1!=A.themeData.customConfig.bellPoster||n?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),-1!==this.jSPlugin.url.indexOf("hd.live")&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById(this.jSPlugin.id+"-wrap").addEventListener("click",(function(){A.stopAutoFocus()}))),this.setDecoderState({cloudRec:"cloud.rec"===g(this.jSPlugin.url).type,rec:"rec"===g(this.jSPlugin.url).type,type:g(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!n?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var r=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(r),A.jSPlugin.reSize(A.jSPlugin.params.width,A.jSPlugin.params.height))}),50);n||this.jSPlugin.isWebConsole?1==this.themeData.customConfig.miniWinRec?this.initMiniImageRec():this.miniRecCloseClick():setTimeout((function(){"onBell"==A.bellStatus&&A.jSPlugin.capacity&&1==A.jSPlugin.capacity.support_doorcall_playback&&1==A.themeData.customConfig.miniWinRec&&(!A.deviceInfoData||A.deviceInfoData&&!A.deviceInfoData.isEncrypt)&&(A.miniRecNum=0,A.initMiniRec())}),1e3)},e.setThemeData=function(A,e){this.themeData=A,"onCall"==e&&(this.bellStatus="onCall")},e.startAutoFocus=function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById(A.jSPlugin.id+"-audioControls")&&(document.getElementById(A.jSPlugin.id+"-audioControls").style.opacity=0,document.getElementById(A.jSPlugin.id+"-audioControls").style.pointerEvents="none")}),1e3*e)},e.stopAutoFocus=function(){document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.opacity=1,document.getElementById(this.jSPlugin.id+"-audioControls").style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()},e.editIcon=function(A,e,t){var i=this.themeData,n=this.themeData[t][this.bellStatus].btnList,a=Hc(n,(function(e){return e.iconId===A})),r=n[a];switch(e){case"delete":n[a].isrender=0;break;case"right":for(var o=-1,s=a+1;s=0;l--)if(n[l].part===n[a].part&&1==n[l].isrender){g=l;break}-1!==g&&(n[a]=n[g],n[g]=r)}i[t][this.bellStatus].btnList=n,this.jSPlugin.Theme.changeTheme(i)},e.countTime=function(A,e){void 0===e&&(e=0);var t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='00:00',document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",r="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),r=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?r+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))},e.editStart=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-audioControls-onCall");document.getElementById(this.jSPlugin.id+"-headControl"),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})},e.editEnd=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-headControl"),i=document.getElementById(this.jSPlugin.id+"-audioControls-onCall");t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),i&&i.setAttribute("class","footer-controls")},e.fetchThemeData=function(A){var e=this;switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"miniRec":break;default:iI(this.jSPlugin,A,(function(A){0==A.meta.code&&A.data?(e.activeThemeStatus=!0,e.themeData=A.data,A.data.header&&(e.themeData.header=A.data.header,e.themeData.header[e.bellStatus].btnList=e.themeData.header[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),A.data.footer&&(e.themeData.footer=A.data.footer,e.themeData.footer[e.bellStatus].btnList=e.themeData.footer[e.bellStatus].btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)):(e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),e.setDecoderState({rejection:!0}),"111021"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff",type:1}),e.activeThemeStatusTxt="无效的模板id"):"111023"==A.meta.code?(e.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff",type:1}),e.activeThemeStatusTxt="试用特权已到期"):(e.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff",type:1}),e.activeThemeStatusTxt="模板未激活"),e.themeData=_I,e.initThemeData(),e.renderThemeData())}),(function(){e.renderThemeData()}))}},e.getCallDeviceInfo=function(){var A=this;this.videoWidth,fI({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:g(this.jSPlugin.url).deviceSerial}).then((function(e){e.data&&(A.deviceInfoData=e.data,e.data.isEncrypt&&(A.miniRecCloseClick(),setTimeout((function(){A.jSPlugin.pluginStatus.loadingClear(),A.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})}),1e3)),document.getElementById("header-"+A.bellStatus+"-deviceCategory")&&(document.getElementById("header-"+A.bellStatus+"-deviceCategory").innerText=""+e.data.deviceName))})).catch((function(e){20018!=e.code||A.jSPlugin.isWebConsole||A.userNoDevice()}))},e.setHeaderText=function(A){var e=this.videoWidth/375||1;document.getElementById(this.jSPlugin.id+"-deviceCategory-content")&&(document.getElementById(this.jSPlugin.id+"-deviceCategory-content").innerHTML=''+A+''+(this.deviceInfoData&&this.deviceInfoData.category||"")+"")},A}();var vI=function(){function A(A){if(this.jSPlugin=A,this.videoWidth=A.width,this.autoFocus=0,this.autoFocusTimer=null,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,rejection:!1,cloudRec:"cloud.rec"===g(A.url).type,rec:"rec"===g(A.url).type,type:g(A.url).type}},this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==A.isMobile&&(this.isMobile=A.isMobile),this.themeData={},"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.jSPlugin.themeId)if(this.isMobile?this.call=new DI(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState):this.call=new xI(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.call.initThemeData(),this.call.renderThemeData();else this.call.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new Yd(this.jSPlugin)),n(this.jSPlugin.staticPath+"/speed/speed.css"),n(this.jSPlugin.staticPath+"/css/theme.css")}var e=A.prototype;return e.changeTheme=function(A,e,t){if(void 0===e&&(e=!0),void 0===t&&(t="onBell"),"string"==typeof A)switch(this.jSPlugin.themeId=A,this.jSPlugin.themeId){case"pcLive":case"mobileCall":case"webCall":this.call.initThemeData(),this.call.renderThemeData();break;default:this.call.fetchThemeData(A)}else"object"==(void 0===A?"undefined":(i=A)&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)&&(this.themeData=A,this.call.setThemeData(A,t),this.call.initThemeData(),this.call.renderThemeData(),this.decoderState.state.isEditing&&e&&this.call.editStart());var i;this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(A)},e.setDecoderState=function(A,e){var t=this,i=this.themeData;i.header,i.footer,Object.keys(A).map((function(i){if("mute"===i)document.getElementById(t.jSPlugin.id+"-icon-mute")&&(A[i]?(document.getElementById(t.jSPlugin.id+"-icon-mute").style.background=e,document.getElementById(t.jSPlugin.id+"-icon-mute").style.border=" 1px solid "+e,document.getElementById("icon-mute-path").style.fill="#ffffff"):(document.getElementById(t.jSPlugin.id+"-icon-mute").style.background="#ffffff",document.getElementById(t.jSPlugin.id+"-icon-mute").style.border="1px solid "+e,document.getElementById("icon-mute-path").style.fill=e));t.decoderState.state=Object.assign(t.decoderState.state,A)}))},e.startAutoFocus=function(){var A=this,e=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout((function(){document.getElementById(A.jSPlugin.id+"-audioControls")&&(document.getElementById(A.jSPlugin.id+"-audioControls").style.opacity=0,document.getElementById(A.jSPlugin.id+"-audioControls").style.pointerEvents="none")}),1e3*e)},e.stopAutoFocus=function(){document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.opacity=1,document.getElementById(this.jSPlugin.id+"-audioControls").style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()},e.toString=function(){return this.coreX+"-"+this.coreY},e.editIcon=function(A,e,t){var i=this.themeData,n=this.themeData[t].btnList,a=Hc(n,(function(e){return e.iconId===A})),r=n[a];switch(e){case"delete":if("rec"===A){if(-1===Hc(n,(function(A){return"cloudRec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if("cloudRec"===A&&-1===Hc(n,(function(A){return"rec"===A.iconId&&1==A.isrender})))return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;n[a].isrender=0;break;case"right":for(var o=-1,s=a+1;s=0;l--)if(n[l].part===n[a].part&&1==n[l].isrender){g=l;break}-1!==g&&(n[a]=n[g],n[g]=r)}i[t].btnList=n,this.changeTheme(i)},e.countTime=function(A,e){void 0===e&&(e=0);var t=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var i=document.createElement("div");i.id=this.jSPlugin.id+"time-area",i.className="time-area",i.innerHTML='00:00',document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").appendChild(i)}if(this.countTimer&&clearInterval(this.countTimer),"add"===A){var n=e;document.getElementById(t.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval((function(){++n,document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML=function(A){var e=parseInt(A),t=0,i=0,n="00",a="00",r="00";e>59&&(t=parseInt(e/60),e=parseInt(e%60),t>59&&(i=parseInt(t/60),t=parseInt(t%60)));return n=parseInt(e)>9?parseInt(e):"0"+parseInt(e),a=parseInt(t)>9?parseInt(t):"0"+parseInt(t),r=parseInt(i)>9?parseInt(i):"0"+parseInt(i),i>0?r+":"+a+":"+n:t>0?a+":"+n:"00:"+n}(n)}),1e3)}else"destroy"===A&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(t.jSPlugin.id+"time-area")&&(document.getElementById(t.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(t.jSPlugin.id+"time-area").style.display="none"))},e.editStart=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-audioControls-onCall"),i=document.getElementById(this.jSPlugin.id+"-headControl");i&&i.setAttribute("class","header-controls themeEditing"),e&&e.setAttribute("class","footer-controls themeEditing"),t&&t.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})},e.editEnd=function(A){var e=document.getElementById(this.jSPlugin.id+"-audioControls"),t=document.getElementById(this.jSPlugin.id+"-headControl");t&&t.setAttribute("class","header-controls"),e&&e.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})},e.setDisabled=function(A){},e.getDeviceInfo=function(){var A=this,e=this.videoWidth/1024||1;fI({accessToken:this.jSPlugin.accessToken||this.jSPlugin.token.deviceToken.video,deviceSerial:g(this.jSPlugin.url).deviceSerial}).then((function(t){200==t.code&&t.data&&document.getElementById(A.jSPlugin.id+"-deviceCategory-content")&&(document.getElementById(A.jSPlugin.id+"-deviceCategory-content").style.maxWidth="100%",document.getElementById(A.jSPlugin.id+"-deviceCategory-content").style.overflow="hidden",document.getElementById(A.jSPlugin.id+"-deviceCategory-content").style.textOverflow="ellipsis",document.getElementById(A.jSPlugin.id+"-deviceCategory-content").style.whiteSpace="nowrap",document.getElementById(A.jSPlugin.id+"-deviceCategory-content").innerHTML='有人按门铃'+t.data.category+"")})).catch((function(A){}))},A}(),wI=function(){function A(A){this.jSPlugin=A;var e=window["EZUIKIT_TIMER_INTERVAL_"+A.id];e&&Object.keys(e).length>0&&this.resetTimer(),window["EZUIKIT_TIMER_INTERVAL_"+A.id]={}}var e=A.prototype;return e.createInterval=function(A,e,t){window["EZUIKIT_TIMER_INTERVAL_"+this.jSPlugin.id][A]=setInterval(e,t)},e.clearTimer=function(A){var e=window["EZUIKIT_TIMER_INTERVAL_"+this.jSPlugin.id];e[A]&&(clearInterval(e[A]),delete e[A])},e.resetTimer=function(){var A=window["EZUIKIT_TIMER_INTERVAL_"+this.jSPlugin.id];for(var e in A)clearInterval(A[e]),delete A[e]},A}(),bI=function(A){var e=this;this.initMap=function(){var A=e,t=e.videoWidth,i=e.videoHeight;if(document.getElementById(e.jSPlugin.id+"-miniRecbox"))document.getElementById(e.jSPlugin.id+"-wrap").removeChild(document.getElementById(e.jSPlugin.id+"-miniRecbox")),e.initMap();else{var n=document.createElement("div");n.id=e.jSPlugin.id+"-miniRecbox",n.style=";position: absolute; bottom:96px;right:"+e.jSPlugin.inspectVideoWidth+"px;",n.innerHTML='
',document.getElementById(e.jSPlugin.id+"-wrap").insertBefore(n,document.getElementById(e.jSPlugin.id+"-ez-iframe-footer-container")),A.map=A.loadMap(e.jSPlugin.id+"-mapbox")}return A.map},this.loadMap=function(A){var e=new BMapGL.Map(A);return e.centerAndZoom(new BMapGL.Point(116.297611,40.047363),15),e.enableScrollWheelZoom(!0),e},this.createCircle=function(A,t,i,n){var a=new BMapGL.Point(A,t),r=new BMapGL.Marker(a,{title:n});if(e.map.addOverlay(r),0!=i){var o=new BMapGL.Circle(new BMapGL.Point(A,t),i,{strokeColor:"#ff4d4f",strokeWeight:4,strokeOpacity:1,strokeStyle:"dashed",fillOpacity:0});e.map.addOverlay(o)}},this.createInspectPoints=function(A){A.map((function(A){e.createCircle(A.longitude,A.latitude,A.radius,A.inspectPointName)}))},this.createPolygon=function(A,t,i,n,a,r,o){void 0===t&&(t="#407AFF"),void 0===i&&(i="solid"),void 0===n&&(n=4),void 0===a&&(a=1),void 0===r&&(r="407AFF"),void 0===o&&(o=0);var s=[];A.split(";").map((function(A){var e=A.split(",");s.push(new BMapGL.Point(e[0],e[1]))})),e.inspectRange=new BMapGL.Polygon(s,{strokeColor:t,strokeWeight:n,strokeOpacity:a,strokeStyle:i,fillOpacity:o,fillColor:r}),e.map.addOverlay(e.inspectRange)},this.createTrack=function(A,t,i,n,a,r,o,s,g,l,c){void 0===t&&(t=!1),void 0===i&&(i="#18C796"),void 0===n&&(n="solid"),void 0===a&&(a=4),void 0===r&&(r=1),void 0===o&&(o=0),void 0===s&&(s=0),void 0===g&&(g=500),void 0===l&&(l=0),void 0===c&&(c=!1);var d=[];if(A.map((function(A){var t=!1;e.currentTrack.length>0&&e.currentTrack.map((function(e){e.longitude===A.longitude&&e.latitude===A.latitude&&e.reportTime===A.reportTime&&(t=!0)})),t||(0==d.length&&e.currentTrack.length>0&&d.push(new BMapGL.Point(e.currentTrack[e.currentTrack.length-1].longitude,e.currentTrack[e.currentTrack.length-1].latitude)),d.push(new BMapGL.Point(A.longitude,A.latitude)))})),0!=d.length){var I=new BMapGL.Polyline(d,{strokeColor:i,strokeWeight:a,strokeOpacity:r,strokeStyle:n,fillOpacity:o});if(t?(e.map.addOverlay(I),e.map.centerAndZoom(d[d.length-1],15)):(e.trackAni=new BMapGLLib.TrackAnimation(e.map,I,{overallView:c,tilt:s,duration:g,delay:l}),e.trackAni.start()),e.currentTrack=A,e.currentTrack.length>0&&e.currentTrack.length>0){var C=new BMapGL.Point(e.currentTrack[0].longitude,e.currentTrack[0].latitude);if(e.startPoint=new BMapGL.Marker(C,{icon:new BMapGL.Icon(e.jSPlugin.staticPath+"/imgs/start.png",new BMapGL.Size(32,47)),offset:new BMapGL.Size(0,-17)}),e.map.addOverlay(e.startPoint),1==e.currentTrack.length)return;var h=new BMapGL.Point(e.currentTrack[e.currentTrack.length-1].longitude,e.currentTrack[e.currentTrack.length-1].latitude);e.endPoint&&e.map.removeOverlay(e.endPoint),setTimeout((function(){e.endPoint=new BMapGL.Marker(h,{icon:new BMapGL.Icon(e.jSPlugin.staticPath+"/imgs/end.png",new BMapGL.Size(30,30))}),e.map.addOverlay(e.endPoint)}),t?0:g)}}},this.centerToTrack=function(A){void 0===A&&(A=15),e.currentTrack.length>0&&(1==e.currentTrack.length?e.map.centerAndZoom(new BMapGL.Point(e.currentTrack[0].longitude,e.currentTrack[0].latitude),A):e.map.centerAndZoom(new BMapGL.Point(e.currentTrack[e.currentTrack.length-1].longitude,e.currentTrack[e.currentTrack.length-1].latitude),A))},this.jSPlugin=A,this.videoWidth=A.width,this.videoHeight=A.height,this.toastCustom=new cI(A,!1),this.currentTrack=[],this.startPoint=null,this.endPoint=null,this.trackAni=null,this.inspectRange=null,this.map=this.initMap()},FI=function(A){var e=this;this.init=function(){var A=e;if(e.videoWidth,e.videoHeight,document.getElementById(e.jSPlugin.id+"-inspect-global-box"))document.getElementById(e.jSPlugin.id+"-inspect-global-box")&&document.getElementById(e.jSPlugin.id+"-wrap").removeChild(document.getElementById(e.jSPlugin.id+"-inspect-global-box")),A.init();else{var t=document.createElement("div");t.id=e.jSPlugin.id+"-inspect-global-box",t.style=";position: absolute; left:0; top: 0; width: 100%; height: 100%; z-index: 10000; background: #fff;",t.innerHTML='
\n
\n
\n
加载中…
\n
\n ',document.getElementById(e.jSPlugin.id+"-wrap").appendChild(t)}},this.deviceErrorInfo=function(A,t){var i=Object.assign({tips:"",refreshBtn:"",refreshShow:!1},A);if(document.getElementById(e.jSPlugin.id+"-no-inspect-box"))document.getElementById(e.jSPlugin.id+"-no-inspect-box")&&document.getElementById(e.jSPlugin.id+"-inspect-global-box").removeChild(document.getElementById(e.jSPlugin.id+"-no-inspect-box")),e.deviceErrorInfo(A,t);else{e.videoHeight;var n=document.createElement("div");n.id=e.jSPlugin.id+"-no-inspect-box",n.style="width:100%;height:100%; background: #ffffff; display: flex; justify-content: center; align-items: center",n.innerHTML='
\n
\n \n
\n
'+i.tips+'
\n \n
\n ",document.getElementById(e.jSPlugin.id+"-inspect-global-box").appendChild(n),document.getElementById(e.jSPlugin.id+"-inspect-device-status-refresh").addEventListener("click",(function(){t&&t()}))}},this.globalContainerToggle=function(A,e){document.getElementById(A)&&(document.getElementById(A).style.display=e?"flex":"none")},this.jSPlugin=A,this.videoWidth=A.width,this.videoHeight=A.height,this.toastCustom=new cI(A,!1),this.init()};function RI(){return RI=Object.assign||function(A){for(var e=1;e\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t'+("warning"===A?'':"")+"\n\t\t\t\t\t\t"+("info"===A?'':"")+"\n\t\t\t\t\t\t"+("error"===A?'':"")+"\n\t\t\t\t\t\t"+("success"===A?'':"")+"\n\t\t\t\t\t\n\t\t\t\t\t"+e+"\n\t\t\t\t
\n\t\t\t
\n\t\t\t",t.appendChild(i)},A}();function PI(){return PI=Object.assign||function(A){for(var e=1;e
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t';var a=document.createElement("img");a.setAttribute("class","ezuikit-image-preview-img"),a.setAttribute("alt",t),a.setAttribute("src",e),a.addEventListener("error",(function(){a.setAttribute("src",i)})),document.body.appendChild(n),n.querySelector(".ezuikit-image-preview-img-main").appendChild(a),document.getElementById(this.id+"-ezuikit-image-preview-operations").addEventListener("click",(function(){document.body.removeChild(n)}))},e.initImage=function(A){var e=this.params,t=e.src,i=e.alt,n=e.fallback,a=document.createElement("img");a.setAttribute("class","ezuikit-image-img"),a.setAttribute("alt",i),a.setAttribute("src",t),a.addEventListener("error",(function(){a.setAttribute("src",n)})),A.appendChild(a)},e.initPreview=function(A){var e=this,t=this.params.showIcon,i=document.createElement("div");i.setAttribute("class","ezuikit-image-mask"),t&&(i.innerHTML='\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t预览\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t'),A.appendChild(i),A.onclick=function(){e.previewImg()}},A}();function TI(){return TI=Object.assign||function(A){for(var e=1;e\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t'+(a?'
'+a+"
":"")+'\n\t\t\t\t\t\t
'+i+"
\n\t\t\t\t\t
\n\t\t\t\t",!document.getElementById(t+"-popover")){var s=document.body;this.params.parentNodeId&&(s=document.getElementById(this.params.parentNodeId)),s.appendChild(o),this.renderPopover(o,r,n)}document.body.addEventListener("click",(function(e){A.addEventListenerFn(e)}))}},e.addEventListenerFn=function(A){var e=this.params.id,t=document.getElementById(e),i=document.getElementById(e+"-popover");t&&A.target!==t&&!t.contains(A.target)&&i&&A.target!==i&&!i.contains(A.target)&&this.hidePopover()},e.hidePopover=function(){var A=this.params.id,e=document.getElementById(A+"-popover");e&&document.body.removeChild(e)},e.renderPopover=function(A,e,t,i,n){A.style.display="block";var a=e.getBoundingClientRect(),r=a.top,o=a.left,s=a.width,g=a.height,l=A.getBoundingClientRect(),c=l.width,d=l.height;i&&(c=i),n&&(d=n);var I=document.body;this.params.parentNodeId&&(I=document.getElementById(this.params.parentNodeId));var C=this.params.arrowPointAtCenter,h=0,u=0,B=A.getElementsByClassName("ezuikit-popover-arrow")[0],E=B.getBoundingClientRect(),f=E.width,Q=E.height;if(C){var x=0,p=0;switch(t){case"top":default:x=c/2,p=d;break;case"bottom":x=c/2,p=0;break;case"left":x=c,p=d/2;break;case"right":x=0,p=d/2;break;case"topLeft":x=(s-f)/2,p=d;break;case"topRight":x=c-(s+f)/2,p=d;break;case"bottomLeft":x=(s-f)/2,p=0;break;case"bottomRight":x=c-(s+f)/2,p=0;break;case"leftTop":x=c,p=(g-Q)/2;break;case"leftBottom":x=c,p=d-(g+Q)/2;break;case"rightTop":x=0,p=(g-10)/2;break;case"rightBottom":x=0,p=d-(g+Q)/2}B.style.left=x+"px",B.style.top=p+"px"}switch(t){case"top":h=-(d+Q),u=(s-c)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top");break;case"bottom":h=g-Q/2,u=(s-c)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottom");break;case"left":h=(g-d)/2,u=-(c+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-left");break;case"right":h=(g-d)/2,u=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-right");break;case"topLeft":h=-(d+Q),u=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topLeft");break;case"topRight":h=-(d+Q),u=s-c,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topRight");break;case"bottomLeft":h=g-Q/2,u=0,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomLeft");break;case"bottomRight":h=g-Q/2,u=s-c,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomRight");break;case"leftTop":h=0,u=-(c+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftTop");break;case"leftBottom":h=g-d,u=-(c+f/2),A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftBottom");break;case"rightTop":h=0,u=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightTop");break;case"rightBottom":h=g-d,u=s-f/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightBottom");break;default:h=-d,u=(s-c)/2,A.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top")}var m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft;A.style.top=r+m+h+"px",A.style.left=o+y+u+"px";var _=A.getBoundingClientRect(),S=I===document.body?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:I.getBoundingClientRect(),D=t;_.leftS.right&&(D=(D=D.replace("Left","Right")).replace("left","right")),_.topS.bottom&&(D=(D=D.replace("Bottom","Top")).replace("bottom","top")),D!==t&&this.renderPopover(A,e,D,c,d)},A}();function LI(){return LI=Object.assign||function(A){for(var e=1;e\n
\n\t\t\t\t\t\n \t\n \n\t\t\t\t\t\n
\n
\n \n ';var s=document.createElement("button");s.className="ezuikit-btn ezuikit-cancel-btn",s.innerText=i;var g=document.createElement("button");return g.className="ezuikit-btn ezuikit-ok-btn ezuikit-btn-primary",g.innerText=n,o.querySelector(".ezuikit-popover-buttons").appendChild(s),o.querySelector(".ezuikit-popover-buttons").appendChild(g),this.PopconfirmDom=new MI(LI({},this.params,{content:o.innerHTML})),document.getElementById(this.params.id+"-popover").querySelector(".ezuikit-cancel-btn")&&(document.getElementById(this.params.id+"-popover").querySelector(".ezuikit-cancel-btn").onclick=function(){a?a():A.hide()}),document.getElementById(this.params.id+"-popover").querySelector(".ezuikit-ok-btn")&&(document.getElementById(this.params.id+"-popover").querySelector(".ezuikit-ok-btn").onclick=function(){r?r():A.hide()}),this.PopconfirmDom},e.hide=function(){this.PopconfirmDom.hidePopover()},A}();function YI(){return YI=Object.assign||function(A){for(var e=1;e\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t',document.body.appendChild(e),document.getElementById(this.id+"-ezuikit-video-preview-operations").addEventListener("click",(function(){document.body.removeChild(e)}))},e.initVideo=function(A){var e=this.params,t=e.poster,i=e.fallback,n=document.createElement("img");n.setAttribute("class","ezuikit-video-img"),n.setAttribute("src",t),n.addEventListener("error",(function(){n.setAttribute("src",i)})),A.appendChild(n)},e.initPreview=function(A){var e=this,t=document.createElement("div");t.setAttribute("class","ezuikit-video-mask"),t.innerHTML='\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t',A.appendChild(t),A.onclick=function(){e.previewVideo()}},A}(),JI=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:e,page:0},a=A.env.domain+"/api/service/devicekit/bodycamera/device/trace";dI(a,"GET",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},HI=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:g(A.url).deviceSerial,validateCode:g(A.url).validCode,channelNo:g(A.url).channelNo,evidenceFileType:e},a=A.env.domain+"/api/service/devicekit/common/file/evidence";dI(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})},KI=function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a=A.env.domain+"/api/service/devicekit/opencloud/task/info";dI(a,"GET",n,(function(A){t&&t(A)}),(function(A){}),{"Content-Type":"application/x-www-form-urlencoded"})};var VI=function(){function A(A,e,t,i,n){void 0===e&&(e={}),void 0===n&&(n=function(){}),this.jSPlugin=A,this.currentEventInfo=e,this.inspectInfo=A.Theme.inspect.inspectInfo,this.type=i,this.timer=t,this.startTime=1e3,this.videoRecordingStatus=!0,this.saveSuccessCallback=n,this.init()}var e=A.prototype;return e.init=function(){this.renderEventDetail(),this.eventDetailDomEvent()},e.show=function(){document.getElementById(this.jSPlugin.id+"-inspect-event-detail-wrap").setAttribute("class","inspect-event-detail-wrap show")},e.hide=function(){document.getElementById(this.jSPlugin.id+"-inspect-event-detail-wrap").setAttribute("class","inspect-event-detail-wrap"),document.getElementById(this.jSPlugin.id+"-inspect-event-detail-box").innerHTML=""},e.validationEventTag=function(){return 0==document.getElementById(this.jSPlugin.id+"-event-tag").value.length?(document.getElementById(this.jSPlugin.id+"-event-tag-error").style.display="block",document.getElementById(this.jSPlugin.id+"-event-tag-error").innerHTML="请输入事件标签",document.getElementById(this.jSPlugin.id+"-event-tag").setAttribute("class","ezuikit-input input-has-error"),!1):(document.getElementById(this.jSPlugin.id+"-event-tag-error").style.display="none",document.getElementById(this.jSPlugin.id+"-event-tag").setAttribute("class","ezuikit-input"),!0)},e.renderVideo=function(A,e,t){var i=this;if(document.getElementById(this.jSPlugin.id+"-inspectEventDetail-videoPreview").innerHTML="",1===A||2===A){if(document.getElementById(this.jSPlugin.id+"-inspectEventDetail-videoPreview").innerHTML='\n
\n
\n
\n
\n 视频正在存储中…\n
\n ',1!==this.type){var n=this.currentEventInfo.evidenceId;this.timer.clearTimer("videoRecordingStatusTimer"),this.timer.createInterval("videoRecordingStatusTimer",(function(){KI(i.jSPlugin,n,(function(A){if(A.meta&&200===A.meta.code){var e=A.data,t=e.taskStatus,n=e.fileUrl,a=e.videoCoverPic||i.jSPlugin.staticPath+"/imgs/bg.svg";i.renderVideo(t,a,n)}}))}),1e3)}}else 4===A||5===A||6===A||7===A?(document.getElementById(this.jSPlugin.id+"-inspectEventDetail-videoPreview").innerHTML='\n
\n
\n \n
\n 视频存储失败\n
\n ',this.timer.clearTimer("videoRecordingStatusTimer")):0!==A&&3!==A||(new UI({id:this.jSPlugin.id+"-inspectEventDetail-videoPreview",poster:e,fallback:this.jSPlugin.staticPath+"/imgs/bg.svg",src:t}),this.timer.clearTimer("videoRecordingStatusTimer"))},e.renderEventDetail=function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.fileUrl,n=e.taskStatus,a=e.videoCoverPic,r=document.createElement("div");r.setAttribute("class","inspectEventDetail");var o="";if(o=1===t?a||this.jSPlugin.staticPath+"/imgs/bg.svg":i||this.jSPlugin.staticPath+"/imgs/bg.svg",r.innerHTML='\n
\n
\n \n
\n
'+(1===this.type?"编辑":"")+(0===t?"图片存证":"视频存证")+'
\n
\n
\n '+(0===t?'
\n

图片已取证,请填写存证信息:

\n
\n
':'
\n \n
\n \n
00:00:00
\n
\n \n
\n
\n

视频已取证:

\n
\n
\n
')+'\n \n \n \n ',document.getElementById(this.jSPlugin.id+"-inspect-event-detail-box").appendChild(r),1===this.type?document.getElementById(this.jSPlugin.id+"-inspectEventDetail-content-info-time").innerHTML=""+(1===t?this.currentEventInfo.eventBeginTime+" ~ "+this.currentEventInfo.eventEndTime:this.currentEventInfo.eventTime):(document.getElementById(this.jSPlugin.id+"-inspectEventDetail-content-info-time").innerHTML=(new Date).Format("yyyy-MM-dd hh:mm:ss")+(1===t?" ~ -":""),1===t&&document.getElementById(this.jSPlugin.id+"-video-recording-time")&&this.videoRecordingStatus&&(0===this.type&&document.getElementById(this.jSPlugin.id+"-event-ok").setAttribute("disabled","disabled"),this.timer.createInterval("videoRecordingTimer",(function(){var e,t,i,n;A.startTime&&(document.getElementById(A.jSPlugin.id+"-video-recording-time").innerHTML=(e=A.startTime,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0"+t:t)+":"+(i<10?"0"+i:i)+":"+(n<10?"0"+n:n))),A.startTime+=1e3,A.startTime>A.jSPlugin.inspectRecordingDuration&&(document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").click(),A.timer&&A.timer.clearTimer("videoRecordingTimer"))}),1e3))),1===t){var s=this.currentEventInfo&&this.currentEventInfo.fileUrl;this.renderVideo(n,o,s)}else new NI({id:this.jSPlugin.id+"-inspectEventDetail-picUrl",src:o,fallback:this.jSPlugin.staticPath+"/imgs/fallback.svg",showIcon:!1});this.show()},e.eventDetailDomEvent=function(){var A=this,e=this.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId;document.getElementById(this.jSPlugin.id+"-event-cancel").addEventListener("click",(function(e){A.cancelPopover=new GI({id:A.jSPlugin.id+"-event-cancel",content:"确定要取消吗?"+(1===A.type?"取消后编辑的内容将不会保存。":"取消后对应存证也将删除。"),placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){A.cancelPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.cancelPopover.hide(),A.hide()}})})),document.getElementById(this.jSPlugin.id+"-event-ok").addEventListener("click",(function(){if(A.validationEventTag()){var e=A.currentEventInfo,t=e.evidenceFileType,i=e.evidenceId,n=A.inspectInfo,a=n.inspectRecordId,r=n.inspectPerson,o=document.getElementById(A.jSPlugin.id+"-inspectEventDetail-content-info-time").innerHTML,s={inspectRecordId:a,depositaryOfficer:r,evidenceFileId:i,evidenceFileType:t,eventType:document.getElementById(A.jSPlugin.id+"-event-tag").value,eventRemark:document.getElementById(A.jSPlugin.id+"-event-remark").value};1===t&&(s.eventBeginTime=o.split("~")[0].trim(),s.eventEndTime=o.split("~")[1].trim(),A.timer.clearTimer("videoRecordingStatusTimer")),0===t&&(s.eventTime=o),1===A.type&&(s.inspectEventId=A.currentEventInfo.inspectEventId,delete s.depositaryOfficer,delete s.eventTime,delete s.eventBeginTime,delete s.eventEndTime,delete s.evidenceFileId,delete s.evidenceFileType,function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",inspectEventId:"",eventType:"",eventRemark:""},a=Object.assign(n,e),r=A.env.domain+"/api/service/devicekit/bodycamera/inspect/event/update";dI(r,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback({eventType:s.eventType,eventRemark:s.eventRemark})):new kI({type:"error",content:"保存失败,"+(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){new kI({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}))),0===A.type&&function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectRecordId:"",eventType:"",evidenceFileId:"",eventTime:"",eventBeginTime:"",eventEndTime:"",depositaryOfficer:"",eventRemark:"",evidenceFileType:""},a=Object.assign(n,e),r=A.env.domain+"/api/service/devicekit/bodycamera/inspect/event";dI(r,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,s,(function(e){e.meta&&200===e.meta.code?(A.hide(),A.saveSuccessCallback&&A.saveSuccessCallback()):new kI({type:"error",content:"保存失败,"+(e.meta&&e.meta.message||"请稍后重试!"),wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){new kI({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}))}})),document.getElementById(this.jSPlugin.id+"-inspectEventDetail-back").addEventListener("click",(function(){A.backPopover=new GI({id:A.jSPlugin.id+"-inspectEventDetail-back",content:"确定要返回吗?"+(1===A.type?"返回后编辑的内容将不会保存。":"返回后对应存证也将删除。"),placement:"bottomRight",arrowPointAtCenter:!0,onCancel:function(){A.backPopover.hide()},onConfirm:function(){1===t&&(A.videoRecordingStatus&&0===A.type&&(A.timer&&A.timer.clearTimer("videoRecordingTimer"),A.startTime=1e3,document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").click()),A.timer.clearTimer("videoRecordingStatusTimer")),A.backPopover.hide(),A.hide()}})})),document.getElementById(this.jSPlugin.id+"-video-recording-stop-btn")&&document.getElementById(this.jSPlugin.id+"-video-recording-stop-btn").addEventListener("click",(function(){document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn ezuikit-btn-loading"),document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,taskId:e},a=A.env.domain+"/api/v3/open/cloud/video/frame/stop";dI(a,"POST",n,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A.jSPlugin,i,(function(e){document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn")&&(document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").querySelector(".ezuikit-btn-loading-icon").style.display="none"),e.meta&&200===e.meta.code?KI(A.jSPlugin,i,(function(e){if(e.meta&&200===e.meta.code){var t=e.data,i=t.taskStatus,n=t.fileUrl,a=t.videoCoverPic;A.timer&&A.timer.clearTimer("videoRecordingTimer");var r=a||A.jSPlugin.staticPath+"/imgs/bg.svg";A.renderVideo(i,r,n),document.getElementById(A.jSPlugin.id+"-inspectEventDetail-content-video-info").style.display="block",document.getElementById(A.jSPlugin.id+"-inspectEventDetail-content-video-timer").style.display="none";var o=document.getElementById(A.jSPlugin.id+"-inspectEventDetail-content-info-time").innerHTML;document.getElementById(A.jSPlugin.id+"-inspectEventDetail-content-info-time").innerHTML=o.split("~")[0]+" ~ "+(new Date).Format("yyyy-MM-dd hh:mm:ss"),A.videoRecordingStatus=!1,document.getElementById(A.jSPlugin.id+"-event-ok").removeAttribute("disabled")}})):new kI({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn")&&(document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn"),document.getElementById(A.jSPlugin.id+"-video-recording-stop-btn").querySelector(".ezuikit-btn-loading-icon").style.display="none"),new kI({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById(A.jSPlugin.id+"-inspect-event-box"),top:40})}))})),document.getElementById(this.jSPlugin.id+"-event-tag").addEventListener("input",(function(){A.validationEventTag()})),document.getElementById(this.jSPlugin.id+"-event-remark").addEventListener("input",(function(A){var e=A.target.value;A.target.parentNode.setAttribute("data-count",e.length+" / 100")})),document.getElementById(this.jSPlugin.id+"-event-remark").addEventListener("focus",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count ezuikit-input-textarea-focus")})),document.getElementById(this.jSPlugin.id+"-event-remark").addEventListener("blur",(function(A){A.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count")}))},A}(),OI=function(){function A(A,e,t){var i=this;this.hideDelEConfirm=function(){for(var A=0;A\n

巡检事件

\n
\n
\n \n \n 图片存证\n \n \n \n 视频存证\n
\n
\n \n \n \n
\n
\n \n
\n \n
\n \n

暂无事件

\n
\n \n \n
\n

巡检事件

\n
\n
\n ',document.getElementById(i.jSPlugin.id+"-wrap").appendChild(e),i.jSPlugin.Theme.decoderState.state.play?i.enableEvidenceBtn():i.disableEvidenceBtn(),document.getElementById(i.jSPlugin.id+"-inspect-event-img").onclick=function(){i.listLoading||i.startEvidence||(i.startEvidence=!0,i.hideDelEConfirm(),document.getElementById(i.jSPlugin.id+"-inspect-event-img").setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById(i.jSPlugin.id+"-inspect-event-img").querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",HI(i.jSPlugin,0,(function(A){i.startEvidence=!1,document.getElementById(i.jSPlugin.id+"-inspect-event-img").setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById(i.jSPlugin.id+"-inspect-event-img").querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new VI(i.jSPlugin,A.data,i.timer,0,(function(){i.initEvent(),new kI({type:"success",content:"保存成功",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})})):new kI({type:"error",content:"图片存证失败,"+(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){i.startEvidence=!1,document.getElementById(i.jSPlugin.id+"-inspect-event-img").setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById(i.jSPlugin.id+"-inspect-event-img").querySelector(".ezuikit-btn-loading-icon").style.display="none",new kI({type:"error",content:"图片存证失败,请稍后重试!",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})})))},document.getElementById(i.jSPlugin.id+"-inspect-event-video").onclick=function(){i.listLoading||i.startEvidence||(i.startEvidence=!0,i.hideDelEConfirm(),document.getElementById(i.jSPlugin.id+"-inspect-event-video").setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading"),document.getElementById(i.jSPlugin.id+"-inspect-event-video").querySelector(".ezuikit-btn-loading-icon").style.display="inline-block",HI(i.jSPlugin,1,(function(A){i.startEvidence=!1,document.getElementById(i.jSPlugin.id+"-inspect-event-video").setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById(i.jSPlugin.id+"-inspect-event-video").querySelector(".ezuikit-btn-loading-icon").style.display="none",A.meta&&200===A.meta.code?new VI(i.jSPlugin,A.data,i.timer,0,(function(){i.initEvent(),new kI({type:"success",content:"保存成功",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})})):new kI({type:"error",content:"视频存证失败,"+(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){i.startEvidence=!1,document.getElementById(i.jSPlugin.id+"-inspect-event-video").setAttribute("class","ezuikit-btn ezuikit-btn-primary"),document.getElementById(i.jSPlugin.id+"-inspect-event-video").querySelector(".ezuikit-btn-loading-icon").style.display="none",new kI({type:"error",content:"视频存证失败,请稍后重试!",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})})))},document.getElementById(i.jSPlugin.id+"-inspect-event-list-refresh").onclick=function(){i.listLoading||i.startEvidence||(i.hideDelEConfirm(),document.getElementById(i.jSPlugin.id+"-inspect-loading").style.display="block",document.getElementById(i.jSPlugin.id+"-inspect-event-list-wrap").style.display="none",document.getElementById(i.jSPlugin.id+"-inspect-event-list-nodata-wrap").style.display="none",A.initEvent())}}},this.renderList=function(A){document.getElementById(i.jSPlugin.id+"-inspect-loading").style.display="none";var e=A.data||[];if(e.length>0){var t=function(t){var n=document.createElement("div");n.setAttribute("class","inspect-event-item");var a=e[t];n.setAttribute("id",i.jSPlugin.id+"-inspect-event-item-"+a.inspectEventId),n.innerHTML="",document.getElementById(i.jSPlugin.id+"-inspect-event-list-wrap-main").appendChild(n);var r=document.createElement("div");r.setAttribute("class","inspect-event-item-header-wrap");var o=void 0;1==a.evidenceFileType&&(o=a.eventBeginTime.split(" ")[1]+"~"+a.eventEndTime.split(" ")[1]),0==a.evidenceFileType&&(o=""+a.eventTime.split(" ")[1]);var s="";1===a.evidenceFileType&&(1===a.taskStatus||2===a.taskStatus?s="storage":4===a.taskStatus||5===a.taskStatus||6===a.taskStatus||7===a.taskStatus?s="storage-error":0!==a.taskStatus&&3!==a.taskStatus||(s="storage-success")),r.innerHTML='\n
\n
\n \n \n \n \n \n \n \n \n \n '+(o||"-")+'\n
\n
\n \n \n \n \n
\n
\n ',n.appendChild(r),r.onclick=function(A){"none"===r.querySelector(".inspect-event-item-header-toggle-up").style.display?(r.querySelector(".inspect-event-item-header-toggle-up").style.display="block",r.querySelector(".inspect-event-item-header-toggle-down").style.display="none",n.querySelector(".inspect-event-item-body").style.display="block"):(r.querySelector(".inspect-event-item-header-toggle-up").style.display="none",r.querySelector(".inspect-event-item-header-toggle-down").style.display="block",n.querySelector(".inspect-event-item-body").style.display="none")};var g=document.createElement("div");g.setAttribute("class","inspect-event-item-body"),g.style.display="none";var l=(1===a.evidenceFileType?a.videoCoverPic:a.fileUrl)||i.jSPlugin.staticPath+"/imgs/bg.svg";g.innerHTML='\n
\n
\n
\n '+a.eventType+"\n
\n
\n ",n.appendChild(g),1==a.evidenceFileType&&(1===a.taskStatus||2===a.taskStatus?document.getElementById(i.jSPlugin.id+"-inspect-view-"+a.inspectEventId).innerHTML='\n
\n
\n
\n
\n 视频正在存储中…\n
\n ':4===a.taskStatus?document.getElementById(i.jSPlugin.id+"-inspect-view-"+a.inspectEventId).innerHTML='\n
\n
\n \n
\n 视频存储失败\n
\n ':0!==a.taskStatus&&3!==a.taskStatus||new UI({id:i.jSPlugin.id+"-inspect-view-"+a.inspectEventId,src:a.fileUrl,poster:l,fallback:i.jSPlugin.staticPath+"/imgs/bg.svg"})),0==a.evidenceFileType&&new NI({id:i.jSPlugin.id+"-inspect-view-"+a.inspectEventId,src:l,fallback:i.jSPlugin.staticPath+"/imgs/bg.svg",showIcon:!1});var c=document.createElement("div");c.setAttribute("class","inspect-event-item-body-info-opr");var d=document.createElement("span");d.setAttribute("class","inspect-event-item-body-info-opr-icon"),d.innerHTML='\n \n ',c.appendChild(d);var I=document.createElement("span");I.setAttribute("class","inspect-event-item-body-info-opr-icon"),I.id=i.jSPlugin.id+"-inspect-event-del-"+a.inspectEventId,I.innerHTML=' \n \n ',c.appendChild(I),d.onclick=function(A){i.startEvidence||new VI(i.jSPlugin,a,i.timer,1,(function(A){new kI({type:"success",content:"保存成功",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40}),a=Object.assign(a,A),document.getElementById(i.jSPlugin.id+"-inspect-event-item-"+a.inspectEventId).querySelector(".inspect-event-item-body-info-tag-label").innerHTML=a.eventType,document.getElementById(i.jSPlugin.id+"-inspect-event-item-"+a.inspectEventId).querySelector(".inspect-event-item-body-info-tag-label").setAttribute("title",a.eventType)}))},I.onclick=function(A){i.startEvidence||(i.delE=new GI({id:i.jSPlugin.id+"-inspect-event-del-"+a.inspectEventId,content:"确定要删除该事件吗?",placement:"topRight",arrowPointAtCenter:!0,onCancel:function(){i.delE.hide()},onConfirm:function(){!function(A,e,t,i){var n={accessToken:A.accessToken||A.token.httpToken.url,inspectEventId:""},a=Object.assign(n,e),r=A.env.domain+"/api/service/devicekit/bodycamera/inspect/event/delete";dI(r,"POST",a,(function(A){t&&t(A)}),(function(A){i&&i(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(i.jSPlugin,{inspectEventId:a.inspectEventId},(function(A){A.meta&&200===A.meta.code?(i.delE.hide(),i.initEvent(),setTimeout((function(){new kI({type:"success",content:"删除成功",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})}),10)):new kI({type:"error",content:"删除失败,"+(A.meta&&A.meta.message||"请稍后重试!"),wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})}),(function(){new kI({type:"error",content:"删除失败,请稍后重试!",wrapNode:document.getElementById(i.jSPlugin.id+"-inspect-event-box"),top:40})}))}}),i.delEConfirmList.push(i.delE))},n.querySelector(".inspect-event-item-body-info").appendChild(c),document.getElementById(i.jSPlugin.id+"-inspect-event-list-wrap").onscroll=function(e){var t=e.target;i.hideDelEConfirm(),t.scrollTop+t.offsetHeight>=t.scrollHeight-48&&!i.listLoading&&(A.start+1)*A.size\n \n ',t.onclick=function(A){setTimeout((function(){e.inspectMapWin.centerToTrack(18)}),100)},A.getContainer().appendChild(t),t},new A},this.initSwithcBtn=function(){var A=document.createElement("div");A.id=a.jSPlugin.id+"-miniSwitch",A.style="cursor: pointer;position: absolute; bottom: 106px; right: "+(a.jSPlugin.inspectVideoWidth+10)+"px; z-index: 999;",A.innerHTML="
\n \n 大小窗切换\n \n \n \n \n \n
',document.getElementById(a.jSPlugin.id+"-wrap").appendChild(A),document.getElementById(a.jSPlugin.id+"-miniSwitch-btn").onclick=function(){!function(A,e,t){var i=!0,n=!0;if("function"!=typeof A)throw new TypeError("Expected a function");return bg(t)&&(i="leading"in t?!!t.leading:i,n="trailing"in t?!!t.trailing:n),Uc(A,e,{leading:i,maxWait:e,trailing:n})}((function(){return a.miniRecSwitchClick()}),1e3)()}},this.initMiniWinToggleBtn=function(){var A=.3333*a.videoWidth,e=.3333*a.videoHeight,t=document.createElement("div");t.id=a.jSPlugin.id+"-miniToggle",t.style="cursor: pointer;position: absolute; bottom: "+(e/2+96-30)+"px; right: "+(a.jSPlugin.inspectVideoWidth+A)+"px; z-index: 999; height:60px; box-sizing: border-box; padding-top: 20px; text-align: center; width:20px; overflow: hidden; background: #000000; border-radius: 2px 0px 0px 2px; opacity: 0.7;",t.innerHTML="
\n \n \n \n \n
',document.getElementById(a.jSPlugin.id+"-wrap").appendChild(t),document.getElementById(a.jSPlugin.id+"-miniToggle").onclick=function(){a.miniWinToggleClick()}},this.init=function(){a.initSwithcBtn(),a.initMiniWinToggleBtn()},this.setStyleListByIds=function(A){A.map((function(A){var e=document.getElementById(A.id);e&&Object.keys(A.styleList).map((function(t){e.style[t]=A.styleList[t]}))}))},this.jSPlugin=A,this.inspectMode=e,this.inspectMapWin=t,this.changeInspectMode=i,this.videoWidth=A.width,this.videoHeight=A.height,this.minWinStatus="open",this.decoderState=n,this.ZoomControl=new BMapGL.ZoomControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(40,50)}),this.LocationControl=this.createLocationControl(),this.NavigationControl3D=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(28,105)}),this.init()}var e=A.prototype;return e.miniWinToggleClick=function(){var A=.3333*this.jSPlugin.width;"open"===this.minWinStatus?(this.setStyleListByIds([{id:"video"===this.inspectMode?this.jSPlugin.id+"-mapbox":""+this.jSPlugin.id,styleList:{width:"0px"}},{id:this.jSPlugin.id+"-miniSwitch",styleList:{display:"none"}},{id:this.jSPlugin.id+"-miniToggle",styleList:{right:this.jSPlugin.inspectVideoWidth+"px"}},{id:this.jSPlugin.id+"-min-win-close-icon",styleList:{display:"none"}},{id:this.jSPlugin.id+"-min-win-open-icon",styleList:{display:"inline-block"}}]),this.minWinStatus="close"):(this.setStyleListByIds([{id:"video"===this.inspectMode?this.jSPlugin.id+"-mapbox":""+this.jSPlugin.id,styleList:{width:A+"px"}},{id:this.jSPlugin.id+"-miniSwitch",styleList:{display:"block"}},{id:this.jSPlugin.id+"-miniToggle",styleList:{right:this.jSPlugin.inspectVideoWidth+A+"px"}},{id:this.jSPlugin.id+"-min-win-close-icon",styleList:{display:"inline-block"}},{id:this.jSPlugin.id+"-min-win-open-icon",styleList:{display:"none"}}]),this.minWinStatus="open")},e.miniRecSwitchClick=function(){var A=this,e=.3333*this.jSPlugin.width,t=.3333*this.jSPlugin.height;"video"===this.inspectMode?(this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom(),this.setStyleListByIds([{id:this.jSPlugin.id+"-mapbox",styleList:{width:this.jSPlugin.width+"px",height:this.jSPlugin.height+"px",marginBottom:"-40px"}},{id:this.jSPlugin.id+"-ez-iframe-footer-container",styleList:{top:this.jSPlugin.height+"px"}},{id:""+this.jSPlugin.id,styleList:{position:"absolute",zIndex:"100",bottom:"96px",right:this.jSPlugin.inspectVideoWidth+"px",overflow:"hidden"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(e,t),this.inspectMode="map",this.changeInspectMode("map"),this.inspectMapWin.map.addControl(this.NavigationControl3D),this.inspectMapWin.map.addControl(this.LocationControl),this.inspectMapWin.map.addControl(this.ZoomControl),this.inspectMapWin.map.addOverlay(this.inspectMapWin.inspectRange),document.getElementById(this.jSPlugin.id+"-loading-item-btn-wrap")&&this.setStyleListByIds([{id:this.jSPlugin.id+"-loading-item-btn",styleList:{display:"none"}},{id:this.jSPlugin.id+"-loading-item-btn-svg",styleList:{display:"block"}},{id:this.jSPlugin.id+"-loading-item-btn-wrap",styleList:{border:"none",width:"32px",height:"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack(18)}),100)):(this.setStyleListByIds([{id:this.jSPlugin.id+"-mapbox",styleList:{width:e+"px",height:t+"px",marginBottom:"0"}},{id:this.jSPlugin.id+"-ez-iframe-footer-container",styleList:{top:"0px"}},{id:""+this.jSPlugin.id,styleList:{position:"relative",zIndex:"0",bottom:"0",right:"0"}}]),this.jSPlugin.Theme.inspect.reSizeVideo(this.jSPlugin.width,this.jSPlugin.height),this.inspectMode="video",this.changeInspectMode("video"),this.inspectMapWin.map.removeControl(this.ZoomControl),this.inspectMapWin.map.removeControl(this.NavigationControl3D),this.inspectMapWin.map.removeControl(this.LocationControl),this.inspectMapWin.map.removeOverlay(this.inspectMapWin.inspectRange),document.getElementById(this.jSPlugin.id+"-loading-item-btn-wrap")&&this.setStyleListByIds([{id:this.jSPlugin.id+"-loading-item-btn",styleList:{display:"block"}},{id:this.jSPlugin.id+"-loading-item-btn-svg",styleList:{display:"none"}},{id:this.jSPlugin.id+"-loading-item-btn-wrap",styleList:{border:"1px solid rgb(255, 255, 255)",width:"80px",height:"32px",color:"#fff","text-align":"center","line-height":"32px","font-size":"14px"}}]),setTimeout((function(){A.inspectMapWin.centerToTrack()}),100),this.jSPlugin.Zoom&&this.decoderState.state.play&&this.jSPlugin.Zoom.startZoom()),this.setStyleListByIds([{id:this.jSPlugin.id+"-wrap",styleList:{width:this.jSPlugin.width+this.jSPlugin.inspectVideoWidth+"px",height:this.jSPlugin.height+this.jSPlugin.inspectVideoHeight+"px"}}])},A}(),WI={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0,inspectInfo:{color:"#000000",backgroundColor:"#ffffff",activeColor:"#1890FF",btnList:[{btnKey:"inspectName",iconId:"inspectName",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectBeginTime",iconId:"inspectBeginTime",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectPerson",iconId:"inspectPerson",part:"right",defaultActive:0,isrender:1,color:"#262626"}]}},header:{color:"#2c2c2c",backgroundColor:"rgba(0,0,0,0.8)",activeColor:"#1890FF",btnList:[{btnKey:"deviceName",iconId:"deviceName",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"inspectTime",iconId:"inspectTime",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"signalType",iconId:"signalType",part:"right",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"batteryStatus",iconId:"batteryStatus",part:"right",defaultActive:0,isrender:1,color:"#ffffff"}]},footer:{color:"#ffffff",backgroundColor:"#000000",activeColor:"blue",btnList:[{btnKey:"talk",iconId:"talk",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"},{btnKey:"sound",iconId:"sound",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"}]}};function ZI(A,e,t){return e&&function(A,e){for(var t=0;t2.0X\n
\n \n \n '+this.jSPlugin.i18n.t("ZOOM_ADD")+'\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n \n '+this.jSPlugin.i18n.t("ZOOM_SUB")+'\n \n \n \n \n \n \n \n \n \n \n
\n \n ';t.innerHTML=r,document.getElementById(A.id+"-audioControls-left")&&(document.getElementById(A.id+"-audioControls-left").parentNode.appendChild(t),document.getElementById(A.id+"-addScale").onclick=function(){e.addScale()},document.getElementById(A.id+"-subScale").onclick=function(){e.subScale()}),this._event()}var e=A.prototype;return e._event=function(){var A=this,e=setInterval((function(){var t=document.getElementById(A.jSPlugin.id+"-container-0");clearInterval(e),A.jSPlugin.isMobile?t&&(t.addEventListener("touchstart",(function(e){return A.onTouchstart(e)})),t.addEventListener("touchend",(function(e){return A.onTouchend(e)}))):t&&(t.addEventListener("mousedown",(function(e){return A.onMouseDown(e)})),t.addEventListener("mouseup",(function(e){return A.onMouseUp(e)})))}),100)},e.onMouseDown=function(A){if(1===this.currentScale)return!1;this.moveX=A.clientX,this.moveY=A.clientY},e.onMouseUp=function(A){var e=this.currentPosition;if(1===this.currentScale)return!1;e.left=e.left-(A.clientX-this.moveX),e.top=e.top-(A.clientY-this.moveY),this.doScale()},e.onTouchstart=function(A){if(1===this.currentScale)return!1;if(this.jSPlugin.use3DZoom||1===this.currentScale)return!1;if(!this.jSPlugin.beforeMobileZoomVerify())return!1;if(!this.inited){var e=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=e.width,this.videoHeight=e.height,this.currentPosition.left=0,this.currentPosition.top=0,this.isMobileFullScreen?(this.currentPosition.right=e.height,this.currentPosition.bottom=e.width):(this.currentPosition.right=e.width,this.currentPosition.bottom=e.height),this.inited=!0}var t=A.touches[0];if(t){var i={clientX:0,clientY:0};i.clientX=t.clientX,i.clientY=t.clientY,this.point1=i}},e.onTouchend=function(A){var e=this,t=this.currentPosition;if(1===this.currentScale)return!1;var i=A.changedTouches[0];this.isMobileFullScreen?(t.left=t.left-(i.clientY-e.point1.clientY),t.top=t.top+(i.clientX-e.point1.clientX)):(t.left=t.left-(i.clientX-e.point1.clientX),t.top=t.top-(i.clientY-e.point1.clientY)),e.doScale()},e.renderDot=function(){var A=this.currentScale;document.getElementById(this.jSPlugin.id+"-scale-value")&&(document.getElementById(this.jSPlugin.id+"-scale-value").innerHTML=A+".0X"),document.getElementById(this.jSPlugin.id+"-line-dot")&&(document.getElementById(this.jSPlugin.id+"-line-dot").style.height=(A-1)/7*100+"%"),document.getElementById(this.jSPlugin.id+"-scale-body-line-dot")&&(document.getElementById(this.jSPlugin.id+"-scale-body-line-dot").style.bottom="calc("+(A-1)/7*100+"% - 3px)")},e.getTopMostElement=function(A,e,t){var i,n=A?A.getBoundingClientRect():null,a=e?e.getBoundingClientRect():null,r=t?t.getBoundingClientRect():null;if(!n&&!a&&!r)return null;if(!n)return a.top1?1.25:.75),e.right=e.right*n*(n>1?1.25:.75),this.info.width=i.width,this.videoWidth=i.width*(n>1.25?1:.75)*this.dpr}if(i.height!=this.info.height){var a=parseFloat(i.height/this.info.height);e.top=e.top*a*(a>1?1.25:.75),e.bottom=e.bottom*a*(a>1?1.25:.75),this.info.height=i.height,this.videoHeight=i.height*(a>1?1.25:.75)*this.dpr}e.left=e.left+.5*(e.right-e.left-this.videoWidth/t),e.left<=0?e.left=0:e.left>this.videoWidth-this.videoWidth/t&&(e.left=this.videoWidth-this.videoWidth/t),e.right=e.left+this.videoWidth/t,e.top=e.top+.5*(e.bottom-e.top-this.videoHeight/t),e.top<=0?e.top=0:e.top>this.videoHeight-this.videoHeight/t&&(e.top=this.videoHeight-this.videoHeight/t),e.bottom=e.top+this.videoHeight/t,e.left=parseInt(e.left,10),e.right=parseInt(e.right,10),e.top=parseInt(e.top,10),e.bottom=parseInt(e.bottom,10);try{e.left=8?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_ADD_MAX"),document.getElementById(""+this.jSPlugin.id)),!1):(this.currentScale=this.currentScale+A,this.currentScale>8?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MAX"),document.getElementById(""+this.jSPlugin.id)),!1):void this.doScale())},e.subScale=function(A){return void 0===A&&(A=1),this.jSPlugin.eventEmitter&&this.jSPlugin.eventEmitter.emit("zoomSub",{eventType:"zoomSub",code:1,target:this,msg:"执行缩小"}),this.currentScale<=1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_SUB_MIN"),document.getElementById(""+this.jSPlugin.id)),!1):(this.currentScale=this.currentScale-A,this.currentScale<1?(this.jSPlugin.Message&&this.jSPlugin.Message.default(this.jSPlugin.i18n.t("ZOOM_LIMIT_MIN"),document.getElementById(""+this.jSPlugin.id)),!1):void this.doScale())},e._JSPlayM4_SetDisplayRegion=function(A,e,t,i,n){this.jSPlugin&&this.jSPlugin.jSPlugin&&this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(A,e,t,i,n,this.isMobileFullScreen)},ZI(A,[{key:"isMobileFullScreen",get:function(){return!!(d()&&this.jSPlugin.Theme&&this.jSPlugin.Theme.decoderState&&this.jSPlugin.Theme.decoderState.state.expend)}}]),A}(),qI=function(A){var e="";return Object.keys(A).map((function(t,i){e+=t+":"+A[t]+(i\n \n ':""+A+"":null},e.renderBatteryStatus=function(A){return A&&0!=A?'\n
\n '+A+'%\n
\n
\n
\n \n \n \n
\n ':null},e.renderInspectTime=function(A){if(!A)return null;var e,t,i,n,a=A.split(" "),r=a[0].split("-"),o=a[1].split(":"),s=new Date(r[0],r[1]-1,r[2],o[0],o[1],o[2]),g=(new Date).getTime()-new Date(s).getTime();return'\n \n '+(e=g,t=parseInt(e%864e5/36e5),i=parseInt(e%36e5/6e4),n=parseInt(e%6e4/1e3),(t<10?"0"+t:t)+":"+(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+"\n ")},e.matchBtn=function(A,e){var t=this,i=this.themeData,n=i.customConfig,a=i.header,r=i.footer,o=n.inspectInfo,s={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},g=o.btnList.findIndex((function(e){return e.iconId===A}));switch(-1!==g?(s.color=o.color,s.backgroundColor=o.backgroundColor,s.activeColor=o.activeColor):-1!==(g=a.btnList.findIndex((function(e){return e.iconId===A})))?(s.color=a.color,s.backgroundColor=a.backgroundColor,s.activeColor=a.activeColor):(s.color=r.color,s.backgroundColor=r.backgroundColor,s.activeColor=r.activeColor),A){case"inspectName":return s.title="巡检名称",s.id=A,s.domString='巡检名称',s.onclick=function(){},s;case"inspectBeginTime":return s.title="巡检开始时间",s.id=A,s.domString='巡检开始时间:-',s.onclick=function(){},s;case"inspectPerson":return s.title="本地巡检员",s.id=A,s.domString='本地巡检员:-',s.onclick=function(){},s;case"deviceName":return s.title="设备名称",s.id=A,s.domString='设备名称',s.onclick=function(){},s;case"inspectTime":return s.title="巡检时长",s.id=A,s.domString='巡检时长:-',s.onclick=function(){},s;case"signalType":return s.title="信号类型",s.id=A,s.domString='',s.onclick=function(){},s;case"batteryStatus":return s.title="设备电量",s.id=A,s.domString='',s.onclick=function(){},s;case"talk":return s.title="对讲",s.id=A,s.domString='
对讲',s.onclick=function(){var A=t.decoderState.state,e=A.talk,i=A.sound;if(A.play)if(e){t.setDecoderState({talk:!1}),t.jSPlugin.Talk.stopTalk();var n=Hc(t.themeData.footer.btnList,(function(A){return"sound"===A.iconId&&1===A.isrender&&1===A.defaultActive}))>-1;t.themeData&&n&&t.jSPlugin.openSound()}else t.setDecoderState({talk:!0}),t.jSPlugin.Talk.startTalk((function(A){i&&!A&&(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1}))}))},s;case"sound":return s.title="音量",s.id=A,s.domString='\n \n \n \n \n 音量',s.onclick=function(){var A=t.decoderState.state,e=A.play,i=A.sound,n=A.talk;e&&!n&&(i?(t.jSPlugin.closeSound(),t.setDecoderState({sound:!1})):t.jSPlugin.openSound())},s;default:return s}},e.renderInspectInfo=function(A,e){var t=this.matchBtn(A,e),i=document.createElement("sapn");i.innerHTML=""+t.domString,"left"===e.part?document.getElementById(this.jSPlugin.id+"-inspectInfoControl-left").appendChild(i):document.getElementById(this.jSPlugin.id+"-inspectInfoControl-right").appendChild(i)},e.renderHeader=function(A,e){var t=this.matchBtn(A,e),i=document.createElement("span");i.className=this.jSPlugin.id+"-header-content",i.style="display: flex; align-items: center; ",i.innerHTML="\n "+t.domString+"\n ","left"===e.part?document.getElementById(this.jSPlugin.id+"-headControl-left").appendChild(i):document.getElementById(this.jSPlugin.id+"-headControl-right").appendChild(i)},e.renderFooter=function(A,e){var t=this,i=this.matchBtn(A,e),n=this.videoWidth/6,a=document.createElement("div");a.className="theme-icon-item",this.jSPlugin.isWebConsole?a.style="padding:0 "+.1*n+"px;":a.style="padding:0 "+.1*n+"px;cursor: pointer;",a.innerHTML='
'+i.domString+"
",a.onclick=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onclick(A)},i.onmouseenter&&(a.onmouseenter=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseenter(A)}),i.onmouseleave&&(a.onmouseleave=function(A){if(t.decoderState.state.isEditing||!t.activeThemeStatus)return!1;i.onmouseleave(A)}),document.getElementById(this.jSPlugin.id+"-audioControls").appendChild(a)},e.initThemeData=function(){var A=this,e=this.themeData,t=e.customConfig,i=e.header,n=e.footer,a=t.inspectInfo,r=this.jSPlugin.id;if(this.isNeedRenderInspectInfo=Hc(a.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderHeader=Hc(i.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderFooter=Hc(n.btnList,(function(A){return A.isrender>0}))>=0,this.isNeedRenderInspectInfo)if(document.getElementById(this.jSPlugin.id+"-inspectInfoControl"))document.getElementById(this.jSPlugin.id+"-inspectInfoControl").innerHTML="
";else{var s=document.createElement("div");s.setAttribute("id",this.jSPlugin.id+"-inspectInfoControl"),s.setAttribute("class","inspectInfo-controls"),s.innerHTML="
";var g={height:"58px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#000000",width:this.jSPlugin.width+290+"px",position:"relative","align-items":"center",background:"#ffffff","border-bottom":"1px solid #D9D9D9","box-sizing":"border-box"};s.style=qI(g),document.getElementById(r+"-wrap").insertBefore(s,document.getElementById(this.jSPlugin.id));var l=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(l)}),50)}else document.getElementById(this.jSPlugin.id+"-inspectInfoControl")&&document.getElementById(this.jSPlugin.id+"-inspectInfoControl").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-inspectInfoControl"));if(this.isNeedRenderHeader)if(document.getElementById(this.jSPlugin.id+"-headControl"))document.getElementById(this.jSPlugin.id+"-headControl").innerHTML="
";else{var c=document.createElement("div");c.setAttribute("id",this.jSPlugin.id+"-headControl"),c.setAttribute("class","header-controls"),c.innerHTML="
";var d={height:"56px",display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:this.jSPlugin.width+"px",padding:"0 16px","box-sizing":"border-box",position:"relative","align-items":"center",background:"#000000"};c.style=qI(d),document.getElementById(r+"-wrap").insertBefore(c,document.getElementById(r));var I=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(I)}),50)}else document.getElementById(this.jSPlugin.id+"-headControl")&&document.getElementById(this.jSPlugin.id+"-headControl").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-headControl"));if(this.isNeedRenderFooter)if(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"))document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.marginTop="-56pxpx");else{var C=document.createElement("div");C.setAttribute("id",this.jSPlugin.id+"-ez-iframe-footer-container"),C.setAttribute("class","ez-iframe-footer-container");var h={position:"relative",display:"flex",height:"56px","flex-wrap":"wrap","justify-content":"center","z-index":999,top:0,color:"#FFFFFF",width:this.jSPlugin.width+"px","align-items":"center","background-color":"#000000","font-size":"14px"};C.style=qI(h),C.innerHTML='\n
\n
\n
\n ",o(C,document.getElementById(r))}else document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container")&&document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").parentElement.removeChild(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container"));this.isNeedRenderInspectInfo&&document.getElementById(this.jSPlugin.id+"-inspectInfoControl")&&(document.getElementById(this.jSPlugin.id+"-inspectInfoControl").style.background=a.backgroundColor,document.getElementById(this.jSPlugin.id+"-inspectInfoControl").style.color=a.color,a.btnList.map((function(e,t){e.isrender&&A.renderInspectInfo(e.iconId,e)}))),this.isNeedRenderHeader&&document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-headControl").style.background=i.backgroundColor,document.getElementById(this.jSPlugin.id+"-headControl").style.color=i.color,i.btnList.map((function(e,t){e.isrender&&A.renderHeader(e.iconId,e)}))),this.isNeedRenderFooter&&document.getElementById(this.jSPlugin.id+"-audioControls")&&(document.getElementById(this.jSPlugin.id+"-audioControls").style.background=n.backgroundColor,document.getElementById(this.jSPlugin.id+"-audioControls").style.color=n.color,n.btnList.map((function(e,t){e.isrender&&A.renderFooter(e.iconId,e)}))),this.inspectMapWin=new bI(this.jSPlugin),this.inspectSmallWin=new jI(this.jSPlugin,this.inspectMode,this.inspectMapWin,this.changeInspectMode,this.decoderState)},e.renderThemeData=function(){var A=this,e=this.decoderState.state.isEditing,t=this.themeData,i=t.inspectInfo,n=t.header,a=t.footer;if(this.isNeedRenderInspectInfo&&i&&(document.getElementById(this.jSPlugin.id+"-inspectInfoControl").style.background=i.backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-inspectInfoControl").style.color=i.color.replace("-diy",""),i.btnList.map((function(e,t){var i;e.isrender&&A.setDecoderState(((i={})[e.iconId]=A.decoderState.state[e.iconId],i))}))),this.isNeedRenderHeader&&n&&(document.getElementById(this.jSPlugin.id+"-headControl").style.background=n.backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-headControl").style.color=n.color.replace("-diy",""),n.btnList&&n.btnList.map((function(e,t){var i;e.isrender&&A.setDecoderState(((i={})[e.iconId]=A.decoderState.state[e.iconId],i))}))),this.isNeedRenderFooter&&a)document.getElementById(this.jSPlugin.id+"-audioControls").style.background=a.backgroundColor.replace("-diy",""),document.getElementById(this.jSPlugin.id+"-audioControls").style.color=a.color.replace("-diy",""),a.btnList.map((function(t,i){var n;t.isrender&&A.setDecoderState(((n={})[t.iconId]=A.decoderState.state[t.iconId],n));if(0==i&&!A.themeInited&&A.activeThemeStatus)var a=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(a),1!=A.themeData.customConfig.bellPoster||e?A.jSPlugin.play():A.jSPlugin.pluginStatus.loadingClear(),A.themeInited=!0)}),50)})),this.setDecoderState({cloudRec:"cloud.rec"===g(this.jSPlugin.url).type,rec:"rec"===g(this.jSPlugin.url).type,type:g(this.jSPlugin.url).type});else if(!this.themeInited&&this.activeThemeStatus)var r=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(r),A.themeData&&A.themeData.customConfig&&1==A.themeData.customConfig.bellPoster&&!e?A.jSPlugin.pluginStatus.loadingClear():A.jSPlugin.play(),A.themeInited=!0)}),50);var o=setInterval((function(){window.EZUIKit[A.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(o),A.reSizeVideo(A.videoWidth,A.videoHeight))}),50);this.jSPlugin.Zoom||(this.jSPlugin.Zoom=new XI(this.jSPlugin)),this.getInspectDevInfo(this.jSPlugin,!0,!1)},e.getInspectRecord=function(){var A=this;!function(A,e){var t={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:g(A.url).deviceSerial},i=A.env.domain+"/api/service/devicekit/bodycamera/inspect/detail/latest";dI(i,"GET",t,(function(A){e&&e(A)}),(function(A){}),{"Content-Type":"application/x-www-form-urlencoded"})}(this.jSPlugin,(function(e){if(200==e.meta.code&&e.data){var t=e.data;t.inspectRange&&A.inspectMapWin.createPolygon(t.inspectRange,"#407AFF","dashed",4,1,"#407AFF",.08),t.inspectPoints&&t.inspectPoints.length>0&&A.inspectMapWin.createInspectPoints(t.inspectPoints),"video"===A.inspectMode&&A.inspectMapWin.map.removeOverlay(A.inspectMapWin.inspectRange),document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectName")&&t.inspectName&&(document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectName").innerText=""+t.inspectName),document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectBeginTime")&&t.beginTime&&(document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectBeginTime").innerText="巡检开始时间:"+t.beginTime),document.getElementById(A.jSPlugin.id+"-header-inspectTime")&&A.timer.createInterval("InspectTimer",(function(){document.getElementById(A.jSPlugin.id+"-header-inspectTime").innerHTML=A.renderInspectTime(t.beginTime)}),1e3),document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectPerson")&&t.inspectPerson&&(document.getElementById(A.jSPlugin.id+"-inspectInfo-inspectPerson").innerText="本地巡检员:"+t.inspectPerson),A.inspectInfo=t,t.inspectRecordId&&JI(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&(A.inspectMapWin.createTrack(e.data,!0),A.timer.createInterval("TraceTimer",(function(){t.inspectRecordId&&JI(A.jSPlugin,t.inspectRecordId,(function(e){200==e.meta.code&&e.data&&A.inspectMapWin.createTrack(e.data,!1)}),(function(){}))}),5e3))}),(function(){})),A.InspectEvent=new OI(A.jSPlugin,t.inspectRecordId,A.timer)}else A.InspectEvent=new OI(A.jSPlugin,null,A.timer)}))},e.getInspectDevInfo=function(A,e,t){var i=this;void 0===e&&(e=!1),void 0===t&&(t=!1);!function(A,e,t){var i={accessToken:A.accessToken||A.token.deviceToken.video,deviceSerial:g(A.url).deviceSerial},n=A.env.domain+"/api/service/devicekit/bodycamera";dI(n,"GET",i,(function(A){e&&e(A)}),(function(A){t&&t(A)}),{"Content-Type":"application/x-www-form-urlencoded"})}(A,(function(n){n.meta&&200==n.meta.code&&n.data?1===n.data.status?(t&&!i.decoderState.state.play&&(i.jSPlugin.pluginStatus.loadingStart(i.jSPlugin.id),i.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"}),i.jSPlugin.play()),i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-inspect-global-box",!1),document.getElementById(i.jSPlugin.id+"-header-deviceName")&&(document.getElementById(i.jSPlugin.id+"-header-deviceName").innerText=n.data.deviceName+"("+n.data.deviceSerial+")",document.getElementById(i.jSPlugin.id+"-header-deviceName").setAttribute("title",n.data.deviceName+"("+n.data.deviceSerial+")")),document.getElementById(i.jSPlugin.id+"-header-signalType")&&(document.getElementById(i.jSPlugin.id+"-header-signalType").innerHTML=i.renderSignalType(n.data.signalType)),document.getElementById(i.jSPlugin.id+"-header-batteryStatus")&&(document.getElementById(i.jSPlugin.id+"-header-batteryStatus").innerHTML=i.renderBatteryStatus(n.data.batteryStatus)),i.timer.createInterval("InspectDevInfoTimer",(function(){i.getInspectDevInfo(A,!1,!1)}),3e5),e&&i.getInspectRecord()):(i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-inspect-loading-box",!1),i.jSPlugin.stop(),i.globalContainer.deviceErrorInfo({tips:"当前设备未在巡检中",refreshBtn:"刷新",refreshShow:!0},(function(){i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-no-inspect-box",!1),i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-inspect-loading-box",!0),i.getInspectDevInfo(A,!0,!0)}))):(i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-inspect-loading-box",!1),i.jSPlugin.stop(),i.globalContainer.deviceErrorInfo({tips:n.meta.message,refreshShow:!1}))}),(function(){i.globalContainer.globalContainerToggle(i.jSPlugin.id+"-inspect-global-box",!1)}))},e.fetchThemeData=function(A){var e=this;iI(this.jSPlugin,A,(function(A){if(0!==A.meta.code||!A.data)return e.activeThemeStatus=!1,e.jSPlugin.pluginStatus.loadingClear(),"111021"==A.meta.code?(e.globalContainer.globalContainerToggle(e.jSPlugin.id+"-inspect-loading-box",!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"无效的模板id",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="无效的模板id")):"111023"==A.meta.code?(e.globalContainer.globalContainerToggle(e.jSPlugin.id+"-inspect-loading-box",!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"您的试用特权已到期,需前往轻应用控制台购买后使用。",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="试用特权已到期")):(e.globalContainer.globalContainerToggle(e.jSPlugin.id+"-inspect-loading-box",!1),e.jSPlugin.stop(),e.globalContainer.deviceErrorInfo({tips:"模板未激活,请先在开放平台轻应用控制台购买模板",refreshBtn:"刷新",refreshShow:!1}),void(e.activeThemeStatusTxt="模板未激活"));e.activeThemeStatus=!0,e.themeData=A.data,e.jSPlugin.capacity?(e.initThemeData(),e.renderThemeData()):setTimeout((function(){e.initThemeData(),e.renderThemeData()}),300)}),(function(){e.themeData=WI,e.themeData.header&&(e.themeData.header.btnList=e.themeData.header.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.themeData.footer&&(e.themeData.footer.btnList=e.themeData.footer.btnList.sort((function(A,e){return A.btnKey.split("-")[3]-e.btnKey.split("-")[3]}))),e.initThemeData(),e.renderThemeData()}))},e.reSizeVideo=function(A,e){if(document.getElementById(""+this.jSPlugin.id).style.width=A+"px",document.getElementById(""+this.jSPlugin.id).style.height=e+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin.JS_Resize(A,e);else{document.getElementById(this.jSPlugin.id+"-player")&&(document.getElementById(this.jSPlugin.id+"-player").width=A,document.getElementById(this.jSPlugin.id+"-player").height=e,document.getElementById(this.jSPlugin.id+"-player").style.width=A+"px",document.getElementById(this.jSPlugin.id+"-player").style.height=e+"px",document.getElementById(this.jSPlugin.id+"-container-0").style.height=e+"px");var t=1;if(document.getElementById(this.jSPlugin.id+"canvas0"))navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)&&(t=2),document.getElementById(this.jSPlugin.id+"canvas0").style.width=A*t+"px",document.getElementById(this.jSPlugin.id+"canvas0").style.height=e*t+"px",document.getElementById(this.jSPlugin.id+"canvas0").width=A*t,document.getElementById(this.jSPlugin.id+"canvas0").height=e*t,document.getElementById(this.jSPlugin.id+"canvas0").parentNode.style.width=A*t+"px",document.getElementById(this.jSPlugin.id+"canvas0").parentNode.style.height=e*t+"px",document.getElementById(this.jSPlugin.id+"canvas_draw0").height=e*t}},e.reSize=function(A,e){var t=.3333*A,i=.3333*e;document.getElementById(this.jSPlugin.id+"-inspectInfoControl")&&(document.getElementById(this.jSPlugin.id+"-inspectInfoControl").style.width=A+this.jSPlugin.inspectVideoWidth+"px"),document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-headControl").style.width=A+"px"),document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.width=A+"px"),"video"===this.jSPlugin.Theme.inspectMode?(this.reSizeVideo(A,e),document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.top=0),document.getElementById(this.jSPlugin.id+"-mapbox").style.width=t+"px",document.getElementById(this.jSPlugin.id+"-mapbox").style.height=i+"px"):(document.getElementById(this.jSPlugin.id+"-headControl")&&(document.getElementById(this.jSPlugin.id+"-ez-iframe-footer-container").style.top=e+"px"),this.reSizeVideo(t,i),document.getElementById(this.jSPlugin.id+"-mapbox").style.width=A+"px",document.getElementById(this.jSPlugin.id+"-mapbox").style.height=e+"px"),document.getElementById(this.jSPlugin.id+"-miniToggle").style.bottom=i/2+96-30+"px",document.getElementById(this.jSPlugin.id+"-miniToggle").style.right=this.jSPlugin.inspectVideoWidth+t+"px"},A}(),AC=function(){function A(A){var e=this;if(this.changeInspectMode=function(A){e.inspectMode=A},this.jSPlugin=A,this.videoWidth=A.width,this.videoHeight=A.height,this.inspectMode="video",this.autoFocus=0,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,mute:!1,cloudRec:"cloud.rec"===g(A.url).type,rec:"rec"===g(A.url).type,type:g(A.url).type}},this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),void 0!==A.isMobile&&(this.isMobile=A.isMobile),this.themeData=WI,"themeData"==this.jSPlugin.themeId&&(this.themeData=this.jSPlugin.params.themeData),this.timer||(this.timer=new wI(A)),this.jSPlugin.themeId)if(this.isMobile||(this.inspect=new $I(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState,this.inspectMode,this.changeInspectMode,this.timer)),"themeData"===this.jSPlugin.themeId)this.themeData=this.jSPlugin.params.themeData,this.inspect.initThemeData(),this.inspect.renderThemeData();else this.inspect.fetchThemeData(this.jSPlugin.themeId);this.jSPlugin.Talk||(this.jSPlugin.Talk=new Yd(this.jSPlugin)),n(this.jSPlugin.staticPath+"/css/theme.css"),n(this.jSPlugin.staticPath+"/css/component.css"),n(this.jSPlugin.staticPath+"/css/inspectTheme.css")}var e=A.prototype;return e.setDecoderState=function(A,e){var t=this,i="#FFFFFF",n="#1890FF";Object.keys(A).map((function(e){switch(e){case"talk":document.getElementById(t.jSPlugin.id+"-talk")&&(document.getElementById(t.jSPlugin.id+"-talk").className=A[e]?"active":"",document.getElementById(t.jSPlugin.id+"-talk-content").childNodes[1].style.fill=A[e]?n:i,document.getElementById(t.jSPlugin.id+"-talk-content").childNodes[2].style.color=A[e]?n:i);break;case"sound":document.getElementById(t.jSPlugin.id+"-sound")&&(A[e]?(document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[1].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[0].style="display:none",document.getElementById(t.jSPlugin.id+"-sound").className=A[e]?"active":"",document.getElementById(t.jSPlugin.id+"-sound-content").childNodes[0].children[1].style.fill=A[e]?n:i,document.getElementById(t.jSPlugin.id+"-sound-label").style.color=A[e]?n:i):(document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[0].style="display:inline-block",document.getElementById(t.jSPlugin.id+"-sound-content").children[0].children[1].style="display:none",document.getElementById(t.jSPlugin.id+"-sound").className=A[e]?"active":"",document.getElementById(t.jSPlugin.id+"-sound-label").style.color=A[e]?n:i))}t.decoderState.state=Object.assign(t.decoderState.state,A)}))},e.setDisabled=function(A){var e=this.decoderState.state,t=e.sound;e.hd,null!=document.getElementById(t?this.jSPlugin.id+"-sound-icon":this.jSPlugin.id+"-nosound-icon")&&document.getElementById(t?this.jSPlugin.id+"-sound-icon":this.jSPlugin.id+"-nosound-icon").setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById(this.jSPlugin.id+"-sound-label")&&document.getElementById(this.jSPlugin.id+"-sound-label").setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default"),null!=document.getElementById(this.jSPlugin.id+"-talk-icon")&&document.getElementById(this.jSPlugin.id+"-talk-icon").setAttribute("style",A?"cursor: not-allowed;fill: gray":"cursor: default"),null!=document.getElementById(this.jSPlugin.id+"-talk-label")&&document.getElementById(this.jSPlugin.id+"-talk-label").setAttribute("style",A?"cursor: not-allowed; color: gray":"cursor: default")},e.inspectEnding=function(){var A=document.createElement("div");A.id=this.jSPlugin.id+"-inspect-ending-box",A.style="width:100%; position: absolute; z-index: 10000; top:58px; bottom:0; left:0; background: #ffffff;",A.innerHTML='
\n
\n
\n \n
\n
巡检已结束
\n
\n
\n ',document.getElementById(this.jSPlugin.id+"-wrap").appendChild(A),this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom()},A}(),eC=function(){function A(){this.events={}}var e=A.prototype;return e.on=function(A,e){A&&e&&(this.events[A]=this.events[A]||[],this.events[A].push(e))},e.emit=function(A,e){A&&this.events[A]&&this.events[A].forEach((function(A){return A(e)}))},e.off=function(A,e){A&&e&&this.events[A]&&this.events[A].splice(this.events[A].indexOf(e),1)},e.once=function(A,e){var t=this;this.on(A,(function i(){var n=Array.prototype.slice.call(arguments);e.apply(null,n),t.off(A,i)}))},e.removeAllListener=function(){this.events={}},A}(),tC=function(A,e){if(void 0===A)return e.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if("string"==typeof A){if(32===A.length)return{templateType:"remote",templateId:A};if(-1!==["theme","standard"].indexOf(A))return"simple"===A&&void 0===e.header&&void 0===e.footer?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:A};if(-1!==["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple","mobileCall","miniRec"].indexOf(A))return-1!=e.url.indexOf("rec")&&"simple"!=e.template&&"miniRec"!=e.id?{templateType:"local",templateId:d()?"mobileRec":"pcRec"}:{templateType:"local",templateId:A};if(e&&e.isCall)return{templateType:"invalid",templateId:A}}},iC=function(){var A=window.navigator.userAgent.toLowerCase(),e=(/version.*safari/.test(A),/chrome/.test(A));/gecko/.test(A)&&/webkit/.test(A);if(d())return!1;if(e){return function(){for(var A=window.navigator.userAgent.split(" "),e="",t=0;t91&&!!window.SharedArrayBuffer}return!1},nC=function(A){return A&&A.retcode?String(A.retcode):A&&A.code?"1"+String(A.code).padStart(5,"0"):A&&A.errorCode?"39"+String(A.errorCode).padStart(4,"0"):"400001"};function aC(){var A,e={},t=navigator.userAgent.toLowerCase();if((A=t.match(/rv:([\d.]+)\) like gecko/))||(A=t.match(/msie ([\d\.]+)/))?e.ie=A[1]:(A=t.match(/edge\/([\d\.]+)/))?e.edge=A[1]:(A=t.match(/firefox\/([\d\.]+)/))?e.firefox=A[1]:(A=t.match(/(?:opera|opr).([\d\.]+)/))?e.opera=A[1]:(A=t.match(/chrome\/([\d\.]+)/))?e.chrome=A[1]:(A=t.match(/version\/([\d\.]+).*safari/))&&(e.safari=A[1]),e.chrome){var i=e.chrome,n=i.indexOf(".");return Number(i.substring(0,n))}return-1}function rC(A){return aC()>=94}function oC(A){if(aC()>=107){window.VideoDecoder&&VideoDecoder.isConfigSupported({codec:"hvc1.1.6.L123.00",hardwareAcceleration:"prefer-hardware"}).then((function(A){A.supported}))}}function sC(){return sC=Object.assign||function(A){for(var e=1;e=e.startTime?t.endTime=e.endTime:A.push(e),A}),[])}function lC(A,e,t,i,n,a,r){try{var o=A[a](r),s=o.value}catch(A){return void t(A)}o.done?e(s):Promise.resolve(s).then(i,n)}function cC(A){return function(){var e=this,t=arguments;return new Promise((function(i,n){var a=A.apply(e,t);function r(A){lC(a,i,n,r,o,"next",A)}function o(A){lC(a,i,n,r,o,"throw",A)}r(void 0)}))}}function dC(){return dC=Object.assign||function(A){for(var e=1;e0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]e.domain?1:-1})),i=[].concat(e).sort((function(A,e){return A.domain>e.domain?1:-1})),n=0;n0?A.data:ed).map((function(A){i.push({name:td[A.videoLevel],level:A.videoLevel,streamTypeIn:A.streamTypeIn,type:A.type})})),i})).catch((function(){return ed.map((function(A){i.push({name:td[A.videoLevel],level:A.videoLevel,streamTypeIn:A.streamTypeIn,type:"compatible"})})),i}))]}))}))()},e.getDeviceList=function(){var A=this;return cC((function(){var e,t;return IC(this,(function(i){return[2,A.post("/api/lapp/device/camera/list?accessToken="+(A._options.accessToken||(null==(t=A._options.token)||null==(e=t.deviceToken)?void 0:e.video))+"&deviceSerial="+A._options.deviceSerial).then((function(A){return A.json()})).then((function(A){return 200==+(null==A?void 0:A.code)?A.data:[]})).catch((function(){return[]}))]}))}))()},e.setVideoLevel=function(A){var e=this;return cC((function(){var t,i,n,a,r;return IC(this,(function(o){return(r=new FormData).append("videoLevel",A+""),[2,e.post(pC+"?accessToken="+(e._options.accessToken||(null==(i=e._options.token)||null==(t=i.deviceToken)?void 0:t.video)),{headers:{accessToken:e._options.accessToken||(null==(a=e._options.token)||null==(n=a.deviceToken)?void 0:n.video)},body:r}).then((function(A){return A.json()})).then((function(A){return A}))]}))}))()},e.getEzopenUrl=function(A){var e=this;return cC((function(){var t,i,n,a,r,o;return IC(this,(function(s){if((o=new FormData).append("isFlv","false"),o.append("userAgent",(null==(i=window)||null==(t=i.navigator)?void 0:t.userAgent)||""),o.append("isHttp","false"),o.append("needStreamToken",(null==(n=e._options)?void 0:n.accessToken)?"1":"0"),o.append("accessToken",e._options.accessToken||(null==(r=e._options.token)||null==(a=r.deviceToken)?void 0:a.video)||""),o.append("ezopen",A),e._options.ezopenParams&&"[object Object]"===Object.prototype.toString.call(e._options.ezopenParams))for(var g in e._options.ezopenParams)o.append(g,e._options.ezopenParams[g]);return e.controllers.ezopen=new AbortController,[2,e.post(mC,{signal:e.controllers.ezopen.signal,body:o,headers:{sdkVersion:"8.1.10"}}).then((function(A){return A.json()})).then((function(t){if(200==+(null==t?void 0:t.code)||0==t.retcode){var i,n,a,r="",o="",s=null==(a=e._options)||null==(n=a.token)||null==(i=n.streamToken)?void 0:i[t.data.indexOf("live")>-1||t.data.indexOf("cloud")>-1?"live":"rec"];if(t.ext&&t.ext.token)r+=t.data,o=e._options.accessToken?t.ext.token:s;else if(t.data){var g;if("string"==typeof t.data&&s)r+=t.data,o=s;else r+=(null==(g=t.data)?void 0:g.url)||"",o=e._options.accessToken?t.data.token:s}if(r="live"===(-1!==A.indexOf("live")?"live":"playback")?r+"&ssn="+(o||"")+"&auth=1&biz=4&cln=100":r+"&ssn="+(o||"")+"&auth=1&cln=100",e._options.wsParams&&"[object Object]"===Object.prototype.toString.call(e._options.wsParams))for(var l in e._options.wsParams)r+="&"+l+"="+e._options.wsParams[l]||"";return r.replace(/&&/gi,"&")}return t})).catch((function(){return""}))]}))}))()},e.getCloudRecordTimes=function(A){var e=this;return cC((function(){var t,i;return IC(this,(function(n){return t={startTime:A.begin?gd.formate(A.begin,"YYYY-MM-DD hh:mm:ss"):void 0,endTime:A.end?gd.formate(A.end,"YYYY-MM-DD hh:mm:ss"):void 0,spaceId:A.spaceId},i=Object.keys(t).reduce((function(A,e){return null==t[e]?A:A+="&"+e+"="+encodeURIComponent(t[e])}),"").replace("&",""),[2,e.get(yC+"?"+i).then((function(A){return A.json()})).then((function(A){var e;return 200==+(null==A||null==(e=A.meta)?void 0:e.code)?gC((A.data||[]).map((function(A){return A.endTime=parseInt(gd.strToDate(A.stopTime).getTime()/1e3+"",10),A.startTime=parseInt(gd.strToDate(A.startTime).getTime()/1e3+"",10),A.busType=7,A.iStorageVersion=A.istorageVersion,A}))):[]})).catch((function(){return[]}))]}))}))()},e.getCloudTimes=function(A){var e=this;return cC((function(){var t,i,n,a,r;return IC(this,(function(o){switch(o.label){case 0:return(n=new FormData).append("recType","1"),n.append("version","2.0"),n.append("deviceSerial",e._options.deviceSerial),n.append("channelNo",e._options.channelNo+""),n.append("accessToken",e._options.accessToken||(null==(i=e._options.token)||null==(t=i.deviceToken)?void 0:t.video)||""),A.begin&&n.append("startTime",gd.strToDate(A.begin+"").getTime()+""),A.end&&n.append("endTime",gd.strToDate(A.end+"").getTime()+""),a=[],r=cC((function(A){return IC(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.post(""+_C,{headers:null,body:A}).then((function(A){return A.json()})).then(cC((function(e){var t,i,n,o,s,g,l;return IC(this,(function(c){switch(c.label){case 0:return 200==+e.code&&e.data?(g=[],Array.isArray(e.data)?g=e.data:(null==(t=e.data)?void 0:t.files)&&(null==(n=e.data)||null==(i=n.files)?void 0:i.length)>0&&(g=(null==(l=e.data)?void 0:l.files)||[]),a=a.concat(g),(null==(o=e.data)?void 0:o.isAll)||!(null==(s=e.data)?void 0:s.nextFileTime)?[3,2]:(A.append("startTime",e.data.nextFileTime),[4,r(A)])):[3,2];case 1:return[2,c.sent()];case 2:return[2]}}))})))];case 1:case 2:return t.sent(),[3,3];case 3:return[2]}}))})),[4,r(n)];case 1:return o.sent(),[2,gC(a=a.map((function(A){return dC({},A,{endTime:parseInt(A.endTime/1e3+"",10),startTime:parseInt(A.startTime/1e3+"",10)})})),e._options.timeZone||0)]}}))}))()},e.getLocalRecTimes=function(A){var e=this;return cC((function(){var t,i,n;return IC(this,(function(a){switch(a.label){case 0:return t=parseInt(gd.strToDate(A.begin+"").getTime()/1e3+"",10),i=parseInt(gd.strToDate(A.end+"").getTime()/1e3+"",10),n=cC((function(A){var t,i,a,r,o,s,g,l;return IC(this,(function(c){switch(c.label){case 0:t=[],c.label=1;case 1:return c.trys.push([1,5,,6]),[4,e.get(SC+"?startTime="+A.startTime+"&endTime="+A.endTime+"&pageSize="+(A.pageSize||200)).then((function(A){return A.json()}))];case 2:return 200!=+(null==(s=c.sent())||null==(i=s.meta)?void 0:i.code)?[2,t]:((null==s||null==(r=s.data)||null==(a=r.records)?void 0:a.length)&&(t=t.concat(s.data.records||[])),(null==s||null==(o=s.data)?void 0:o.hasMore)?(l=t.concat,[4,n(dC({},A,{startTime:null==s||null==(g=s.data)?void 0:g.nextFileTime}))]):[3,4]);case 3:t=l.apply(t,[c.sent()]),c.label=4;case 4:return[3,6];case 5:return c.sent(),[3,6];case 6:return[2,t]}}))})),[4,n({startTime:t,endTime:i})];case 1:return[2,gC(a.sent()||[]||[],e._options.timeZone||0)]}}))}))()},e.postDevicePtzMirror=function(A){var e=this;return cC((function(){var t,i,n;return IC(this,(function(a){return(n=new FormData).append("command",A+""),n.append("accessToken",e._options.accessToken||(null==(i=e._options.token)||null==(t=i.deviceToken)?void 0:t.video)||""),n.append("deviceSerial",e._options.deviceSerial),n.append("channelNo",e._options.channelNo+""),e.post(DC,{body:n}),[2]}))}))()},A}(),bC=(CC="undefined"!=typeof self?self:window,hC={navigator:void 0!==CC.navigator?CC.navigator:{userAgent:""},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}},uC={getMatchMap:function(A){return{Trident:A.indexOf("Trident")>-1||A.indexOf("NET CLR")>-1,Presto:A.indexOf("Presto")>-1,WebKit:A.indexOf("AppleWebKit")>-1,Gecko:A.indexOf("Gecko/")>-1,Safari:A.indexOf("Safari")>-1,Chrome:A.indexOf("Chrome")>-1||A.indexOf("CriOS")>-1,IE:A.indexOf("MSIE")>-1||A.indexOf("Trident")>-1,Edge:A.indexOf("Edge")>-1,Firefox:A.indexOf("Firefox")>-1||A.indexOf("FxiOS")>-1,"Firefox Focus":A.indexOf("Focus")>-1,Chromium:A.indexOf("Chromium")>-1,Opera:A.indexOf("Opera")>-1||A.indexOf("OPR")>-1,Vivaldi:A.indexOf("Vivaldi")>-1,Yandex:A.indexOf("YaBrowser")>-1,Arora:A.indexOf("Arora")>-1,Lunascape:A.indexOf("Lunascape")>-1,QupZilla:A.indexOf("QupZilla")>-1,"Coc Coc":A.indexOf("coc_coc_browser")>-1,Kindle:A.indexOf("Kindle")>-1||A.indexOf("Silk/")>-1,Iceweasel:A.indexOf("Iceweasel")>-1,Konqueror:A.indexOf("Konqueror")>-1,Iceape:A.indexOf("Iceape")>-1,SeaMonkey:A.indexOf("SeaMonkey")>-1,Epiphany:A.indexOf("Epiphany")>-1,360:A.indexOf("QihooBrowser")>-1||A.indexOf("QHBrowser")>-1,"360EE":A.indexOf("360EE")>-1,"360SE":A.indexOf("360SE")>-1,UC:A.indexOf("UC")>-1||A.indexOf(" UBrowser")>-1,QQBrowser:A.indexOf("QQBrowser")>-1,QQ:A.indexOf("QQ/")>-1,Baidu:A.indexOf("Baidu")>-1||A.indexOf("BIDUBrowser")>-1,Maxthon:A.indexOf("Maxthon")>-1,Sogou:A.indexOf("MetaSr")>-1||A.indexOf("Sogou")>-1,LBBROWSER:A.indexOf("LBBROWSER")>-1,"2345Explorer":A.indexOf("2345Explorer")>-1,TheWorld:A.indexOf("TheWorld")>-1,XiaoMi:A.indexOf("MiuiBrowser")>-1,Quark:A.indexOf("Quark")>-1,Qiyu:A.indexOf("Qiyu")>-1,Wechat:A.indexOf("MicroMessenger")>-1,Taobao:A.indexOf("AliApp(TB")>-1,Alipay:A.indexOf("AliApp(AP")>-1,Weibo:A.indexOf("Weibo")>-1,Douban:A.indexOf("com.douban.frodo")>-1,Suning:A.indexOf("SNEBUY-APP")>-1,iQiYi:A.indexOf("IqiyiApp")>-1,Windows:A.indexOf("Windows")>-1,Linux:A.indexOf("Linux")>-1||A.indexOf("X11")>-1,"Mac OS":A.indexOf("Macintosh")>-1,Android:A.indexOf("Android")>-1||A.indexOf("Adr")>-1,Ubuntu:A.indexOf("Ubuntu")>-1,FreeBSD:A.indexOf("FreeBSD")>-1,Debian:A.indexOf("Debian")>-1,"Windows Phone":A.indexOf("IEMobile")>-1||A.indexOf("Windows Phone")>-1,BlackBerry:A.indexOf("BlackBerry")>-1||A.indexOf("RIM")>-1,MeeGo:A.indexOf("MeeGo")>-1,Symbian:A.indexOf("Symbian")>-1,iOS:A.indexOf("like Mac OS X")>-1,"Chrome OS":A.indexOf("CrOS")>-1,WebOS:A.indexOf("hpwOS")>-1,Mobile:A.indexOf("Mobi")>-1||A.indexOf("iPh")>-1||A.indexOf("480")>-1,Tablet:A.indexOf("Tablet")>-1||A.indexOf("Nexus 7")>-1,iPad:A.indexOf("iPad")>-1}},matchInfoMap:function(A){var e,t=(null==(e=hC.navigator)?void 0:e.userAgent)||"",i=uC.getMatchMap(t);for(var n in hC.infoMap)for(var a=0;a36&&CC.showModalDialog?n=!0:+a>45&&(n=t("type","application/vnd.chromium.remoting-viewer"))}if(i.Baidu&&i.Opera&&(i.Baidu=!1),i.Mobile&&(i.Mobile=!e.includes("iPad")),n&&(t("type","application/gameplugin")||hC.navigator&&void 0===hC.navigator.connection.saveData?i["360SE"]=!0:i["360EE"]=!0),i.IE||i.Edge)switch(window.screenTop-window.screenY){case 71:case 74:case 99:case 75:case 105:break;case 102:i["360EE"]=!0;break;case 104:i["360SE"]=!0}var r={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return e.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return e.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return e.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return e.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return e.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return e.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return e.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return e.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return e.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return e.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){return{63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"360EE":function(){return{69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[+e.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){return{57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[+navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1")]||""},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};return A.browserVersion="",r[A.browser]&&(A.browserVersion=r[A.browser](),A.browserVersion==e&&(A.browserVersion="")),"Edge"==A.browser&&(A.engine="EdgeHTML"),"Chrome"==A.browser&&parseInt(A.browserVersion)>27&&(A.engine="Blink"),"Opera"==A.browser&&parseInt(A.browserVersion)>12&&(A.engine="Blink"),"Yandex"==A.browser&&(A.engine="Blink"),A.browser+" (version: "+A.browserVersion+"; kernel: "+A.engine+")"}},BC={DeviceInfoObj:function(A){var e,t=function(e){var t;null==(t=A.info)||t.forEach((function(A){A.toLowerCase()===e.toLowerCase()&&(n[e]=i[e])}))};A=A||{domain:""};var i={deviceType:uC.getDeviceType(),OS:uC.getOS(),OSVersion:uC.getOSVersion(),sh:CC.screen.height,sw:CC.screen.width,lang:uC.getLanguage(),netWork:uC.getNetwork(),orientation:uC.getOrientationStatu(),browserInfo:uC.getBrowserInfo(),fingerprint:uC.createFingerprint(A.domain),userAgent:null==(e=hC.navigator)?void 0:e.userAgent};if(!A.info||0===A.info.length)return i;var n={};for(var a in i)t(a);return n}},{getDeviceInfo:function(A){return BC.DeviceInfoObj(A)}}),FC=function(){function A(){}return A.add=function(e,t){A.queues.push({url:e,data:t})},A.fire=function(){if(A.queues&&0!==A.queues.length){A.isStop=!1;var e=A.queues[0];e.url&&A.api.report(e.data),A.queues.splice(0,1),A.fire()}else A.isStop=!0},A}();function RC(A){return A&&"undefined"!=typeof Symbol&&A.constructor===Symbol?"symbol":typeof A}FC.isStop=!0,FC.queues=[];var kC=function(){function A(A){this.url=A}var e=A.prototype;return e.report=function(A){this.checkUrl(this.url)&&this.sendInfo(A)},e.sendInfo=function(A){navigator.sendBeacon?this.sendBeacon(this.url,A):this.sendImage(this.url,A)},e.sendImage=function(A,e){var t=this.changeJSON2Query(e),i=new Image;i.onload=i.onerror=function(){i=null},i.src=A+"?"+t+"&random="+Math.random()},e.sendBeacon=function(A,e){try{navigator.sendBeacon(A,this.formatParamsByURLSearchParams(e))}catch(A){}},e.formatParamsByURLSearchParams=function(A){var e=new URLSearchParams;for(var t in A)"object"===RC(A[t])&&(A[t]=JSON.stringify(A[t])),e.append(t,A[t]);return e},e.changeJSON2Query=function(A){var e="";for(var t in A){""!=e&&(e+="&");var i=A[t];e+=t+"="+encodeURIComponent("object"===(void 0===i?"undefined":RC(i))?JSON.stringify(i):i)}return e},e.checkUrl=function(A){return!!A&&/^[hH][tT][tT][pP]([sS]?):\/\//.test(A)},A}();function PC(){return PC=Object.assign||function(A){for(var e=1;e-1?MC[e].logHost:""},e.report=function(A,e){var t;this.monitorReport&&(null==(t=this.collect)||t.send(TC({action:A,appKey:this.appKey},e,{logInfo:TC({pluginVersion:this.pluginVersion},e.logInfo||{})})))},e.updateParams=function(A){var e;null==(e=this.collect)||e.updateExtendsInfo(A)},e.updateAppKey=function(A){this.appKey=A},e.setForbidden=function(A){var e;null==(e=this.collect)||e.setForbidden(A)},A}();function GC(A){document.getElementById(A+"-player")&&document.getElementById(A+"-container-0").removeChild(document.getElementById(A+"-player"))}function YC(){return YC=Object.assign||function(A){for(var e=1;e=a&&A.endTime<=r||(A.startTimea||(A.startTimer||void 0))}))).length>0&&(A[0].startTime=a,A[A.length-1].endTime=r),A.reduce((function(A,e,t){return 0===t?(A.push(n(e)),A):(A[A.length-1].downloadPath===e.downloadPath?A[A.length-1].endTime=e.endTime:A.push(n(e)),A)}),[])}function JC(A,e,t,i,n,a,r){try{var o=A[a](r),s=o.value}catch(A){return void t(A)}o.done?e(s):Promise.resolve(s).then(i,n)}function HC(){return HC=Object.assign||function(A){for(var e=1;e0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]=24||t<=-24||isNaN(t))&&(t=0),7==+i?{begin:A,end:e,timeZone:t,originBegin:n,originEnd:a}:{begin:A=gd.formate(gd.strToDate(A).getTime()+60*t*60*1e3,"YYYYMMDDhhmmss"),end:e=gd.formate(gd.strToDate(e).getTime()+60*t*60*1e3,"YYYYMMDDhhmmss"),timeZone:t,originBegin:n,originEnd:a}}(A.urlInfo.searchParams.begin,A.urlInfo.searchParams.end,null==(i=A.urlInfo.searchParams)?void 0:i.timeZone,A.urlInfo.searchParams.busType),A.timeZone=e.timeZone,t="&begin="+gd.formate(e.originBegin,"YYYYMMDDThhmmssZ")+"&end="+gd.formate(e.originEnd,"YYYYMMDDThhmmssZ")+"&timeZone="+e.timeZone),A._isCloudRecord&&-1!==A.url.indexOf(".cloud")&&"7"===A.urlInfo.searchParams.busType?[4,A._services.getCloudRecordTimes({begin:e.begin,end:e.end,spaceId:A.urlInfo.searchParams.spaceId}).then((function(i){var n,a,r;if(A.cloudRecordRecList=i||[],null==(n=A.eventEmitter)||n.emit(id.http.getCloudRecordTimes,i||[]),null==(a=A.eventEmitter)||a.emit(id.setAllDayRecTimes,{type:"cloudRecordTimes",list:i||[]}),i.length){var o,s=UC(i,["downloadPath","ownerId","iStorageVersion","spaceId","startTime","endTime","videoType","busType"],e.originBegin,e.originEnd);if(null==(o=A.eventEmitter)||o.emit(id.setRecTimes,i),0===s.length)return"";var g=JSON.stringify(s).replace("\\","");return t+"&recSlice="+g.replace("\\","")+"&r="+Math.random()}return null==(r=A.eventEmitter)||r.emit(id.setRecTimes,[]),""}))]:[3,2];case 1:return[2,n.sent()];case 2:return-1===A.url.indexOf(".cloud")||"7"===A.urlInfo.searchParams.busType?[3,4]:[4,A._services.getCloudTimes({begin:e.begin,end:e.end}).then((function(i){var n,a,r;if(A.cloudRecList=i||[],null==(n=A.eventEmitter)||n.emit(id.http.getCloudRecTimes,i||[]),null==(a=A.eventEmitter)||a.emit(id.setAllDayRecTimes,{type:"cloudRecTimes",list:i||[]}),i.length){var o,s=UC(i,["downloadPath","ownerId","iStorageVersion","startTime","endTime","videoType"],e.originBegin,e.originEnd);if(null==(o=A.eventEmitter)||o.emit(id.setRecTimes,s),0===s.length)return"";var g=JSON.stringify(s.map((function(e){var t,i;return HC({},e,{startTime:e.startTime+3600*((null==(t=A.urlInfo.searchParams)?void 0:t.timeZone)||0)*1e3,endTime:e.endTime+3600*((null==(i=A.urlInfo.searchParams)?void 0:i.timeZone)||0)*1e3})}))).replace("\\","");return t+"&recSlice="+g.replace("\\","")+"&r="+Math.random()}return null==(r=A.eventEmitter)||r.emit(id.setRecTimes,[]),""}))];case 3:return[2,n.sent()];case 4:if(-1!==A.url.indexOf(".rec"))return A._services.getLocalRecTimes({begin:e.begin,end:e.end}).then((function(e){var t,i,n;A.localRecList=e,null==(t=A.eventEmitter)||t.emit(id.http.getLocalRecTimes,e||[]),null==(i=A.eventEmitter)||i.emit(id.setAllDayRecTimes,{type:"localTimes",list:e||[]}),null==(n=A.eventEmitter)||n.emit(id.setRecTimes,[])})),[2,t];n.label=5;case 5:return[2]}}))})),OC.apply(this,arguments)}function jC(A){var e,t;return A.url.indexOf(".live")>-1?(null==(t=A.logger)||null==(e=t.log)||e.call(t,"[https request] _getDeviceSupportQualityServicesAndGetDeviceListServices()"),new Promise((function(e){var t=A.params.videoLevelList?Promise.resolve(A.params.videoLevelList):function(A){var e,t;return null==(t=A.logger)||null==(e=t.log)||e.call(t,"[https request] getDeviceSupportQuality()"),A._services.getDeviceSupportQuality().then((function(e){var t;return A.videoLevelList=e,null==(t=A.eventEmitter)||t.emit(id.http.getDeviceSupportQuality,e),e}))}(A);Promise.all([t,A._services.getDeviceList()]).then((function(t){var i,n,a,r,o,s,g,l;null==(n=A.logger)||null==(i=n.log)||i.call(n,"[https request] getDeviceList()"),null==(r=A.eventEmitter)||null==(a=r.emit)||a.call(r,id.http.getDeviceList,t[1]||[]);var c=t[1].find((function(e){return e.channelNo===+A.urlInfo.channelNo}));c||e([[],[]]),A.videoLevelList=t[0],null==(s=A.eventEmitter)||null==(o=s.emit)||o.call(s,id.setVideoLevelList,t[0]||[]);var d={};(d="compatible"===(null==(g=A.videoLevelList[0])?void 0:g.type)?A.url.indexOf(".hd.live")>0?A.videoLevelList[1]:A.videoLevelList[0]:A.videoLevelList.find((function(A){return A.level==(null==c?void 0:c.videoLevel)}))||{})?(A.videoLevel=d.level,A.streamTypeIn=d.streamTypeIn):A.logger.warn("the current video quality("+(null==c?void 0:c.videoLevel)+") is not in the list!"),null==(l=A.eventEmitter)||l.emit(id.currentVideoLevel,d),e(t)}))}))):Promise.resolve([[],[]])}function WC(A){var e;return null==(e=A.logger)||e.log("[https request] getStreamAddressList()"),A._services.getStreamAddressList().then((function(e){var t;A.maxReloadTime=e[0],null==(t=A.eventEmitter)||t.emit(id.http.getStreamAddressList,e[1])}))}function ZC(){return ZC=Object.assign||function(A){for(var e=1;eA.length)&&(e=A.length);for(var t=0,i=new Array(e);t=A.length?{done:!0}:{done:!1,value:A[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function th(A,e){var t,i,n,a=-1;if(e===A.speed)return null==(t=A.logger)||t.warn("the speed value has not changed!"),0;e&&(Ad.includes(e)?(A.jSPlugin.JS_Speed(e),a=1,A.speed=e,A.Theme?(A.Theme.changeRecSpeed(e),A.Theme.nextRate=e):null==(i=A.eventEmitter)||i.emit(id.speedChange,A.speed)):null==(n=A.logger)||n.warn("current speed is not supported!"));return a}function ih(A,e,t,i,n,a,r){try{var o=A[a](r),s=o.value}catch(A){return void t(A)}o.done?e(s):Promise.resolve(s).then(i,n)}function nh(A){return function(){var e=this,t=arguments;return new Promise((function(i,n){var a=A.apply(e,t);function r(A){ih(a,i,n,r,o,"next",A)}function o(A){ih(a,i,n,r,o,"throw",A)}r(void 0)}))}}function ah(A,e){var t,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(n=r.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]=0?i=i.replace(".hd.live",".live"):i.indexOf(".live")>=0&&(i=i.replace(".live",".hd.live")),[3,4]);case 1:return d.trys.push([1,3,,4]),null==(r=A.logger)||null==(n=r.log)||n.call(r,"[https request] setVideoLevel()","videoLevel",JSON.stringify(e)),[4,null==(o=A._services)?void 0:o.setVideoLevel(A.videoLevel)];case 2:return l=d.sent(),null==A||null==(g=A.eventEmitter)||null==(s=g.emit)||s.call(g,id.http.setVideoLevel,l),[3,4];case 3:return d.sent(),[3,4];case 4:return document.getElementById(A.id+"-videoLevel-icon")&&(c=A.videoLevelList.find((function(e){return e.level===A.videoLevel})),document.getElementById(A.id+"-videoLevel-icon").innerHTML=function(A,e){return Object.values(td).includes(e.name)?A.i18n.t(td[e.level]):e.name}(A,c),document.getElementById(A.id+"-videoLevel-icon").dataset.type=A.videoLevel),A.changePlayUrl({url:A.url},(function(){}),!1).then((function(i){var n;null==(n=A.eventEmitter)||n.emit(id.changeVideoLevel,{eventType:id.changeVideoLevel,code:0,data:e,msg:A.i18n.t("CHANGE_VIDEO_LEVEL")}),t({code:0,data:e,msg:A.i18n.t("CHANGE_VIDEO_LEVEL")})})).catch((function(){var i;null==(i=A.eventEmitter)||i.emit(id.changeVideoLevel,{eventType:id.changeVideoLevel,code:-1,data:e,msg:A.i18n.t("CHANGE_VIDEO_LEVEL_FAIL")}),t({code:-1,data:e,msg:A.i18n.t("CHANGE_VIDEO_LEVEL_FAIL")})})),[2]}}))})))):(null==(i=A.eventEmitter)||i.emit(id.changeVideoLevel,{eventType:id.changeVideoLevel,code:-2,data:e,msg:A.i18n.t("VIDEO_LEVEL_NOT_SUPPORT")+":"+JSON.stringify(e)}),null==(n=A.logger)||n.warn("video level does not exist!"),Promise.resolve({code:-2,data:e}))}function oh(){return oh=Object.assign||function(A){for(var e=1;et&&ai?0:-1:n>t&&a>i?1:n-1)try{var a=function(A,e,t,i){void 0===i&&(i=5);if(!(A&&e&&t&&t.startPos&&t.endPos))return-1;var n=t.startPos[0],a=t.startPos[1],r=t.endPos[0],o=t.endPos[1],s=Math.abs(r-n),g=Math.abs(o-a),l=parseInt((n+r)/2+""),c=parseInt((a+o)/2+""),d=Math.round(A*e/(s*g));return{startPointX:parseInt(n/A*256+""),startPointY:parseInt(a/e*256+""),endPointX:parseInt(r/A*256+""),endPointY:parseInt(o/e*256+""),zoomRate:d>i?i:d,targetCenterX:l,targetCenterY:c,targetWidth:s,targetHeight:g}}(t,i,e,A.capacity&&A.capacity.support_zoomOut_maxTime?A.capacity.support_zoomOut_maxTime:5);if(-1===a)return;var r=A.env.domain+"/api/v3/das/device/3d/zoom?accessToken="+(A.accessToken||A.token.deviceToken.video)+"&deviceSerial="+A.urlInfo.deviceSerial+"&channelNo="+A.urlInfo.channelNo+"&command="+(0==n?9:8)+"&zoomTimes="+a.zoomRate+"&startPointX="+a.startPointX+"&startPointY="+a.startPointY+"&endPointX="+a.endPointX+"&endPointY="+a.endPointY+"&length="+parseInt(i)+"&width="+parseInt(t)+"&midPointX="+a.targetCenterX+"&midPointY="+a.targetCenterY+"&lengthX="+a.targetWidth+"&lengthY="+a.targetHeight;fetch(r,{method:"POST"}).then((function(A){return A.json()})).then((function(e){var t;200!=e.code&&(null==(t=A.pluginStatus)||t.loadingSetText({text:e.msg,color:"red",delayClear:2e3}))})).catch((function(e){var t;null==(t=A.pluginStatus)||t.loadingSetText({text:A.i18n.t("3D_ZOOM_FAILED"),color:"red",delayClear:2e3})}))}catch(e){var o;A.pluginStatus.loadingSetText({text:null==(o=A.i18n)?void 0:o.t("3D_ZOOM_FAILED"),color:"red",delayClear:2e3})}}));return null==(g=A.eventEmitter)||g.emit(id.enable3DZoom,{eventType:id.enable3DZoom,code:l,msg:null==(s=A.i18n)?void 0:s.t("START_3D_ZOOM")}),0===l?Promise.resolve({code:-1}):Promise.resolve({code:0})}return A.is3DZooming=!1,a&&(a.title=null==(n=A.i18n)?void 0:n.t("ZOOM")),new Promise((function(e){A.eventEmitter&&A.eventEmitter.emit(id.enable3DZoom,{eventType:id.enable3DZoom,code:-1,msg:A.i18n.t("DEVICE_NOT_SUPPORT_3D_ZOOM")}),e({code:-1,msg:A.i18n.t("DEVICE_NOT_SUPPORT_3D_ZOOM")})}))}function ch(A,e){var t,i,n,a,r,o,s,g,l;return!A._FECCorrectType||((null==(t=A.jSPlugin)?void 0:t.isHardH264)||(null==(i=A.jSPlugin)?void 0:i.isHardH265))&&(null==(n=A.jSPlugin)?void 0:n.useHardDev)?(A.eventEmitter.emit(id.getFEC3DViewParam,{eventType:id.getFEC3DViewParam,code:-1,msg:A.i18n.t("FEC.GET_FEC_PARAMS_SUPPORT_VERSION")}),Promise.resolve({code:-1,msg:A.i18n.t("FEC.GET_FEC_PARAMS_SUPPORT_VERSION")})):(null==(a=A.jSPlugin)?void 0:a.FEC_Set3DViewParam)&&A._FECCorrectType&&(3===(null==(r=A._FECCorrectType)?void 0:r.place)&&1536===(null==(o=A._FECCorrectType)?void 0:o.correctType)||1===(null==(s=A._FECCorrectType)?void 0:s.place)&&2304===(null==(g=A._FECCorrectType)?void 0:g.correctType))?null==(l=A.jSPlugin)?void 0:l.FEC_Get3DViewParam(e).then((function(e){return A.eventEmitter.emit(id.getFEC3DViewParam,{eventType:id.getFEC3DViewParam,code:0,data:e,msg:A.i18n.t("FEC.SET_FEC_PARAMS")}),{code:0,data:e}})).catch((function(){return A.eventEmitter.emit(id.getFEC3DViewParam,{eventType:id.getFEC3DViewParam,code:-1}),{code:-1}})):(A.eventEmitter.emit(id.getFEC3DViewParam,{eventType:id.getFEC3DViewParam,code:-1,msg:A.i18n.t("FEC.SET_FEC_PARAMS_FAILED")}),Promise.resolve({code:-1,msg:A.i18n.t("FEC.SET_FEC_PARAMS_FAILED")}))}function dh(A,e,t,i,n,a,r){try{var o=A[a](r),s=o.value}catch(A){return void t(A)}o.done?e(s):Promise.resolve(s).then(i,n)}function Ih(A,e){var t,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(n=r.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]0&&e-1 in A)}function y(A,e){return A.nodeName&&A.nodeName.toLowerCase()===e.toLowerCase()}p.fn=p.prototype={jquery:Q,constructor:p,length:0,toArray:function(){return n.call(this)},get:function(A){return null==A?n.call(this):A<0?this[A+this.length]:this[A]},pushStack:function(A){var e=p.merge(this.constructor(),A);return e.prevObject=this,e},each:function(A){return p.each(this,A)},map:function(A){return this.pushStack(p.map(this,(function(e,t){return A.call(e,t,e)})))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,(function(A,e){return(e+1)%2})))},odd:function(){return this.pushStack(p.grep(this,(function(A,e){return e%2})))},eq:function(A){var e=this.length,t=+A+(A<0?e:0);return this.pushStack(t>=0&&t+~]|"+v+")"+v+"*"),U=new RegExp(v+"|>"),J=new RegExp(M),H=new RegExp("^"+N+"$"),K={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+T),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+v+"*(even|odd|(([+-]|)(\\d*)n|)"+v+"*(?:([+-]|)"+v+"*(\\d+)|))"+v+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+v+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+v+"*((?:-\\d)?\\d*)"+v+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,O=/^h\d$/i,j=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+v+"?|\\\\([^\\r\\n\\f])","g"),X=function(A,e){var t="0x"+A.slice(1)-65536;return e||(t<0?String.fromCharCode(t+65536):String.fromCharCode(t>>10|55296,1023&t|56320))},q=function(){sA()},z=dA((function(A){return!0===A.disabled&&y(A,"fieldset")}),{dir:"parentNode",next:"legend"});try{u.apply(t=n.call(R.childNodes),R.childNodes),t[R.childNodes.length].nodeType}catch(A){u={apply:function(A,e){k.apply(A,n.call(e))},call:function(A){k.apply(A,n.call(arguments,1))}}}function $(A,e,t,i){var n,a,r,o,s,l,c,h=e&&e.ownerDocument,E=e?e.nodeType:9;if(t=t||[],"string"!=typeof A||!A||1!==E&&9!==E&&11!==E)return t;if(!i&&(sA(e),e=e||g,d)){if(11!==E&&(s=j.exec(A)))if(n=s[1]){if(9===E){if(!(r=e.getElementById(n)))return t;if(r.id===n)return u.call(t,r),t}else if(h&&(r=h.getElementById(n))&&$.contains(e,r)&&r.id===n)return u.call(t,r),t}else{if(s[2])return u.apply(t,e.getElementsByTagName(A)),t;if((n=s[3])&&e.getElementsByClassName)return u.apply(t,e.getElementsByClassName(n)),t}if(!(b[A+" "]||C&&C.test(A))){if(c=A,h=e,1===E&&(U.test(A)||Y.test(A))){for((h=W.test(A)&&oA(e.parentNode)||e)==e&&I.scope||((o=e.getAttribute("id"))?o=p.escapeSelector(o):e.setAttribute("id",o=B)),a=(l=lA(A)).length;a--;)l[a]=(o?"#"+o:":scope")+" "+cA(l[a]);c=l.join(",")}try{return u.apply(t,h.querySelectorAll(c)),t}catch(e){b(A,!0)}finally{o===B&&e.removeAttribute("id")}}}return EA(A.replace(w,"$1"),e,t,i)}function AA(){var A=[];return function e(t,n){return A.push(t+" ")>i.cacheLength&&delete e[A.shift()],e[t+" "]=n}}function eA(A){return A[B]=!0,A}function tA(A){var e=g.createElement("fieldset");try{return!!A(e)}catch(A){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function iA(A){return function(e){return y(e,"input")&&e.type===A}}function nA(A){return function(e){return(y(e,"input")||y(e,"button"))&&e.type===A}}function aA(A){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===A:e.disabled===A:e.isDisabled===A||e.isDisabled!==!A&&z(e)===A:e.disabled===A:"label"in e&&e.disabled===A}}function rA(A){return eA((function(e){return e=+e,eA((function(t,i){for(var n,a=A([],t.length,e),r=a.length;r--;)t[n=a[r]]&&(t[n]=!(i[n]=t[n]))}))}))}function oA(A){return A&&void 0!==A.getElementsByTagName&&A}function sA(A){var e,t=A?A.ownerDocument||A:R;return t!=g&&9===t.nodeType&&t.documentElement?(c=(g=t).documentElement,d=!p.isXMLDoc(g),h=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&R!=g&&(e=g.defaultView)&&e.top!==e&&e.addEventListener("unload",q),I.getById=tA((function(A){return c.appendChild(A).id=p.expando,!g.getElementsByName||!g.getElementsByName(p.expando).length})),I.disconnectedMatch=tA((function(A){return h.call(A,"*")})),I.scope=tA((function(){return g.querySelectorAll(":scope")})),I.cssHas=tA((function(){try{return g.querySelector(":has(*,:jqfake)"),!1}catch(A){return!0}})),I.getById?(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){return A.getAttribute("id")===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&d){var t=e.getElementById(A);return t?[t]:[]}}):(i.filter.ID=function(A){var e=A.replace(Z,X);return function(A){var t=void 0!==A.getAttributeNode&&A.getAttributeNode("id");return t&&t.value===e}},i.find.ID=function(A,e){if(void 0!==e.getElementById&&d){var t,i,n,a=e.getElementById(A);if(a){if((t=a.getAttributeNode("id"))&&t.value===A)return[a];for(n=e.getElementsByName(A),i=0;a=n[i++];)if((t=a.getAttributeNode("id"))&&t.value===A)return[a]}return[]}}),i.find.TAG=function(A,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(A):e.querySelectorAll(A)},i.find.CLASS=function(A,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(A)},C=[],tA((function(A){var e;c.appendChild(A).innerHTML="",A.querySelectorAll("[selected]").length||C.push("\\["+v+"*(?:value|"+P+")"),A.querySelectorAll("[id~="+B+"-]").length||C.push("~="),A.querySelectorAll("a#"+B+"+*").length||C.push(".#.+[+~]"),A.querySelectorAll(":checked").length||C.push(":checked"),(e=g.createElement("input")).setAttribute("type","hidden"),A.appendChild(e).setAttribute("name","D"),c.appendChild(A).disabled=!0,2!==A.querySelectorAll(":disabled").length&&C.push(":enabled",":disabled"),(e=g.createElement("input")).setAttribute("name",""),A.appendChild(e),A.querySelectorAll("[name='']").length||C.push("\\["+v+"*name"+v+"*="+v+"*(?:''|\"\")")})),I.cssHas||C.push(":has"),C=C.length&&new RegExp(C.join("|")),F=function(A,e){if(A===e)return s=!0,0;var t=!A.compareDocumentPosition-!e.compareDocumentPosition;return t||(1&(t=(A.ownerDocument||A)==(e.ownerDocument||e)?A.compareDocumentPosition(e):1)||!I.sortDetached&&e.compareDocumentPosition(A)===t?A===g||A.ownerDocument==R&&$.contains(R,A)?-1:e===g||e.ownerDocument==R&&$.contains(R,e)?1:r?o.call(r,A)-o.call(r,e):0:4&t?-1:1)},g):g}for(e in $.matches=function(A,e){return $(A,null,null,e)},$.matchesSelector=function(A,e){if(sA(A),d&&!b[e+" "]&&(!C||!C.test(e)))try{var t=h.call(A,e);if(t||I.disconnectedMatch||A.document&&11!==A.document.nodeType)return t}catch(A){b(e,!0)}return $(e,g,null,[A]).length>0},$.contains=function(A,e){return(A.ownerDocument||A)!=g&&sA(A),p.contains(A,e)},$.attr=function(A,e){(A.ownerDocument||A)!=g&&sA(A);var t=i.attrHandle[e.toLowerCase()],n=t&&l.call(i.attrHandle,e.toLowerCase())?t(A,e,!d):void 0;return void 0!==n?n:A.getAttribute(e)},$.error=function(A){throw new Error("Syntax error, unrecognized expression: "+A)},p.uniqueSort=function(A){var e,t=[],i=0,a=0;if(s=!I.sortStable,r=!I.sortStable&&n.call(A,0),S.call(A,F),s){for(;e=A[a++];)e===A[a]&&(i=t.push(a));for(;i--;)D.call(A,t[i],1)}return r=null,A},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(n.apply(this)))},i=p.expr={cacheLength:50,createPseudo:eA,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(A){return A[1]=A[1].replace(Z,X),A[3]=(A[3]||A[4]||A[5]||"").replace(Z,X),"~="===A[2]&&(A[3]=" "+A[3]+" "),A.slice(0,4)},CHILD:function(A){return A[1]=A[1].toLowerCase(),"nth"===A[1].slice(0,3)?(A[3]||$.error(A[0]),A[4]=+(A[4]?A[5]+(A[6]||1):2*("even"===A[3]||"odd"===A[3])),A[5]=+(A[7]+A[8]||"odd"===A[3])):A[3]&&$.error(A[0]),A},PSEUDO:function(A){var e,t=!A[6]&&A[2];return K.CHILD.test(A[0])?null:(A[3]?A[2]=A[4]||A[5]||"":t&&J.test(t)&&(e=lA(t,!0))&&(e=t.indexOf(")",t.length-e)-t.length)&&(A[0]=A[0].slice(0,e),A[2]=t.slice(0,e)),A.slice(0,3))}},filter:{TAG:function(A){var e=A.replace(Z,X).toLowerCase();return"*"===A?function(){return!0}:function(A){return y(A,e)}},CLASS:function(A){var e=Q[A+" "];return e||(e=new RegExp("(^|"+v+")"+A+"("+v+"|$)"))&&Q(A,(function(A){return e.test("string"==typeof A.className&&A.className||void 0!==A.getAttribute&&A.getAttribute("class")||"")}))},ATTR:function(A,e,t){return function(i){var n=$.attr(i,A);return null==n?"!="===e:!e||(n+="","="===e?n===t:"!="===e?n!==t:"^="===e?t&&0===n.indexOf(t):"*="===e?t&&n.indexOf(t)>-1:"$="===e?t&&n.slice(-t.length)===t:"~="===e?(" "+n.replace(L," ")+" ").indexOf(t)>-1:"|="===e&&(n===t||n.slice(0,t.length+1)===t+"-"))}},CHILD:function(A,e,t,i,n){var a="nth"!==A.slice(0,3),r="last"!==A.slice(-4),o="of-type"===e;return 1===i&&0===n?function(A){return!!A.parentNode}:function(e,t,s){var g,l,c,d,I,C=a!==r?"nextSibling":"previousSibling",h=e.parentNode,u=o&&e.nodeName.toLowerCase(),f=!s&&!o,Q=!1;if(h){if(a){for(;C;){for(c=e;c=c[C];)if(o?y(c,u):1===c.nodeType)return!1;I=C="only"===A&&!I&&"nextSibling"}return!0}if(I=[r?h.firstChild:h.lastChild],r&&f){for(Q=(d=(g=(l=h[B]||(h[B]={}))[A]||[])[0]===E&&g[1])&&g[2],c=d&&h.childNodes[d];c=++d&&c&&c[C]||(Q=d=0)||I.pop();)if(1===c.nodeType&&++Q&&c===e){l[A]=[E,d,Q];break}}else if(f&&(Q=d=(g=(l=e[B]||(e[B]={}))[A]||[])[0]===E&&g[1]),!1===Q)for(;(c=++d&&c&&c[C]||(Q=d=0)||I.pop())&&(!(o?y(c,u):1===c.nodeType)||!++Q||(f&&((l=c[B]||(c[B]={}))[A]=[E,Q]),c!==e)););return(Q-=n)===i||Q%i==0&&Q/i>=0}}},PSEUDO:function(A,e){var t,n=i.pseudos[A]||i.setFilters[A.toLowerCase()]||$.error("unsupported pseudo: "+A);return n[B]?n(e):n.length>1?(t=[A,A,"",e],i.setFilters.hasOwnProperty(A.toLowerCase())?eA((function(A,t){for(var i,a=n(A,e),r=a.length;r--;)A[i=o.call(A,a[r])]=!(t[i]=a[r])})):function(A){return n(A,0,t)}):n}},pseudos:{not:eA((function(A){var e=[],t=[],i=BA(A.replace(w,"$1"));return i[B]?eA((function(A,e,t,n){for(var a,r=i(A,null,n,[]),o=A.length;o--;)(a=r[o])&&(A[o]=!(e[o]=a))})):function(A,n,a){return e[0]=A,i(e,null,a,t),e[0]=null,!t.pop()}})),has:eA((function(A){return function(e){return $(A,e).length>0}})),contains:eA((function(A){return A=A.replace(Z,X),function(e){return(e.textContent||p.text(e)).indexOf(A)>-1}})),lang:eA((function(A){return H.test(A||"")||$.error("unsupported lang: "+A),A=A.replace(Z,X).toLowerCase(),function(e){var t;do{if(t=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===A||0===t.indexOf(A+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var t=A.location&&A.location.hash;return t&&t.slice(1)===e.id},root:function(A){return A===c},focus:function(A){return A===function(){try{return g.activeElement}catch(A){}}()&&g.hasFocus()&&!!(A.type||A.href||~A.tabIndex)},enabled:aA(!1),disabled:aA(!0),checked:function(A){return y(A,"input")&&!!A.checked||y(A,"option")&&!!A.selected},selected:function(A){return A.parentNode&&A.parentNode.selectedIndex,!0===A.selected},empty:function(A){for(A=A.firstChild;A;A=A.nextSibling)if(A.nodeType<6)return!1;return!0},parent:function(A){return!i.pseudos.empty(A)},header:function(A){return O.test(A.nodeName)},input:function(A){return V.test(A.nodeName)},button:function(A){return y(A,"input")&&"button"===A.type||y(A,"button")},text:function(A){var e;return y(A,"input")&&"text"===A.type&&(null==(e=A.getAttribute("type"))||"text"===e.toLowerCase())},first:rA((function(){return[0]})),last:rA((function(A,e){return[e-1]})),eq:rA((function(A,e,t){return[t<0?t+e:t]})),even:rA((function(A,e){for(var t=0;te?e:t;--i>=0;)A.push(i);return A})),gt:rA((function(A,e,t){for(var i=t<0?t+e:t;++i1?function(e,t,i){for(var n=A.length;n--;)if(!A[n](e,t,i))return!1;return!0}:A[0]}function CA(A,e,t,i,n){for(var a,r=[],o=0,s=A.length,g=null!=e;o-1&&(a[l]=!(r[l]=d))}}else I=CA(I===r?I.splice(B,I.length):I),n?n(null,r,I,g):u.apply(r,I)}))}function uA(A){for(var e,t,n,r=A.length,s=i.relative[A[0].type],g=s||i.relative[" "],l=s?1:0,c=dA((function(A){return A===e}),g,!0),d=dA((function(A){return o.call(e,A)>-1}),g,!0),I=[function(A,t,i){var n=!s&&(i||t!=a)||((e=t).nodeType?c(A,t,i):d(A,t,i));return e=null,n}];l1&&IA(I),l>1&&cA(A.slice(0,l-1).concat({value:" "===A[l-2].type?"*":""})).replace(w,"$1"),t,l0,n=A.length>0,r=function(r,o,s,l,c){var I,C,h,B=0,f="0",Q=r&&[],x=[],m=a,y=r||n&&i.find.TAG("*",c),S=E+=null==m?1:Math.random()||.1,D=y.length;for(c&&(a=o==g||o||c);f!==D&&null!=(I=y[f]);f++){if(n&&I){for(C=0,o||I.ownerDocument==g||(sA(I),s=!d);h=A[C++];)if(h(I,o||g,s)){u.call(l,I);break}c&&(E=S)}t&&((I=!h&&I)&&B--,r&&Q.push(I))}if(B+=f,t&&f!==B){for(C=0;h=e[C++];)h(Q,x,o,s);if(r){if(B>0)for(;f--;)Q[f]||x[f]||(x[f]=_.call(l));x=CA(x)}u.apply(l,x),c&&!r&&x.length>0&&B+e.length>1&&p.uniqueSort(l)}return c&&(E=S,a=m),Q};return t?eA(r):r}(r,n)),o.selector=A}return o}function EA(A,e,t,n){var a,r,o,s,g,l="function"==typeof A&&A,c=!n&&lA(A=l.selector||A);if(t=t||[],1===c.length){if((r=c[0]=c[0].slice(0)).length>2&&"ID"===(o=r[0]).type&&9===e.nodeType&&d&&i.relative[r[1].type]){if(!(e=(i.find.ID(o.matches[0].replace(Z,X),e)||[])[0]))return t;l&&(e=e.parentNode),A=A.slice(r.shift().value.length)}for(a=K.needsContext.test(A)?0:r.length;a--&&(o=r[a],!i.relative[s=o.type]);)if((g=i.find[s])&&(n=g(o.matches[0].replace(Z,X),W.test(r[0].type)&&oA(e.parentNode)||e))){if(r.splice(a,1),!(A=n.length&&cA(r)))return u.apply(t,n),t;break}}return(l||BA(A,c))(n,e,!d,t,!e||W.test(A)&&oA(e.parentNode)||e),t}gA.prototype=i.filters=i.pseudos,i.setFilters=new gA,I.sortStable=B.split("").sort(F).join("")===B,sA(),I.sortDetached=tA((function(A){return 1&A.compareDocumentPosition(g.createElement("fieldset"))})),p.find=$,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,$.compile=BA,$.select=EA,$.setDocument=sA,$.tokenize=lA,$.escape=p.escapeSelector,$.getText=p.text,$.isXML=p.isXMLDoc,$.selectors=p.expr,$.support=p.support,$.uniqueSort=p.uniqueSort}();var P=function(A,e,t){for(var i=[],n=void 0!==t;(A=A[e])&&9!==A.nodeType;)if(1===A.nodeType){if(n&&p(A).is(t))break;i.push(A)}return i},N=function(A,e){for(var t=[];A;A=A.nextSibling)1===A.nodeType&&A!==e&&t.push(A);return t},T=p.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(A,e,t){return C(e)?p.grep(A,(function(A,i){return!!e.call(A,i,A)!==t})):e.nodeType?p.grep(A,(function(A){return A===e!==t})):"string"!=typeof e?p.grep(A,(function(A){return o.call(e,A)>-1!==t})):p.filter(e,A,t)}p.filter=function(A,e,t){var i=e[0];return t&&(A=":not("+A+")"),1===e.length&&1===i.nodeType?p.find.matchesSelector(i,A)?[i]:[]:p.find.matches(A,p.grep(e,(function(A){return 1===A.nodeType})))},p.fn.extend({find:function(A){var e,t,i=this.length,n=this;if("string"!=typeof A)return this.pushStack(p(A).filter((function(){for(e=0;e1?p.uniqueSort(t):t},filter:function(A){return this.pushStack(L(this,A||[],!1))},not:function(A){return this.pushStack(L(this,A||[],!0))},is:function(A){return!!L(this,"string"==typeof A&&T.test(A)?p(A):A||[],!1).length}});var G,Y=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,U=p.fn.init=function(A,e,t){var i,n;if(!A)return this;if(t=t||G,"string"==typeof A){if(!(i="<"===A[0]&&">"===A[A.length-1]&&A.length>=3?[null,A,null]:Y.exec(A))||!i[1]&&e)return!e||e.jquery?(e||t).find(A):this.constructor(e).find(A);if(i[1]){if(e=e instanceof p?e[0]:e,p.merge(this,p.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:u,!0)),M.test(i[1])&&p.isPlainObject(e))for(i in e)C(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(n=u.getElementById(i[2]))&&(this[0]=n,this.length=1),this}return A.nodeType?(this[0]=A,this.length=1,this):C(A)?void 0!==t.ready?t.ready(A):A(p):p.makeArray(A,this)};U.prototype=p.fn,G=p(u);var J=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function K(A,e){for(;(A=A[e])&&1!==A.nodeType;);return A}p.fn.extend({has:function(A){var e=p(A,this),t=e.length;return this.filter((function(){for(var A=0;A-1:1===t.nodeType&&p.find.matchesSelector(t,A))){a.push(t);break}return this.pushStack(a.length>1?p.uniqueSort(a):a)},index:function(A){return A?"string"==typeof A?o.call(p(A),this[0]):o.call(this,A.jquery?A[0]:A):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(A,e){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(A,e))))},addBack:function(A){return this.add(null==A?this.prevObject:this.prevObject.filter(A))}}),p.each({parent:function(A){var e=A.parentNode;return e&&11!==e.nodeType?e:null},parents:function(A){return P(A,"parentNode")},parentsUntil:function(A,e,t){return P(A,"parentNode",t)},next:function(A){return K(A,"nextSibling")},prev:function(A){return K(A,"previousSibling")},nextAll:function(A){return P(A,"nextSibling")},prevAll:function(A){return P(A,"previousSibling")},nextUntil:function(A,e,t){return P(A,"nextSibling",t)},prevUntil:function(A,e,t){return P(A,"previousSibling",t)},siblings:function(A){return N((A.parentNode||{}).firstChild,A)},children:function(A){return N(A.firstChild)},contents:function(A){return null!=A.contentDocument&&i(A.contentDocument)?A.contentDocument:(y(A,"template")&&(A=A.content||A),p.merge([],A.childNodes))}},(function(A,e){p.fn[A]=function(t,i){var n=p.map(this,e,t);return"Until"!==A.slice(-5)&&(i=t),i&&"string"==typeof i&&(n=p.filter(i,n)),this.length>1&&(H[A]||p.uniqueSort(n),J.test(A)&&n.reverse()),this.pushStack(n)}}));var V=/[^\x20\t\r\n\f]+/g;function O(A){return A}function j(A){throw A}function W(A,e,t,i){var n;try{A&&C(n=A.promise)?n.call(A).done(e).fail(t):A&&C(n=A.then)?n.call(A,e,t):e.apply(void 0,[A].slice(i))}catch(A){t.apply(void 0,[A])}}p.Callbacks=function(A){A="string"==typeof A?function(A){var e={};return p.each(A.match(V)||[],(function(A,t){e[t]=!0})),e}(A):p.extend({},A);var e,t,i,n,a=[],r=[],o=-1,s=function(){for(n=n||A.once,i=e=!0;r.length;o=-1)for(t=r.shift();++o-1;)a.splice(t,1),t<=o&&o--})),this},has:function(A){return A?p.inArray(A,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return n=r=[],a=t="",this},disabled:function(){return!a},lock:function(){return n=r=[],t||e||(a=t=""),this},locked:function(){return!!n},fireWith:function(A,t){return n||(t=[A,(t=t||[]).slice?t.slice():t],r.push(t),e||s()),this},fire:function(){return g.fireWith(this,arguments),this},fired:function(){return!!i}};return g},p.extend({Deferred:function(e){var t=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],i="pending",n={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(A){return n.then(null,A)},pipe:function(){var A=arguments;return p.Deferred((function(e){p.each(t,(function(t,i){var n=C(A[i[4]])&&A[i[4]];a[i[1]]((function(){var A=n&&n.apply(this,arguments);A&&C(A.promise)?A.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,n?[A]:arguments)}))})),A=null})).promise()},then:function(e,i,n){var a=0;function r(e,t,i,n){return function(){var o=this,s=arguments,g=function(){var A,g;if(!(e=a&&(i!==j&&(o=void 0,s=[A]),t.rejectWith(o,s))}};e?l():(p.Deferred.getErrorHook?l.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(l.error=p.Deferred.getStackHook()),A.setTimeout(l))}}return p.Deferred((function(A){t[0][3].add(r(0,A,C(n)?n:O,A.notifyWith)),t[1][3].add(r(0,A,C(e)?e:O)),t[2][3].add(r(0,A,C(i)?i:j))})).promise()},promise:function(A){return null!=A?p.extend(A,n):n}},a={};return p.each(t,(function(A,e){var r=e[2],o=e[5];n[e[1]]=r.add,o&&r.add((function(){i=o}),t[3-A][2].disable,t[3-A][3].disable,t[0][2].lock,t[0][3].lock),r.add(e[3].fire),a[e[0]]=function(){return a[e[0]+"With"](this===a?void 0:this,arguments),this},a[e[0]+"With"]=r.fireWith})),n.promise(a),e&&e.call(a,a),a},when:function(A){var e=arguments.length,t=e,i=Array(t),a=n.call(arguments),r=p.Deferred(),o=function(A){return function(t){i[A]=this,a[A]=arguments.length>1?n.call(arguments):t,--e||r.resolveWith(i,a)}};if(e<=1&&(W(A,r.done(o(t)).resolve,r.reject,!e),"pending"===r.state()||C(a[t]&&a[t].then)))return r.then();for(;t--;)W(a[t],o(t),r.reject);return r.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(e,t){A.console&&A.console.warn&&e&&Z.test(e.name)&&A.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},p.readyException=function(e){A.setTimeout((function(){throw e}))};var X=p.Deferred();function q(){u.removeEventListener("DOMContentLoaded",q),A.removeEventListener("load",q),p.ready()}p.fn.ready=function(A){return X.then(A).catch((function(A){p.readyException(A)})),this},p.extend({isReady:!1,readyWait:1,ready:function(A){(!0===A?--p.readyWait:p.isReady)||(p.isReady=!0,!0!==A&&--p.readyWait>0||X.resolveWith(u,[p]))}}),p.ready.then=X.then,"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?A.setTimeout(p.ready):(u.addEventListener("DOMContentLoaded",q),A.addEventListener("load",q));var z=function(A,e,t,i,n,a,r){var o=0,s=A.length,g=null==t;if("object"===f(t))for(o in n=!0,t)z(A,e,o,t[o],!0,a,r);else if(void 0!==i&&(n=!0,C(i)||(r=!0),g&&(r?(e.call(A,i),e=null):(g=e,e=function(A,e,t){return g.call(p(A),t)})),e))for(;o1,null,!0)},removeData:function(A){return this.each((function(){rA.remove(this,A)}))}}),p.extend({queue:function(A,e,t){var i;if(A)return e=(e||"fx")+"queue",i=aA.get(A,e),t&&(!i||Array.isArray(t)?i=aA.access(A,e,p.makeArray(t)):i.push(t)),i||[]},dequeue:function(A,e){e=e||"fx";var t=p.queue(A,e),i=t.length,n=t.shift(),a=p._queueHooks(A,e);"inprogress"===n&&(n=t.shift(),i--),n&&("fx"===e&&t.unshift("inprogress"),delete a.stop,n.call(A,(function(){p.dequeue(A,e)}),a)),!i&&a&&a.empty.fire()},_queueHooks:function(A,e){var t=e+"queueHooks";return aA.get(A,t)||aA.access(A,t,{empty:p.Callbacks("once memory").add((function(){aA.remove(A,[e+"queue",t])}))})}}),p.fn.extend({queue:function(A,e){var t=2;return"string"!=typeof A&&(e=A,A="fx",t--),arguments.length\x20\t\r\n\f]*)/i,_A=/^$|^module$|\/(?:java|ecma)script/i;xA=u.createDocumentFragment().appendChild(u.createElement("div")),(pA=u.createElement("input")).setAttribute("type","radio"),pA.setAttribute("checked","checked"),pA.setAttribute("name","t"),xA.appendChild(pA),I.checkClone=xA.cloneNode(!0).cloneNode(!0).lastChild.checked,xA.innerHTML="",I.noCloneChecked=!!xA.cloneNode(!0).lastChild.defaultValue,xA.innerHTML="",I.option=!!xA.lastChild;var SA={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function DA(A,e){var t;return t=void 0!==A.getElementsByTagName?A.getElementsByTagName(e||"*"):void 0!==A.querySelectorAll?A.querySelectorAll(e||"*"):[],void 0===e||e&&y(A,e)?p.merge([A],t):t}function vA(A,e){for(var t=0,i=A.length;t",""]);var wA=/<|&#?\w+;/;function bA(A,e,t,i,n){for(var a,r,o,s,g,l,c=e.createDocumentFragment(),d=[],I=0,C=A.length;I-1)n&&n.push(a);else if(g=CA(a),r=DA(c.appendChild(a),"script"),g&&vA(r),t)for(l=0;a=r[l++];)_A.test(a.type||"")&&t.push(a);return c}var FA=/^([^.]*)(?:\.(.+)|)/;function RA(){return!0}function kA(){return!1}function PA(A,e,t,i,n,a){var r,o;if("object"==typeof e){for(o in"string"!=typeof t&&(i=i||t,t=void 0),e)PA(A,o,t,i,e[o],a);return A}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),!1===n)n=kA;else if(!n)return A;return 1===a&&(r=n,n=function(A){return p().off(A),r.apply(this,arguments)},n.guid=r.guid||(r.guid=p.guid++)),A.each((function(){p.event.add(this,e,n,i,t)}))}function NA(A,e,t){t?(aA.set(A,e,!1),p.event.add(A,e,{namespace:!1,handler:function(A){var t,i=aA.get(this,e);if(1&A.isTrigger&&this[e]){if(i)(p.event.special[e]||{}).delegateType&&A.stopPropagation();else if(i=n.call(arguments),aA.set(this,e,i),this[e](),t=aA.get(this,e),aA.set(this,e,!1),i!==t)return A.stopImmediatePropagation(),A.preventDefault(),t}else i&&(aA.set(this,e,p.event.trigger(i[0],i.slice(1),this)),A.stopPropagation(),A.isImmediatePropagationStopped=RA)}})):void 0===aA.get(A,e)&&p.event.add(A,e,RA)}p.event={global:{},add:function(A,e,t,i,n){var a,r,o,s,g,l,c,d,I,C,h,u=aA.get(A);if(iA(A))for(t.handler&&(t=(a=t).handler,n=a.selector),n&&p.find.matchesSelector(IA,n),t.guid||(t.guid=p.guid++),(s=u.events)||(s=u.events=Object.create(null)),(r=u.handle)||(r=u.handle=function(e){return void 0!==p&&p.event.triggered!==e.type?p.event.dispatch.apply(A,arguments):void 0}),g=(e=(e||"").match(V)||[""]).length;g--;)I=h=(o=FA.exec(e[g])||[])[1],C=(o[2]||"").split(".").sort(),I&&(c=p.event.special[I]||{},I=(n?c.delegateType:c.bindType)||I,c=p.event.special[I]||{},l=p.extend({type:I,origType:h,data:i,handler:t,guid:t.guid,selector:n,needsContext:n&&p.expr.match.needsContext.test(n),namespace:C.join(".")},a),(d=s[I])||((d=s[I]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(A,i,C,r)||A.addEventListener&&A.addEventListener(I,r)),c.add&&(c.add.call(A,l),l.handler.guid||(l.handler.guid=t.guid)),n?d.splice(d.delegateCount++,0,l):d.push(l),p.event.global[I]=!0)},remove:function(A,e,t,i,n){var a,r,o,s,g,l,c,d,I,C,h,u=aA.hasData(A)&&aA.get(A);if(u&&(s=u.events)){for(g=(e=(e||"").match(V)||[""]).length;g--;)if(I=h=(o=FA.exec(e[g])||[])[1],C=(o[2]||"").split(".").sort(),I){for(c=p.event.special[I]||{},d=s[I=(i?c.delegateType:c.bindType)||I]||[],o=o[2]&&new RegExp("(^|\\.)"+C.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=a=d.length;a--;)l=d[a],!n&&h!==l.origType||t&&t.guid!==l.guid||o&&!o.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(d.splice(a,1),l.selector&&d.delegateCount--,c.remove&&c.remove.call(A,l));r&&!d.length&&(c.teardown&&!1!==c.teardown.call(A,C,u.handle)||p.removeEvent(A,I,u.handle),delete s[I])}else for(I in s)p.event.remove(A,I+e[g],t,i,!0);p.isEmptyObject(s)&&aA.remove(A,"handle events")}},dispatch:function(A){var e,t,i,n,a,r,o=new Array(arguments.length),s=p.event.fix(A),g=(aA.get(this,"events")||Object.create(null))[s.type]||[],l=p.event.special[s.type]||{};for(o[0]=s,e=1;e=1))for(;g!==this;g=g.parentNode||this)if(1===g.nodeType&&("click"!==A.type||!0!==g.disabled)){for(a=[],r={},t=0;t-1:p.find(n,this,null,[g]).length),r[n]&&a.push(i);a.length&&o.push({elem:g,handlers:a})}return g=this,s\s*$/g;function GA(A,e){return y(A,"table")&&y(11!==e.nodeType?e:e.firstChild,"tr")&&p(A).children("tbody")[0]||A}function YA(A){return A.type=(null!==A.getAttribute("type"))+"/"+A.type,A}function UA(A){return"true/"===(A.type||"").slice(0,5)?A.type=A.type.slice(5):A.removeAttribute("type"),A}function JA(A,e){var t,i,n,a,r,o;if(1===e.nodeType){if(aA.hasData(A)&&(o=aA.get(A).events))for(n in aA.remove(e,"handle events"),o)for(t=0,i=o[n].length;t1&&"string"==typeof u&&!I.checkClone&&MA.test(u))return A.each((function(n){var a=A.eq(n);B&&(e[0]=u.call(this,n,a.html())),KA(a,e,t,i)}));if(d&&(r=(n=bA(e,A[0].ownerDocument,!1,A,i)).firstChild,1===n.childNodes.length&&(n=r),r||i)){for(s=(o=p.map(DA(n,"script"),YA)).length;c0&&vA(r,!s&&DA(A,"script")),o},cleanData:function(A){for(var e,t,i,n=p.event.special,a=0;void 0!==(t=A[a]);a++)if(iA(t)){if(e=t[aA.expando]){if(e.events)for(i in e.events)n[i]?p.event.remove(t,i):p.removeEvent(t,i,e.handle);t[aA.expando]=void 0}t[rA.expando]&&(t[rA.expando]=void 0)}}}),p.fn.extend({detach:function(A){return VA(this,A,!0)},remove:function(A){return VA(this,A)},text:function(A){return z(this,(function(A){return void 0===A?p.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=A)}))}),null,A,arguments.length)},append:function(){return KA(this,arguments,(function(A){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||GA(this,A).appendChild(A)}))},prepend:function(){return KA(this,arguments,(function(A){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=GA(this,A);e.insertBefore(A,e.firstChild)}}))},before:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this)}))},after:function(){return KA(this,arguments,(function(A){this.parentNode&&this.parentNode.insertBefore(A,this.nextSibling)}))},empty:function(){for(var A,e=0;null!=(A=this[e]);e++)1===A.nodeType&&(p.cleanData(DA(A,!1)),A.textContent="");return this},clone:function(A,e){return A=null!=A&&A,e=null==e?A:e,this.map((function(){return p.clone(this,A,e)}))},html:function(A){return z(this,(function(A){var e=this[0]||{},t=0,i=this.length;if(void 0===A&&1===e.nodeType)return e.innerHTML;if("string"==typeof A&&!TA.test(A)&&!SA[(yA.exec(A)||["",""])[1].toLowerCase()]){A=p.htmlPrefilter(A);try{for(;t=0&&(s+=Math.max(0,Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-a-s-o-.5))||0),s+g}function se(A,e,t){var i=WA(A),n=(!I.boxSizingReliable()||t)&&"border-box"===p.css(A,"boxSizing",!1,i),a=n,r=qA(A,e,i),o="offset"+e[0].toUpperCase()+e.slice(1);if(OA.test(r)){if(!t)return r;r="auto"}return(!I.boxSizingReliable()&&n||!I.reliableTrDimensions()&&y(A,"tr")||"auto"===r||!parseFloat(r)&&"inline"===p.css(A,"display",!1,i))&&A.getClientRects().length&&(n="border-box"===p.css(A,"boxSizing",!1,i),(a=o in A)&&(r=A[o])),(r=parseFloat(r)||0)+oe(A,e,t||(n?"border":"content"),a,i,r)+"px"}function ge(A,e,t,i,n){return new ge.prototype.init(A,e,t,i,n)}p.extend({cssHooks:{opacity:{get:function(A,e){if(e){var t=qA(A,"opacity");return""===t?"1":t}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(A,e,t,i){if(A&&3!==A.nodeType&&8!==A.nodeType&&A.style){var n,a,r,o=tA(e),s=jA.test(e),g=A.style;if(s||(e=te(o)),r=p.cssHooks[e]||p.cssHooks[o],void 0===t)return r&&"get"in r&&void 0!==(n=r.get(A,!1,i))?n:g[e];"string"==(a=typeof t)&&(n=cA.exec(t))&&n[1]&&(t=BA(A,e,n),a="number"),null!=t&&t==t&&("number"!==a||s||(t+=n&&n[3]||(p.cssNumber[o]?"":"px")),I.clearCloneStyle||""!==t||0!==e.indexOf("background")||(g[e]="inherit"),r&&"set"in r&&void 0===(t=r.set(A,t,i))||(s?g.setProperty(e,t):g[e]=t))}},css:function(A,e,t,i){var n,a,r,o=tA(e);return jA.test(e)||(e=te(o)),(r=p.cssHooks[e]||p.cssHooks[o])&&"get"in r&&(n=r.get(A,!0,t)),void 0===n&&(n=qA(A,e,i)),"normal"===n&&e in ae&&(n=ae[e]),""===t||t?(a=parseFloat(n),!0===t||isFinite(a)?a||0:n):n}}),p.each(["height","width"],(function(A,e){p.cssHooks[e]={get:function(A,t,i){if(t)return!ie.test(p.css(A,"display"))||A.getClientRects().length&&A.getBoundingClientRect().width?se(A,e,i):ZA(A,ne,(function(){return se(A,e,i)}))},set:function(A,t,i){var n,a=WA(A),r=!I.scrollboxSize()&&"absolute"===a.position,o=(r||i)&&"border-box"===p.css(A,"boxSizing",!1,a),s=i?oe(A,e,i,o,a):0;return o&&r&&(s-=Math.ceil(A["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-oe(A,e,"border",!1,a)-.5)),s&&(n=cA.exec(t))&&"px"!==(n[3]||"px")&&(A.style[e]=t,t=p.css(A,e)),re(0,t,s)}}})),p.cssHooks.marginLeft=zA(I.reliableMarginLeft,(function(A,e){if(e)return(parseFloat(qA(A,"marginLeft"))||A.getBoundingClientRect().left-ZA(A,{marginLeft:0},(function(){return A.getBoundingClientRect().left})))+"px"})),p.each({margin:"",padding:"",border:"Width"},(function(A,e){p.cssHooks[A+e]={expand:function(t){for(var i=0,n={},a="string"==typeof t?t.split(" "):[t];i<4;i++)n[A+dA[i]+e]=a[i]||a[i-2]||a[0];return n}},"margin"!==A&&(p.cssHooks[A+e].set=re)})),p.fn.extend({css:function(A,e){return z(this,(function(A,e,t){var i,n,a={},r=0;if(Array.isArray(e)){for(i=WA(A),n=e.length;r1)}}),p.Tween=ge,ge.prototype={constructor:ge,init:function(A,e,t,i,n,a){this.elem=A,this.prop=t,this.easing=n||p.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=a||(p.cssNumber[t]?"":"px")},cur:function(){var A=ge.propHooks[this.prop];return A&&A.get?A.get(this):ge.propHooks._default.get(this)},run:function(A){var e,t=ge.propHooks[this.prop];return this.options.duration?this.pos=e=p.easing[this.easing](A,this.options.duration*A,0,1,this.options.duration):this.pos=e=A,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):ge.propHooks._default.set(this),this}},ge.prototype.init.prototype=ge.prototype,ge.propHooks={_default:{get:function(A){var e;return 1!==A.elem.nodeType||null!=A.elem[A.prop]&&null==A.elem.style[A.prop]?A.elem[A.prop]:(e=p.css(A.elem,A.prop,""))&&"auto"!==e?e:0},set:function(A){p.fx.step[A.prop]?p.fx.step[A.prop](A):1!==A.elem.nodeType||!p.cssHooks[A.prop]&&null==A.elem.style[te(A.prop)]?A.elem[A.prop]=A.now:p.style(A.elem,A.prop,A.now+A.unit)}}},ge.propHooks.scrollTop=ge.propHooks.scrollLeft={set:function(A){A.elem.nodeType&&A.elem.parentNode&&(A.elem[A.prop]=A.now)}},p.easing={linear:function(A){return A},swing:function(A){return.5-Math.cos(A*Math.PI)/2},_default:"swing"},p.fx=ge.prototype.init,p.fx.step={};var le,ce,de=/^(?:toggle|show|hide)$/,Ie=/queueHooks$/;function Ce(){ce&&(!1===u.hidden&&A.requestAnimationFrame?A.requestAnimationFrame(Ce):A.setTimeout(Ce,p.fx.interval),p.fx.tick())}function he(){return A.setTimeout((function(){le=void 0})),le=Date.now()}function ue(A,e){var t,i=0,n={height:A};for(e=e?1:0;i<4;i+=2-e)n["margin"+(t=dA[i])]=n["padding"+t]=A;return e&&(n.opacity=n.width=A),n}function Be(A,e,t){for(var i,n=(Ee.tweeners[e]||[]).concat(Ee.tweeners["*"]),a=0,r=n.length;a1)},removeAttr:function(A){return this.each((function(){p.removeAttr(this,A)}))}}),p.extend({attr:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===A.getAttribute?p.prop(A,e,t):(1===a&&p.isXMLDoc(A)||(n=p.attrHooks[e.toLowerCase()]||(p.expr.match.bool.test(e)?fe:void 0)),void 0!==t?null===t?void p.removeAttr(A,e):n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:(A.setAttribute(e,t+""),t):n&&"get"in n&&null!==(i=n.get(A,e))?i:null==(i=p.find.attr(A,e))?void 0:i)},attrHooks:{type:{set:function(A,e){if(!I.radioValue&&"radio"===e&&y(A,"input")){var t=A.value;return A.setAttribute("type",e),t&&(A.value=t),e}}}},removeAttr:function(A,e){var t,i=0,n=e&&e.match(V);if(n&&1===A.nodeType)for(;t=n[i++];)A.removeAttribute(t)}}),fe={set:function(A,e,t){return!1===e?p.removeAttr(A,t):A.setAttribute(t,t),t}},p.each(p.expr.match.bool.source.match(/\w+/g),(function(A,e){var t=Qe[e]||p.find.attr;Qe[e]=function(A,e,i){var n,a,r=e.toLowerCase();return i||(a=Qe[r],Qe[r]=n,n=null!=t(A,e,i)?r:null,Qe[r]=a),n}}));var xe=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function me(A){return(A.match(V)||[]).join(" ")}function ye(A){return A.getAttribute&&A.getAttribute("class")||""}function _e(A){return Array.isArray(A)?A:"string"==typeof A&&A.match(V)||[]}p.fn.extend({prop:function(A,e){return z(this,p.prop,A,e,arguments.length>1)},removeProp:function(A){return this.each((function(){delete this[p.propFix[A]||A]}))}}),p.extend({prop:function(A,e,t){var i,n,a=A.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&p.isXMLDoc(A)||(e=p.propFix[e]||e,n=p.propHooks[e]),void 0!==t?n&&"set"in n&&void 0!==(i=n.set(A,t,e))?i:A[e]=t:n&&"get"in n&&null!==(i=n.get(A,e))?i:A[e]},propHooks:{tabIndex:{get:function(A){var e=p.find.attr(A,"tabindex");return e?parseInt(e,10):xe.test(A.nodeName)||pe.test(A.nodeName)&&A.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),I.optSelected||(p.propHooks.selected={get:function(A){var e=A.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(A){var e=A.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){p.propFix[this.toLowerCase()]=this})),p.fn.extend({addClass:function(A){var e,t,i,n,a,r;return C(A)?this.each((function(e){p(this).addClass(A.call(this,e,ye(this)))})):(e=_e(A)).length?this.each((function(){if(i=ye(this),t=1===this.nodeType&&" "+me(i)+" "){for(a=0;a-1;)t=t.replace(" "+n+" "," ");r=me(t),i!==r&&this.setAttribute("class",r)}})):this:this.attr("class","")},toggleClass:function(A,e){var t,i,n,a,r=typeof A,o="string"===r||Array.isArray(A);return C(A)?this.each((function(t){p(this).toggleClass(A.call(this,t,ye(this),e),e)})):"boolean"==typeof e&&o?e?this.addClass(A):this.removeClass(A):(t=_e(A),this.each((function(){if(o)for(a=p(this),n=0;n-1)return!0;return!1}});var Se=/\r/g;p.fn.extend({val:function(A){var e,t,i,n=this[0];return arguments.length?(i=C(A),this.each((function(t){var n;1===this.nodeType&&(null==(n=i?A.call(this,t,p(this).val()):A)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=p.map(n,(function(A){return null==A?"":A+""}))),(e=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,n,"value")||(this.value=n))}))):n?(e=p.valHooks[n.type]||p.valHooks[n.nodeName.toLowerCase()])&&"get"in e&&void 0!==(t=e.get(n,"value"))?t:"string"==typeof(t=n.value)?t.replace(Se,""):null==t?"":t:void 0}}),p.extend({valHooks:{option:{get:function(A){var e=p.find.attr(A,"value");return null!=e?e:me(p.text(A))}},select:{get:function(A){var e,t,i,n=A.options,a=A.selectedIndex,r="select-one"===A.type,o=r?null:[],s=r?a+1:n.length;for(i=a<0?s:r?a:0;i-1)&&(t=!0);return t||(A.selectedIndex=-1),a}}}}),p.each(["radio","checkbox"],(function(){p.valHooks[this]={set:function(A,e){if(Array.isArray(e))return A.checked=p.inArray(p(A).val(),e)>-1}},I.checkOn||(p.valHooks[this].get=function(A){return null===A.getAttribute("value")?"on":A.value})}));var De=A.location,ve={guid:Date.now()},we=/\?/;p.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new A.DOMParser).parseFromString(e,"text/xml")}catch(A){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||p.error("Invalid XML: "+(i?p.map(i.childNodes,(function(A){return A.textContent})).join("\n"):e)),t};var be=/^(?:focusinfocus|focusoutblur)$/,Fe=function(A){A.stopPropagation()};p.extend(p.event,{trigger:function(e,t,i,n){var a,r,o,s,g,c,d,I,B=[i||u],E=l.call(e,"type")?e.type:e,f=l.call(e,"namespace")?e.namespace.split("."):[];if(r=I=o=i=i||u,3!==i.nodeType&&8!==i.nodeType&&!be.test(E+p.event.triggered)&&(E.indexOf(".")>-1&&(f=E.split("."),E=f.shift(),f.sort()),g=E.indexOf(":")<0&&"on"+E,(e=e[p.expando]?e:new p.Event(E,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:p.makeArray(t,[e]),d=p.event.special[E]||{},n||!d.trigger||!1!==d.trigger.apply(i,t))){if(!n&&!d.noBubble&&!h(i)){for(s=d.delegateType||E,be.test(s+E)||(r=r.parentNode);r;r=r.parentNode)B.push(r),o=r;o===(i.ownerDocument||u)&&B.push(o.defaultView||o.parentWindow||A)}for(a=0;(r=B[a++])&&!e.isPropagationStopped();)I=r,e.type=a>1?s:d.bindType||E,(c=(aA.get(r,"events")||Object.create(null))[e.type]&&aA.get(r,"handle"))&&c.apply(r,t),(c=g&&r[g])&&c.apply&&iA(r)&&(e.result=c.apply(r,t),!1===e.result&&e.preventDefault());return e.type=E,n||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(B.pop(),t)||!iA(i)||g&&C(i[E])&&!h(i)&&((o=i[g])&&(i[g]=null),p.event.triggered=E,e.isPropagationStopped()&&I.addEventListener(E,Fe),i[E](),e.isPropagationStopped()&&I.removeEventListener(E,Fe),p.event.triggered=void 0,o&&(i[g]=o)),e.result}},simulate:function(A,e,t){var i=p.extend(new p.Event,t,{type:A,isSimulated:!0});p.event.trigger(i,null,e)}}),p.fn.extend({trigger:function(A,e){return this.each((function(){p.event.trigger(A,e,this)}))},triggerHandler:function(A,e){var t=this[0];if(t)return p.event.trigger(A,e,t,!0)}});var Re=/\[\]$/,ke=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;function Te(A,e,t,i){var n;if(Array.isArray(e))p.each(e,(function(e,n){t||Re.test(A)?i(A,n):Te(A+"["+("object"==typeof n&&null!=n?e:"")+"]",n,t,i)}));else if(t||"object"!==f(e))i(A,e);else for(n in e)Te(A+"["+n+"]",e[n],t,i)}p.param=function(A,e){var t,i=[],n=function(A,e){var t=C(e)?e():e;i[i.length]=encodeURIComponent(A)+"="+encodeURIComponent(null==t?"":t)};if(null==A)return"";if(Array.isArray(A)||A.jquery&&!p.isPlainObject(A))p.each(A,(function(){n(this.name,this.value)}));else for(t in A)Te(t,A[t],e,n);return i.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var A=p.prop(this,"elements");return A?p.makeArray(A):this})).filter((function(){var A=this.type;return this.name&&!p(this).is(":disabled")&&Ne.test(this.nodeName)&&!Pe.test(A)&&(this.checked||!mA.test(A))})).map((function(A,e){var t=p(this).val();return null==t?null:Array.isArray(t)?p.map(t,(function(A){return{name:e.name,value:A.replace(ke,"\r\n")}})):{name:e.name,value:t.replace(ke,"\r\n")}})).get()}});var Me=/%20/g,Le=/#.*$/,Ge=/([?&])_=[^&]*/,Ye=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:GET|HEAD)$/,Je=/^\/\//,He={},Ke={},Ve="*/".concat("*"),Oe=u.createElement("a");function je(A){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,a=e.toLowerCase().match(V)||[];if(C(t))for(;i=a[n++];)"+"===i[0]?(i=i.slice(1)||"*",(A[i]=A[i]||[]).unshift(t)):(A[i]=A[i]||[]).push(t)}}function We(A,e,t,i){var n={},a=A===Ke;function r(o){var s;return n[o]=!0,p.each(A[o]||[],(function(A,o){var g=o(e,t,i);return"string"!=typeof g||a||n[g]?a?!(s=g):void 0:(e.dataTypes.unshift(g),r(g),!1)})),s}return r(e.dataTypes[0])||!n["*"]&&r("*")}function Ze(A,e){var t,i,n=p.ajaxSettings.flatOptions||{};for(t in e)void 0!==e[t]&&((n[t]?A:i||(i={}))[t]=e[t]);return i&&p.extend(!0,A,i),A}Oe.href=De.href,p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ve,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(A,e){return e?Ze(Ze(A,p.ajaxSettings),e):Ze(p.ajaxSettings,A)},ajaxPrefilter:je(He),ajaxTransport:je(Ke),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,a,r,o,s,g,l,c,d,I=p.ajaxSetup({},t),C=I.context||I,h=I.context&&(C.nodeType||C.jquery)?p(C):p.event,B=p.Deferred(),E=p.Callbacks("once memory"),f=I.statusCode||{},Q={},x={},m="canceled",y={readyState:0,getResponseHeader:function(A){var e;if(g){if(!r)for(r={};e=Ye.exec(a);)r[e[1].toLowerCase()+" "]=(r[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=r[A.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return g?a:null},setRequestHeader:function(A,e){return null==g&&(A=x[A.toLowerCase()]=x[A.toLowerCase()]||A,Q[A]=e),this},overrideMimeType:function(A){return null==g&&(I.mimeType=A),this},statusCode:function(A){var e;if(A)if(g)y.always(A[y.status]);else for(e in A)f[e]=[f[e],A[e]];return this},abort:function(A){var e=A||m;return i&&i.abort(e),_(0,e),this}};if(B.promise(y),I.url=((e||I.url||De.href)+"").replace(Je,De.protocol+"//"),I.type=t.method||t.type||I.method||I.type,I.dataTypes=(I.dataType||"*").toLowerCase().match(V)||[""],null==I.crossDomain){s=u.createElement("a");try{s.href=I.url,s.href=s.href,I.crossDomain=Oe.protocol+"//"+Oe.host!=s.protocol+"//"+s.host}catch(A){I.crossDomain=!0}}if(I.data&&I.processData&&"string"!=typeof I.data&&(I.data=p.param(I.data,I.traditional)),We(He,I,t,y),g)return y;for(c in(l=p.event&&I.global)&&0==p.active++&&p.event.trigger("ajaxStart"),I.type=I.type.toUpperCase(),I.hasContent=!Ue.test(I.type),n=I.url.replace(Le,""),I.hasContent?I.data&&I.processData&&0===(I.contentType||"").indexOf("application/x-www-form-urlencoded")&&(I.data=I.data.replace(Me,"+")):(d=I.url.slice(n.length),I.data&&(I.processData||"string"==typeof I.data)&&(n+=(we.test(n)?"&":"?")+I.data,delete I.data),!1===I.cache&&(n=n.replace(Ge,"$1"),d=(we.test(n)?"&":"?")+"_="+ve.guid+++d),I.url=n+d),I.ifModified&&(p.lastModified[n]&&y.setRequestHeader("If-Modified-Since",p.lastModified[n]),p.etag[n]&&y.setRequestHeader("If-None-Match",p.etag[n])),(I.data&&I.hasContent&&!1!==I.contentType||t.contentType)&&y.setRequestHeader("Content-Type",I.contentType),y.setRequestHeader("Accept",I.dataTypes[0]&&I.accepts[I.dataTypes[0]]?I.accepts[I.dataTypes[0]]+("*"!==I.dataTypes[0]?", "+Ve+"; q=0.01":""):I.accepts["*"]),I.headers)y.setRequestHeader(c,I.headers[c]);if(I.beforeSend&&(!1===I.beforeSend.call(C,y,I)||g))return y.abort();if(m="abort",E.add(I.complete),y.done(I.success),y.fail(I.error),i=We(Ke,I,t,y)){if(y.readyState=1,l&&h.trigger("ajaxSend",[y,I]),g)return y;I.async&&I.timeout>0&&(o=A.setTimeout((function(){y.abort("timeout")}),I.timeout));try{g=!1,i.send(Q,_)}catch(A){if(g)throw A;_(-1,A)}}else _(-1,"No Transport");function _(e,t,r,s){var c,d,u,Q,x,m=t;g||(g=!0,o&&A.clearTimeout(o),i=void 0,a=s||"",y.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(Q=function(A,e,t){for(var i,n,a,r,o=A.contents,s=A.dataTypes;"*"===s[0];)s.shift(),void 0===i&&(i=A.mimeType||e.getResponseHeader("Content-Type"));if(i)for(n in o)if(o[n]&&o[n].test(i)){s.unshift(n);break}if(s[0]in t)a=s[0];else{for(n in t){if(!s[0]||A.converters[n+" "+s[0]]){a=n;break}r||(r=n)}a=a||r}if(a)return a!==s[0]&&s.unshift(a),t[a]}(I,y,r)),!c&&p.inArray("script",I.dataTypes)>-1&&p.inArray("json",I.dataTypes)<0&&(I.converters["text script"]=function(){}),Q=function(A,e,t,i){var n,a,r,o,s,g={},l=A.dataTypes.slice();if(l[1])for(r in A.converters)g[r.toLowerCase()]=A.converters[r];for(a=l.shift();a;)if(A.responseFields[a]&&(t[A.responseFields[a]]=e),!s&&i&&A.dataFilter&&(e=A.dataFilter(e,A.dataType)),s=a,a=l.shift())if("*"===a)a=s;else if("*"!==s&&s!==a){if(!(r=g[s+" "+a]||g["* "+a]))for(n in g)if((o=n.split(" "))[1]===a&&(r=g[s+" "+o[0]]||g["* "+o[0]])){!0===r?r=g[n]:!0!==g[n]&&(a=o[0],l.unshift(o[1]));break}if(!0!==r)if(r&&A.throws)e=r(e);else try{e=r(e)}catch(A){return{state:"parsererror",error:r?A:"No conversion from "+s+" to "+a}}}return{state:"success",data:e}}(I,Q,y,c),c?(I.ifModified&&((x=y.getResponseHeader("Last-Modified"))&&(p.lastModified[n]=x),(x=y.getResponseHeader("etag"))&&(p.etag[n]=x)),204===e||"HEAD"===I.type?m="nocontent":304===e?m="notmodified":(m=Q.state,d=Q.data,c=!(u=Q.error))):(u=m,!e&&m||(m="error",e<0&&(e=0))),y.status=e,y.statusText=(t||m)+"",c?B.resolveWith(C,[d,m,y]):B.rejectWith(C,[y,m,u]),y.statusCode(f),f=void 0,l&&h.trigger(c?"ajaxSuccess":"ajaxError",[y,I,c?d:u]),E.fireWith(C,[y,m]),l&&(h.trigger("ajaxComplete",[y,I]),--p.active||p.event.trigger("ajaxStop")))}return y},getJSON:function(A,e,t){return p.get(A,e,t,"json")},getScript:function(A,e){return p.get(A,void 0,e,"script")}}),p.each(["get","post"],(function(A,e){p[e]=function(A,t,i,n){return C(t)&&(n=n||i,i=t,t=void 0),p.ajax(p.extend({url:A,type:e,dataType:n,data:t,success:i},p.isPlainObject(A)&&A))}})),p.ajaxPrefilter((function(A){var e;for(e in A.headers)"content-type"===e.toLowerCase()&&(A.contentType=A.headers[e]||"")})),p._evalUrl=function(A,e,t){return p.ajax({url:A,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(A){p.globalEval(A,e,t)}})},p.fn.extend({wrapAll:function(A){var e;return this[0]&&(C(A)&&(A=A.call(this[0])),e=p(A,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var A=this;A.firstElementChild;)A=A.firstElementChild;return A})).append(this)),this},wrapInner:function(A){return C(A)?this.each((function(e){p(this).wrapInner(A.call(this,e))})):this.each((function(){var e=p(this),t=e.contents();t.length?t.wrapAll(A):e.append(A)}))},wrap:function(A){var e=C(A);return this.each((function(t){p(this).wrapAll(e?A.call(this,t):A)}))},unwrap:function(A){return this.parent(A).not("body").each((function(){p(this).replaceWith(this.childNodes)})),this}}),p.expr.pseudos.hidden=function(A){return!p.expr.pseudos.visible(A)},p.expr.pseudos.visible=function(A){return!!(A.offsetWidth||A.offsetHeight||A.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new A.XMLHttpRequest}catch(A){}};var Xe={0:200,1223:204},qe=p.ajaxSettings.xhr();I.cors=!!qe&&"withCredentials"in qe,I.ajax=qe=!!qe,p.ajaxTransport((function(e){var t,i;if(I.cors||qe&&!e.crossDomain)return{send:function(n,a){var r,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];for(r in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)o.setRequestHeader(r,n[r]);t=function(A){return function(){t&&(t=i=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===A?o.abort():"error"===A?"number"!=typeof o.status?a(0,"error"):a(o.status,o.statusText):a(Xe[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),i=o.onerror=o.ontimeout=t("error"),void 0!==o.onabort?o.onabort=i:o.onreadystatechange=function(){4===o.readyState&&A.setTimeout((function(){t&&i()}))},t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(A){if(t)throw A}},abort:function(){t&&t()}}})),p.ajaxPrefilter((function(A){A.crossDomain&&(A.contents.script=!1)})),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(A){return p.globalEval(A),A}}}),p.ajaxPrefilter("script",(function(A){void 0===A.cache&&(A.cache=!1),A.crossDomain&&(A.type="GET")})),p.ajaxTransport("script",(function(A){var e,t;if(A.crossDomain||A.scriptAttrs)return{send:function(i,n){e=p(" + + + +
+

视频模式使用示例:

+
+
+
+
+ + + + + + + + + + + + + +
+
+ + + diff --git a/demos/with-electron/src/main.js b/demos/with-electron/src/main.js new file mode 100644 index 0000000..a1b0867 --- /dev/null +++ b/demos/with-electron/src/main.js @@ -0,0 +1,18 @@ +const { app, BrowserWindow } = require('electron') + +function createWindow() { + // 创建浏览器窗口 + let win = new BrowserWindow({ + width: 800, + height: 600, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + } + }) + + // 加载index.html文件 + win.loadFile('./src/index.html') +} + +app.whenReady().then(createWindow) \ No newline at end of file From 9516c4201d89daba3e19e7f38a748c4c08810475 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 14:45:05 +0800 Subject: [PATCH 02/14] chore: update action name --- .github/workflows/build-electron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 88f57dc..67846a7 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -1,4 +1,4 @@ -name: build-nextjs +name: build-electron on: push: From 82e46347a898ac619b51fa21c14bab0ce0187466 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 14:49:39 +0800 Subject: [PATCH 03/14] feat: electron build mac win32 win64 --- .github/workflows/build-electron.yml | 3 ++- demos/with-electron/package.json | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 67846a7..808b783 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -28,4 +28,5 @@ jobs: working-directory: ./demos/with-electron run: | pnpm install --no-frozen-lockfile - pnpm run build \ No newline at end of file + pnpm run build:win32 + pnpm run build:win64 \ No newline at end of file diff --git a/demos/with-electron/package.json b/demos/with-electron/package.json index 5fefceb..83e5ec1 100644 --- a/demos/with-electron/package.json +++ b/demos/with-electron/package.json @@ -5,7 +5,9 @@ "main": "src/main.js", "scripts": { "dev": "npx electron .", - "build": "electron-builder" + "build:mac": "electron-builder --mac", + "build:win32": "electron-builder --win --ia32", + "build:win64": "electron-builder --win --x64" }, "keywords": [], "author": "", From a2679aeb291b9f10eb1a111be2089d5af5aff03a Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 14:54:22 +0800 Subject: [PATCH 04/14] ci: add MacOS and update --- ...ld-electron.yml => build-electron-mac.yml} | 7 ++-- .github/workflows/build-electron-win.yml | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) rename .github/workflows/{build-electron.yml => build-electron-mac.yml} (84%) create mode 100644 .github/workflows/build-electron-win.yml diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron-mac.yml similarity index 84% rename from .github/workflows/build-electron.yml rename to .github/workflows/build-electron-mac.yml index 808b783..385aa5d 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron-mac.yml @@ -1,4 +1,4 @@ -name: build-electron +name: build-electron-mac on: push: @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: windows-latest + runs-on: macos-latest strategy: matrix: @@ -28,5 +28,4 @@ jobs: working-directory: ./demos/with-electron run: | pnpm install --no-frozen-lockfile - pnpm run build:win32 - pnpm run build:win64 \ No newline at end of file + pnpm run build:mac \ No newline at end of file diff --git a/.github/workflows/build-electron-win.yml b/.github/workflows/build-electron-win.yml new file mode 100644 index 0000000..4e483f9 --- /dev/null +++ b/.github/workflows/build-electron-win.yml @@ -0,0 +1,32 @@ +name: build-electron-win + +on: + push: + branches: ["main", "develop"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: windows-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 21.x, 22.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: Build with-electron + working-directory: ./demos/with-electron + run: | + pnpm install --no-frozen-lockfile + pnpm run build:win32 + # pnpm run build:win64 \ No newline at end of file From bc1fe08e5f1f49d42e023ec0e3df81e431542f33 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 14:59:02 +0800 Subject: [PATCH 05/14] ci: win build remove node --- .github/workflows/build-electron-win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-electron-win.yml b/.github/workflows/build-electron-win.yml index 4e483f9..8007d1e 100644 --- a/.github/workflows/build-electron-win.yml +++ b/.github/workflows/build-electron-win.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 21.x, 22.x] + node-version: [22.x] # 同时多个 node 环境构建会报错 ERR_ELECTRON_BUILDER_CANNOT_EXECUTE steps: - uses: actions/checkout@v4 From af9a866243c4cc434c4f54c32780e3bc685ef040 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:06:53 +0800 Subject: [PATCH 06/14] ci: change yarn --- .github/workflows/build-electron-win.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-electron-win.yml b/.github/workflows/build-electron-win.yml index 8007d1e..f8b5058 100644 --- a/.github/workflows/build-electron-win.yml +++ b/.github/workflows/build-electron-win.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [22.x] # 同时多个 node 环境构建会报错 ERR_ELECTRON_BUILDER_CANNOT_EXECUTE + node-version: [18.x, 20.x, 21.x, 22.x, 23.x, 24.x] steps: - uses: actions/checkout@v4 @@ -20,13 +20,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - uses: pnpm/action-setup@v3 - with: - version: 8 + # Yarn - name: Build with-electron working-directory: ./demos/with-electron run: | - pnpm install --no-frozen-lockfile - pnpm run build:win32 - # pnpm run build:win64 \ No newline at end of file + yarn install --no-frozen-lockfile + yarn run build:win32 + yarn run build:win64 \ No newline at end of file From 7ea9504b7fef3d16ba57a8ca26cfd7b7da6e19e6 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:15:53 +0800 Subject: [PATCH 07/14] ci: update --- .github/workflows/build-electron-win.yml | 30 ------------- .github/workflows/build-electron.yml | 49 ++++++++++++++++++++++ demos/with-electron/electron-builder.json5 | 33 +++++++++++++++ 3 files changed, 82 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/build-electron-win.yml create mode 100644 .github/workflows/build-electron.yml create mode 100644 demos/with-electron/electron-builder.json5 diff --git a/.github/workflows/build-electron-win.yml b/.github/workflows/build-electron-win.yml deleted file mode 100644 index f8b5058..0000000 --- a/.github/workflows/build-electron-win.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: build-electron-win - -on: - push: - branches: ["main", "develop"] - pull_request: - branches: ["main"] - -jobs: - build: - runs-on: windows-latest - - strategy: - matrix: - node-version: [18.x, 20.x, 21.x, 22.x, 23.x, 24.x] - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - # Yarn - - name: Build with-electron - working-directory: ./demos/with-electron - run: | - yarn install --no-frozen-lockfile - yarn run build:win32 - yarn run build:win64 \ No newline at end of file diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml new file mode 100644 index 0000000..fbce98f --- /dev/null +++ b/.github/workflows/build-electron.yml @@ -0,0 +1,49 @@ +name: Build + +on: + push: + branches: [main, develop] + paths-ignore: + - '**.md' + - '**.spec.js' + - '.idea' + - '.vscode' + - '.dockerignore' + - 'Dockerfile' + - '.gitignore' + - '.github/**' + - '!.github/workflows/build.yml' + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] # + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: Install Dependencies + run: pnpm install + + - name: Build Release Files + run: pnpm run build + + # - name: Upload Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: release_on_${{ matrix. os }} + # path: release/ + # retention-days: 5 \ No newline at end of file diff --git a/demos/with-electron/electron-builder.json5 b/demos/with-electron/electron-builder.json5 new file mode 100644 index 0000000..c29cfe2 --- /dev/null +++ b/demos/with-electron/electron-builder.json5 @@ -0,0 +1,33 @@ + +/** + * @see https://www.electron.build/configuration/configuration + */ +{ + appId: 'YourAppID', + asar: true, + directories: { + output: 'release/${version}', + }, + files: ['src'], + mac: { + artifactName: '${productName}_${version}.${ext}', + target: ['dmg', 'zip'], + }, + win: { + target: [ + { + target: 'nsis', + arch: ['x64'], + }, + ], + artifactName: '${productName}_${version}.${ext}', + }, + nsis: { + oneClick: false, + perMachine: false, + allowToChangeInstallationDirectory: true, + deleteAppDataOnUninstall: true, + installerIcon: 'build/icon.ico', + installerHeaderIcon: 'build/icon.ico', + } +} From d97c5bd5125600b3e1b351210ad04052e408fe30 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:17:11 +0800 Subject: [PATCH 08/14] ci: update --- .github/workflows/build-electron.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index fbce98f..3b94e29 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -40,10 +40,3 @@ jobs: - name: Build Release Files run: pnpm run build - - # - name: Upload Artifact - # uses: actions/upload-artifact@v4 - # with: - # name: release_on_${{ matrix. os }} - # path: release/ - # retention-days: 5 \ No newline at end of file From 3f82ce10dd67cc3cfcf128742dc8655cc0cc253b Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:17:57 +0800 Subject: [PATCH 09/14] ci: update --- .github/workflows/build-electron.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 3b94e29..f91f20d 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -1,18 +1,10 @@ -name: Build +name: build-electron on: push: - branches: [main, develop] - paths-ignore: - - '**.md' - - '**.spec.js' - - '.idea' - - '.vscode' - - '.dockerignore' - - 'Dockerfile' - - '.gitignore' - - '.github/**' - - '!.github/workflows/build.yml' + branches: ["main", "develop"] + pull_request: + branches: ["main"] jobs: build: From 99a249f031ae8d56412a6277806c609c37e801a8 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:20:37 +0800 Subject: [PATCH 10/14] ci: update --- demos/with-electron/package.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/demos/with-electron/package.json b/demos/with-electron/package.json index 83e5ec1..7e8d9fa 100644 --- a/demos/with-electron/package.json +++ b/demos/with-electron/package.json @@ -5,9 +5,7 @@ "main": "src/main.js", "scripts": { "dev": "npx electron .", - "build:mac": "electron-builder --mac", - "build:win32": "electron-builder --win --ia32", - "build:win64": "electron-builder --win --x64" + "build": "electron-builder" }, "keywords": [], "author": "", @@ -17,15 +15,5 @@ "devDependencies": { "electron": "^36.3.2", "electron-builder": "^26.0.12" - }, - "build": { - "appId": "com.ezuikit.app", - "productName": "Ezuikit", - "win": { - "target": "nsis" - }, - "mac": { - "target": "dmg" - } } } From 2d1a3c8e2f49888990accc571180f7f4598d5a8b Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:22:13 +0800 Subject: [PATCH 11/14] ci: update --- .github/workflows/build-electron-mac.yml | 2 +- .github/workflows/build-electron.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-electron-mac.yml b/.github/workflows/build-electron-mac.yml index 385aa5d..6fe950f 100644 --- a/.github/workflows/build-electron-mac.yml +++ b/.github/workflows/build-electron-mac.yml @@ -28,4 +28,4 @@ jobs: working-directory: ./demos/with-electron run: | pnpm install --no-frozen-lockfile - pnpm run build:mac \ No newline at end of file + pnpm run build \ No newline at end of file diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index f91f20d..79fdbe4 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -27,8 +27,8 @@ jobs: with: version: 8 - - name: Install Dependencies - run: pnpm install - - - name: Build Release Files - run: pnpm run build + - name: Build with-electron + working-directory: ./demos/with-electron + run: | + pnpm install --no-frozen-lockfile + pnpm run build From c6b5893e1b56cac51cf0a13646e8e181ebb0ca9d Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:32:00 +0800 Subject: [PATCH 12/14] fix: wid builder --- .gitignore | 1 + demos/with-electron/electron-builder.json5 | 6 +++--- demos/with-electron/resource/icon.ico | Bin 0 -> 4286 bytes demos/with-electron/resource/icon.png | Bin 0 -> 20824 bytes 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 demos/with-electron/resource/icon.ico create mode 100644 demos/with-electron/resource/icon.png diff --git a/.gitignore b/.gitignore index a51bf29..77b5319 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,6 @@ build/ npm-debug.log* npm-error.log* yarn-debug.log* +demos/with-electron/release \ No newline at end of file diff --git a/demos/with-electron/electron-builder.json5 b/demos/with-electron/electron-builder.json5 index c29cfe2..cf1205a 100644 --- a/demos/with-electron/electron-builder.json5 +++ b/demos/with-electron/electron-builder.json5 @@ -3,7 +3,7 @@ * @see https://www.electron.build/configuration/configuration */ { - appId: 'YourAppID', + appId: 'com.ezuikit.app', asar: true, directories: { output: 'release/${version}', @@ -27,7 +27,7 @@ perMachine: false, allowToChangeInstallationDirectory: true, deleteAppDataOnUninstall: true, - installerIcon: 'build/icon.ico', - installerHeaderIcon: 'build/icon.ico', + installerIcon: 'resource/icon.ico', + installerHeaderIcon: 'resource/icon.ico', } } diff --git a/demos/with-electron/resource/icon.ico b/demos/with-electron/resource/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..fe1b3f5f2cc701b85f88156c1fd67d399f139e46 GIT binary patch literal 4286 zcmchZX=of}7{_N#O^jEH(H`2GXu*2WYQdvwHB}1L+G49k#iLkj>s7=9E#eVjTPp>- z5pP>Xr|nM zBkY3}Fde+zWv~|>fFq$1*?n_(AxG>)+_Ujy(c zECO@581xymmca-l@GW#hTJF6mZD4#nEQgoilkwx794~>h#_8l}94>_C;8*w)^mRKZ z>-A&Mx5RKgq;)JmMCtbyu-5wFMmQOcfFS+90PVrR(f)Mr;K#UxetjloKg9R~$jY@# z;RARbE{8VA(+L=jy?F~V20ugaug{>F48Df1z*w8pw7kD<;5FOp>D=)%SKj~1)Qo!? zgZH2aK0AVp-40k145_0vV}7566I1p^!v|ULNX{aC6>{wEzcFQZ-A%9`RzNzx{A?&| zsMK)P-wVvAv9ZqdWi8ut3t%F0zg-Y&tkE7mBl^MX_FQ{-F4U5Jb1_^Bj)zbzh zLocQ4CY)pM>EC>+E8#OR4tcUB?*@C|dDslbu9l`T;TrpRM$V#n*sQ0cQ*)0q-U4~` ze+Kq&eVvTo0QU>|37Ee7+FjpYs4jDaz) zCF5it^@Fv2Gfao%-@IR`y9Byb9-lzOo8A^Zu5A_u;$A9yG7BLEQn{ zMn_{`#(F-Oci##6%9H;stWEdyI^Fj%cmj<57MKb_)`rjM4X_j5g>#`FR>FGlI?VSz z@Htg4zD$qG-s=JD=RUX#%+L9t&pc`O+Lps^aF5mCeY1?TP-*^ z4NeEg-oO7L`oMfQQ`Y;vP=SN63G_VxGojh?-TWhj_un6keSZ8OzHu{JTiLM}O{RQ?`~(%a4JM@I_l_i~v?a;#P?8J{CrPQ&v$YfziaVo1OW%xgv0NQ27URKE zM|}7|SDci4)mOBt`jw(dYre0Y0DJW^_lN4_7djto^64i6q`FIHNkwrX3s U3kOLOw9bf<_&4y0j2YBNX)B@IG4Bqc_S5&=P_VK7RB z(J^3b|I6q1{quV90(Q@H&ill3?sLyMmzO3+I&?H#G$bS>bb7j)rX(a}z^`N^R9Ar? zhoQgEfFIQUx;B9%B(yA--=rkjxf~=UH%Rm}ADD;cV&^IA-L)Dd7x`0ig*=|#zph6^ zb&G6XNK5ZkG>6H3>QB*+nbJR8Va+Ji^}fQSIrvCAhU(RQF@(K()5;Ack@h3IdH<&) zO6?~VwsKZDpWv?oT4(y1|&%faYN*&+w)?& z8A}pyj)-B63J%xXaCqFf&>NRpv81kwAN?*+i+(AymGRzrm{ zqD0N!zkV?X^hENxihzKCbljkZcbsCblU9kEwF)mLg)xv_QI&~_>HWYyh!7XROLQ)v zI;OpA*xN4(kRvp9MG|lfcxB=Xh!vvY_B~f7rqrb6Eqv<|dc&9}l2eJtR_TU-K-&BW z$T1e?p=LivGEB$F#5Cwy$EX$!TVL>cL$^oJw^i5FEEFuJf+*v`N6=+zl-?_V`?v^U zUyYuS*CNNqQ2Y4U5`f{UWK?#rjWS#AVx(R5g}@ukS_|n5zWgAAdc<(@CIyz-bOuF;xY!5duhExRK#4^vFr6*db5c{`tmu92;DuD+(?=*v3SOG>{YvA3T==SC570c^@ z*mpfkXwpegv7wJHu<)i586nS)S6zw(u$w5n6M0anvBl$BhHAW|y*5l5Dz;5i`^Yx% z5<`#W?oQ|?n?jtmQqd!T^FQApTu5`!8)BT|P1KL$Vpb-m(rSuD^z?+%HbZTGOAtWw zYzu@7sSiq)QUBrM;|xetR%R#gdb7mXQC9nTy8$1}Oj8i@yv$+($)RKtoY$FB*{rV< zc)fmMiubTL0aQ<$dXQ#5wko`?ZU%0z5s2Tte7id)Ib3tbF8hQWdmzlwTOh{-n8(a- zMH$p#RMR)W{B*fw#H9Mcy-CJ{llgyuO-9%l_JG(LXWlD#MR1rfxBiGuU}s|5I~K!* zj9Bysf>aqXSzp$)7Ec+yPG)z375R#B!}Q~=Z>yv`Iw^a!6Q>m@a24Y)MzTqx3hDU9+28_T*~OziCi9Gn%n(S;CgTFaDDHG zQsmcUq?CXF=2g$+LSD!-yaeh^f*U^*X5vklzqt!ogAZ6KNgodr@l6D4{CMlXRk0ls z-WRF(sZL8>6}YA)w$U7<p= zBq%0S6lKK9cXGubu35@#gdxuQ!~GFJu1!t&0s)a%71BT2Ot#lsm`Scaz%s~eK>f#y=B!WTdm^tf)rSoO@rLSt_#s|E;vZG~hre^Unmiwv` z8R3OW|MSqLIlzo{HnOM_^|@qxo~pv;($gN1F((UT*>GZH0lB9E zMW)ti=2$UVAbG8JY$#IT15 z4Rvo8SGpCaekVCL-tV=_&h`kU@5KPUfM~PkE_EUDiaoU<%_Y$5Y_#8NRrXWHUjp9O zw5+-H6XVV%WnXf3BA9G8rF@VZWcjZ`=9LB@u62erAXBz{*Pd}Shuu*%<_MKaVOSi zMT6BJTKpd`X_oO#@+}8t&r8PrE|K)>c1|RY*J_{cRa^p@cG2agXfBNW4!}%%WkBwy zF=No#*ZY+X(DAWYLMZPsdo-o`59|K{Yq${oOrj=UPzL}j%$7v8*C0vSVyqwQ0y=Q5 zu>iajzy2Su9>0`h<{Hb>^h+s!=0N#z7Zi(`jBnXTZ2{UepXB;S(Uspz!~wab#Z-5% z0&?IVBw_(-F3$``;)@I6`{!2xDYC!)TwtW3%BYG}vrACsv~i)N$63*_|F>3Yi{YHM z^8is!18^;LDb~sT?GZ(-`00Nj8UcJYn!DZqTf0NEXFTOZW_0U61y*YAZb^|;CvZGc z0kRg;ASN8R23@(O+mDl` z8XW=xJ9k(xTPr7V*3ifbCf7e@hF~^6QVO&q(NW>YYw-)cMV$2Xy^nq)B%&A+F@C)cvLrmmN+FDP<>%EZ+ z+R$n>PRt(TNnEoS$`C|g#B4G4!*LG~^Ndbgr~9K>xlD*r7N$~8!Z*SdjA4X5LQEaF ziz|N*+Op_jV~^5WVpMOI5M#LMt-%yI}!p zm}IyU$k)H#0Ri0i)Ryle25#W4jw~HkYTyM>iJ*KSqhWa&ZgkwJnNa4}{rq8!Ty*pH zR5g0^$@dqda50vB-NX`g{9V*tP_R1wnxa*)8_P!SG!wiB7Be*+cu^DLF#N8vJ;O8Bak@akBs`w6_SZcr6bNKFvg>zXr6_V_Q}w{8#$ft(sKzq7(ru0% z^M$cI;hoAyL(ONgLwm=x5Cy#7onEk8HE1+fmepf2aC~c0BR8gb%ct2ZnniEj0H1@- zMWHz)q3OFJR>rv2AbRKoP82iuVvu=8r?7d0$z!Wzi>LS&i}-ixqs5X(Trs?=V48{6 z#ge>r=S_dMhXXEGQ9;LzIdFx`H4pEuGPT0`WzWC=RqnPx5mFG znT!Pw#3O^GzB|y0h^$3D=|&TryV3KcSmO0N*8akzL%Ag*ON<-T@O*h%hzMQ^s+Iqf zxiH+Cx%SJj-0r#7c^1k|_kH@wYZP+$;~t!u0DT)PcQr|SuJwK)GY=mRIq~&9ImZW) zCV0Bq^bJ1^yb6jGfwtfTV=5hpikhk}lSn#7gDBrS1Y*Z@G_l>GpV)-fvUlwr)@mN4 zg8Q^=P`&2KScrRS3gJf4igeVbEu`K$7lSo(yj^N0_~K`ChwhkR&}(U$3pu&TyF-i~ zH%6EiMf5FMSFhf;Pxz6+G{^Cm&aEnlZo*uN)RRS7YvBneZenIzMDf}{BDhMsjR}|c zMy_AU^BL1`j|daCrKOPh4E0E6$YggEHv1+q+@oN;opHb@; zbVMs^u0@d=BWe*EM{Ro((ch<-;oz3Tw70#-^n06(3U1?ql=dO*i5eXa-Ey<|{L!Ky zL(V5qj@pBfrJ6XE%XCPGs+iY~^O@>_8NC4(a?$maCrwq)oUqUs^w6o# z;V%R-rYI!$%it()?)3(+YuMN?CI!10n%bwYSDNl492k*u5oooGt2#GTGixO>^#@je zz6lFmGU&n}4&cp(yM<+UGpR=IVN^;)#Z-Jf??7`Rud1?(z{hY7&xaTf%%eUCyszm~ z&H4a2UoFOu7bq$U)cbBHJm9&gS?PIM=d)FaGaWf);u&1YoOfK$`5b3p6wz(o{D70i?{?0w+;CDQ5+KGSf=0Q$=Je-S&TTapX zl^jb{D1Bjiqkk`uPn!Qc{=?2DlIOqwUOp%Frb|?iq{OPG`A*W@_|jx)ogkQP^Dg#p zieH{Tbg;?fiC7Sn8Tagc53?~(<}$sjh2z8ApC=k9n=t{yPNxALjMV9nn6R}b0^Cz8 zk4j^$*D;#-9u3>qZA?(S-C5L8;c9&p)En@_CpTKO%Nw!zpnMCbWMAf|KYl$@&)w%G zWOwJc2rEyj^GnanPrl=YHjULs@7RL|nno- zW;A&A>NhWJ$)6H6^k|27#o92r;HPzV;~=`n#t!vObKj2sRGw6XE?~pcVv{}n^}W8o z_etl*I5#0}f$qq*yPu29zJMtF{3MHDf+LR+;}*xBMZqIyqk{wjCK?n;Ym-y6^=$&d z5IhBBtzI`z9AT|6@3sE@Wo)^NqUQI!h5GBkp(0%qeNEt%8MX@E-5dK3JFOXpPT{>| zpq5~fk-KgH0b`W!7WsX!@`a_0AKh0SLqs-Ml%Z}RH=Q7o12 zzgOqCH0Lg0fAV8hyHsSK8+aJtj1KBQiH5yj$WqVca;5t#V{M^${X*7zeSMSuw2_ro zyl6qn-lgXG21*!1{;J2dRAjI9a#=F#c?acr$dY{*byRE8s7_f3jraP7bn;`nEe~B} z$Q0#<`*c^Zu3DH5>!_{Jwr_|D!eeQ2<6x53s@4DK&4heb@9Fi4z+#7g`!4;%8FHm3 z<4HvW5)>)cX;yPM++hpD;owaq zYl`Z}$UhjH5JnHtlH5X{p%QW4o?$=h%o*ibupA#vEkDMdyi|mqGtjeO6%YLhLQ5_( z&!wMlYyVxXFtrcp>K2+{dG33fUZhdXP|H5PUSb`4ZsmOyYddkhsXI6yiB0v^$$e2D zvHNS)Y?~hHQJeoxc@3;ZR6ZL`jkND20P zMte%*Fa7o?&YpqQE2XVjZ`9`&dhcLzkbq#hRy2(x8>Gt=pX_=-su@JmPDw zi~Nr56OIs-DYd#?P*;CFq`UR%Di}IKSnFVyv4kN^e{R$`F!Tev9%S$Hr1DRvbqBDb zfp$woorNd_KM^ou)IYuEPVM`>=ak|XumBTXkRm?Ws|dGmUDKV~nRVmc_YtP=pQE1D zTf9>04m_Vpbie$p0}rKh2NRI-I2H5e5^Qr%!BJ5F6Fjmtj)kn!0(^@0td}I8xZR|x zX&g9UHS;gLntnHm-Eo$8i7?s9C?mn0!u zClatTVb{O;>MzC_Y$ludFsC~UZ82C%yiIi+=601GFMD{*EzW)Rl9^JZL4nTIfpRFQ zP|4_z9nJB1qzF9HZrOhd{iY;fz$!a_a)1vp8-(J!#ylt%@p=`nEzL#L1a zXbbwfJd2u=+)SyK?djH?HT#6-V8@94yn0Vs#aGy?rNf%j^t0Zd9O~o2Xm0SzZ0Kyy z#1xO*PdX4w4t;Ihw!y7mdj~SV=@CQJS~ue-UpCB?T7okmq(DaCNPe8NZB-+8oXR(- zUkR~6E2eMY3K$?H=2tY&LO8uA=YoNdWYpOgUtjkHXp@9ZBof;*b?QtFD%LL|0Ad@_ z6jt(e$$-b>+7Ug$*gQT91>RSm~aN$Q!xT zK0{&~sx-55iX))ODlYO_C0n%MbTKBSvM9BBU)S=P`(p&`!;fl$n!q;wtu%5c`^p0n zHvfU9*YvSid?a9-Vr9lgZB>+@O=pi% zM+I#lJv-Z0pU;vCdR3Z{O*i*-|4hVVx!QXLr<203TomvpJv7=$_5QWXp6AZ62EUia z$}V1ZAd&ulC4|ED(d|@bYq^nq&e!E8#eo2D$r!9nU9L`@VNarsc;dNE^5ddrh6J2g z*$z(Wag*LhH)hTO<(EOM$&bMU-=ey+ifLr zytZs${|9}x6HBA5cX2_|xEY}aq!L7V+}S;alW&h_?s#+sFO4pzRy^(sx;Re=W&IO` zw-*^66CU2qy1B?~J`@Cf0VIa!+-GVE$*ll=#e46T-6LneVqtYW#UH{yBxx-)TGvec z+H3DA_*~6WmwDeSVCKzZI;qtE$UJ{{l7g6Pq-%6ObGdlkGRjEO(R- zVUCVL0A9s7_m;mUySkPS*BBteWfy-&&U@?xz+n^X+FwIEMiKUgNrC8UipKd4c^@FeqrV!TI`(2mTCp zRKV=o2%Jhy?`|#}lmLFaI~SoXMZ&7c-S`@63514-{lbZ{`Q)D36$$Ly<65IDZSz2M zp30o5NsV4=FP`b0pB_&kKSkDRCaE?dTSjlV(_a$&x{BzdKt%QLz*-1RZ@zLweMyyysr1 zQzw1Px8i`K?EDW*-1VMsYU4Sl_sQS{;M@V)zri`dO!Lzqm!+KH-@%^y+%T(*)%6VYo}H zljNRmqo8&t;o4h0oT7JP#0P**ZSK{ni}|lTwU;>4TjN^xs$QIrT7mqKWKGfNF%4uj zdAh7OHe4a~fUB*JQix#)L0SQaVD>X)h@zEtxm#J+=y2xxbO;c!Tobj8vfKPXmcElY z-C*AHPgt?*3HT|DlBsSx?|L?%?eu)0*z+Gb10{GhzxGxg?mFmvh?mq+|VQ9+l1y-Rhb#*QB=!>w%yNmjGdRv)@RzFunT!U*>E2>ZIv=@C3JcWqXtty3-07=K4cVD?%a5{7L z2I|)UdJl=fDLv4xph9smgQ2~agRU=2~eDVc1)+X8-#&$de_(Yi4wy(aQrgQr8<^A^Lq^S7?ZT#ctQoC-w(mRG3z6q3yg!4 zd~LUz=m7fKU(R5L9N?t;cp`&D3|J=c8aSQhw=S>G5GrZ-;JP{946{*9uXXAqf)%{i zmo5MkbDo4X$sUgI4K`kxEG2NCf?*vd;x@aAnln!fr?%S*04}Bnox$|^@s=cqiCW^~ zi5J|!Q8gNQ$5DeY0(*|wxMa+o7>y;g{sv7pV(xUT^4Ko{`C5X)&MnZeMStKp=?HHV zEdn$xlz70bD)g!H%TfbYKZ#LailR?>uFihlJqLjBO5xU>y>=OtS7tTse}%K|hY*(4 zBfreKAfA&=rkzAcb?~{~1|&bd<~^!mh?1?7jGF!>IGtd_b4)GK)4TIA?T3IxGe=`Y z00f|V;yab8d4PQX3xu|uB5$N6=qEqsetaFXrl$mkI{vNT{xB#h@MjSU|}(s+4VZ~yuQI50K2Yhruu^#kra;WHZV#8JOFGvyUKg*K9E?S-U* z&r}sYm8+Qot2OxvtI!Kz`$`1xcw?dMI(0r@8Mk;XCQsfuDWcR;n-12;e~hN9P%(x5 zTK-GSZ$}IN3SLas-P|QM0q4XbJ7+MdNVt$43y);IH%PgZa&TXmL0xlU?a3hwUB?!! zt>L3ee|`|)37oe)`KOFJ&Hg@NdXoyu*IpPQ&M*dMTylm7y0pS{6jx@h<{CWl+<^fx zZ7KfP1>39&970MGQ(*7WwLhh(Qk82a$T&7qy?ctT5&2hB{L1IA&c6IRe$CqVLwcYF zztQn*^$ICspr)dCOdc@ql4%0b3b>K~IgX7nH-G;BX92L9{$|=^M|(`~b&pKc1R71EIL&)0jlet-)XY0IShR)qe&o0b|VG5;4``kH_Xuq&$b= zK98M=9#O#~!Cl`9D=UxQ*?jyrIWT(~*xQT0v_W{|4eyhq9l#eg4$iQIs(&edBK{6V zM}?77AoT6pZ)hcexPZapn59&v99C1H`a=6~(ij z;%8ya^k#N@Z3}OFKe8F2+kP*Gu(K24Anj8u=K@RG-bwK*v8S4S=|a(J!?Qo^v&J|H za_S#_PdLARkBmtVB6fxxb$UKn|9&L;!lo>7>~^1Y{lti`F+4I5L;E9fVDdCj)_oIr zq8BKYe1V0+nsn;udR#rKyC*s(6<21JDz-f41>O~T=h*&yvcT9R=(IlS4lTG9enlXy zN3Ul7U?*gt!Sgug;{CS_jgGuSmMP=$b>4l$UYpYpkkdNxDT4JCFx;>bK;?aM!3Atl zs`dMcv6VhH!O$}dXUK2Unh+=qGN7QfJwn`O+!4Lx%d(kmy?r4CB_@P*rp zB2nOp302pS8|BGMfxCa24$p{~B5MA{T=(Q&_!S8~I#+2P7o5J@%ysOsm9+XR;{|>E z#Y)~r%8rS3boaOEG3TzLw70B)W}?0OJsxiiijSVmJEZOj)rY)ljaP5GdVZ@@desaH zw_)-dvCktuaR0@g+AS^^&+zTBt>47>{u>RR{fq~A=Hs`2+YQ$q4%jVNvqYK7} zUzgmo9&UQMPZfNXihoxU`CXcWtx=DY0;hYLPV}%v2@AC-6QhQTr38#56R?~g|J?V} zn>NSZf=9Y@AY(2bhkIi>@6nki6x^i8{uLSLE$KeawH^?h=F+!086A$%zCLQ5(A!Wu zH$M_?Iw|%}%*&`CFJ%+;k;X}2K0wHO^p*0YnrQqeI-Pn_B;D919Ky9FlHq>CK>Ypk z4}7{3EqQE#RQ)xr!ieKo?EA5F>Aw~;^v52OYI0JRs_q-TX`qGZixppo8~yw@R}>(T zU+;Gan5s?Cz0gm3KEafQy?5XvRMsrSW>>hiB5P*qrP`C0QXgti`w+8$9I=8 z#^jqTckj@TroVm8BBECLviaG{I#54#kXMydulT&z&X@xatu{*v-U7%!q-KZDqFU=41ql|F!oCMX)^YxiI583+K{Jp)<(1{Q%)q^$Li*R5{u zVzufyoZVnx4G~x{Fw0V*;$(w4TaOf-EQk~hzpfwc3b{Xu?!&x1r#u5MB@1F7^gI0% zIXYE<({yOA0D74Fgz<%X!EavZtI$wnX3Dsr^MmO z{fCvMNMnAOS93Epq~w08qc`;|-(IGo7|Pq7-XNiicjN3{2;X^r=#sAQ_n?u+@sde4 z#p~^PyF;m#^r12dH|}r9|>N8{#2u_wZ|Y^O%VMlg!`+ERSU{R z>|1!^HRK3Pz2@Iq$!%3j&bju##K?;RgJO4x@w+S+WU;%ROTUp9B!#;jOHsX6z5ijA*H@dkzHt{=GR^KexmN^~rHWm{26z}o%j9pQ9ow+~ zkvK3&^!oVefv`g|VRY;(pjVf1i)e$CVp`GdcjGL+eW|8);p+Id=a_M8{I*}Eug&ca z%jvNpRFx)iecdAKVR`?IL=y-*^GDlj{B5tZU5pGQ7hdlUAD2*zgHfuLhH{lLnb4g0 z*W`YdR}F+l*KY=kVQBm$orAFp%bZF>z)9qfdbKFL>>Ozm{2BCc76%tb063ek|6V#VP6Yu*K0B z7@&|Hr`Lrk)>;450VX#R`-Y1Mbi}0g0^BoU2@rYha$RnY&Aqfr-G8q*MoK-+B6PJZ z)$Pj*&Yb5i)ePP2LTc-3i_c!s&l5hj zyYus$4*K?wRQWTT>ensz(uUtyIGE}5Y6IgDT<~7#$b&QTRGHve#dFIt57ARw_*C<& zz7z!rk$EWW{iNXZo91D#&O6g8!_4!%B0#hXTKg`ne7O~AIj@gI<5XLF7q z_nch4`ycLIMuidGs9(Q>OVeDraUm-c&0k}VQ<``vX2WcL3r=5K(>SXtcl($}D5O-9 zKUMk=Ix#MM;%HJCB9%O+9qg3ed^yI$GL*eAuMRcm&@+!@Y z#zHs!aDd|iP?U*jNF~e@Z=&d8H4|jr5!|W4A8W_alm;S_l^I?`p2?w~F5z0QlgN6S z?o*+R^+YF^WS(xfQHmmR-W94IHcI6;)N>mA3kOugA^&4Ny_I>e&zJm|&U&3_S?C1M z0fuz4Mf#IWk-$h!{k-mfR`~KCTUt^HpbS=E9gV$K=oE_t%r84yk1)tIm6WygiU`?2 z6&+bO&9@3R^%;vjWe9s6Bo!U6l7{`Ypo=8*#l0)O^qty+nfSixk(njqvhm-hoducq&HSY0l+ZHH!GjBFIjxOGl^I%N``PI>jywK4DsixKPYbwqaR6R_T*Q)P6o#c`=fJo%G%cyn4k?xW;uGenA}Wkmx3&X59zba=E3Do0+ z0qO2i5n)6PD#ldnQ~@`vX7(?$S{19a5yd;AuMw-I}Xi7h0Ec=7t~!o zFssV_Xm=Bs4srb-=u#pVP0AU%~d$yj--UN3Cr~SF#=!)kJQx`jSH2%Py&kz|~3EPkfu2ZIbg4@K+joCdD;{8shUXMuQ>rc=&) zat1hW40k15z-hNhtkw;|g^rC>dpzHt6WHV4l@B}`G-=L6o2slogWHS5_m2! zGdIV-hJYp#8dd*V+XgIL3ybW*o!C^GXjv3m<*Ic{xSExh(XpPyPt{M24frckq5|lp zfD#I&eLqs-suT^%_zKU1yeNmWS2j8v zr;k(==!D-wo*$n}cdojMBv_Ll-R2czQfRMLF)%vRwJemi-1-{a%%kog>?WzEJK(PF z|8g;%Gce6}={6f7dqxmdi$L#5Y2=#sx{Bkk4jD$uGt{PE9>G{Ik6;_A6}o!%wrQq2 z#KIq^74K7qIu%(?wS_ecTP9+#oS*WzijI;J+TTVgqjKLLEM3V;A4CABTo!Xbhr(G^ zy4eFa{^ZA6`kYJ{)+zARz1!ctJP(oA{hOI+qOw>ws-$|3w{QtMbpl1XWD)(!k|e!+$-exUCx0_u=zTjzT6P{G|G5R}Z5UqQ%MKLSm z7Ii6OQAo+lDtE6rrAzT9!$b`J6;;HVj@=}s1@1&NP1jnatirKT<><1eE-V) zR?!HdnrEMv#)+)i!lNoH`nCE)t3xWy!gP-@qRbNiB~9G9#@FZ7MX@XXQM)HOTO#`Vs-e1osdUFfF3C|aIkrywZvQdHWkm2)dG1n74N zDOi53VM`Evlz)-wQ(6_jbyNmnrW8?C_d70AYD@4yLjr+}`L)TNxBYM0jaO_RfiLeyy2 z%De?f`qMR(>jR`lM;1xn1Cub5)SI;&{pvuU(>TPo~Tn-uA!29i-Tdl7O7gAs>>%~IbqCbY+% zf6?f$m}LnA+|@PUda2CWo+RoNe6cVK^wY)Cel^qtdBYBL8&mv1I|d|P6cr|y-n0tr z33e&~dI!3av^O$$8|?95pdK?WkI3O(4X0l8$V|L^XX3Ei_A2fv5aR*Uq>Z!%6tQao z15NeD@KEYgM>1Sp1HUXpx6nu)sA~|C0DrgG)6K@iQZ=d^wYxj+?VCVU>x*i19kxhk zqwwyRTo$*Udu^brGLZJtsEdJf<~ui0h?xEx0D}k~~}2__3H$-NXbU zyaeUCWF(8ofm2f6JTwA`E!8oHDAhVC0tE*3Nx?OW=sMe?!Om`R1|rNsMl{GfFMl31T3PQ*0`+KCy&!IHcDyoB3Ho{c%aeGL6Csm! zlGL^eIg;WdU=L7;;cSAN-3Avq0T^}FH`q=GF9iIhT_u28mPaY+ZnQzMz)Q>c%3m#G zg41jq@z&c4z&;oTv55f~Dp9OEC>%mlb#7tOO(G<_e5DR35c{31jw640eGV zn^LY@_X_|z2~-QUtnckz14x{C$fJ_4*W$RmPv$}{S@hlx%%p`vfy!>e=IMz#;rokg zz7lPrEgDRo@q#X`X!-vDizL}77xZ6N&W#g7X-=KU@@Z?sx|SI|zYV#xPO2^fA^ghS zxpfK#oCSy46;Ns^MB(Tz3o@Au@b%QbaHK?jHZ5LsIyNO=!e#V94mNC#{bJ(GQ-1454J7Gqu;X+kgxnHnIFy>&E>ODUbQkdRIZy=6Ai7X5Z2~kTIvmyy{Lfr< z1WozvU$}9)NBoDVg4tu^7CmqqT95@=b3*<)K*f+ZQTJXXRpa?8P;u8Xt-Lx*fvg4^ zNc5W@vmGcn?Im&TjAra$E+!|Z7_8$M4T-0a7t@D4K-L3`Q@vF4y zV-`TCPbwGvsQ0*=B_@bm)okmjW?3(FL+1J7e;W}eFH83G$qqF{uq=Yw*}wjQmPz5p z@eAx3@iIdxZBfo@sg*^RxuU3J&Oc`7QHWfj{TTW2=N`iR1#(4Vk`R8m-JPR09e_lw z*WIluzH7Gnv{MVjCLVNOfHN^3n_bWkIGU$}`n+axopBQB`vTV?R7Jgcmb>N*wE zL9UdQ-xvtJiJ}J;-vTT{YY-*NyPO z0b5Gv=1_7-%Tx=3A{J+Q$EK7#Eq~V?3pEFG`5PcI40uy?V}hJp`=o$=>Jm;cuD}o) z)65!$Y%t){+Oora+U@FYX`)A0lx z$mj%DrPaOXKr$Ot>0Z<0w)%5kT_yV8IV)ibcMtQo`0%gUEh5<+5P`|{7ce>*e#Zdu z_R)nB(F?)Au6#4q@!r+hqc)($On1iu;h?TUTF|k|fC#+$m@4;66AY2Hcmk}Iq}}Uy z#$XkWV){t=2z$Dgb4CqXyEI^r&6UPY+ykIs>^#gE(v5Ul3S1NVd$0`lSDJFzReM0b z%!>LbV90jZ-$MEskh<guNBXWx$Z`Kw z4r-WXD2Z<<(%YT1(&u%tPmBZ!#V*o( zQvM;hDdMXQr=i&+BMRcV=b1+na3+MCOrJ%W6q0X4dIFQamkjY_KA+;MaVTht5VDiu z{xox;Rd$W=&hz4_AWRG5P#EG?az(_yO(CR5mpMPV{LvczVCSijZkekD$@2;TV;xua z$q)?F%vXEc#VauZCb*8M{b`!?Z7FVC!r4h}-q^qSsF3l1RZ((-ZIhu;3XsC`S^x^X zjL05vMU15}V3jk=Donw5r1?r24={yU+vTLORao9}HD6~==y3uw<;}`|&L#Yhr!8!k zx(pi2LScg{%FqZkRob-t z>k%qsM{a*?-6Wva67yEMWMtADiW8e|y<7gq>mwy}e$Vd0&tyB>8T7H?HP8Ec>ZbGt zdp~fP(B_*w!OgFsYQ*w47Xfma>_+KgN1H=3jRU_OO)DSWvg6${ecBs+n1Ci0#9);- zF>-y<*oD!Hve?<{qdDbWDmdM4?9T1u2C}Zhq($D`bPnX;L9ndh-Fl!9}LE#4dUd1~00%&``hH^B$eK z`Hw95aUPbMxE@vN%s(^mh{PAWIUgzNs>Mg41(E^>7vi90j711Oq-vZh_sq|LM=HKw12wFBp z)lvnhD$uUme5wSGyytU;xE{H&s4AOyhH8_qwph&c|G ze<$22JA;RFu>izv0k3J%TDraRYgnr*9)-c~32V-^;o&U$hBX7f+;2r(_$PG^g4m?| zBTX3;x`QjX{-#!ZmZT>dQ*A@W5o3H+dPlzEql!1$sf(UW&_XD`JL=fWbz-#2WT$=S zC>OplyNd$KG}LbSsf{7R872ZUeO_*k=a@W02-?}fLrL7LMJAY> zw0GlM)4#uLI5qUW<;@L4>vpFe$T{ZiY|D_hy&Ui6(Ys-IFAWx41g1*Bnd?z5?i);lZBdGd#yiDx2FDMbTabM^~^niE3&B0zOCcKe*|fpN2R3w zQLV|_nISS)kRV|ZfT-BfOj|!D6*5AiIUJ|$3f2#VJdsx*?u9ZfO7$FQR9Kuo(x-LjMjhu^VqZ5T@lwrtulD@Bhu73-`iviwmW+l+A@-{e@ zff`V!G9}$5AAWX*vO(-z+fkPNXZIpJfLoHQ%YS~~U$GQl6v8Q_d#I$&#f-b}JmATM zQ4=Pm*J)~gz5hHexSj9d0_J}m24vpc=I>c%I}zP7(CoQa6wljTe^G20-r7gHN8pPF z*!6e3vc;&N+^!DK1F3C&Gs8s{S{~aXt2m;~pU_#-fEK<+^OiDo%IW1Dw_U(XncAQ#Vmt ztb8G}kvtH=lBJpBXTKw{ArB&{UEK|KHs=NDM}9(kBgqJKYfL(;Putj*8yiYo{wBRP z7+YA+bU5(uUUYf)T*Oq`k#_H#(Jua7!#52-y8IrN-I1|qqDF3XsT0BPL=VDn;E_j!Z}SAEw717SWSg2qWy)Jlf$wr8;rDfe8L#&U*}P%eT-z@V{h&c zM)mX#AqpfEr9ZgGr^N`yFH8mwPRSd8&FFPioCu#Zd}DYZYbRFw+Z%~(Ni-MQs0Wfd07?mbN3LrBv}~*w|U2O9j3ce|1ikC@OgUvktp9jFF3}QO}}S# zlDLaBPIz?}M1LP2SNzfM{dGsd_DCadjjim`VS9gV|Gb;GELb;JpVee4(>4Y>3<6Ji zZj?i}W9P06oab}i=DP-oM2y~VW&Qs1+wRNv4QgCO(L?TCzk%D!-I0cWY%7wUdd@ll zqXVQ{)=fJ2RcsXT8hfth0G)p@{APlFy(PkH3FecDNR)1PFGim@8HT$nY@HL{_1{_- zA5V0N#>34NzpR>1=+Q@`Eo3bHiYP9@IbS<&-=LuxP*p5Z&iXbqt7Q703w3>E3u{;QAi zZMfF(WoT5TBOM5E!Pyif0!6D{Ns zaIA*W{T5bKUU=`p<3u(R5Bq%b|5~{Bc&5KU4&X_-w~K48nM-nAl8gy4w?rj{h>#>< zZV_hW_K9-)`jT4|<(ouq-`kd zI@xwb;?7&t)+gUU&O4C2ur1nG_h7d46lu9TFN%ltF#f0L`_oTF2;c3x?i0psH&Cqx z1+^1YjmIP5+hTa)iqG8adOO+EV)%@`Ubv9Ku6o$d5?WU6s$T+P7B?+bKA_Ai#-Ev7 z3SZxtS0umPsZ(04d$OTv@D=3y){v1ZA6Hb9INfza1N)({hf81{-uu`?HJ@ z@AH+;09;Z3VSa1Ab-d5pyd#l2L6c<({Ty|=BhrF=fjwz*wezEJz7VSi0Xk5}nY3y` zz>lzH8N!QbJAxuv`-iDI@4VoZJ<$@)xS?o=4rW$uMUesdI!edt#r~M1lC%`i`l=H! zFN`G0*WPR%d-~l}>$2q{y`@{luX05-6>Gm7c7WI({bC8c_(jF@o<)udpQQh^k!ok#o_vG zH^q$eiw^9xn^jVlA()6-Ai2;VBxP9v)#MOcU~odN;Lp_jtUYS0+Ub zYA7^yWTUPtkjl@GW(Sq6QHQ8i5Gi9RiO9HrCFqBq7(-Ay>3*FO)AazyHqG+Qx_M>& zX9D$-Xve@=_Jv!)$<=Mf^}}9*G{@r$w^;#TWgJ@9{9A8n^w_jtciWlMW2WorrJ6@J zUGKe?;&CvmjdmW!B1}s}R6b!NwfB$d+b5puy?70Hxz$m_%P5YQ(zZ)|YvNvsvt66k2*GXK#2fhu9!F??1~2 zx8+%^N1k)ffU%~Ym`EQ6zZGiWtUYAcEhWk!xsn?S&-uxT(CjTszHXGaPRSIUC5t9W z$3$LDv+ZNfj}{Epq=)awk3GLnQe#Y|oi?O2@peV((-#CWk<*H|+$xS#r$w@Nry9p7 zQI5Ok_{i6MN-7%wfe7uc{F|y4v4VAok%%wn9-7xuRUC9a&c|vqD-|gr)enORcdya2 zY8$17R&-LE=SJa(7f;zzTiDl+_=H>Q}Qc#N6Je zT%*jWok@K&@=hT3>xLgBjI_4JoL@dhX7l54o4o}3Q@G0C{CTb3mHnc9%1G?-@gxQw zV=yyUS*r`7g%n~+MI?t4HLo>eHBE_l_EF*5K%}=mIq;tTk`=C=h6osRe3}htf`O|? z$c1ZKm~QjSvP$Pn>DvNYZX@;mTRnu~cxpOX+JgL8jJ*{4??ZycVwy`!#w@+%9U6Px zp|_-b(?T36J)HoU1NU!#;DSz1Gj(jZzos9+5>jX)0Sm&NEwBxMz1Z+g$13|y`2}_Z z=Yw*}`qlQ%PNt!n<{!*~=2-3wAcOa1|Mw2+z)Rw>?<4;{=?Y{8$GWKFgF%6w>VM#b zPK`_BQajG+71jK?`Wpe|k;+!3y8Uq$yTM<10p%uiM9ntZ@5;v(R6A1#znAf!5ONl&cH(*;(qlA~$Fa#oHUk7f zC>Tn2@Gtd=fo$&Q%l2a4Y2?THq*H9|boG+f`6)G-F&4uvMj>F@OdBGAU1?196so%h z(go08*(R$bZhanCp|&NSWkimV@(zshhkxf}85xD+{~JJKmDyfIm=pD(_Bk`T54J4| zm<7+jaF)2M8B^?fbGL7H@!xn4&%Q({m`z5M`91(7(jg*5RAzQ@q9J_{*7* zjVnmxSLkR~CGVU~{9sRB!;agi)K>bn`JruJD>yRHgM z`W7O}vzKD=^`G;&#XX#i4~kxNsW(cW471EElXscSFF(*S!s}DXjTkH4S(!n=6@wXJ zGKbM+&ZQzOmF4H0pg$AS-2@nNf)}58u+voG54gr(Ahi?sw9 za@&^5GlNDay!TLY^PU@1g(ak_!(ek95THLXGB^khhr?UC|IzLcU?#46=Qa=w)1I9L z)fhln(H`l&P~_NkYNFQQx`8bgk0pZIhotULGY9hpnTvo{a((6j{;AHo>VAi_9)_mU zGW4Zj)-%Cu5MUzPCV`#s13qUm_%x_w%!@X*88dSsJ67nm9%C0g<&nt~us^Hr7YWq2?MrW<^J9&G6_pTOwx+}bLO`Si{Wl!?=~c#Y1C z($XVUcX5UX8-Lvd{!>#ZlzJ+V(VLwjj3fn|1n0Inpo|rdfIrxLK6hnU9E2fpIJ&kw z3NKN`{IZ|?9x-cm6fjal18U~Qva|@NS;=bgW{+%TV46wqoT%sQc=uX(?_&N^1Qa8p zb&9&4^2#=QAqAsDE?L+p0NxC=T(KN*79+ZykKB7>FChf9iW^&Y1z808B z$FP%OJql<>?~G9+AV@elMrGul{6mK6cNOv|gz*;2R43rIR-bqR74G6D;&*bCGyu#> z=C3xk$pP6YTwHCUgol&yJgCcPyIKZQ(C!adqHnSnT z%q_CgOMmWqWFKq}p3mp=Cgg#CW<_64clkooqAsL$Fqh9o1@x1HpUxvj&M(uN<#J?Y z{O1+G)n0hbkAPfBI#jgagp5o9M`7*-Q&wQLin(~){d+gsl5L9IItoIfCL*uD0C#F2 zr6aA zu)rZbSQ~mT(0e>BruW}{BCI2*%NH_69bk3A*ra)m-}mQzuj7MYAq1!ap{5+COpb=I hLRSaw*`#lo_RMH8x4tB;04i~Zt)&C5#{A;V{{cHZ4DbK| literal 0 HcmV?d00001 From cb6faae32213681f203201948d135fa52971505b Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:40:37 +0800 Subject: [PATCH 13/14] fix: yarn --- .github/workflows/build-electron.yml | 8 ++------ demos/with-electron/package.json | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 79fdbe4..8de1537 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -23,12 +23,8 @@ jobs: with: node-version: 18 - - uses: pnpm/action-setup@v3 - with: - version: 8 - - name: Build with-electron working-directory: ./demos/with-electron run: | - pnpm install --no-frozen-lockfile - pnpm run build + yarn install --no-frozen-lockfile + yarn run build diff --git a/demos/with-electron/package.json b/demos/with-electron/package.json index 7e8d9fa..08d1ca8 100644 --- a/demos/with-electron/package.json +++ b/demos/with-electron/package.json @@ -10,8 +10,7 @@ "keywords": [], "author": "", "license": "ISC", - "dependencies": { - }, + "dependencies": {}, "devDependencies": { "electron": "^36.3.2", "electron-builder": "^26.0.12" From c682a6d7e4d6795a6f884e57104f49cb61e965c6 Mon Sep 17 00:00:00 2001 From: ShineShao Date: Mon, 2 Jun 2025 15:41:55 +0800 Subject: [PATCH 14/14] ci: node@22 --- .github/workflows/build-electron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-electron.yml b/.github/workflows/build-electron.yml index 8de1537..c902fee 100644 --- a/.github/workflows/build-electron.yml +++ b/.github/workflows/build-electron.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - name: Build with-electron working-directory: ./demos/with-electron