diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index d6471a3..0000000 --- a/.browserslistrc +++ /dev/null @@ -1,2 +0,0 @@ -> 1% -last 2 versions diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index c071e91..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - root: true, - env: { - node: true, - browser: true, - es6: true - }, - 'extends': [ - 'plugin:vue/essential', - 'eslint:recommended' - ], - rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' - }, - parserOptions: { - parser: 'babel-eslint' - }, - - globals: { - 'Aliplayer': false - }, -} diff --git a/GITHUB_ISSUES_TODO.md b/GITHUB_ISSUES_TODO.md new file mode 100644 index 0000000..4041727 --- /dev/null +++ b/GITHUB_ISSUES_TODO.md @@ -0,0 +1,268 @@ +# GitHub Issues Todo + +Fetched from `langyuxiansheng/vue-aliplayer-v2` open issues on 2026-05-23. + +Source: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues + +## Summary + +- Open issues recorded: 25 +- Main themes: Vue 3 compatibility, SDK loading/lifecycle, FLV/HLS/RTMP playback, Aliplayer SDK version drift, skin/custom UI configuration, documentation gaps. +- Implementation pass on 2026-05-23: Vue 3 rewrite landed, SDK default updated to the new `imp-web-player` path, wrapper-level lifecycle/loading/playback helpers were added. Items marked "Code status" below are handled in this repository unless noted as upstream/documentation-only. + +## Compatibility And Packaging + +### #34 please support vue3.x + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/34 +- Created: 2020-12-08 +- Comments: 3 +- Problem: users request Vue 3 support. +- Notes: comments mention a third-party Vue 3/Vite fork/package `vue-aliplayer-v3`; current project is Vue 2 based. +- Follow-up: decide whether to add Vue 3 support in this package, publish a separate Vue 3 package, or document Vue 2-only support. +- Code status: fixed in v2.0.0 rewrite. Vue 2 users must stay on 1.x. + +### #35 安装之后引用就直接报这个问题 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/35 +- Created: 2020-12-23 +- Comments: 3 +- Problem: Vue 3 usage throws `Cannot read property '_c' of undefined` from `vue-aliplayer-v2.umd.min.js`. +- Notes: maintainer identified likely cause as Vue version mismatch; overlaps with #34. +- Follow-up: treat as Vue 3 compatibility/package-entry issue. +- Code status: fixed by replacing the Vue 2 UMD build with Vue 3/Vite library output. + +### #65 VueAliplayerV2在vue中使用报错 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/65 +- Created: 2022-06-12 +- Comments: 1 +- Problem: user reports usage error with screenshot only. +- Notes: another user reported the same issue in 2023. +- Follow-up: inspect screenshot manually when triaging; likely packaging/import/runtime compatibility. +- Code status: likely fixed by Vue 3 package rewrite and typed exports; still needs reporter repro if screenshot covers another error. + +### #45 关于浏览器兼容的问题 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/45 +- Created: 2021-03-23 +- Comments: 1 +- Problem: works in Chrome 89, player component does not display in Chrome 59. +- Notes: current wrapper relies on upstream Aliplayer SDK compatibility. +- Follow-up: define supported browser matrix and test whether transpilation/polyfills or SDK version is the blocker. +- Code status: documented as upstream SDK/browser support. v2 build targets modern Vue 3/Vite environments. + +### #46 请问,我使用uniapp安装aliplayerV2的问题 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/46 +- Created: 2021-03-25 +- Comments: 1 +- Problem: using npm install in uni-app, player buttons/components do not show. +- Notes: maintainer had not tested uni-app. +- Follow-up: decide whether uni-app is supported; if yes, add setup notes and a minimal repro. +- Code status: not claimed as fixed. Needs a uni-app repro because this package targets Vue 3 web apps. + +### #70 建议升级阿里云播放器到最新版 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/70 +- Created: 2023-04-12 +- Comments: 0 +- Problem: default SDK is outdated; user changed CSS/JS defaults to Aliplayer `2.15.2`. +- Notes: user also mentions missing source maps because Aliplayer is closed source. +- Follow-up: verify latest stable Aliplayer SDK URL, update defaults if safe, and document how to override SDK URLs. +- Code status: fixed. Default SDK now uses `apsara-media-box/imp-web-player/2.37.0`; `sdkVersion`, `cssLink`, and `scriptSrc` are configurable. + +## SDK Loading And Lifecycle + +### #71 优化建议 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/71 +- Created: 2024-08-02 +- Comments: 2 +- Problem: each created player reportedly adds another CSS and JS resource. +- Notes: comment references newer `apsara-media-box/imp-web-player/2.16.3` resource URLs and a multi-player example. +- Follow-up: reproduce with multiple create/destroy cycles and verify whether duplicate resource tags appear under current component logic. +- Code status: fixed in shared SDK loader. It caches CSS/JS by URL and avoids duplicate tags for multiple players. + +### #62 多屏播放后,只销毁最后一个播放实例 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/62 +- Created: 2022-03-25 +- Comments: 2 +- Problem: in `v-for`, clearing the list only destroys the last player instance. +- Notes: reporter says FLV did not reproduce, HLS did reproduce. +- Follow-up: test multi-instance destroy with HLS and inspect player ID/ref/lifecycle handling. +- Code status: improved. Component now guards async init after unmount and disposes each instance independently; still needs real HLS multi-player regression test. + +### #69 Uncaught TypeError: s._options is null + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/69 +- Created: 2023-03-29 +- Comments: 0 +- Problem: runtime error `s._options is null`, screenshot only. +- Follow-up: inspect screenshot and try to reproduce around destroy/re-init or options mutation. +- Code status: improved. Init is token-guarded and avoids creating stale players after fast option/source changes. + +## Playback Failures And Stream Behavior + +### #11 rtmp html5模式下不能播放 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/11 +- Created: 2020-06-10 +- Comments: 3 +- Problem: RTMP cannot play in HTML5 mode after Flash deprecation. +- Notes: comment says RTMP only works with Flash; another suggests FLV.js. +- Follow-up: document RTMP limitation clearly; avoid promising HTML5 RTMP support unless using another playback strategy. +- Code status: documented limitation. RTMP H5 support is not fixed in wrapper. + +### #21 直播,不能播放flv格式的视频 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/21 +- Created: 2020-08-10 +- Comments: 1 +- Problem: FLV live stream fails both by `source` and dynamic `loadByUrl`. +- Notes: maintainer suggested validating stream in VLC and checking Aliplayer config. +- Follow-up: create verified FLV live test case and document required options. +- Code status: improved. Wrapper infers `format: 'flv'`; `lowLatency` adds FLV live buffer defaults. Needs real FLV source validation. + +### #24 mp4格式视频加载错误4400 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/24 +- Created: 2020-09-27 +- Comments: 4 +- Problem: large or special MP4 URL reports error 4400; user says autoplay is false but play still appears to trigger. +- Notes: maintainer suspected URL permissions/cross-origin/path encoding; reporter later said the URL contains Chinese characters. +- Follow-up: test encoded vs unencoded URLs, autoplay false behavior, and error handling for cross-origin/private MP4. +- Code status: improved. Wrapper now `encodeURI`s source URLs by default to handle Chinese filenames. Cross-origin/private URL failures remain source/server issues. + +### #37 发现m3u8视频播放时的问题 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/37 +- Created: 2021-01-07 +- Comments: 1 +- Problem: M3U8 quality switching is delayed; after switching and refreshing, playback fails. +- Follow-up: reproduce with multi-quality M3U8 source and inspect whether wrapper re-init/load flow loses format or quality state. +- Code status: improved. Wrapper infers source format and rebuilds player on cross-format changes instead of always calling `loadByUrl`. + +### #52 flv直播刷新页面视频卡住 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/52 +- Created: 2021-06-16 +- Comments: 3 +- Problem: FLV live video gets stuck after page refresh. +- Notes: reporter confirmed issue was still unresolved in 2021. +- Follow-up: include in FLV live repro matrix with #21 and #68. +- Code status: improved by FLV format inference, async init guards, and `lowLatency`; still needs real stream repro. + +### #68 播放Flv视频直播时,时间长了后会延迟几分钟 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/68 +- Created: 2022-12-17 +- Comments: 0 +- Problem: FLV live stream accumulates several minutes of latency over time. +- Follow-up: check Aliplayer FLV buffer options such as stash buffer settings and live latency handling. +- Code status: improved. `lowLatency` applies `enableStashBufferForFlv: false` and `stashInitialSizeForFlv: 128` unless explicitly overridden. + +## Playback APIs And Source Modes + +### #43 vid+palyauth播放问题 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/43 +- Created: 2021-03-06 +- Comments: 5 +- Problem: `replayByVidAndPlayAuth` appears undefined from both `getPlayer()` and component ref. +- Notes: later comment says methods like `replay()` and `pause()` were also undefined; maintainer notes multiple refs become arrays; user later resolved. +- Follow-up: improve docs for `$refs` in single vs multiple-player usage and when methods are available. +- Code status: fixed for Vue 3 docs. README now shows typed `ref`. + +### #49 这个不支持vid+playauth播放吗 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/49 +- Created: 2021-05-18 +- Comments: 3 +- Problem: question about `vid + playauth` playback support. +- Notes: comment says it works when adding `encryptType: 1`; later user asks what else is required. +- Follow-up: add working `vid + playauth` example and option notes. +- Code status: documented. `vid + playauth` is supported through `options`; ref method remains exposed. + +## UI, Skin, And Extension Features + +### #53 播放按钮 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/53 +- Created: 2021-06-21 +- Comments: 14 +- Problem: users ask how to center play button, configure quality/subtitle options, change cover, and adjust progress/button colors. +- Notes: maintainer answered that `skinLayout` must be placed inside `options`; example uses `skinLayout: [{ name: 'bigPlayButton', align: 'cc' }]`. +- Follow-up: add skin customization examples to README. +- Code status: partially documented through options passthrough. More visual skin examples can be added later. + +### #55 请问我要把清晰度切换单独放到设置外面要怎么弄呢? + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/55 +- Created: 2021-06-22 +- Comments: 1 +- Problem: user wants quality switch outside the settings menu. +- Notes: maintainer pointed to Aliplayer skin settings docs. +- Follow-up: document whether this is possible through `skinLayout` or requires custom components. +- Code status: documented as Aliplayer skin/custom component responsibility. + +### #57 自定义组件 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/57 +- Created: 2021-07-06 +- Comments: 4 +- Problem: user asks whether Aliplayer custom component API is supported for a playlist. +- Notes: maintainer says SDK should support it, but another user says adding `components` in `options` does not work unless custom component JS is separately loaded. +- Follow-up: verify custom component loading order and provide an example if supported. +- Code status: improved. Added `componentScripts` to load custom component scripts before player init; README includes example. + +### #61 播放失败页面自定义 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/61 +- Created: 2021-09-24 +- Comments: 1 +- Problem: clicking refresh on the player error page refreshes the whole page; user wants local refresh or custom refresh handler. +- Notes: maintainer says the error page comes from Aliplayer. +- Follow-up: check whether SDK exposes error UI customization or whether wrapper can expose a local retry pattern. +- Code status: improved. Added `reload()` / `retry()` exposed methods for local retry; SDK error UI itself remains upstream. + +### #67 跑马灯功能可以用吗 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/67 +- Created: 2022-10-08 +- Comments: 0 +- Problem: user asks whether marquee/watermark scrolling text is available. +- Follow-up: verify Aliplayer support and document unsupported/supported approach. +- Code status: documented via `componentScripts` + `options.components`; availability depends on the loaded Aliplayer custom component. + +### #59 如何关闭track + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/59 +- Created: 2021-08-20 +- Comments: 1 +- Problem: player sends tracking POST requests to `https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/newplayer/track`; user wants to disable. +- Notes: a comment suggests deleting `postWithHeader`, which is not a clean wrapper-level solution. +- Follow-up: find official SDK option, if any; otherwise document limitation. +- Code status: opt-in mitigation added. `disableTracking` can block known Aliplayer tracking URLs at wrapper level. + +## Format And Capability Questions + +### #60 能播vr视频或者vr直播吗 + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/60 +- Created: 2021-09-16 +- Comments: 1 +- Problem: asks whether VR video or VR live can be played. +- Notes: maintainer had not tested. +- Follow-up: verify upstream Aliplayer capability and document scope. +- Code status: documentation-only. Wrapper passes options through but does not implement VR rendering itself. + +### #66 支持AVI 格式的视频吗? + +- Link: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/66 +- Created: 2022-09-07 +- Comments: 0 +- Problem: asks whether AVI format is supported. +- Follow-up: document supported formats according to upstream Aliplayer/browser support. +- Code status: documented format scope. AVI is not claimed as supported by this wrapper. diff --git a/README.md b/README.md index 55167e2..cb5194b 100644 --- a/README.md +++ b/README.md @@ -1,512 +1,296 @@ -# vue-alipayer-v2 +# vue-aliplayer-v2 -## 感谢每一位支持开源的朋友. 这是一个基于 Alipayer 开发并封装成 vue 组件的播放器. +基于阿里云 Aliplayer SDK 的 Vue 3 播放器组件。可通过 Aliplayer 官方能力播放 mp4、m3u8、flv、直播流、加密点播、清晰度切换和直播时移等场景。 -### vue 中使用 Alipayer,播放 rtmp,m3u8,mp4 视频 +> v2 从 Vue 3 + Vite 重构开始,不再兼容 Vue 2。Vue 2 项目请继续安装 `vue-aliplayer-v2@1.x`。 -#### [本项目在线演示](https://langyuxiansheng.github.io/vue-aliplayer-v2/) +## 在线演示 -#### [阿里云播放器在线演示](https://player.alicdn.com/aliplayer/index.html) +- 项目演示:https://langyuxiansheng.github.io/vue-aliplayer-v2/ +- 阿里云播放器演示:https://player.alicdn.com/aliplayer/index.html -> 假如此轮子对你有帮助,请顺手 star 一下吧.o(_ ̄︶ ̄_)o - -## 1.安装使用! 下载安装 npm 包 +## 安装 + +```bash +npm i vue-aliplayer-v2 +``` ```bash -npm i vue-aliplayer-v2 --save -or yarn add vue-aliplayer-v2 ``` -#### 全局注册 main.js +## 全局注册 -```javascript -import VueAliplayerV2 from "vue-aliplayer-v2"; +```ts +import { createApp } from 'vue'; +import App from './App.vue'; +import VueAliplayerV2 from 'vue-aliplayer-v2'; -Vue.use(VueAliplayerV2); +const app = createApp(App); -//可选全局配置 -//Vue.use(VueAliplayerV2,{ -// cssLink: 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css', -// scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js' -//}); +app.use(VueAliplayerV2, { + // 默认使用阿里云 Web 播放器 SDK 2.37.0,新版 SDK 走 imp-web-player 资源路径 + sdkVersion: '2.37.0', + // 可选:覆盖完整 SDK 地址 + cssLink: 'https://g.alicdn.com/apsara-media-box/imp-web-player/2.37.0/skins/default/aliplayer-min.css', + scriptSrc: 'https://g.alicdn.com/apsara-media-box/imp-web-player/2.37.0/aliplayer-min.js' +}); + +app.mount('#app'); ``` -#### 局部注册 App.vue +## 局部注册 -```javascript -//推荐第一种(仅v1.2.3)及以上的版本可用 -import VueAliplayerV2 from "vue-aliplayer-v2"; -components: { - VueAliplayerV2; -} - -//或者 -components: { - VueAliplayerV2: VueAliplayerV2.Player; -} -``` - -## 2.组件中使用 - -### 组件模板使用,下面的视频连接仅供演示测试. - -```html +```vue - - ``` -## 3.功能与配置 +## Props -```javascript -props:{ +| 名称 | 类型 | 默认值 | 说明 | +| --- | --- | --- | --- | +| `source` | `string \| null` | `null` | 播放源。存在时优先于 `options.source`,变更后会调用底层 `loadByUrl` 动态切换。 | +| `options` | `AliplayerOptions \| null` | `null` | 透传给 Aliplayer 的配置项。 | +| `license` | `AliplayerLicense \| null` | `null` | Aliplayer License 配置,等价于 `options.license`,适配新版 SDK 要求。 | +| `autoFormat` | `boolean` | `true` | 根据 `source` 后缀自动补充 `format`,支持 `mp4/m3u8/flv/mp3/rtmp`。 | +| `lowLatency` | `boolean` | `false` | FLV 直播低延迟预设,会在 `isLive + flv` 时默认关闭 stash buffer。 | +| `normalizeSourceUrl` | `boolean` | `true` | 自动对非 ASCII 播放地址执行 `encodeURI`,处理中文文件名等 URL。 | +| `forbidFastForward` | `boolean` | `false` | 禁止拖拽快进。通过监听 `timeupdate` 回退到上次播放位置实现。 | +| `sdkVersion` | `string` | `2.37.0` | 生成阿里云 `imp-web-player` SDK 资源地址。 | +| `cssLink` | `string` | Aliplayer 2.37.0 CSS | 覆盖播放器样式地址。 | +| `scriptSrc` | `string` | Aliplayer 2.37.0 JS | 覆盖播放器脚本地址。 | +| `componentScripts` | `string[]` | `[]` | 额外加载自定义组件脚本,需在播放器初始化前加载。 | +| `disableTracking` | `boolean` | `false` | 可选拦截 Aliplayer 已知 track 上报请求。 | +| `trackingUrlPatterns` | `Array` | `[]` | 自定义需要拦截的 track URL 片段或正则。 | - forbidFastForward: { //禁止拖拽快进 - required: false, - type: [Boolean], - default: false - }, - - options: { //配置项 (options.source 不支持动态切换,需要动态切换请直接使用source) - required: false, - type: [Object], - default: () => null - }, +## Events - source: { //播放源(此属性存在则优先于options.source) 支持动态切换,目前只支持同种格式(mp4/flv/m3u8)之间切换。暂不支持直播rtmp流切换。 - required: false, - type: [Object], - default: () => null - }, +组件会透传常用 Aliplayer 事件: - cssLink:{ //css版本源 - required: false, - type: [String], - default: `https://g.alicdn.com/de/prismplayer/2.9.7/skins/default/aliplayer-min.css` - }, - scriptSrc:{ //js版本源 - required: false, - type: [String], - default: `https://g.alicdn.com/de/prismplayer/2.9.7/aliplayer-min.js` - } +```ts +ready +play +pause +canplay +playing +ended +liveStreamStop +onM3u8Retry +hideBar +showBar +waiting +timeupdate +snapshoted +requestFullScreen +cancelFullScreen +error +startSeek +completeSeek +sdk-error +``` + +`sdk-error` 是组件额外事件,在 Aliplayer SDK 脚本加载失败时触发。 + +## Ref 方法 + +```ts +playerRef.value?.play(); +playerRef.value?.pause(); +playerRef.value?.replay(); +playerRef.value?.seek(30); +playerRef.value?.getCurrentTime(); +playerRef.value?.getDuration(); +playerRef.value?.getVolume(); +playerRef.value?.setVolume(0.8); +playerRef.value?.loadByUrl('//player.alicdn.com/video/aliyunmedia.mp4'); +playerRef.value?.getStatus(); +playerRef.value?.requestFullScreen(); +playerRef.value?.cancelFullScreen(); +playerRef.value?.dispose(); +playerRef.value?.getPlayer(); +``` + +完整暴露方法包括: + +```ts +getPlayer +init +initPlayer +reload +retry +play +pause +replay +seek +getCurrentTime +getDuration +getVolume +setVolume +loadByUrl +replayByVidAndPlayAuth +replayByVidAndAuthInfo +setPlayerSize +setSpeed +setSanpshotProperties +requestFullScreen +cancelFullScreen +getIsFullScreen +getStatus +setLiveTimeRange +setRotate +getRotate +setImage +dispose +setCover +setProgressMarkers +setPreviewTime +getPreviewTime +isPreview +off +``` + +## 多播放器 + +```vue + +``` + +v2 的 SDK 加载器会复用同一份 CSS/JS 资源,多个播放器同时挂载时不会重复插入相同的 SDK 标签。 + +## License + +阿里云新版 Web 播放器 SDK 要求配置网站域名和 License Key。可以通过 `license` prop 或 `options.license` 传入: + +```vue + +``` + +## VID + PlayAuth + +```vue + +``` + +`vid + playauth` 是初始化配置,不需要再传 `source`。如果要在播放器创建后切换,可以调用: + +```ts +playerRef.value?.replayByVidAndPlayAuth(vid, playauth); +``` + +## FLV/HLS/RTMP 说明 + +- FLV 直播请设置 `options.isLive = true`,组件会自动推断 `format: 'flv'`。 +- 开启 `low-latency` 后,FLV 直播默认使用 `enableStashBufferForFlv: false` 和 `stashInitialSizeForFlv: 128`,可在 `options` 中覆盖。 +- m3u8、flv、mp4 跨格式切换时,v2 会自动重建播放器;同格式切换优先调用 `loadByUrl`。 +- RTMP 在现代浏览器 H5 模式下不再可靠,建议服务端转 HLS/FLV/RTS。 + +## 自定义组件和跑马灯 + +Aliplayer 自定义组件需要额外加载组件脚本,然后通过 `options.components` 注入。组件提供 `componentScripts` 保证脚本在播放器初始化前加载: + +```vue + +``` + +跑马灯、水印、播放列表等能力是否可用取决于所加载的 Aliplayer 自定义组件脚本。 + +## 失败重试 + +播放器错误页属于 Aliplayer SDK 内部 UI。业务侧可以监听 `error` 后使用组件暴露的 `retry()` 或 `reload()` 做局部重试: + +```ts +function handleError() { + playerRef.value?.retry(); } ``` -### 3.1 配置项 options 属性 - -可以参考 [属性和接口说明](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P) - -| 名称 | 类型 | 说明 | -| :----------------------- | :-----------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| source | String | 视频播放地址 url:单独 url。默认状态,表示使用 vid+playauth。source 播放方式优先级最高。source 支持多清晰度设置:source:’{“HD”:”address1”,”SD”:”address2”’,详情参见多清晰度播放。 | -| vid | String | 媒体转码服务的媒体 Id。 | -| playauth | String | 播放权证,如何得到参见获取 playauth。 | -| height | String | 播放器高度,可形如‘100%’或者‘100px’,chrome 浏览器下 flash 播放器分别不能小于 397x297。 | -| width | String | 播放器宽度,可形如‘100%’或者‘100px’,chrome 浏览器下 flash 播放器分别不能小于 397x297。 | -| videoWidth | String | 视频宽度,仅 h5 支持。详情参见旋转和镜像。 | -| videoHeight | String | 视频高度,仅 h5 支持。详情参见旋转和镜像。 | -| preload | Boolean | 播放器自动加载,目前仅 h5 可用。 | -| cover | String | 播放器默认封面图片,请填写正确的图片 url 地址。需要 autoplay 为’false’时,才生效。Flash 播放器封面也需要开启允许跨域访问。 | -| isLive | Boolean | 播放内容是否为直播,直播时会禁止用户拖动进度条。 | -| autoplay | Boolean | 播放器是否自动播放,在移动端 autoplay 属性会失效。Safari11 不会自动开启自动播放如何开启。 | -| rePlay | Boolean | 播放器自动循环播放。 | -| useH5Prism | Boolean | 指定使用 H5 播放器。 | -| useFlashPrism | Boolean | 指定使用 Flash 播放器。 | -| playsinline | Boolean | H5 是否内置播放,有的 Android 浏览器不起作用。 | -| showBuffer | Boolean | 显示播放时缓冲图标,默认 true。 | -| skinRes | Url | 说明:皮肤图片,不建议随意修改该字段,如要修改,请参照皮肤定制。 | -| skinLayout | Array Boolean | 说明:功能组件布局配置,不传该字段使用默认布局。传 false 隐藏所有功能组件,请参照皮肤定制。 | -| controlBarVisibility | String | 控制面板的实现,默认为‘hover’。可选的值为:‘click’、‘hover’、‘always’。 | -| showBarTime | String | 控制栏自动隐藏时间(ms)。 | -| extraInfo | String | 说明:JSON 串用于定制性接口参数。 | -| > | > | 1.“fullTitle”:“测试页面”全屏时显示视频标题(仅 flash 支持)。 | -| > | > | 2. “m3u8BufferLength”:“30”播放 m3u8 时加载缓存 ts 文件长度单位(秒)(仅 flash 支持)。 | -| > | > | 3. “liveStartTime”:“2016/08/17 12:00:00”,直播开始时间,用于提示直播未开始(仅 flash 支持)。 | -| > | > | 4. “liveOverTime”:“2016/08/17 14:00:00”,直播结束时间,用于提示直播结束(仅 flash 支持)。 | -| enableSystemMenu | Boolean | 是否允许系统右键菜单显示,默认为 false。 | -| format | String | 指定播放地址格式,只有使用 vid 的播放方式时支持,可选值为’mp4’、’m3u8’、’flv’、’mp3’,默认为空,仅 H5 支持。 | -| mediaType | String | 指定返回音频还是视频,只有使用 vid 的播放方式时支持。可选值为’video’和’audio’,默认为’video’,‘audio’主要是针对只包含音频的视频格式,比如音频的 mp4,仅 H5 支持。 | -| qualitySort | String | 指定排序方式,只有使用 vid + plauth 播放方式时支持。‘desc’表示按倒序排序(即:从大到小排序),‘asc’表示按正序排序(即:从小到大排序),默认值:‘asc’,仅 H5 支持。 | -| definition | String | 显示视频清晰度,多个用逗号分隔,比如:’FD,LD’,此值是 vid 对应流清晰度的一个子集,取值范围:FD(流畅)LD(标清)SD(高清)HD(超清)OD(原画)2K(2K)4K(4K),仅 H5 支持。 | -| defaultDefinition | String | 默认视频清晰度,此值是 vid 对应流的一个清晰度,取值范围:FD(流畅)LD(标清)SD(高清)HD(超清)OD(原画)2K(2K)4K(4K),仅 H5 支持。 | -| x5_type | String | 声明启用同层 H5 播放器,启用时设置的值为‘h5’,详情参见同层播放。 | -| x5_fullscreen | Boolean | 声明视频播放时是否进入到 TBS 的全屏模式,默认为 false。当需要把视频做为背景时,设置为 true,详情参见同层播放。 | -| x5_video_position | String | 声明视频播在界面上的位置,默认为“center”。可选值为:“top”,“center”,详情参见同层播放。 | -| x5_orientation | String | 声明 TBS 播放器支持的方向,可选值:landscape:横屏,portraint:竖屏,详情参见同层播放。 | -| x5LandscapeAsFullScreen | String | 声明 TBS 全屏播放是否横屏,默认值为 true。 | -| autoPlayDelay | Number | 延迟播放时间,单位为秒。详情参见延迟播放 | -| autoPlayDelayDisplayText | String | 延迟播放提示文本,详情参见延迟播放。 | -| language | String | 国际化,默认为‘zh-cn’。如果未设置,则采用浏览器语言。可选值为‘zh-cn’、‘en-us’或其它值。 | -| languageTexts | JSON | 自定义国际化文本 json 结构,key 的值需要和 language 属性值对应起来。例子:{jp:{Play:”Play”}},自定义值参见 Json 结构。 | -| snapshot | Boolean | flash 启用截图功能。 | -| snapshotWatermark | Object | H5 设置截图水印。 | -| useHlsPluginForSafari | Boolean | Safari 浏览器可以启用 Hls 插件播放,Safari 11 除外。 | -| enableStashBufferForFlv | Boolean | H5 播放 flv 时,设置是否启用播放缓存,只在直播下起作用。 | -| stashInitialSizeForFlv | Number | H5 播放 flv 时,初始缓存大小,只在直播下起作用。 | -| loadDataTimeout | Number | 缓冲多长时间后,提示用户切换低清晰度,默认:20 秒。 | -| waitingTimeout | Number | 最大缓冲超时时间,超过这个时间会有错误提示,默认:60 秒。 | -| liveStartTime | String | 直播开始时间,直播时移功能使用,格式为:“2018/01/04 12:00:00”。 | -| liveOverTime | String | 直播结束时间,直播时移功能使用,格式为:“2018/01/04 12:00:00”。 | -| liveTimeShiftUrl | String | 直播可用时移查询地址,详情参见直播时移。 | -| liveShiftSource | String | flv 直播地址播放时,hls 的流地址,详情参见直播时移。 | -| recreatePlayer | Function | flv 直播和 hls 时移切换是,重新创建播放器方法,详情参见直播时移。 | -| diagnosisButtonVisible | Boolean | 是否显示检测按钮,默认为 true。 | -| disableSeek | Boolean | 禁用进度条的 Seek,默认为 false,仅 Flash 支持。 | -| encryptType | int | 加密类型,播放点播私有加密视频时,设置值为 1,默认值为 0。 | -| progressMarkers | Array | 进度条打点内容数组,详情参见进度条打点。 | -| vodRetry | int | 点播失败重试次数,默认 3 次 | -| liveRetry | int | 直播播放失败重试次数,默认 5 次 | - -### 3.2 播放器方法 - -```javascript -// 暂停播放 -this.$refs.VueAliplayerV2.pause(); -``` - -可以参考 [播放器接口方法](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u63A5u53E32) - -| 名称 | 参数 | 说明 | -| :--------------------- | :------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| play | - | 播放视频。 | -| pause | - | 暂停视频。 | -| replay | - | 重播视频。 | -| seek | time | 跳转到某个时刻进行播放,time 的单位为秒。 | -| getCurrentTime | - | 获取当前的播放时刻,返回的单位为秒。 | -| getDuration | - | 获取视频总时长,返回的单位为秒,这个需要在视频加载完成以后才可以获取到,可以在 play 事件后获取。 | -| getVolume | - | 获取当前的音量,返回值为 0-1 的实数。ios 和部分 android 会失效。 | -| setVolume | - | 设置音量,vol 为 0-1 的实数,ios 和部分 android 会失效。 | -| loadByUrl | url,time | 直接播放视频 url,time 为可选值(单位秒)。目前只支持同种格式(mp4/flv/m3u8)之间切换。暂不支持直播 rtmp 流切换。 | -| replayByVidAndPlayAuth | vid:视频 id,playauth:播放凭证 | 目前只支持 H5 播放器。暂不支持不同格式视频间的之间切换。暂不支持直播 rtmp 流切换。 | -| replayByVidAndAuthInfo | 仅 MPS 用户时使用,参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion | 目前只支持 H5 播放器。暂不支持不同格式视频间的之间切换。暂不支持直播 rtmp 流切换。 | -| setPlayerSize | w,h | 设置播放器大小 w,h 可分别为 400px 像素或 60%百分比。chrome 浏览器下 flash 播放器分别不能小于 397x297。 | -| setSpeed | speed | 手动设置播放的倍速,倍速播放仅 H5 支持。移动端可能会失效,比如 android 微信。倍速播放 UI 默认是开启的。如果自定义过 skinLaout 属性,需要添加 speedButton 项到数组里: | -| > | > | {name:“speedButton”,align:“tr”,x:10,y:23} | -| setSanpshotProperties | width:宽度,height:高度,rate:截图质量 | 设置截图参数。 | -| requestFullScreen | - | 播放器全屏,仅 H5 支持。 | -| cancelFullScreen | - | 播放器退出全屏,iOS 调用无效,仅 H5 支持。 | -| getIsFullScreen | - | 获取播放器全屏状态,仅 H5 支持。 | -| getStatus | - | 获取播放器状态,包含的值:‘init’,‘ready’,‘loading’,‘play’,‘pause’,‘playing’,‘waiting’,‘error’,‘ended’ | -| setLiveTimeRange | 开始时间,结束时间 | 设置直播的开始结束时间,开启直播时移功能时使用。例子:player.liveShiftSerivce.setLiveTimeRange(“”,‘2018/01/04 20:00:00’) | -| setRotate | rotate 旋转角度 | 参数为旋转角度, 正数为正时针旋转, 负数为逆时针旋转。例如: setRotate(90)。详情参见旋转和镜像。 | -| getRotate | - | 获取旋转角度。详情参见旋转和镜像。 | -| setImage | image:镜像类型,可选值为:horizon,vertical | 设置镜像,例如: setImage(‘horizon’)。详情参见旋转和镜像。 | -| dispose | - | 播放器销毁 | -| setCover | cover 封面地址 | 设置封面 | -| setProgressMarkers | markers 打点数据集合 | 设置打点数据 | -| setPreviewTime | time 试看时间 | 设置试看时间,单位为秒,详情参见试看 | -| getPreviewTime | - | 获取试看时间 | -| isPreview | - | 是否试看 | -| off | ev:事件名[String],handle,事件回调方法[Function] | 通过播放器实例的 off 方法取消绑定的方法 | - -## 4.播放器事件 - -```html - - -``` - -可以参考 [播放器事件](https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u4E8Bu4EF63) - -| 名称 | 说明 | -| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | -| ready | 播放器视频初始化按钮渲染完毕。播放器 UI 初始设置需要此事件后触发,避免 UI 被初始化所覆盖。播放器提供的方法需要在此事件发生后才可以调用。 | -| play | 视频由暂停恢复为播放时触发。 | -| pause | 视频暂停时触发。 | -| canplay | 能够开始播放音频/视频时发生,会多次触发,仅 H5 播放器。 | -| playing | 播放中,会触发多次。 | -| ended | 当前视频播放完毕时触发。 | -| liveStreamStop | 直播流中断时触发。m3u8/flv/rtmp 在重试 5 次未成功后触发。提示上层流中断或需要重新加载视频。PS:m3u8 一直自动重试,不需要上层添加重试。 | -| onM3u8Retry | m3u8 直播流中断后重试事件,每次断流只触发一次。 | -| hideBar | 控制栏自动隐藏事件。 | -| showBar | 控制栏自动显示事件。 | -| waiting | 数据缓冲事件。 | -| timeupdate | 播放位置发生改变时触发,仅 H5 播放器。可通过 getCurrentTime 方法,得到当前播放时间。 | -| snapshoted | 截图完成事件。 | -| requestFullScreen | 全屏事件,仅 H5 支持。 | -| cancelFullScreen | 取消全屏事件,iOS 下不会触发,仅 H5 支持。 | -| error | 错误事件。 | -| startSeek | 开始拖拽,参数返回拖拽点的时间。 | -| completeSeek | 完成拖拽,参数返回拖拽点的时间。 | - ---- - -## 5. 图片展示 - -![图片1](https://github.com/langyuxiansheng/vue-aliplayer-v2/blob/master/images/p1.png) -![图片2](https://github.com/langyuxiansheng/vue-aliplayer-v2/blob/master/images/p2.png) - ---- - -## 6.二次开发 下载项目 +## 开发 ```bash -git clone https://github.com/langyuxiansheng/vue-aliplayer-v2.git -``` - -## Project setup - -```bash -cd vue-aliplayer-v2 - npm install -``` - -### Compiles and hot-reloads for development - -```bash npm run dev ``` -### Compiles and minifies for production +构建 demo: ```bash npm run build ``` -### Lints and fixes files +构建组件库: ```bash -npm run lint +npm run type-check +npm run lib ``` -## 7.缺陷 & 后期计划 +## 迁移说明 -> 2019 年 12 月 27 日 更新优化局部引用方式 - -> 您有功能建议,或者 bug 反馈请留言. - -## 8.感谢 - ---- - -- vue-aliplayer 的作者,项目地址:https://github.com/slacrey/vue-aliplayer - -- Alipayer 阿里云的开源播放器 https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1085.36fc6fc57WKZ5P#h2-u64ADu653Eu5668u4E8Bu4EF63 - -### Customize configuration - -See [Configuration Reference](https://cli.vuejs.org/config/). - -## 更新日志 - -> v1.3.0 修复部分已知bug,增加forbidFastForward 属性,感谢 "william-xue"网友的功能提交. - -- sdk 版本更新,默认 SDK 版本由 2.9.3 更新为 2.9.20 -- 默认注释更新 -- 增加禁止用户拖拽快进的属性选项 forbidFastForward [Boolean] 默认 false - -> v1.2.9 修正部分默认属性, 感谢"Schean17"网友的反馈与建议. - -> v1.2.8 更换底层默认 sdk 版本为 2.9.3 修复 options 遇到 update loop 错误 感谢"litmonw"网友的反馈与建议. - -> v1.2.7 更换底层默认 sdk 版本为 2.9.1 的版本. 更新线上演示 demo 的选项 - -> v1.2.6 优化 beforeDestroy() 部分的代码. - -> v1.2.5 更换默认的播放器 SDK 版本 2.8.2 => 2.9.0,2.8.2 的版本存在多个播放器同时播放直播流异常的 bug,增加了全局 SDK 版本配置,可以在 Vue.use()的时候进行配置. - -> v1.2.4 修复多个播放器加载,只初始化一个播放器的 bug.文档部分更新,增加了问题栏. 感谢"沙洲 ad"的反馈与建议. - -> v1.2.3 优化播放器的初始化代码,调整包内结构,优化局部组件的注册方式,也兼容老版本的引用方式.文档部分更新,增加了问题栏. 感谢"liangzhiyuan2015"和"fancheur"两位网友的反馈与建议. - -> v1.2.2 修复指定 id 情况下,播放器报错"没有为播放器指定容器",目前移除外部指定 id 的方式,所有的播放器 id 都由内部生成,不再由外部指定容器(外部指定的意义并不大),其它的说明:更新 1.2.1 后报错 Uncaught TypeError: 没有为播放器指定容器,因为源码中变更了部分代码,以及最大限度的简化代码,组件内部的根容器就只有一个 div 容器,导致以前外部指定 id 的时候,容器 id 与外部的不一致,导致抛出异常了,现在已经紧急修复了,若在使用,请更新到 v1.2.2 的版本;如果使用了外部指定 id 的方式请移除外部的 id.否则 id 会出现重复的情况., 感谢"liyoro"的反馈和建议. - -> v1.2.1 修复直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的 bug,修复多个播放器只渲染 1 个的 bug, 感谢"Jonauil"和"guangming95"两位网友的反馈和建议. - -> v1.2.0 修复播放源(MP4/m3u8)之间切换无法正常播放的 bug,增加 options 配置项动态响应功能,优化部分播放器的逻辑, 感谢"liyoro"网友的反馈和建议. - -> v1.1.9 修复播放源(修复 prop:source 类型验证报错), 感谢"hugo2017"和“nullF”网友的反馈. - -> v1.1.8 修复播放源(增加 source 属性类型错误),修复获取播放器状态 getStatus()方法报错, 感谢"kongjigu"网友的反馈. - -> v1.1.7 增加动态切换播放源(增加 source 属性)功能 感谢"wikimo"和"jieruian"两位网友的反馈建议. - -> v1.1.6 修复部分已知 bug 和优化局部的引用方式 - ---- - -## 其它问题 - -1. IOS 或者其它设备无法全屏播放,或者点击全屏按钮的时候也只是显示竖屏? - -> 方案与问题所在: - -一般情况下可能是开启了强制竖屏(也就是屏幕锁定)打开后就会竖屏而不会全屏了!如下关闭就可以了: -参考 issues: https://github.com/langyuxiansheng/vue-aliplayer-v2/issues/25 - --开启了屏幕锁定,只要上拉控制中心,点击屏幕锁定关闭就可以了! - --也可能是播放器或者浏览器兼容性问题. +- v2 仅支持 Vue 3。 +- 入口从 Vue 2 插件模式迁移为 Vue 3 `app.use(...)`。 +- 组件 ref 需要通过 `ref` 使用。 +- 旧版本用户请安装 `vue-aliplayer-v2@1.x`。 diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index ba17966..0000000 --- a/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/app' - ] -} diff --git a/dist/assets/index-BwNqcy-4.css b/dist/assets/index-BwNqcy-4.css new file mode 100644 index 0000000..1591011 --- /dev/null +++ b/dist/assets/index-BwNqcy-4.css @@ -0,0 +1 @@ +.vue-aliplayer-v2[data-v-cf852d0d]{width:100%}*{box-sizing:border-box}body{color:oklch(24% .018 235);background:linear-gradient(oklch(97% .012 225),oklch(94% .018 210) 58%,oklch(95% .011 145));min-width:320px;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,system-ui,sans-serif;overflow-x:hidden}button,input,select,textarea{font:inherit}.demo-page[data-v-308d3b6d]{width:min(1500px,100vw - 32px);margin:0 auto;padding:22px 0 40px}.app-header[data-v-308d3b6d],.status-strip[data-v-308d3b6d],.player-panel[data-v-308d3b6d],.event-panel[data-v-308d3b6d],.config-panel[data-v-308d3b6d],.inspector[data-v-308d3b6d]{background:oklch(99% .006 225);border:1px solid oklch(84% .018 225);box-shadow:0 18px 48px oklch(40% .05 230/.1)}.app-header[data-v-308d3b6d]{border-radius:8px;justify-content:space-between;align-items:center;gap:18px;padding:18px 20px;display:flex}.brand-block[data-v-308d3b6d]{gap:4px;display:grid}.version[data-v-308d3b6d]{color:oklch(40% .06 170);background:oklch(94% .045 165);border-radius:999px;width:fit-content;padding:4px 8px;font-size:12px;font-weight:700}h1[data-v-308d3b6d],h2[data-v-308d3b6d],p[data-v-308d3b6d]{margin:0}h1[data-v-308d3b6d]{color:oklch(21% .02 235);font-size:26px;line-height:1.2}h2[data-v-308d3b6d]{color:oklch(25% .018 235);font-size:16px;line-height:1.3}.header-actions[data-v-308d3b6d],.transport[data-v-308d3b6d],.section-head[data-v-308d3b6d],.tabs[data-v-308d3b6d],.segmented[data-v-308d3b6d]{align-items:center;display:flex}.header-actions[data-v-308d3b6d],.transport[data-v-308d3b6d]{flex-wrap:wrap;gap:8px}.button[data-v-308d3b6d],.text-button[data-v-308d3b6d],.tabs button[data-v-308d3b6d],.segmented button[data-v-308d3b6d]{color:oklch(27% .02 235);cursor:pointer;background:oklch(99% .004 225);border:1px solid oklch(78% .024 225);border-radius:7px;min-height:36px;transition:border-color .18s ease-out,color .18s ease-out,background .18s ease-out,transform .18s ease-out}.button[data-v-308d3b6d]{padding:0 14px;font-weight:700}.button[data-v-308d3b6d]:hover,.text-button[data-v-308d3b6d]:hover,.tabs button[data-v-308d3b6d]:hover,.segmented button[data-v-308d3b6d]:hover{color:oklch(36% .1 170);border-color:oklch(59% .13 170)}.button[data-v-308d3b6d]:active,.text-button[data-v-308d3b6d]:active,.tabs button[data-v-308d3b6d]:active,.segmented button[data-v-308d3b6d]:active{transform:translateY(1px)}.button[data-v-308d3b6d]:disabled{cursor:not-allowed;opacity:.45}.primary[data-v-308d3b6d]{color:oklch(98% .006 170);background:oklch(48% .12 170);border-color:oklch(53% .13 170)}.secondary[data-v-308d3b6d]{background:oklch(97% .01 225)}.icon-button[data-v-308d3b6d]{min-width:72px}.text-button[data-v-308d3b6d]{color:oklch(39% .06 170);background:0 0;min-height:30px;padding:0 10px;font-size:12px;font-weight:700}.status-strip[data-v-308d3b6d]{border-radius:8px;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;margin-top:14px;display:grid;overflow:hidden}.status-strip article[data-v-308d3b6d]{background:oklch(98% .007 225);gap:6px;min-height:72px;padding:14px 16px;display:grid}.status-strip span[data-v-308d3b6d],.player-panel-head p[data-v-308d3b6d],.field span[data-v-308d3b6d],.switch span[data-v-308d3b6d],.log-list time[data-v-308d3b6d]{color:oklch(48% .025 235);font-size:12px}.status-strip strong[data-v-308d3b6d]{color:oklch(24% .02 235);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:16px;line-height:1.2;overflow:hidden}.workspace[data-v-308d3b6d]{grid-template-columns:minmax(0,1fr) 430px;gap:16px;margin-top:16px;display:grid}.stage-column[data-v-308d3b6d]{gap:16px;min-width:0;display:grid}.player-panel[data-v-308d3b6d],.event-panel[data-v-308d3b6d],.config-panel[data-v-308d3b6d],.inspector[data-v-308d3b6d]{border-radius:8px;min-width:0}.player-panel[data-v-308d3b6d]{overflow:hidden}.player-panel-head[data-v-308d3b6d]{border-bottom:1px solid oklch(87% .016 225);justify-content:space-between;align-items:center;gap:16px;padding:16px 18px;display:flex}.player-panel-head>div[data-v-308d3b6d]{gap:4px;min-width:0;display:grid}.player-panel-head p[data-v-308d3b6d]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.player-frame[data-v-308d3b6d]{background:radial-gradient(circle at 0 0,oklch(83% .06 172/.2),#0000 30%),oklch(18% .015 235);min-height:460px;padding:14px;overflow:hidden}.player-frame.is-multiple[data-v-308d3b6d]{min-height:360px}.player[data-v-308d3b6d]{background:oklch(13% .014 235);border:1px solid oklch(30% .025 235);border-radius:7px;width:100%;min-height:430px;overflow:hidden}.player-grid[data-v-308d3b6d]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.player-grid .player[data-v-308d3b6d]{min-height:250px}.empty-player[data-v-308d3b6d]{color:oklch(87% .01 225);background:oklch(17% .014 235);border:1px dashed oklch(43% .025 235);border-radius:7px;align-content:center;place-items:center;gap:8px;min-height:430px;display:grid}.empty-player span[data-v-308d3b6d]{color:oklch(70% .018 225);text-overflow:ellipsis;white-space:nowrap;max-width:70ch;font-size:12px;overflow:hidden}.transport[data-v-308d3b6d]{border-top:1px solid oklch(87% .016 225);padding:12px 14px 14px}.lower-grid[data-v-308d3b6d]{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:16px;display:grid}.event-panel[data-v-308d3b6d],.config-panel[data-v-308d3b6d]{min-width:0;padding:16px}.section-head[data-v-308d3b6d]{justify-content:space-between;gap:12px;margin-bottom:12px}.log-list[data-v-308d3b6d]{gap:8px;max-height:290px;margin:0;padding:0;list-style:none;display:grid;overflow:auto}.log-list li[data-v-308d3b6d]{color:oklch(28% .02 235);background:oklch(97% .008 225);border:1px solid oklch(88% .014 225);border-radius:6px;grid-template-columns:82px minmax(0,1fr);align-items:start;gap:10px;min-height:34px;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;display:grid}.log-list span[data-v-308d3b6d]{overflow-wrap:anywhere;min-width:0}.muted-row[data-v-308d3b6d]{color:oklch(52% .02 235);font-family:inherit!important;display:block!important}.config-panel pre[data-v-308d3b6d]{color:oklch(88% .02 155);background:oklch(18% .018 235);border-radius:7px;max-height:290px;margin:0;padding:12px;font-size:12px;line-height:1.55;overflow:auto}.inspector[data-v-308d3b6d]{align-self:start;max-height:calc(100vh - 28px);position:sticky;top:14px;overflow:hidden}.tabs[data-v-308d3b6d]{background:oklch(96% .01 225);border-bottom:1px solid oklch(87% .016 225);gap:6px;padding:10px}.tabs button[data-v-308d3b6d]{flex:1;min-width:0;padding:0 8px;font-size:13px;font-weight:700}.tabs button.active[data-v-308d3b6d],.segmented button.active[data-v-308d3b6d]{color:oklch(31% .09 170);background:oklch(93% .04 165);border-color:oklch(54% .12 170)}.panel-section[data-v-308d3b6d]{gap:16px;max-height:calc(100vh - 92px);padding:16px;display:grid;overflow:auto}.segmented[data-v-308d3b6d]{background:oklch(96% .01 225);border:1px solid oklch(86% .016 225);border-radius:8px;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:4px;display:grid}.segmented button[data-v-308d3b6d]{background:0 0;border-color:#0000;font-weight:700}.field-grid[data-v-308d3b6d],.switch-grid[data-v-308d3b6d]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.field[data-v-308d3b6d]{gap:6px;min-width:0;display:grid}.field input[data-v-308d3b6d],.field select[data-v-308d3b6d],.field textarea[data-v-308d3b6d]{color:oklch(24% .018 235);background:oklch(99% .005 225);border:1px solid oklch(78% .024 225);border-radius:7px;outline:none;width:100%;min-height:38px;padding:0 10px;transition:border-color .16s ease-out,box-shadow .16s ease-out}.field textarea[data-v-308d3b6d]{resize:vertical;min-height:90px;padding:10px;line-height:1.45}.field input[data-v-308d3b6d]:focus,.field select[data-v-308d3b6d]:focus,.field textarea[data-v-308d3b6d]:focus{border-color:oklch(55% .12 170);box-shadow:0 0 0 3px oklch(78% .09 170/.22)}.switch[data-v-308d3b6d]{background:oklch(98% .007 225);border:1px solid oklch(86% .016 225);border-radius:7px;justify-content:space-between;align-items:center;gap:10px;min-height:42px;padding:10px 12px;display:flex}.compact-switch[data-v-308d3b6d]{min-width:112px}.switch input[data-v-308d3b6d]{accent-color:oklch(49% .12 170);width:18px;height:18px}.error-line[data-v-308d3b6d]{color:oklch(43% .13 28);background:oklch(95% .04 35);border:1px solid oklch(82% .06 35);border-radius:7px;padding:10px 12px;font-size:12px}@media (width<=1180px){.workspace[data-v-308d3b6d],.lower-grid[data-v-308d3b6d]{grid-template-columns:1fr}.inspector[data-v-308d3b6d]{max-height:none;position:static}.panel-section[data-v-308d3b6d]{max-height:none}}@media (width<=780px){.demo-page[data-v-308d3b6d]{width:min(100vw - 20px,740px);padding-top:10px}.app-header[data-v-308d3b6d]{flex-direction:column;align-items:stretch}.header-actions[data-v-308d3b6d],.transport[data-v-308d3b6d]{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;display:grid}.header-actions .primary[data-v-308d3b6d]{grid-column:1/-1}.button[data-v-308d3b6d],.icon-button[data-v-308d3b6d]{min-width:0;padding-inline:8px}.player-panel-head[data-v-308d3b6d]{flex-direction:column;align-items:stretch}.status-strip[data-v-308d3b6d],.field-grid[data-v-308d3b6d],.switch-grid[data-v-308d3b6d],.player-grid[data-v-308d3b6d]{grid-template-columns:1fr}.player-frame[data-v-308d3b6d],.player[data-v-308d3b6d],.empty-player[data-v-308d3b6d],.player-grid .player[data-v-308d3b6d]{min-height:260px}.tabs[data-v-308d3b6d]{overflow-x:auto}.tabs button[data-v-308d3b6d]{min-width:74px}} diff --git a/dist/assets/index-Cx06WFub.js b/dist/assets/index-Cx06WFub.js new file mode 100644 index 0000000..21ef4f0 --- /dev/null +++ b/dist/assets/index-Cx06WFub.js @@ -0,0 +1,6 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,T=te(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),re=/\B([A-Z])/g,E=te(e=>e.replace(re,`-$1`).toLowerCase()),ie=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),ae=te(e=>e?`on${ie(e)}`:``),D=(e,t)=>!Object.is(e,t),O=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},A=e=>{let t=parseFloat(e);return isNaN(t)?e:t},oe,se=()=>oe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ce(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(ue);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function j(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nN(e,t))}var _e=e=>!!(e&&e.__v_isRef===!0),P=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?_e(e)?P(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>_e(t)?ve(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:_(t)?ye(t):v(t)&&!d(t)&&!C(t)?String(t):t,ye=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,F,be=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&F&&(F.active?(this.parent=F,this.index=(F.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(F===this)F=this.prevScope;else{let e=F;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ee){let e=Ee;for(Ee=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Te;){let t=Te;for(Te=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ae(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function je(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Pe(r),Fe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Me(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ne(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ne(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ve)||(e.globalVersion=Ve,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Me(e))))return;e.flags|=2;let t=e.dep,n=I,r=Ie;I=e,Ie=!0;try{Ae(e);let n=e.fn(e._value);(t.version===0||D(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{I=n,Ie=r,je(e),e.flags&=-3}}function Pe(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Pe(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ie=!0,Le=[];function Re(){Le.push(Ie),Ie=!1}function ze(){let e=Le.pop();Ie=e===void 0?!0:e}function Be(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=I;I=void 0;try{t()}finally{I=e}}}var Ve=0,He=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ue=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!I||!Ie||I===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==I)t=this.activeLink=new He(I,this),I.deps?(t.prevDep=I.depsTail,I.depsTail.nextDep=t,I.depsTail=t):I.deps=I.depsTail=t,We(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=I.depsTail,t.nextDep=void 0,I.depsTail.nextDep=t,I.depsTail=t,I.deps===t&&(I.deps=e)}return t}trigger(e){this.version++,Ve++,this.notify(e)}notify(e){Oe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ke()}}};function We(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)We(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ge=new WeakMap,Ke=Symbol(``),qe=Symbol(``),Je=Symbol(``);function L(e,t,n){if(Ie&&I){let t=Ge.get(e);t||Ge.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ue),r.map=t,r.key=n),r.track()}}function Ye(e,t,n,r,i,a){let o=Ge.get(e);if(!o){Ve++;return}let s=e=>{e&&e.trigger()};if(Oe(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Je||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Je)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`delete`:i||(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`set`:f(e)&&s(o.get(Ke));break}}ke()}function Xe(e){let t=R(e);return t===e?t:(L(t,`iterate`,Je),It(e)?t:t.map(zt))}function Ze(e){return L(e=R(e),`iterate`,Je),e}function Qe(e,t){return Ft(e)?Bt(Pt(e)?zt(t):t):zt(t)}var $e={__proto__:null,[Symbol.iterator](){return et(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Xe(this).concat(...e.map(e=>d(e)?Xe(e):e))},entries(){return et(this,`entries`,e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return nt(this,`every`,e,t,void 0,arguments)},filter(e,t){return nt(this,`filter`,e,t,e=>e.map(e=>Qe(this,e)),arguments)},find(e,t){return nt(this,`find`,e,t,e=>Qe(this,e),arguments)},findIndex(e,t){return nt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return nt(this,`findLast`,e,t,e=>Qe(this,e),arguments)},findLastIndex(e,t){return nt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return nt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return it(this,`includes`,e)},indexOf(...e){return it(this,`indexOf`,e)},join(e){return Xe(this).join(e)},lastIndexOf(...e){return it(this,`lastIndexOf`,e)},map(e,t){return nt(this,`map`,e,t,void 0,arguments)},pop(){return at(this,`pop`)},push(...e){return at(this,`push`,e)},reduce(e,...t){return rt(this,`reduce`,e,t)},reduceRight(e,...t){return rt(this,`reduceRight`,e,t)},shift(){return at(this,`shift`)},some(e,t){return nt(this,`some`,e,t,void 0,arguments)},splice(...e){return at(this,`splice`,e)},toReversed(){return Xe(this).toReversed()},toSorted(e){return Xe(this).toSorted(e)},toSpliced(...e){return Xe(this).toSpliced(...e)},unshift(...e){return at(this,`unshift`,e)},values(){return et(this,`values`,e=>Qe(this,e))}};function et(e,t,n){let r=Ze(e),i=r[t]();return r!==e&&!It(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var tt=Array.prototype;function nt(e,t,n,r,i,a){let o=Ze(e),s=o!==e&&!It(e),c=o[t];if(c!==tt[t]){let t=c.apply(e,a);return s?zt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,Qe(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function rt(e,t,n,r){let i=Ze(e),a=i!==e&&!It(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=Qe(e,t)),n.call(this,t,Qe(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?Qe(e,c):c}function it(e,t,n){let r=R(e);L(r,`iterate`,Je);let i=r[t](...n);return(i===-1||i===!1)&&Lt(n[0])?(n[0]=R(n[0]),r[t](...n)):i}function at(e,t,n=[]){Re(),Oe();let r=R(e)[t].apply(e,n);return ke(),ze(),r}var ot=e(`__proto__,__v_isRef,__isVue`),st=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function ct(e){_(e)||(e=String(e));let t=R(this);return L(t,`has`,e),t.hasOwnProperty(e)}var lt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Dt:Et:i?Tt:wt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=$e[t]))return e;if(t===`hasOwnProperty`)return ct}let o=Reflect.get(e,t,z(e)?e:n);if((_(t)?st.has(t):ot(t))||(r||L(e,`get`,t),i))return o;if(z(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Mt(e):e}return v(o)?r?Mt(o):At(o):o}},ut=class extends lt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Ft(i);if(!It(n)&&!Ft(n)&&(i=R(i),n=R(n)),!a&&z(i)&&!z(n))return e||(i.value=n),!0}let o=a?Number(t)e,gt=e=>Reflect.getPrototypeOf(e);function _t(e,t,n){return function(...r){let i=this.__v_raw,a=R(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?ht:t?Bt:zt;return!t&&L(a,`iterate`,l?qe:Ke),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function vt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function yt(e,t){let n={get(n){let r=this.__v_raw,i=R(r),a=R(n);e||(D(n,a)&&L(i,`get`,n),L(i,`get`,a));let{has:o}=gt(i),s=t?ht:e?Bt:zt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&L(R(t),`iterate`,Ke),t.size},has(t){let n=this.__v_raw,r=R(n),i=R(t);return e||(D(t,i)&&L(r,`has`,t),L(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=R(a),s=t?ht:e?Bt:zt;return!e&&L(o,`iterate`,Ke),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:vt(`add`),set:vt(`set`),delete:vt(`delete`),clear:vt(`clear`)}:{add(e){let n=R(this),r=gt(n),i=R(e),a=!t&&!It(e)&&!Ft(e)?i:e;return r.has.call(n,a)||D(e,a)&&r.has.call(n,e)||D(i,a)&&r.has.call(n,i)||(n.add(a),Ye(n,`add`,a,a)),this},set(e,n){!t&&!It(n)&&!Ft(n)&&(n=R(n));let r=R(this),{has:i,get:a}=gt(r),o=i.call(r,e);o||=(e=R(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?D(n,s)&&Ye(r,`set`,e,n,s):Ye(r,`add`,e,n),this},delete(e){let t=R(this),{has:n,get:r}=gt(t),i=n.call(t,e);i||=(e=R(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Ye(t,`delete`,e,void 0,a),o},clear(){let e=R(this),t=e.size!==0,n=e.clear();return t&&Ye(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=_t(r,e,t)}),n}function bt(e,t){let n=yt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var xt={get:bt(!1,!1)},St={get:bt(!1,!0)},Ct={get:bt(!0,!1)},wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap;function Ot(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function kt(e){return e.__v_skip||!Object.isExtensible(e)?0:Ot(S(e))}function At(e){return Ft(e)?e:Nt(e,!1,ft,xt,wt)}function jt(e){return Nt(e,!1,mt,St,Tt)}function Mt(e){return Nt(e,!0,pt,Ct,Et)}function Nt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=kt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Pt(e){return Ft(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ft(e){return!!(e&&e.__v_isReadonly)}function It(e){return!!(e&&e.__v_isShallow)}function Lt(e){return e?!!e.__v_raw:!1}function R(e){let t=e&&e.__v_raw;return t?R(t):e}function Rt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&k(e,`__v_skip`,!0),e}var zt=e=>v(e)?At(e):e,Bt=e=>v(e)?Mt(e):e;function z(e){return e?e.__v_isRef===!0:!1}function B(e){return Vt(e,!1)}function Vt(e,t){return z(e)?e:new Ht(e,t)}var Ht=class{constructor(e,t){this.dep=new Ue,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:R(e),this._value=t?e:zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||It(e)||Ft(e);e=n?e:R(e),D(e,t)&&(this._rawValue=e,this._value=n?e:zt(e),this.dep.trigger())}};function Ut(e){return z(e)?e.value:e}var Wt={get:(e,t,n)=>t===`__v_raw`?e:Ut(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return z(i)&&!z(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Gt(e){return Pt(e)?e:new Proxy(e,Wt)}var Kt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ue(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ve-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&I!==this)return De(this,!0),!0}get value(){let e=this.dep.track();return Ne(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function qt(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Kt(r,i,n)}var Jt={},Yt=new WeakMap,Xt=void 0;function Zt(e,t=!1,n=Xt){if(n){let t=Yt.get(n);t||Yt.set(n,t=[]),t.push(e)}}function Qt(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:It(e)||o===!1||o===0?$t(e,1):$t(e),m,g,_,v,y=!1,b=!1;if(z(e)?(g=()=>e.value,y=It(e)):Pt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Pt(e)||It(e)),g=()=>e.map(e=>{if(z(e))return e.value;if(Pt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Re();try{_()}finally{ze()}}let t=Xt;Xt=m;try{return f?f(e,3,[v]):e(v)}finally{Xt=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>$t(e(),t)}let x=xe(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(Jt):Jt,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>D(e,C[t])):D(e,C))){_&&_();let t=Xt;Xt=m;try{let t=[e,C===Jt?void 0:b&&C[0]===Jt?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{Xt=t}}}else m.run()};return u&&u(w),m=new Ce(g),m.scheduler=l?()=>l(w,!1):w,v=e=>Zt(e,!1,m),_=m.onStop=()=>{let e=Yt.get(m);if(e){if(f)f(e,4);else for(let t of e)t();Yt.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function $t(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,z(e))$t(e.value,t,n);else if(d(e))for(let r=0;r{$t(e,t,n)});else if(C(e)){for(let r in e)$t(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&$t(e[r],t,n)}return e}function en(e,t,n,r){try{return r?e(...r):e()}catch(e){nn(e,t,n)}}function tn(e,t,n,r){if(h(e)){let i=en(e,t,n,r);return i&&y(i)&&i.catch(e=>{nn(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=V[r],a=vn(i);a=vn(n)?V.push(e):V.splice(fn(t),0,e),e.flags|=1,mn()}}function mn(){un||=ln.then(yn)}function hn(e){d(e)?on.push(...e):sn&&e.id===-1?sn.splice(cn+1,0,e):e.flags&1||(on.push(e),e.flags|=1),mn()}function gn(e,t,n=an+1){for(;nvn(e)-vn(t));if(on.length=0,sn){sn.push(...e);return}for(sn=e,cn=0;cne.id==null?e.flags&2?-1:1/0:e.id;function yn(e){try{for(an=0;an{r._d&&Ei(-1);let i=Sn(t),a;try{a=e(...n)}finally{Sn(i),r._d&&Ei(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function H(e,n){if(bn===null)return e;let r=la(bn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}var Dn=Symbol.for(`v-scx`),On=()=>En(Dn);function kn(e,t,n){return An(e,t,n)}function An(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(ea){if(c===`sync`){let e=On();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=X;u.call=(e,t,n)=>tn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{W(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():pn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=Qt(e,n,u);return ea&&(f?f.push(h):d&&h()),h}function jn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Mn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=Zi(this),s=An(i,a.bind(r),n);return o(),s}function Mn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Fn=Symbol(`_leaveCb`);function In(e,t){e.shapeFlag&6&&e.component?(e.transition=t,In(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ln(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Rn(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function zn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Bn=new WeakMap;function Vn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Vn(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Un(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Vn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?la(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=R(v),b=v===t?i:e=>zn(_,e)?!1:u(y,e),x=(e,t)=>!(t&&zn(_,t));if(m!=null&&m!==p){if(Hn(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(z(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))en(p,f,12,[l,_]);else{let t=g(p),n=z(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Bn.delete(e)};t.id=-1,Bn.set(e,t),W(t,r)}else Hn(e),i()}}}function Hn(e){let t=Bn.get(e);t&&(t.flags|=8,Bn.delete(e))}se().requestIdleCallback,se().cancelIdleCallback;var Un=e=>!!e.type.__asyncLoader,Wn=e=>e.type.__isKeepAlive;function Gn(e,t){qn(e,`a`,t)}function Kn(e,t){qn(e,`da`,t)}function qn(e,t,n=X){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Yn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Wn(e.parent.vnode)&&Jn(r,t,n,e),e=e.parent}}function Jn(e,t,n,r){let i=Yn(t,e,r,!0);nr(()=>{c(r[t],i)},n)}function Yn(e,t,n=X,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Re();let i=Zi(n),a=tn(t,n,e,r);return i(),ze(),a};return r?i.unshift(a):i.push(a),a}}var Xn=e=>(t,n=X)=>{(!ea||e===`sp`)&&Yn(e,(...e)=>t(...e),n)},Zn=Xn(`bm`),Qn=Xn(`m`),$n=Xn(`bu`),er=Xn(`u`),tr=Xn(`bum`),nr=Xn(`um`),rr=Xn(`sp`),ir=Xn(`rtg`),ar=Xn(`rtc`);function or(e,t=X){Yn(`ec`,e,t)}var sr=Symbol.for(`v-ndc`);function cr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Pt(e),r=!1,s=!1;n&&(r=!It(e),s=Ft(e),e=Ze(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?$i(e)?la(e):lr(e.parent):null,ur=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lr(e.parent),$root:e=>lr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>yr(e),$forceUpdate:e=>e.f||=()=>{pn(e.update)},$nextTick:e=>e.n||=dn.bind(e.proxy),$watch:e=>jn.bind(e)}),dr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),fr={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(dr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else mr&&(s[n]=0)}let d=ur[n],f,p;if(d)return n===`$attrs`&&L(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return dr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||dr(n,c)||u(o,c)||u(i,c)||u(ur,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function pr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var mr=!0;function hr(e){let t=yr(e),n=e.proxy,i=e.ctx;mr=!1,t.beforeCreate&&_r(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:ne,errorCaptured:T,serverPrefetch:re,expose:E,inheritAttrs:ie,components:ae,directives:D,filters:O}=t;if(u&&gr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=At(t))}if(mr=!0,o)for(let e in o){let t=o[e],a=Z({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)vr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Tn(t,e[t])})}f&&_r(f,e,`c`);function k(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(Zn,p),k(Qn,m),k($n,g),k(er,_),k(Gn,y),k(Kn,b),k(or,T),k(ar,te),k(ir,ne),k(tr,S),k(nr,w),k(rr,re),d(E))if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};ee&&e.render===r&&(e.render=ee),ie!=null&&(e.inheritAttrs=ie),ae&&(e.components=ae),D&&(e.directives=D),re&&Rn(e)}function gr(e,t,n=r){d(e)&&(e=wr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?En(r.from||n,r.default,!0):En(r.from||n):En(r),z(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function _r(e,t,n){tn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function vr(e,t,n,r){let i=r.includes(`.`)?Mn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&kn(i,n)}else if(h(e))kn(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>vr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&kn(i,r,e)}}function yr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>br(c,e,o,!0)),br(c,t,o)),v(t)&&a.set(t,c),c}function br(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&br(e,a,n,!0),i&&i.forEach(t=>br(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=xr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var xr={data:Sr,props:Er,emits:Er,methods:Tr,computed:Tr,beforeCreate:U,created:U,beforeMount:U,mounted:U,beforeUpdate:U,updated:U,beforeDestroy:U,beforeUnmount:U,destroyed:U,unmounted:U,activated:U,deactivated:U,errorCaptured:U,serverPrefetch:U,components:Tr,directives:Tr,watch:Dr,provide:Sr,inject:Cr};function Sr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Cr(e,t){return Tr(wr(e),wr(t))}function wr(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Nr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Mr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(A)));let c,l=i[c=ae(n)]||i[c=ae(T(n))];!l&&o&&(l=i[c=ae(E(n))]),l&&tn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,tn(u,e,6,a)}}var Pr=new WeakMap;function Fr(e,t,n=!1){let r=n?Pr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Fr(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Ir(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,E(t))||u(e,t))}function Lr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Sn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Bi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Bi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Rr(c)}}catch(t){Ci.length=0,nn(t,e,1),v=Ni(xi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=zr(y,a)),b=Ii(b,y,!1,!0))}return n.dirs&&(b=Ii(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&In(b,n.transition),v=b,Sn(_),v}var Rr=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},zr=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Br(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Vr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Wr),Kr=e=>Object.getPrototypeOf(e)===Wr;function qr(e,t,n,r=!1){let i={},a=Gr();e.propsDefaults=Object.create(null),Yr(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:jt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function Jr(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=R(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Qr(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,ti=e=>d(e)?e.map(Bi):[Bi(e)],ni=(e,t,n)=>{if(t._n)return t;let r=Cn((...e)=>ti(t(...e)),n);return r._c=!1,r},ri=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ei(n))continue;let i=e[n];if(h(i))t[n]=ni(n,i,r);else if(i!=null){let e=ti(i);t[n]=()=>e}}},ii=(e,t)=>{let n=ti(t);e.slots.default=()=>n},ai=(e,t,n)=>{for(let r in t)(n||!ei(r))&&(e[r]=t[r])},oi=(e,t,n)=>{let r=e.slots=Gr();if(e.vnode.shapeFlag&32){let e=t._;e?(ai(r,t,n),n&&k(r,`_`,e,!0)):ri(t,r)}else t&&ii(e,t)},si=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:ai(a,n,r):(o=!n.$stable,ri(n,a)),s=n}else n&&(ii(e,n),s={default:1});if(o)for(let e in a)!ei(e)&&s[e]==null&&delete a[e]},W=yi;function ci(e){return li(e)}function li(e,i){let a=se();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ai(e,t)&&(r=N(e),j(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case bi:y(e,t,n,r);break;case xi:b(e,t,n,r);break;case Si:e??x(t,n,r,o);break;case G:ae(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?D(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,P)}u!=null&&i?Vn(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Vn(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),re(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&T(e.children,d,null,r,i,ui(e,a),s,u),_&&wn(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Wi(f,r,e)}_&&wn(e,null,r,`beforeMount`);let v=fi(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&W(()=>{try{f&&Wi(f,r,e),v&&g.enter(d),_&&wn(e,null,r,`mounted`)}finally{}},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&di(r,!1),(g=h.onVnodeBeforeUpdate)&&Wi(g,r,n,e),f&&wn(n,e,r,`beforeUpdate`),r&&di(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?E(e.dynamicChildren,d,l,r,i,ui(n,a),o):s||le(e,n,l,null,r,i,ui(n,a),o,!1),u>0){if(u&16)ie(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&Wi(g,r,n,e),f&&wn(n,e,r,`updated`)},i)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!ee(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ee(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ae=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),T(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&pi(e,t,!0)):le(e,t,n,f,i,a,s,c,l)},D=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):A(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=qi(e,r,i);if(Wn(e)&&(s.ctx.renderer=P),ta(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,oe,o),!e.el){let r=s.subTree=Ni(xi);b(null,r,t,n),e.placeholder=r.el}}else oe(s,e,t,n,i,a,o)},A=(e,t,n)=>{let r=t.component=e.component;if(Br(e,t,n))if(r.asyncDep&&!r.asyncResolved){ce(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},oe=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=hi(e);if(n){t&&(t.el=c.el,ce(e,t,o)),n.asyncDep.then(()=>{W(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;di(e,!1),t?(t.el=c.el,ce(e,t,o)):t=c,n&&O(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Wi(d,s,t,c),di(e,!0);let f=Lr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),N(p),e,i,a),t.el=f.el,u===null&&Ur(e,f.el),r&&W(r,i),(d=t.props&&t.props.onVnodeUpdated)&&W(()=>Wi(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Un(t);if(di(e,!1),l&&O(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Wi(o,d,t),di(e,!0),s&&ye){let t=()=>{e.subTree=Lr(e),ye(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Lr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&W(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;W(()=>Wi(o,d,e),i)}(t.shapeFlag&256||d&&Un(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&W(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ce(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>pn(u),di(e,!0),l()},ce=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Jr(e,t.props,r,n),si(e,t.children,n),Re(),gn(e),ze()},le=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){de(l,d,n,r,i,a,o,s,c);return}else if(f&256){ue(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&M(l,i,a),d!==l&&p(n,d)):u&16?m&16?de(l,d,n,r,i,a,o,s,c):M(l,i,a,!0):(u&8&&p(n,``),m&16&&T(d,n,r,i,a,o,s,c))},ue=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?M(e,a,o,!0,!1,f):T(t,r,i,a,o,s,c,l,f)},de=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?Vi(t[u]):Bi(t[u]);if(Ai(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?Vi(t[p]):Bi(t[p]);if(Ai(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)j(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Vi(t[u]):Bi(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){j(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ai(n,t[_])){i=_;break}i===void 0?j(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?mi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){fe(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,P);return}if(c===G){o(a,t,n);for(let e=0;el.enter(a),i);else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{a._isLeaving&&a[Fn](!0),r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},j=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Re(),Vn(s,null,n,e,!0),ze()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Un(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Wi(_,t,e),u&6)he(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&wn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,P,r):l&&!l.hasOnce&&(a!==G||d>0&&d&64)?M(l,t,n,!1,!0):(a===G&&d&384||!i&&u&16)&&M(c,t,n),r&&pe(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&W(()=>{_&&Wi(_,t,e),h&&wn(e,null,t,`unmounted`),v&&(e.el=null)},n)},pe=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===G){me(n,r);return}if(t===Si){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},me=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},he=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;gi(c),gi(l),r&&O(r),i.stop(),a&&(a.flags|=8,j(o,e,t,n)),s&&W(s,t),W(()=>{e.isUnmounted=!0},t)},M=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return N(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Nn];return n?h(n):t},ge=!1,_e=(e,t,n)=>{let r;e==null?t._vnode&&(j(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ge||=(ge=!0,gn(r),_n(),!1)},P={p:v,um:j,m:fe,r:pe,mt:k,mc:T,pc:le,pbc:E,n:N,o:e},ve,ye;return i&&([ve,ye]=i(P)),{render:_e,hydrate:ve,createApp:Ar(_e,ve)}}function ui({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function di({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function hi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hi(t)}function gi(e){if(e)for(let t=0;te.__isSuspense;function yi(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):hn(e)}var G=Symbol.for(`v-fgt`),bi=Symbol.for(`v-txt`),xi=Symbol.for(`v-cmt`),Si=Symbol.for(`v-stc`),Ci=[],K=null;function q(e=!1){Ci.push(K=e?null:[])}function wi(){Ci.pop(),K=Ci[Ci.length-1]||null}var Ti=1;function Ei(e,t=!1){Ti+=e,e<0&&K&&t&&(K.hasOnce=!0)}function Di(e){return e.dynamicChildren=Ti>0?K||n:null,wi(),Ti>0&&K&&K.push(e),e}function J(e,t,n,r,i,a){return Di(Y(e,t,n,r,i,a,!0))}function Oi(e,t,n,r,i){return Di(Ni(e,t,n,r,i,!0))}function ki(e){return e?e.__v_isVNode===!0:!1}function Ai(e,t){return e.type===t.type&&e.key===t.key}var ji=({key:e})=>e??null,Mi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||z(e)||h(e)?{i:bn,r:e,k:t,f:!!n}:e);function Y(e,t=null,n=null,r=0,i=null,a=e===G?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ji(t),ref:t&&Mi(t),scopeId:xn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:bn};return s?(Hi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Ti>0&&!o&&K&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&K.push(c),c}var Ni=Pi;function Pi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===sr)&&(e=xi),ki(e)){let r=Ii(e,t,!0);return n&&Hi(r,n),Ti>0&&!a&&K&&(r.shapeFlag&6?K[K.indexOf(e)]=r:K.push(r)),r.patchFlag=-2,r}if(ua(e)&&(e=e.__vccOpts),t){t=Fi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=j(e)),v(n)&&(Lt(n)&&!d(n)&&(n=s({},n)),t.style=ce(n))}let o=g(e)?1:vi(e)?128:Pn(e)?64:v(e)?4:h(e)?2:0;return Y(e,t,n,r,i,o,a,!0)}function Fi(e){return e?Lt(e)||Kr(e)?s({},e):e:null}function Ii(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Ui(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ji(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Mi(t)):[a,Mi(t)]:Mi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==G?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ii(e.ssContent),ssFallback:e.ssFallback&&Ii(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&In(u,c.clone(u)),u}function Li(e=` `,t=0){return Ni(bi,null,e,t)}function Ri(e,t){let n=Ni(Si,null,e);return n.staticCount=t,n}function zi(e=``,t=!1){return t?(q(),Oi(xi,null,e)):Ni(xi,null,e)}function Bi(e){return e==null||typeof e==`boolean`?Ni(xi):d(e)?Ni(G,null,e.slice()):ki(e)?Vi(e):Ni(bi,null,String(e))}function Vi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ii(e)}function Hi(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Hi(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Kr(t)?t._ctx=bn:r===3&&bn&&(bn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:bn},n=32):(t=String(t),r&64?(n=16,t=[Li(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ui(...e){let t={};for(let n=0;nX||bn,Yi,Xi;{let e=se(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Yi=t(`__VUE_INSTANCE_SETTERS__`,e=>X=e),Xi=t(`__VUE_SSR_SETTERS__`,e=>ea=e)}var Zi=e=>{let t=X;return Yi(e),e.scope.on(),()=>{e.scope.off(),Yi(t)}},Qi=()=>{X&&X.scope.off(),Yi(null)};function $i(e){return e.vnode.shapeFlag&4}var ea=!1;function ta(e,t=!1,n=!1){t&&Xi(t);let{props:r,children:i}=e.vnode,a=$i(e);qr(e,r,a,t),oi(e,i,n||t);let o=a?na(e,t):void 0;return t&&Xi(!1),o}function na(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,fr);let{setup:r}=n;if(r){Re();let n=e.setupContext=r.length>1?ca(e):null,i=Zi(e),a=en(r,e,0,[e.props,n]),o=y(a);if(ze(),i(),(o||e.sp)&&!Un(e)&&Rn(e),o){if(a.then(Qi,Qi),t)return a.then(n=>{ra(e,n,t)}).catch(t=>{nn(t,e,0)});e.asyncDep=a}else ra(e,a,t)}else oa(e,t)}function ra(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Gt(t)),oa(e,n)}var ia,aa;function oa(e,t,n){let i=e.type;if(!e.render){if(!t&&ia&&!i.render){let t=i.template||yr(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=ia(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,aa&&aa(e)}{let t=Zi(e);Re();try{hr(e)}finally{ze(),t()}}}var sa={get(e,t){return L(e,`get`,``),e[t]}};function ca(e){return{attrs:new Proxy(e.attrs,sa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function la(e){return e.exposed?e.exposeProxy||=new Proxy(Gt(Rt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ur)return ur[n](e)},has(e,t){return t in e||t in ur}}):e.proxy}function ua(e){return h(e)&&`__vccOpts`in e}var Z=(e,t)=>qt(e,t,ea),da=`3.5.34`,fa=void 0,pa=typeof window<`u`&&window.trustedTypes;if(pa)try{fa=pa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ma=fa?e=>fa.createHTML(e):e=>e,ha=`http://www.w3.org/2000/svg`,ga=`http://www.w3.org/1998/Math/MathML`,_a=typeof document<`u`?document:null,va=_a&&_a.createElement(`template`),ya={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?_a.createElementNS(ha,e):t===`mathml`?_a.createElementNS(ga,e):n?_a.createElement(e,{is:n}):_a.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>_a.createTextNode(e),createComment:e=>_a.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>_a.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{va.innerHTML=ma(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=va.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ba=Symbol(`_vtc`);function xa(e,t,n){let r=e[ba];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Sa=Symbol(`_vod`),Ca=Symbol(`_vsh`),wa=Symbol(``),Ta=/(?:^|;)\s*display\s*:/;function Ea(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Oa(r,t,``)}else for(let e in t)n[e]??Oa(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Oa(r,i,``):Ma(e,i,!g(t)&&t?t[i]:void 0,o)||Oa(r,i,o)}}else if(i){if(t!==n){let e=r[wa];e&&(n+=`;`+e),r.cssText=n,a=Ta.test(n)}}else t&&e.removeAttribute(`style`);Sa in e&&(e[Sa]=a?r.display:``,e[Ca]&&(r.display=`none`))}var Da=/\s*!important$/;function Oa(e,t,n){if(d(n))n.forEach(n=>Oa(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=ja(e,t);Da.test(n)?e.setProperty(E(r),n.replace(Da,``),`important`):e[r]=n}}var ka=[`Webkit`,`Moz`,`ms`],Aa={};function ja(e,t){let n=Aa[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Aa[t]=r;r=ie(r);for(let n=0;nHa||=(Ua.then(()=>Ha=0),Date.now());function Ga(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;tn(Ka(e,n.value),t,5,[e])};return n.value=e,n.attached=Wa(),n}function Ka(e,t){if(d(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var qa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ja=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?xa(e,r,c):t===`style`?Ea(e,n,r):a(t)?o(t)||za(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Ya(e,t,r,c))?(Fa(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Pa(e,t,r,c,s,t!==`value`)):e._isVueCE&&(Xa(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Fa(e,T(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Pa(e,t,r,c))};function Ya(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&qa(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return qa(t)&&g(n)?!1:t in e}function Xa(e,t){let n=e._def.props;if(!n)return!1;let r=T(t);return Array.isArray(n)?n.some(e=>T(e)===r):Object.keys(n).some(e=>T(e)===r)}var Za=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>O(t,e):t};function Qa(e){e.target.composing=!0}function $a(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var eo=Symbol(`_assign`);function to(e,t,n){return t&&(e=e.trim()),n&&(e=A(e)),e}var Q={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[eo]=Za(i);let a=r||i.props&&i.props.type===`number`;Ia(e,t?`change`:`input`,t=>{t.target.composing||e[eo](to(e.value,n,a))}),(n||a)&&Ia(e,`change`,()=>{e.value=to(e.value,n,a)}),t||(Ia(e,`compositionstart`,Qa),Ia(e,`compositionend`,$a),Ia(e,`change`,$a))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[eo]=Za(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?A(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},$={deep:!0,created(e,t,n){e[eo]=Za(n),Ia(e,`change`,()=>{let t=e._modelValue,n=ao(e),r=e.checked,i=e[eo];if(d(t)){let e=ge(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(oo(e,r))})},mounted:no,beforeUpdate(e,t,n){e[eo]=Za(n),no(e,t,n)}};function no(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=ge(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=N(t,oo(e,!0))}e.checked!==i&&(e.checked=i)}var ro={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=p(t);Ia(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?A(ao(e)):ao(e));e[eo](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,dn(()=>{e._assigning=!1})}),e[eo]=Za(r)},mounted(e,{value:t}){io(e,t)},beforeUpdate(e,t,n){e[eo]=Za(n)},updated(e,{value:t}){e._assigning||io(e,t)}};function io(e,t){let n=e.multiple,r=d(t);if(!(n&&!r&&!p(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=ge(t,o)>-1}else a.selected=t.has(o);else if(N(ao(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ao(e){return`_value`in e?e._value:e.value}function oo(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var so=s({patchProp:Ja},ya),co;function lo(){return co||=ci(so)}var uo=((...e)=>{let t=lo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=po(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,fo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function fo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function po(e){return g(e)?document.querySelector(e):e}var mo=`2.37.0`,ho=`https://g.alicdn.com/apsara-media-box/imp-web-player/${mo}/skins/default/aliplayer-min.css`,go=`https://g.alicdn.com/apsara-media-box/imp-web-player/${mo}/aliplayer-min.js`,_o=new Map;function vo(e){return`https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/skins/default/aliplayer-min.css`}function yo(e){return`https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/aliplayer-min.js`}function bo(e){if(!e||document.querySelector(`link[data-vue-aliplayer-v2-css="${e}"]`))return;let t=document.createElement(`link`);t.type=`text/css`,t.rel=`stylesheet`,t.href=e,t.dataset.vueAliplayerV2Css=e,document.head.appendChild(t)}function xo(e,t){if(!e||t&&window[t])return Promise.resolve();if(_o.has(e))return _o.get(e);let n=document.querySelector(`script[data-vue-aliplayer-v2-js="${e}"]`);if(n){let t=new Promise((t,r)=>{if(n.dataset.vueAliplayerV2Loaded===`true`){t();return}n.addEventListener(`load`,()=>{n.dataset.vueAliplayerV2Loaded=`true`,t()},{once:!0}),n.addEventListener(`error`,()=>r(Error(`Failed to load Aliplayer SDK: ${e}`)),{once:!0})});return _o.set(e,t),t}let r=new Promise((t,n)=>{let r=document.createElement(`script`);r.type=`text/javascript`,r.src=e,r.dataset.vueAliplayerV2Js=e,r.addEventListener(`load`,()=>{r.dataset.vueAliplayerV2Loaded=`true`,t()},{once:!0}),r.addEventListener(`error`,()=>n(Error(`Failed to load Aliplayer SDK: ${e}`)),{once:!0}),document.documentElement.appendChild(r)});return _o.set(e,r),r}async function So(e,t){bo(e),await xo(t,`Aliplayer`)}async function Co(e=[]){for(let t of e)await xo(t)}var wo=[`m3u8`,`flv`,`mp4`,`rtmp`,`mp3`];function To(e){if(!e)return null;if(/^rtmps?:\/\//i.test(e))return`rtmp`;let t=e.split(`?`)[0].split(`#`)[0].toLowerCase();return wo.find(e=>e&&t.endsWith(`.${e}`))||null}function Eo(e){if(!e)return e||null;if(/^(data|blob):/i.test(e))return e;try{return encodeURI(e)}catch{return e}}var Do=[`videocloud.cn-hangzhou.log.aliyuncs.com/logstores/newplayer/track`],Oo=!1;function ko(e,t){return t.some(t=>typeof t==`string`?e.includes(t):t.test(e))}function Ao(e=Do){if(Oo)return;Oo=!0;let t=window.fetch?.bind(window);t&&(window.fetch=((n,r)=>ko(typeof n==`string`||n instanceof URL?String(n):n.url,e)?Promise.resolve(new Response(null,{status:204,statusText:`No Content`})):t(n,r)));let n=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(t,r,i,a,o){this.__vueAliplayerV2Blocked=ko(String(r),e),n.call(this,t,r,i??!0,a??void 0,o??void 0)},XMLHttpRequest.prototype.send=function(e){this.__vueAliplayerV2Blocked||r.call(this,e)}}var jo=Ln({name:`VueAliplayerV2`,__name:`index`,props:{autoFormat:{type:Boolean,default:!0},forbidFastForward:{type:Boolean,default:!1},license:{default:null},lowLatency:{type:Boolean,default:!1},normalizeSourceUrl:{type:Boolean,default:!0},options:{default:null},source:{default:null},sdkVersion:{default:mo},cssLink:{default:``},scriptSrc:{default:``},componentScripts:{default:()=>[]},disableTracking:{type:Boolean,default:!1},trackingUrlPatterns:{default:()=>[]}},emits:[`ready`,`play`,`pause`,`canplay`,`playing`,`ended`,`liveStreamStop`,`onM3u8Retry`,`hideBar`,`showBar`,`waiting`,`timeupdate`,`snapshoted`,`requestFullScreen`,`cancelFullScreen`,`error`,`startSeek`,`completeSeek`,`sdk-error`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=B(null),o=B(null),s=B(!1),c=B(null),l=0,u=`player-${Math.random().toString(36).slice(2).toUpperCase()}`,d=[`ready`,`play`,`pause`,`canplay`,`playing`,`ended`,`liveStreamStop`,`onM3u8Retry`,`hideBar`,`showBar`,`waiting`,`timeupdate`,`snapshoted`,`requestFullScreen`,`cancelFullScreen`,`error`,`startSeek`,`completeSeek`],f=Z(()=>r.cssLink||(r.sdkVersion?vo(r.sdkVersion):ho)),p=Z(()=>r.scriptSrc||(r.sdkVersion?yo(r.sdkVersion):go)),m=Z(()=>r.normalizeSourceUrl?Eo(r.source):r.source),h=Z(()=>To(m.value)),g=Z(()=>{let e={width:`100%`,autoplay:!0,...r.options||{},...r.license?{license:r.license}:{},...m.value?{source:m.value}:{},id:u};return r.autoFormat&&h.value&&!e.format&&(e.format=h.value),r.lowLatency&&e.isLive&&h.value===`flv`&&(e.enableStashBufferForFlv=e.enableStashBufferForFlv??!1,e.stashInitialSizeForFlv=e.stashInitialSizeForFlv??128),e});function _(){return a.value}function v(){a.value&&(a.value.dispose(),a.value=null,c.value=null)}function y(e){d.forEach(t=>{e.on(t,e=>{i(t,e)})})}function b(e){if(!r.forbidFastForward)return;let t=0,n=0;e.on(`timeupdate`,()=>{let r=e.getCurrentTime();if(r-t>2){e.seek(t);return}t=r,t>=n&&(n=t)})}function x(){if(s.value||!window.Aliplayer||!o.value)return;v();let e=window.Aliplayer({...g.value});a.value=e,c.value=h.value,y(e),b(e)}async function S(){let e=++l;try{if(r.disableTracking&&Ao(r.trackingUrlPatterns),await So(f.value,p.value),await Co(r.componentScripts),await dn(),s.value||e!==l)return;x()}catch(e){i(`sdk-error`,e instanceof Error?e:Error(String(e)))}}async function C(e){if(e&&a.value){a.value.loadByUrl(r.normalizeSourceUrl&&Eo(e)||e);return}await S()}async function w(e){await C(e)}function ee(){a.value?.play()}function te(){a.value?.pause()}function ne(){a.value?.replay()}function T(e){a.value?.seek(e)}function re(){return a.value?.getCurrentTime()}function E(){return a.value?.getDuration()}function ie(){return a.value?.getVolume()}function ae(e){a.value?.setVolume(e)}function D(e,t){a.value?.loadByUrl(e,t)}function O(e,t){a.value?.replayByVidAndPlayAuth(e,t)}function k(e,t,n,r,i,o){a.value?.replayByVidAndAuthInfo(e,t,n,r,i,o)}function A(e,t){a.value?.setPlayerSize(e,t)}function oe(e){a.value?.setSpeed(e)}function se(e,t,n){a.value?.setSanpshotProperties(e,t,n)}function ce(){a.value?.fullscreenService?.requestFullScreen()}function le(){a.value?.fullscreenService?.cancelFullScreen()}function ue(){return a.value?.fullscreenService?.getIsFullScreen()}function de(){return a.value?.getStatus()}function fe(e,t){a.value?.liveShiftSerivce?.setLiveTimeRange(e,t)}function j(e){a.value?.setRotate(e)}function pe(){return a.value?.getRotate()}function me(e){a.value?.setImage(e)}function he(e){a.value?.setCover(e)}function M(e){a.value?.setProgressMarkers(e)}function N(e){a.value?.setPreviewTime(e)}function ge(){return a.value?.getPreviewTime()}function _e(){return a.value?.isPreview()}function P(e,t){a.value?.off?.(e,t)}return Qn(()=>{S()}),kn(()=>m.value,e=>{if(!e)return;let t=To(e);if(a.value&&t&&t===c.value){a.value.loadByUrl(e);return}S()}),kn(()=>[r.options,r.forbidFastForward,r.license,r.lowLatency,r.autoFormat,r.sdkVersion,r.cssLink,r.scriptSrc,r.componentScripts,r.disableTracking,r.trackingUrlPatterns],()=>{S()},{deep:!0}),tr(()=>{s.value=!0,l+=1,v()}),t({getPlayer:_,init:S,initPlayer:x,reload:C,retry:w,play:ee,pause:te,replay:ne,seek:T,getCurrentTime:re,getDuration:E,getVolume:ie,setVolume:ae,loadByUrl:D,replayByVidAndPlayAuth:O,replayByVidAndAuthInfo:k,setPlayerSize:A,setSpeed:oe,setSanpshotProperties:se,requestFullScreen:ce,cancelFullScreen:le,getIsFullScreen:ue,getStatus:de,setLiveTimeRange:fe,setRotate:j,getRotate:pe,setImage:me,dispose:v,setCover:he,setProgressMarkers:M,setPreviewTime:N,getPreviewTime:ge,isPreview:_e,off:P}),(e,t)=>(q(),J(`div`,{id:u,ref_key:`containerRef`,ref:o,class:`vue-aliplayer-v2`},null,512))}}),Mo=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},No=Mo(jo,[[`__scopeId`,`data-v-cf852d0d`]]),Po={sdkVersion:mo,cssLink:ho,scriptSrc:go,componentScripts:[],disableTracking:!1,trackingUrlPatterns:[]},Fo=No;Fo.install=(e,t)=>{Object.assign(Po,t||{}),e.component(`VueAliplayerV2`,Fo)},Fo.props.cssLink.default=()=>Po.cssLink,Fo.props.scriptSrc.default=()=>Po.scriptSrc,Fo.props.sdkVersion.default=()=>Po.sdkVersion,Fo.props.componentScripts.default=()=>Po.componentScripts,Fo.props.disableTracking.default=()=>Po.disableTracking,Fo.props.trackingUrlPatterns.default=()=>Po.trackingUrlPatterns,Fo.Player=Fo;var Io={class:`demo-page`},Lo={class:`app-header`},Ro={class:`header-actions`},zo=[`disabled`],Bo={class:`status-strip`},Vo={class:`workspace`},Ho={class:`stage-column`},Uo={class:`player-panel`},Wo={class:`player-panel-head`},Go={class:`switch compact-switch`},Ko={key:0,class:`player-grid`},qo={key:1,class:`empty-player`},Jo={class:`transport`},Yo=[`disabled`],Xo=[`disabled`],Zo=[`disabled`],Qo=[`disabled`],$o=[`disabled`],es=[`disabled`],ts={class:`lower-grid`},ns={class:`event-panel`},rs={class:`section-head`},is={class:`log-list`},as={key:0,class:`muted-row`},os={class:`config-panel`},ss={class:`inspector`},cs={class:`tabs`,role:`tablist`,"aria-label":`参数分组`},ls=[`onClick`],us={key:0,class:`panel-section`},ds={class:`segmented`},fs=[`onClick`],ps={key:0,class:`field`},ms=[`value`],hs={key:1,class:`field`},gs={key:2,class:`field-grid`},_s={class:`field`},vs={class:`field`},ys={class:`field`},bs={key:3,class:`field-grid`},xs={class:`field`},Ss={class:`field`},Cs={class:`field`},ws={class:`field`},Ts={class:`field`},Es={key:1,class:`panel-section`},Ds={class:`switch-grid`},Os={class:`switch`},ks={class:`switch`},As={class:`switch`},js={class:`switch`},Ms={class:`switch`},Ns={class:`switch`},Ps={class:`switch`},Fs={class:`switch`},Is={class:`field-grid`},Ls={class:`field`},Rs={class:`field`},zs={class:`field`},Bs={class:`field`},Vs={class:`field`},Hs={class:`field`},Us={key:2,class:`panel-section`},Ws={class:`switch-grid`},Gs={class:`switch`},Ks={class:`switch`},qs={class:`switch`},Js={class:`switch`},Ys={class:`field-grid`},Xs={class:`field`},Zs={class:`field`},Qs={class:`field`},$s={class:`field`},ec={class:`field`},tc={class:`field`},nc={key:3,class:`panel-section`},rc={class:`field-grid`},ic={class:`field`},ac={class:`field`},oc={class:`field`},sc={class:`field`},cc={class:`switch-grid`},lc={class:`switch`},uc={class:`switch`},dc={key:4,class:`panel-section`},fc={class:`field-grid`},pc={class:`field`},mc={class:`field`},hc={class:`field`},gc={class:`field`},_c={key:0,class:`error-line`};uo(Mo(Ln({__name:`App`,setup(e){let t=B(null),n=B(!0),r=B(!1),i=B(`source`),a=B(`url`),o=B(`//player.alicdn.com/video/aliyunmedia.mp4`),s=B(``),c=B(`init`),l=B([]),u=B(`2.37.0`),d=B(!0),f=B(!0),p=B(!0),m=B(!1),h=B(!1),g=B(``),_=B(``),v=B(`auto`),y=B(128),b=B(``),x=B(``),S=B(``),C=B(`center`),w=B(0),ee=B(`10,30,60`),te=B(`{ + "diagnosisButtonVisible": true +}`),ne=B(``),T=0,re=[{label:`源`,value:`source`},{label:`基础`,value:`basic`},{label:`直播`,value:`live`},{label:`SDK`,value:`sdk`},{label:`皮肤`,value:`skin`}],E=[{label:`URL`,value:`url`},{label:`VID`,value:`vid`},{label:`STS`,value:`sts`}],ie=[{label:`MP4 演示源`,value:`//player.alicdn.com/video/aliyunmedia.mp4`},{label:`MP4 备用源`,value:`//yunqivedio.alicdn.com/user-upload/nXPDX8AASx.mp4`},{label:`M3U8 直播源`,value:`//ivi.bupt.edu.cn/hls/cctv1.m3u8`}],ae=[`//player.alicdn.com/video/aliyunmedia.mp4`,`//yunqivedio.alicdn.com/user-upload/nXPDX8AASx.mp4`,`//player.alicdn.com/video/aliyunmedia.mp4`,`//yunqivedio.alicdn.com/user-upload/nXPDX8AASx.mp4`],D=At({width:`100%`,height:`420px`,autoplay:!0,isLive:!1,useH5Prism:!0,useFlashPrism:!1,playsinline:!0,preload:!0,rePlay:!1,disableSeek:!1,enableSystemMenu:!1,controlBarVisibility:`hover`,showBarTime:5e3,language:`zh-cn`,cover:``}),O=At({domain:``,key:``}),k=At({vid:``,playauth:``,authTimeout:7200}),A=At({vid:``,region:`cn-shanghai`,accessKeyId:``,accessKeySecret:``,securityToken:``}),oe=Z(()=>E.find(e=>e.value===a.value)?.label||`URL`),se=Z(()=>a.value===`url`?s.value.trim()||o.value:null),ce=Z(()=>To(se.value)),le=Z(()=>g.value.split(` +`).map(e=>e.trim()).filter(Boolean)),ue=Z(()=>!O.domain.trim()||!O.key.trim()?null:{domain:O.domain.trim(),key:O.key.trim()}),de=Z(()=>{if(C.value!==`default`)return C.value===`hidden`?!1:C.value===`minimal`?[{name:`bigPlayButton`,align:`cc`},{name:`controlBar`,align:`blabs`,x:0,y:0,children:[{name:`progress`,align:`blabs`,x:0,y:44},{name:`playButton`,align:`tl`,x:12,y:12},{name:`timeDisplay`,align:`tl`,x:48,y:10},{name:`fullScreenButton`,align:`tr`,x:12,y:12}]}]:[{name:`bigPlayButton`,align:`cc`}]}),fe=Z(()=>ee.value.split(`,`).map(e=>Number(e.trim())).filter(e=>Number.isFinite(e)&&e>0).map((e,t)=>({offset:e,text:`Marker ${t+1}`}))),pe=Z(()=>{if(ne.value=``,!te.value.trim())return{};try{return JSON.parse(te.value)}catch(e){return ne.value=e instanceof Error?e.message:String(e),{}}}),me=Z(()=>{let e={...D,...pe.value};return D.cover||delete e.cover,_.value&&(e.format=_.value),v.value!==`auto`&&(e.enableStashBufferForFlv=v.value===`on`),y.value>0&&(e.stashInitialSizeForFlv=y.value),b.value.trim()&&(e.rtsVersion=b.value.trim()),x.value.trim()&&(e.liveStartTime=x.value.trim()),S.value.trim()&&(e.liveOverTime=S.value.trim()),de.value!==void 0&&(e.skinLayout=de.value),w.value>0&&(e.previewTime=w.value),fe.value.length&&(e.progressMarkers=fe.value),a.value===`vid`&&(e.vid=k.vid.trim(),e.playauth=k.playauth.trim(),e.authTimeout=k.authTimeout),a.value===`sts`&&(e.vid=A.vid.trim(),e.region=A.region.trim(),e.accessKeyId=A.accessKeyId.trim(),e.accessKeySecret=A.accessKeySecret.trim(),e.securityToken=A.securityToken.trim()),e}),he=Z(()=>JSON.stringify({source:se.value,options:me.value,license:ue.value,sdkVersion:u.value,autoFormat:d.value,lowLatency:f.value,normalizeSourceUrl:p.value,disableTracking:h.value,componentScripts:le.value},null,2));function M(e){l.value=[{id:`${Date.now()}-${T++}`,time:new Date().toLocaleTimeString(),message:e},...l.value].slice(0,10)}function N(){c.value=`ready`,M(`ready`)}function ge(){let e=t.value?.getCurrentTime();typeof e==`number`&&Math.floor(e)%15==0&&(c.value=`playing ${Math.floor(e)}s`)}function _e(e){c.value=`error`,M(`error ${JSON.stringify(e||{})}`)}function ve(e){c.value=`sdk-error`,M(`sdk-error ${e.message}`)}function ye(){t.value?.seek(15),M(`seek 15s`)}function F(){t.value?.requestFullScreen(),M(`fullscreen`)}function be(){c.value=t.value?.getStatus()||`unknown`,M(`status ${c.value}`)}function xe(){navigator.clipboard?.writeText(he.value),M(`config copied`)}function I(){a.value=`url`,o.value=ie[0].value,s.value=``,u.value=`2.37.0`,d.value=!0,f.value=!0,p.value=!0,m.value=!1,h.value=!1,_.value=``,v.value=`auto`,y.value=128,b.value=``,x.value=``,S.value=``,C.value=`center`,w.value=0,ee.value=`10,30,60`,te.value=`{ + "diagnosisButtonVisible": true +}`,g.value=``,O.domain=``,O.key=``,Object.assign(D,{width:`100%`,height:`420px`,autoplay:!0,isLive:!1,useH5Prism:!0,useFlashPrism:!1,playsinline:!0,preload:!0,rePlay:!1,disableSeek:!1,enableSystemMenu:!1,controlBarVisibility:`hover`,showBarTime:5e3,language:`zh-cn`,cover:``}),M(`reset`)}return(e,T)=>(q(),J(`main`,Io,[Y(`header`,Lo,[T[55]||=Y(`div`,{class:`brand-block`},[Y(`span`,{class:`version`},`vue-aliplayer-v2`),Y(`h1`,null,`Aliplayer Vue 3 Workbench`)],-1),Y(`div`,Ro,[Y(`button`,{type:`button`,class:`button secondary`,onClick:I},`重置`),Y(`button`,{type:`button`,class:`button secondary`,onClick:T[0]||=e=>n.value=!n.value},P(n.value?`销毁`:`挂载`),1),Y(`button`,{type:`button`,class:`button primary`,disabled:r.value||!n.value,onClick:T[1]||=e=>t.value?.retry(se.value||void 0)},`重试`,8,zo)])]),Y(`section`,Bo,[Y(`article`,null,[T[56]||=Y(`span`,null,`SDK`,-1),Y(`strong`,null,P(u.value),1)]),Y(`article`,null,[T[57]||=Y(`span`,null,`播放模式`,-1),Y(`strong`,null,P(oe.value),1)]),Y(`article`,null,[T[58]||=Y(`span`,null,`推断格式`,-1),Y(`strong`,null,P(ce.value||`未识别`),1)]),Y(`article`,null,[T[59]||=Y(`span`,null,`播放器状态`,-1),Y(`strong`,null,P(c.value),1)]),Y(`article`,null,[T[60]||=Y(`span`,null,`事件`,-1),Y(`strong`,null,P(l.value.length),1)])]),Y(`section`,Vo,[Y(`div`,Ho,[Y(`section`,Uo,[Y(`div`,Wo,[Y(`div`,null,[Y(`h2`,null,P(r.value?`多实例验证`:`单实例调试`),1),Y(`p`,null,P(se.value||`VID / STS 初始化模式`),1)]),Y(`label`,Go,[T[61]||=Y(`span`,null,`多实例`,-1),H(Y(`input`,{"onUpdate:modelValue":T[2]||=e=>r.value=e,type:`checkbox`},null,512),[[$,r.value]])])]),Y(`div`,{class:j([`player-frame`,{"is-multiple":r.value}])},[n.value?(q(),J(G,{key:0},[r.value?(q(),J(`div`,Ko,[(q(),J(G,null,cr(ae,e=>Ni(Ut(Fo),{key:e,class:`player`,source:e,options:me.value,license:ue.value,"sdk-version":u.value,"component-scripts":le.value,"auto-format":d.value,"normalize-source-url":p.value,"disable-tracking":h.value,"low-latency":f.value,"forbid-fast-forward":m.value,onReady:N,onError:_e,onSdkError:ve},null,8,[`source`,`options`,`license`,`sdk-version`,`component-scripts`,`auto-format`,`normalize-source-url`,`disable-tracking`,`low-latency`,`forbid-fast-forward`])),64))])):(q(),Oi(Ut(Fo),{key:1,ref_key:`playerRef`,ref:t,class:`player`,source:se.value,options:me.value,license:ue.value,"sdk-version":u.value,"component-scripts":le.value,"auto-format":d.value,"normalize-source-url":p.value,"disable-tracking":h.value,"low-latency":f.value,"forbid-fast-forward":m.value,onReady:N,onPlay:T[3]||=e=>M(`play`),onPause:T[4]||=e=>M(`pause`),onEnded:T[5]||=e=>M(`ended`),onWaiting:T[6]||=e=>M(`waiting`),onTimeupdate:ge,onError:_e,onSdkError:ve},null,8,[`source`,`options`,`license`,`sdk-version`,`component-scripts`,`auto-format`,`normalize-source-url`,`disable-tracking`,`low-latency`,`forbid-fast-forward`]))],64)):(q(),J(`div`,qo,[T[62]||=Y(`strong`,null,`播放器未挂载`,-1),Y(`span`,null,P(se.value||`等待初始化参数`),1)]))],2),Y(`div`,Jo,[Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:T[7]||=e=>t.value?.play()},`播放`,8,Yo),Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:T[8]||=e=>t.value?.pause()},`暂停`,8,Xo),Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:T[9]||=e=>t.value?.replay()},`重播`,8,Zo),Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:ye},`跳转`,8,Qo),Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:F},`全屏`,8,$o),Y(`button`,{type:`button`,class:`button icon-button`,disabled:r.value||!n.value,onClick:be},`状态`,8,es)])]),Y(`section`,ts,[Y(`article`,ns,[Y(`div`,rs,[T[63]||=Y(`h2`,null,`事件流`,-1),Y(`button`,{type:`button`,class:`text-button`,onClick:T[10]||=e=>l.value=[]},`清空`)]),Y(`ol`,is,[(q(!0),J(G,null,cr(l.value,e=>(q(),J(`li`,{key:e.id},[Y(`time`,null,P(e.time),1),Y(`span`,null,P(e.message),1)]))),128)),l.value.length?zi(``,!0):(q(),J(`li`,as,`暂无事件`))])]),Y(`article`,os,[Y(`div`,{class:`section-head`},[T[64]||=Y(`h2`,null,`配置预览`,-1),Y(`button`,{type:`button`,class:`text-button`,onClick:xe},`复制`)]),Y(`pre`,null,P(he.value),1)])])]),Y(`aside`,ss,[Y(`div`,cs,[(q(),J(G,null,cr(re,e=>Y(`button`,{key:e.value,type:`button`,class:j({active:i.value===e.value}),onClick:t=>i.value=e.value},P(e.label),11,ls)),64))]),i.value===`source`?(q(),J(`section`,us,[T[75]||=Y(`h2`,null,`播放源`,-1),Y(`div`,ds,[(q(),J(G,null,cr(E,e=>Y(`button`,{key:e.value,type:`button`,class:j({active:a.value===e.value}),onClick:t=>a.value=e.value},P(e.label),11,fs)),64))]),a.value===`url`?(q(),J(`label`,ps,[T[65]||=Y(`span`,null,`预设源`,-1),H(Y(`select`,{"onUpdate:modelValue":T[11]||=e=>o.value=e},[(q(),J(G,null,cr(ie,e=>Y(`option`,{key:e.value,value:e.value},P(e.label),9,ms)),64))],512),[[ro,o.value]])])):zi(``,!0),a.value===`url`?(q(),J(`label`,hs,[T[66]||=Y(`span`,null,`自定义 URL`,-1),H(Y(`input`,{"onUpdate:modelValue":T[12]||=e=>s.value=e,type:`url`,placeholder:`https://example.com/video.mp4`},null,512),[[Q,s.value]])])):zi(``,!0),a.value===`vid`?(q(),J(`div`,gs,[Y(`label`,_s,[T[67]||=Y(`span`,null,`VID`,-1),H(Y(`input`,{"onUpdate:modelValue":T[13]||=e=>k.vid=e,type:`text`,placeholder:`1e067a2831b641db...`},null,512),[[Q,k.vid]])]),Y(`label`,vs,[T[68]||=Y(`span`,null,`PlayAuth`,-1),H(Y(`input`,{"onUpdate:modelValue":T[14]||=e=>k.playauth=e,type:`text`,placeholder:`Base64 PlayAuth`},null,512),[[Q,k.playauth]])]),Y(`label`,ys,[T[69]||=Y(`span`,null,`Auth Timeout`,-1),H(Y(`input`,{"onUpdate:modelValue":T[15]||=e=>k.authTimeout=e,type:`number`,min:`60`,step:`60`},null,512),[[Q,k.authTimeout,void 0,{number:!0}]])])])):zi(``,!0),a.value===`sts`?(q(),J(`div`,bs,[Y(`label`,xs,[T[70]||=Y(`span`,null,`VID`,-1),H(Y(`input`,{"onUpdate:modelValue":T[16]||=e=>A.vid=e,type:`text`},null,512),[[Q,A.vid]])]),Y(`label`,Ss,[T[71]||=Y(`span`,null,`Region`,-1),H(Y(`input`,{"onUpdate:modelValue":T[17]||=e=>A.region=e,type:`text`,placeholder:`cn-shanghai`},null,512),[[Q,A.region]])]),Y(`label`,Cs,[T[72]||=Y(`span`,null,`AccessKey ID`,-1),H(Y(`input`,{"onUpdate:modelValue":T[18]||=e=>A.accessKeyId=e,type:`text`},null,512),[[Q,A.accessKeyId]])]),Y(`label`,ws,[T[73]||=Y(`span`,null,`AccessKey Secret`,-1),H(Y(`input`,{"onUpdate:modelValue":T[19]||=e=>A.accessKeySecret=e,type:`password`},null,512),[[Q,A.accessKeySecret]])]),Y(`label`,Ts,[T[74]||=Y(`span`,null,`Security Token`,-1),H(Y(`textarea`,{"onUpdate:modelValue":T[20]||=e=>A.securityToken=e,rows:`3`},null,512),[[Q,A.securityToken]])])])):zi(``,!0)])):zi(``,!0),i.value===`basic`?(q(),J(`section`,Es,[T[92]||=Y(`h2`,null,`基础`,-1),Y(`div`,Ds,[Y(`label`,Os,[T[76]||=Y(`span`,null,`自动播放`,-1),H(Y(`input`,{"onUpdate:modelValue":T[21]||=e=>D.autoplay=e,type:`checkbox`},null,512),[[$,D.autoplay]])]),Y(`label`,ks,[T[77]||=Y(`span`,null,`直播`,-1),H(Y(`input`,{"onUpdate:modelValue":T[22]||=e=>D.isLive=e,type:`checkbox`},null,512),[[$,D.isLive]])]),Y(`label`,As,[T[78]||=Y(`span`,null,`H5`,-1),H(Y(`input`,{"onUpdate:modelValue":T[23]||=e=>D.useH5Prism=e,type:`checkbox`},null,512),[[$,D.useH5Prism]])]),Y(`label`,js,[T[79]||=Y(`span`,null,`Flash`,-1),H(Y(`input`,{"onUpdate:modelValue":T[24]||=e=>D.useFlashPrism=e,type:`checkbox`},null,512),[[$,D.useFlashPrism]])]),Y(`label`,Ms,[T[80]||=Y(`span`,null,`循环`,-1),H(Y(`input`,{"onUpdate:modelValue":T[25]||=e=>D.rePlay=e,type:`checkbox`},null,512),[[$,D.rePlay]])]),Y(`label`,Ns,[T[81]||=Y(`span`,null,`预加载`,-1),H(Y(`input`,{"onUpdate:modelValue":T[26]||=e=>D.preload=e,type:`checkbox`},null,512),[[$,D.preload]])]),Y(`label`,Ps,[T[82]||=Y(`span`,null,`内联播放`,-1),H(Y(`input`,{"onUpdate:modelValue":T[27]||=e=>D.playsinline=e,type:`checkbox`},null,512),[[$,D.playsinline]])]),Y(`label`,Fs,[T[83]||=Y(`span`,null,`禁用 Seek`,-1),H(Y(`input`,{"onUpdate:modelValue":T[28]||=e=>D.disableSeek=e,type:`checkbox`},null,512),[[$,D.disableSeek]])])]),Y(`div`,Is,[Y(`label`,Ls,[T[84]||=Y(`span`,null,`宽度`,-1),H(Y(`input`,{"onUpdate:modelValue":T[29]||=e=>D.width=e,type:`text`},null,512),[[Q,D.width]])]),Y(`label`,Rs,[T[85]||=Y(`span`,null,`高度`,-1),H(Y(`input`,{"onUpdate:modelValue":T[30]||=e=>D.height=e,type:`text`},null,512),[[Q,D.height]])]),Y(`label`,zs,[T[87]||=Y(`span`,null,`语言`,-1),H(Y(`select`,{"onUpdate:modelValue":T[31]||=e=>D.language=e},[...T[86]||=[Y(`option`,{value:`zh-cn`},`zh-cn`,-1),Y(`option`,{value:`en-us`},`en-us`,-1)]],512),[[ro,D.language]])]),Y(`label`,Bs,[T[89]||=Y(`span`,null,`控制栏`,-1),H(Y(`select`,{"onUpdate:modelValue":T[32]||=e=>D.controlBarVisibility=e},[...T[88]||=[Y(`option`,{value:`hover`},`hover`,-1),Y(`option`,{value:`click`},`click`,-1),Y(`option`,{value:`always`},`always`,-1)]],512),[[ro,D.controlBarVisibility]])]),Y(`label`,Vs,[T[90]||=Y(`span`,null,`隐藏延迟`,-1),H(Y(`input`,{"onUpdate:modelValue":T[33]||=e=>D.showBarTime=e,type:`number`,min:`0`,step:`500`},null,512),[[Q,D.showBarTime,void 0,{number:!0}]])]),Y(`label`,Hs,[T[91]||=Y(`span`,null,`封面`,-1),H(Y(`input`,{"onUpdate:modelValue":T[34]||=e=>D.cover=e,type:`url`,placeholder:`https://...`},null,512),[[Q,D.cover]])])])])):zi(``,!0),i.value===`live`?(q(),J(`section`,Us,[T[105]||=Y(`h2`,null,`直播与格式`,-1),Y(`div`,Ws,[Y(`label`,Gs,[T[93]||=Y(`span`,null,`自动格式`,-1),H(Y(`input`,{"onUpdate:modelValue":T[35]||=e=>d.value=e,type:`checkbox`},null,512),[[$,d.value]])]),Y(`label`,Ks,[T[94]||=Y(`span`,null,`低延迟`,-1),H(Y(`input`,{"onUpdate:modelValue":T[36]||=e=>f.value=e,type:`checkbox`},null,512),[[$,f.value]])]),Y(`label`,qs,[T[95]||=Y(`span`,null,`URL 编码`,-1),H(Y(`input`,{"onUpdate:modelValue":T[37]||=e=>p.value=e,type:`checkbox`},null,512),[[$,p.value]])]),Y(`label`,Js,[T[96]||=Y(`span`,null,`禁快进`,-1),H(Y(`input`,{"onUpdate:modelValue":T[38]||=e=>m.value=e,type:`checkbox`},null,512),[[$,m.value]])])]),Y(`div`,Ys,[Y(`label`,Xs,[T[98]||=Y(`span`,null,`格式`,-1),H(Y(`select`,{"onUpdate:modelValue":T[39]||=e=>_.value=e},[...T[97]||=[Ri(``,6)]],512),[[ro,_.value]])]),Y(`label`,Zs,[T[100]||=Y(`span`,null,`FLV stash`,-1),H(Y(`select`,{"onUpdate:modelValue":T[40]||=e=>v.value=e},[...T[99]||=[Y(`option`,{value:`auto`},`auto`,-1),Y(`option`,{value:`on`},`on`,-1),Y(`option`,{value:`off`},`off`,-1)]],512),[[ro,v.value]])]),Y(`label`,Qs,[T[101]||=Y(`span`,null,`stash size`,-1),H(Y(`input`,{"onUpdate:modelValue":T[41]||=e=>y.value=e,type:`number`,min:`0`,step:`32`},null,512),[[Q,y.value,void 0,{number:!0}]])]),Y(`label`,$s,[T[102]||=Y(`span`,null,`RTS 版本`,-1),H(Y(`input`,{"onUpdate:modelValue":T[42]||=e=>b.value=e,type:`text`,placeholder:`2.2.1`},null,512),[[Q,b.value]])]),Y(`label`,ec,[T[103]||=Y(`span`,null,`时移开始`,-1),H(Y(`input`,{"onUpdate:modelValue":T[43]||=e=>x.value=e,type:`text`,placeholder:`2026/05/23 10:00:00`},null,512),[[Q,x.value]])]),Y(`label`,tc,[T[104]||=Y(`span`,null,`时移结束`,-1),H(Y(`input`,{"onUpdate:modelValue":T[44]||=e=>S.value=e,type:`text`,placeholder:`2026/05/23 12:00:00`},null,512),[[Q,S.value]])])])])):zi(``,!0),i.value===`sdk`?(q(),J(`section`,nc,[T[112]||=Y(`h2`,null,`SDK 与扩展`,-1),Y(`div`,rc,[Y(`label`,ic,[T[106]||=Y(`span`,null,`SDK 版本`,-1),H(Y(`input`,{"onUpdate:modelValue":T[45]||=e=>u.value=e,type:`text`},null,512),[[Q,u.value]])]),Y(`label`,ac,[T[107]||=Y(`span`,null,`License 域名`,-1),H(Y(`input`,{"onUpdate:modelValue":T[46]||=e=>O.domain=e,type:`text`,placeholder:`example.com`},null,512),[[Q,O.domain]])]),Y(`label`,oc,[T[108]||=Y(`span`,null,`License Key`,-1),H(Y(`input`,{"onUpdate:modelValue":T[47]||=e=>O.key=e,type:`password`},null,512),[[Q,O.key]])]),Y(`label`,sc,[T[109]||=Y(`span`,null,`组件脚本`,-1),H(Y(`textarea`,{"onUpdate:modelValue":T[48]||=e=>g.value=e,rows:`3`,placeholder:`每行一个脚本地址`},null,512),[[Q,g.value]])])]),Y(`div`,cc,[Y(`label`,lc,[T[110]||=Y(`span`,null,`拦截 track`,-1),H(Y(`input`,{"onUpdate:modelValue":T[49]||=e=>h.value=e,type:`checkbox`},null,512),[[$,h.value]])]),Y(`label`,uc,[T[111]||=Y(`span`,null,`系统菜单`,-1),H(Y(`input`,{"onUpdate:modelValue":T[50]||=e=>D.enableSystemMenu=e,type:`checkbox`},null,512),[[$,D.enableSystemMenu]])])])])):zi(``,!0),i.value===`skin`?(q(),J(`section`,dc,[T[118]||=Y(`h2`,null,`皮肤`,-1),Y(`div`,fc,[Y(`label`,pc,[T[114]||=Y(`span`,null,`大播放按钮`,-1),H(Y(`select`,{"onUpdate:modelValue":T[51]||=e=>C.value=e},[...T[113]||=[Y(`option`,{value:`default`},`default`,-1),Y(`option`,{value:`center`},`center`,-1),Y(`option`,{value:`minimal`},`minimal`,-1),Y(`option`,{value:`hidden`},`hidden`,-1)]],512),[[ro,C.value]])]),Y(`label`,mc,[T[115]||=Y(`span`,null,`试看时间`,-1),H(Y(`input`,{"onUpdate:modelValue":T[52]||=e=>w.value=e,type:`number`,min:`0`},null,512),[[Q,w.value,void 0,{number:!0}]])]),Y(`label`,hc,[T[116]||=Y(`span`,null,`打点秒数`,-1),H(Y(`input`,{"onUpdate:modelValue":T[53]||=e=>ee.value=e,type:`text`,placeholder:`10,30,60`},null,512),[[Q,ee.value]])])]),Y(`label`,gc,[T[117]||=Y(`span`,null,`自定义 options JSON`,-1),H(Y(`textarea`,{"onUpdate:modelValue":T[54]||=e=>te.value=e,rows:`8`,spellcheck:`false`},null,512),[[Q,te.value]])]),ne.value?(q(),J(`p`,_c,P(ne.value),1)):zi(``,!0)])):zi(``,!0)])])]))}}),[[`__scopeId`,`data-v-308d3b6d`]])).mount(`#app`); \ No newline at end of file diff --git a/dist/css/index.06951331.css b/dist/css/index.06951331.css deleted file mode 100644 index 3060944..0000000 --- a/dist/css/index.06951331.css +++ /dev/null @@ -1 +0,0 @@ -[data-v-9b14a31e]{margin:0;padding:0}.remove-text[data-v-9b14a31e]{text-align:center;padding:20px;font-size:24px}.player-btns[data-v-9b14a31e]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.player-btns span[data-v-9b14a31e]{margin:0 auto;display:inline-block;padding:5px 10px;width:150px;height:40px;line-height:40px;border:1px solid #eee;background:#e1e1e1;border-radius:10px;text-align:center;margin:20px auto;cursor:pointer} \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index 713914e..b91e83d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1,14 @@ -vue-aliplayer-v2
\ No newline at end of file + + + + + + + vue-aliplayer-v2 + + + + +
+ + diff --git a/dist/js/chunk-vendors.69bad5f4.js b/dist/js/chunk-vendors.69bad5f4.js deleted file mode 100644 index 27ba409..0000000 --- a/dist/js/chunk-vendors.69bad5f4.js +++ /dev/null @@ -1,8 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"02f2":function(t,e,n){var r=n("6077"),o=n("1277")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},"0614":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"0cc1":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},1277:function(t,e,n){var r=n("f341")("wks"),o=n("4d2c"),i=n("3f8b").Symbol,a="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},"17cb":function(t,e,n){var r=n("3f8b").document;t.exports=r&&r.documentElement},"1cd7":function(t,e,n){var r=n("3f8b"),o=r.navigator;t.exports=o&&o.userAgent||""},"1f9e":function(t,e,n){var r=n("6117"),o=n("8941"),i=n("c3a9");t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){while(u>f)if(s=c[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},"21cb":function(t,e,n){"use strict";var r=n("8451");function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},"22ae":function(t,e,n){var r=n("e85e"),o=n("dd80"),i=n("67c1"),a=n("8cac"),s=n("8941"),c=n("5fff"),u={},f={};e=t.exports=function(t,e,n,l,p){var d,v,h,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),_=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=s(t.length);d>_;_++)if(y=e?g(a(v=t[_])[0],v[1]):g(t[_]),y===u||y===f)return y}else for(h=m.call(t);!(v=h.next()).done;)if(y=o(h,g,v.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},2498:function(t,e,n){var r=n("3f8b"),o=n("da27"),i=n("b8ea"),a=n("a6d5"),s=n("e85e"),c="prototype",u=function(t,e,n){var f,l,p,d,v=t&u.F,h=t&u.G,y=t&u.S,m=t&u.P,g=t&u.B,_=h?r:y?r[e]||(r[e]={}):(r[e]||{})[c],b=h?o:o[e]||(o[e]={}),w=b[c]||(b[c]={});for(f in h&&(n=e),n)l=!v&&_&&void 0!==_[f],p=(l?_:n)[f],d=g&&l?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,_&&a(_,f,p,t&u.U),b[f]!=p&&i(b,f,d),m&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"25ae":function(t,e,n){t.exports=!n("f9a5")&&!n("0cc1")((function(){return 7!=Object.defineProperty(n("6618")("div"),"a",{get:function(){return 7}}).a}))},"2ab1":function(t,e,n){var r=n("da0b");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"2dbc":function(t,e,n){var r,o,i,a=n("e85e"),s=n("2f1e"),c=n("17cb"),u=n("6618"),f=n("3f8b"),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,y=0,m={},g="onreadystatechange",_=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){_.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n("6077")(l)?r=function(t){l.nextTick(a(_,t,1))}:h&&h.now?r=function(t){h.now(a(_,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r=g in u("script")?function(t){c.appendChild(u("script"))[g]=function(){c.removeChild(this),_.call(t)}}:function(t){setTimeout(a(_,t,1),0)}),t.exports={set:p,clear:d}},"2f1e":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},3038:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"3d87":function(t,e,n){var r=n("d3d8").f,o=n("549d"),i=n("1277")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"3f8b":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},4634:function(t,e,n){for(var r=n("96dd"),o=n("7d56"),i=n("a6d5"),a=n("3f8b"),s=n("b8ea"),c=n("e3b3"),u=n("1277"),f=u("iterator"),l=u("toStringTag"),p=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(d),h=0;h";e.style.display="none",n("17cb").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},6618:function(t,e,n){var r=n("da0b"),o=n("3f8b").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"67c1":function(t,e,n){var r=n("e3b3"),o=n("1277")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"6cc2":function(t,e){t.exports=!1},"6e6d":function(t,e,n){"use strict";(function(t){ -/*! - * Vue.js v2.6.10 - * (c) 2014-2019 Evan You - * Released under the MIT License. - */ -var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function v(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var x=/-(\w)/g,C=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),O=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),A=/\B([A-Z])/g,$=w((function(t){return t.replace(A,"-$1").toLowerCase()}));function S(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function k(t,e){return t.bind(e)}var j=Function.prototype.bind?k:S;function T(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function E(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,nt=Y&&Y.indexOf("edge/")>0,rt=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===Q),ot=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(J)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(Ca){}var ct=function(){return void 0===K&&(K=!J&&!Z&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),K},ut=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=I,vt=0,ht=function(){this.id=vt++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){g(this.subs,t)},ht.prototype.depend=function(){ht.target&&ht.target.addDep(this)},ht.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===$(t)){var c=te(String,o.type);(c<0||s0&&(a=Se(a,(e||"")+"_"+n),$e(a[0])&&$e(u)&&(f[c]=xt(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?$e(u)?f[c]=xt(u.text+a):""!==a&&f.push(xt(a)):$e(a)&&$e(u)?f[c]=xt(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function ke(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function je(t){var e=Te(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach((function(n){Lt(t,n,e[n])})),jt(!0))}function Te(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Le(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=Me(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),W(o,"$stable",a),W(o,"$key",s),W(o,"$hasNormal",i),o}function Le(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ae(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Me(t,e){return function(){return t[e]}}function De(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?T(n):n;for(var r=T(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Kn=function(){return Xn.now()})}function Jn(){var t,e;for(qn=Kn(),zn=!0,Un.sort((function(t,e){return t.id-e.id})),Wn=0;WnWn&&Un[n].id>t.id)n--;Un.splice(n+1,0,t)}else Un.push(t);Bn||(Bn=!0,ve(Jn))}}var er=0,nr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new lt,this.newDepIds=new lt,this.expression="","function"===typeof e?this.getter=e:(this.getter=q(e),this.getter||(this.getter=I)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var t;mt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Ca){if(!this.user)throw Ca;ee(Ca,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ye(t),gt(),this.cleanupDeps()}return t},nr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},nr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Ca){ee(Ca,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:I,set:I};function or(t,e,n){rr.get=function(){return this[e][n]},rr.set=function(t){this[e][n]=t},Object.defineProperty(t,n,rr)}function ir(t){t._watchers=[];var e=t.$options;e.props&&ar(t,e.props),e.methods&&vr(t,e.methods),e.data?sr(t):It(t._data={},!0),e.computed&&fr(t,e.computed),e.watch&&e.watch!==it&&hr(t,e.watch)}function ar(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||jt(!1);var a=function(i){o.push(i);var a=Jt(i,e,n,t);Lt(r,i,a),i in t||or(t,"_props",i)};for(var s in e)a(s);jt(!0)}function sr(t){var e=t.$options.data;e=t._data="function"===typeof e?cr(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&b(r,i)||z(i)||or(t,"_data",i)}It(e,!0)}function cr(t,e){mt();try{return t.call(e,e)}catch(Ca){return ee(Ca,e,"data()"),{}}finally{gt()}}var ur={lazy:!0};function fr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new nr(t,a||I,I,ur)),o in t||lr(t,o,i)}}function lr(t,e,n){var r=!ct();"function"===typeof n?(rr.get=r?pr(e):dr(n),rr.set=I):(rr.get=n.get?r&&!1!==n.cache?pr(e):dr(n.get):I,rr.set=n.set||I),Object.defineProperty(t,e,rr)}function pr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ht.target&&e.depend(),e.value}}function dr(t){return function(){return t.call(this,this)}}function vr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?I:j(e[n],t)}function hr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=T(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Ar(t){t.mixin=function(t){return this.options=Kt(this.options,t),this}}function $r(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Kt(n.options,t),a["super"]=n,a.options.props&&Sr(a),a.options.computed&&kr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=E({},a.options),o[r]=a,a}}function Sr(t){var e=t.options.props;for(var n in e)or(t.prototype,"_props",n)}function kr(t){var e=t.options.computed;for(var n in e)lr(t.prototype,n,e[n])}function jr(t){U.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&f(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function Tr(t){return t&&(t.Ctor.options.name||t.tag)}function Er(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Pr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=Tr(a.componentOptions);s&&!e(s)&&Ir(n,i,r,o)}}}function Ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}_r(Cr),mr(Cr),jn(Cr),In(Cr),gn(Cr);var Lr=[String,RegExp,Array],Mr={name:"keep-alive",abstract:!0,props:{include:Lr,exclude:Lr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){Pr(t,(function(t){return Er(e,t)}))})),this.$watch("exclude",(function(e){Pr(t,(function(t){return!Er(e,t)}))}))},render:function(){var t=this.$slots.default,e=Cn(t),n=e&&e.componentOptions;if(n){var r=Tr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Er(i,r))||a&&r&&Er(a,r))return e;var s=this,c=s.cache,u=s.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,g(u,f),u.push(f)):(c[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&Ir(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Dr={KeepAlive:Mr};function Nr(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:E,mergeOptions:Kt,defineReactive:Lt},t.set=Mt,t.delete=Dt,t.nextTick=ve,t.observable=function(t){return It(t),t},t.options=Object.create(null),U.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,E(t.options.components,Dr),Or(t),Ar(t),$r(t),jr(t)}Nr(Cr),Object.defineProperty(Cr.prototype,"$isServer",{get:ct}),Object.defineProperty(Cr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cr,"FunctionalRenderContext",{value:Ze}),Cr.version="2.6.10";var Fr=y("style,class"),Rr=y("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Rr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Vr=y("contenteditable,draggable,spellcheck"),Hr=y("events,caret,typing,plaintext-only"),Br=function(t,e){return Kr(e)||"false"===e?"false":"contenteditable"===t&&Hr(e)?e:"true"},zr=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Wr="http://www.w3.org/1999/xlink",Gr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},qr=function(t){return Gr(t)?t.slice(6,t.length):""},Kr=function(t){return null==t||!1===t};function Xr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Jr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Jr(e,n.data));return Zr(e.staticClass,e.class)}function Jr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zr(t,e){return o(t)||o(e)?Qr(t,Yr(e)):""}function Qr(t,e){return t?e?t+" "+e:t:e||""}function Yr(t){return Array.isArray(t)?to(t):c(t)?eo(t):"string"===typeof t?t:""}function to(t){for(var e,n="",r=0,i=t.length;r-1?so[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:so[t]=/HTMLUnknownElement/.test(e.toString())}var uo=y("text,number,password,search,email,tel,url");function fo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function lo(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function po(t,e){return document.createElementNS(no[t],e)}function vo(t){return document.createTextNode(t)}function ho(t){return document.createComment(t)}function yo(t,e,n){t.insertBefore(e,n)}function mo(t,e){t.removeChild(e)}function go(t,e){t.appendChild(e)}function _o(t){return t.parentNode}function bo(t){return t.nextSibling}function wo(t){return t.tagName}function xo(t,e){t.textContent=e}function Co(t,e){t.setAttribute(e,"")}var Oo=Object.freeze({createElement:lo,createElementNS:po,createTextNode:vo,createComment:ho,insertBefore:yo,removeChild:mo,appendChild:go,parentNode:_o,nextSibling:bo,tagName:wo,setTextContent:xo,setStyleScope:Co}),Ao={create:function(t,e){$o(e)},update:function(t,e){t.data.ref!==e.data.ref&&($o(t,!0),$o(e))},destroy:function(t){$o(t,!0)}};function $o(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?g(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var So=new _t("",{},[]),ko=["create","activate","update","remove","destroy"];function jo(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&To(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function To(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||uo(r)&&uo(i)}function Eo(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Po(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;eh?(l=r(n[g+1])?null:n[g+1].elm,C(t,l,n,v,g,i)):v>g&&A(t,e,p,h)}function k(t,e,n,r){for(var i=n;i-1?Bo(t,e,n):zr(e)?Kr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Vr(e)?t.setAttribute(e,Br(e,n)):Gr(e)?Kr(n)?t.removeAttributeNS(Wr,qr(e)):t.setAttributeNS(Wr,e,n):Bo(t,e,n)}function Bo(t,e,n){if(Kr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var zo={create:Vo,update:Vo};function Wo(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Xr(e),c=n._transitionClasses;o(c)&&(s=Qr(s,Yr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Go,qo={create:Wo,update:Wo},Ko="__r",Xo="__c";function Jo(t){if(o(t[Ko])){var e=tt?"change":"input";t[e]=[].concat(t[Ko],t[e]||[]),delete t[Ko]}o(t[Xo])&&(t.change=[].concat(t[Xo],t.change||[]),delete t[Xo])}function Zo(t,e,n){var r=Go;return function o(){var i=e.apply(null,arguments);null!==i&&ti(t,o,n,r)}}var Qo=ae&&!(ot&&Number(ot[1])<=53);function Yo(t,e,n,r){if(Qo){var o=qn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Go.addEventListener(t,e,at?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Go).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Go=e.elm,Jo(n),be(n,o,Yo,ti,Zo,e.context),Go=void 0}}var ni,ri={create:ei,update:ei};function oi(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=E({},c)),s)n in c||(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);ii(a,u)&&(a.value=u)}else if("innerHTML"===n&&oo(a.tagName)&&r(a.innerHTML)){ni=ni||document.createElement("div"),ni.innerHTML=""+i+"";var f=ni.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==s[n])try{a[n]=i}catch(Ca){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||ai(t,e)||si(t,e))}function ai(t,e){var n=!0;try{n=document.activeElement!==t}catch(Ca){}return n&&t.value!==e}function si(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return h(n)!==h(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ci={create:oi,update:oi},ui=w((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function fi(t){var e=li(t.style);return t.staticStyle?E(t.staticStyle,e):e}function li(t){return Array.isArray(t)?P(t):"string"===typeof t?ui(t):t}function pi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=fi(o.data))&&E(r,n)}(n=fi(t.data))&&E(r,n);var i=t;while(i=i.parent)i.data&&(n=fi(i.data))&&E(r,n);return r}var di,vi=/^--/,hi=/\s*!important$/,yi=function(t,e,n){if(vi.test(e))t.style.setProperty(e,n);else if(hi.test(n))t.style.setProperty($(e),n.replace(hi,""),"important");else{var r=gi(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(wi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ci(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function Oi(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&E(e,Ai(t.name||"v")),E(e,t),e}return"string"===typeof t?Ai(t):void 0}}var Ai=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),$i=J&&!et,Si="transition",ki="animation",ji="transition",Ti="transitionend",Ei="animation",Pi="animationend";$i&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ji="WebkitTransition",Ti="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ei="WebkitAnimation",Pi="webkitAnimationEnd"));var Ii=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Li(t){Ii((function(){Ii(t)}))}function Mi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xi(t,e))}function Di(t,e){t._transitionClasses&&g(t._transitionClasses,e),Ci(t,e)}function Ni(t,e,n){var r=Ri(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Si?Ti:Pi,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Si,f=a,l=i.length):e===ki?u>0&&(n=ki,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?Si:ki:null,l=n?n===Si?i.length:c.length:0);var p=n===Si&&Fi.test(r[ji+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Ui(t,e){while(t.length1}function Gi(t,e){!0!==e.data.show&&Hi(e)}var qi=J?{create:Gi,activate:Gi,remove:function(t,e){!0!==t.data.show?Bi(t,e):e()}}:{},Ki=[zo,qo,ri,ci,bi,qi],Xi=Ki.concat(Uo),Ji=Po({nodeOps:Oo,modules:Xi});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&oa(t,"input")}));var Zi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?we(n,"postpatch",(function(){Zi.componentUpdated(t,e,n)})):Qi(t,e,n.context),t._vOptions=[].map.call(t.options,ea)):("textarea"===n.tag||uo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",na),t.addEventListener("compositionend",ra),t.addEventListener("change",ra),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Qi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,ea);if(o.some((function(t,e){return!D(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return ta(t,o)})):e.value!==e.oldValue&&ta(e.value,o);i&&oa(t,"change")}}}};function Qi(t,e,n){Yi(t,e,n),(tt||nt)&&setTimeout((function(){Yi(t,e,n)}),0)}function Yi(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(D(ea(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ta(t,e){return e.every((function(e){return!D(e,t)}))}function ea(t){return"_value"in t?t._value:t.value}function na(t){t.target.composing=!0}function ra(t){t.target.composing&&(t.target.composing=!1,oa(t.target,"input"))}function oa(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ia(t){return!t.componentInstance||t.data&&t.data.transition?t:ia(t.componentInstance._vnode)}var aa={bind:function(t,e,n){var r=e.value;n=ia(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Hi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=ia(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Hi(n,(function(){t.style.display=t.__vOriginalDisplay})):Bi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},sa={model:Zi,show:aa},ca={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ua(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ua(Cn(e.children)):t}function fa(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[C(i)]=o[i];return e}function la(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function pa(t){while(t=t.parent)if(t.data.transition)return!0}function da(t,e){return e.key===t.key&&e.tag===t.tag}var va=function(t){return t.tag||xn(t)},ha=function(t){return"show"===t.name},ya={name:"transition",props:ca,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(va),n.length)){0;var r=this.mode;0;var o=n[0];if(pa(this.$vnode))return o;var i=ua(o);if(!i)return o;if(this._leaving)return la(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=fa(this),u=this._vnode,f=ua(u);if(i.data.directives&&i.data.directives.some(ha)&&(i.data.show=!0),f&&f.data&&!da(i,f)&&!xn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=E({},c);if("out-in"===r)return this._leaving=!0,we(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),la(t,o);if("in-out"===r){if(xn(i))return u;var p,d=function(){p()};we(c,"afterEnter",d),we(c,"enterCancelled",d),we(l,"delayLeave",(function(t){p=t}))}}return o}}},ma=E({tag:String,moveClass:String},ca);delete ma.mode;var ga={props:ma,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=En(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=fa(this),s=0;sc)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},"7bc3":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},"7cfd":function(t,e,n){var r=n("d3d8").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n("f9a5")&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},"7d56":function(t,e,n){var r=n("7afe"),o=n("d93f");t.exports=Object.keys||function(t){return r(t,o)}},8451:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"87c5":function(t,e,n){"use strict";var r=n("f9a5"),o=n("7d56"),i=n("9d61"),a=n("c864"),s=n("a9cf"),c=n("9952"),u=Object.assign;t.exports=!u||n("0cc1")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){var n=s(t),u=arguments.length,f=1,l=i.f,p=a.f;while(u>f){var d,v=c(arguments[f++]),h=l?o(v).concat(l(v)):o(v),y=h.length,m=0;while(y>m)d=h[m++],r&&!p.call(v,d)||(n[d]=v[d])}return n}:u},8941:function(t,e,n){var r=n("a6ad"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"8b1f":function(t,e,n){"use strict";var r=n("2498"),o=n("da27"),i=n("3f8b"),a=n("95e3"),s=n("a07c");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},"8cac":function(t,e,n){var r=n("da0b");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"8d69":function(t,e,n){var r=n("d3d8"),o=n("8cac"),i=n("7d56");t.exports=n("f9a5")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},9497:function(t,e,n){var r=n("3f8b"),o=n("2dbc").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n("6077")(a);t.exports=function(){var t,e,n,u=function(){var r,o;c&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},"95e3":function(t,e,n){var r=n("8cac"),o=n("8451"),i=n("1277")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},"96dd":function(t,e,n){"use strict";var r=n("ab19"),o=n("c8e9"),i=n("e3b3"),a=n("6117");t.exports=n("4aef")(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},9947:function(t,e,n){var r=n("f341")("keys"),o=n("4d2c");t.exports=function(t){return r[t]||(r[t]=o(t))}},9952:function(t,e,n){var r=n("6077");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"9d61":function(t,e){e.f=Object.getOwnPropertySymbols},a07c:function(t,e,n){var r=n("8cac"),o=n("da0b"),i=n("21cb");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},a17c:function(t,e,n){var r=n("a6d5");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},a60a:function(t,e,n){"use strict";var r,o,i,a,s=n("6cc2"),c=n("3f8b"),u=n("e85e"),f=n("02f2"),l=n("2498"),p=n("da0b"),d=n("8451"),v=n("5e01"),h=n("22ae"),y=n("95e3"),m=n("2dbc").set,g=n("9497")(),_=n("21cb"),b=n("d8bd"),w=n("1cd7"),x=n("a07c"),C="Promise",O=c.TypeError,A=c.process,$=A&&A.versions,S=$&&$.v8||"",k=c[C],j="process"==f(A),T=function(){},E=o=_.f,P=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n("1277")("species")]=function(t){t(T,T)};return(j||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==S.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&N(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(O("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(l){f&&!a&&f.exit(),u(l)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=D(t);if(i&&(e=b((function(){j?A.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=j||D(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},D=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){m.call(c,(function(){var e;j?A.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},F=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},R=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(R,r,1),u(F,r,1))}catch(o){F.call(r,o)}})):(n._v=t,n._s=1,L(n,!1))}catch(r){F.call({_w:n,_d:!1},r)}}};P||(k=function(t){v(this,k,C,"_h"),d(t),r.call(this);try{t(u(R,this,1),u(F,this,1))}catch(e){F.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("a17c")(k.prototype,{then:function(t,e){var n=E(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=j?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(R,t,1),this.reject=u(F,t,1)},_.f=E=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!P,{Promise:k}),n("3d87")(k,C),n("e465")(C),a=n("da27")[C],l(l.S+l.F*!P,C,{reject:function(t){var e=E(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(s||!P),C,{resolve:function(t){return x(s&&this===a?k:this,t)}}),l(l.S+l.F*!(P&&n("b309")((function(t){k.all(t)["catch"](T)}))),C,{all:function(t){var e=this,n=E(e),r=n.resolve,o=n.reject,i=b((function(){var n=[],i=0,a=1;h(t,!1,(function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=E(e),r=n.reject,o=b((function(){h(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},a6ad:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a6d5:function(t,e,n){var r=n("3f8b"),o=n("b8ea"),i=n("549d"),a=n("4d2c")("src"),s=n("6fe0"),c="toString",u=(""+s).split(c);n("da27").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},a9cf:function(t,e,n){var r=n("3038");t.exports=function(t){return Object(r(t))}},ab19:function(t,e,n){var r=n("1277")("unscopables"),o=Array.prototype;void 0==o[r]&&n("b8ea")(o,r,{}),t.exports=function(t){o[r][t]=!0}},b309:function(t,e,n){var r=n("1277")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(a){}return n}},b8ea:function(t,e,n){var r=n("d3d8"),o=n("0614");t.exports=n("f9a5")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},c264:function(t,e,n){"use strict";var r=n("65c3"),o=n("0614"),i=n("3d87"),a={};n("b8ea")(a,n("1277")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},c3a9:function(t,e,n){var r=n("a6ad"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},c864:function(t,e){e.f={}.propertyIsEnumerable},c8e9:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d15b:function(t,e,n){var r=n("549d"),o=n("a9cf"),i=n("9947")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},d3d8:function(t,e,n){var r=n("8cac"),o=n("25ae"),i=n("2ab1"),a=Object.defineProperty;e.f=n("f9a5")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},d8bd:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},d93f:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},da0b:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},da27:function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},dd80:function(t,e,n){var r=n("8cac");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},e3b3:function(t,e){t.exports={}},e465:function(t,e,n){"use strict";var r=n("3f8b"),o=n("d3d8"),i=n("f9a5"),a=n("1277")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},e783:function(t,e,n){var r=n("2498");r(r.S+r.F,"Object",{assign:n("87c5")})},e85e:function(t,e,n){var r=n("8451");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},f341:function(t,e,n){var r=n("da27"),o=n("3f8b"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("6cc2")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},f9a5:function(t,e,n){t.exports=!n("0cc1")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}}]); -//# sourceMappingURL=chunk-vendors.69bad5f4.js.map \ No newline at end of file diff --git a/dist/js/index.b7f22f1a.js b/dist/js/index.b7f22f1a.js deleted file mode 100644 index 424ffe6..0000000 --- a/dist/js/index.b7f22f1a.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var n,a,s=t[0],o=t[1],u=t[2],c=0,y=[];c + +declare module '*.vue' { + import type { DefineComponent } from 'vue'; + + const component: DefineComponent, Record, unknown>; + export default component; +} diff --git a/examples/App.vue b/examples/App.vue index 5696655..ad6d312 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,204 +1,1281 @@ - - diff --git a/examples/main.js b/examples/main.js deleted file mode 100644 index 2baf567..0000000 --- a/examples/main.js +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from 'vue'; -import App from './App.vue'; -import VueAliplayerV2 from '../packages'; -Vue.use(VueAliplayerV2,{ - // cssLink: 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css', - // scriptSrc: 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js' -}); -Vue.config.productionTip = false; -new Vue({ - render: h => h(App), -}).$mount('#app'); diff --git a/examples/main.ts b/examples/main.ts new file mode 100644 index 0000000..684d042 --- /dev/null +++ b/examples/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue'; +import App from './App.vue'; + +createApp(App).mount('#app'); diff --git a/index.html b/index.html new file mode 100644 index 0000000..dcd7b91 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + vue-aliplayer-v2 + + +
+ + + diff --git a/lib/demo.html b/lib/demo.html deleted file mode 100644 index 5a7b66a..0000000 --- a/lib/demo.html +++ /dev/null @@ -1,10 +0,0 @@ - -vue-aliplayer-v2 demo - - - - - - diff --git a/lib/types/AliplayerV2/index.vue.d.ts b/lib/types/AliplayerV2/index.vue.d.ts new file mode 100644 index 0000000..c0e4902 --- /dev/null +++ b/lib/types/AliplayerV2/index.vue.d.ts @@ -0,0 +1,59 @@ +import type { AliplayerOptions, AliplayerV2Props, VueAliplayerV2Expose } from './types'; +declare const __VLS_export: import("vue").DefineComponent any; + ended: (payload?: unknown) => any; + error: (payload?: unknown) => any; + pause: (payload?: unknown) => any; + play: (payload?: unknown) => any; + playing: (payload?: unknown) => any; + timeupdate: (payload?: unknown) => any; + waiting: (payload?: unknown) => any; + ready: (payload?: unknown) => any; + liveStreamStop: (payload?: unknown) => any; + onM3u8Retry: (payload?: unknown) => any; + hideBar: (payload?: unknown) => any; + showBar: (payload?: unknown) => any; + snapshoted: (payload?: unknown) => any; + requestFullScreen: (payload?: unknown) => any; + cancelFullScreen: (payload?: unknown) => any; + startSeek: (payload?: unknown) => any; + completeSeek: (payload?: unknown) => any; + "sdk-error": (error: Error) => any; +}, string, import("vue").PublicProps, Readonly & Readonly<{ + onCanplay?: ((payload?: unknown) => any) | undefined; + onEnded?: ((payload?: unknown) => any) | undefined; + onError?: ((payload?: unknown) => any) | undefined; + onPause?: ((payload?: unknown) => any) | undefined; + onPlay?: ((payload?: unknown) => any) | undefined; + onPlaying?: ((payload?: unknown) => any) | undefined; + onTimeupdate?: ((payload?: unknown) => any) | undefined; + onWaiting?: ((payload?: unknown) => any) | undefined; + onReady?: ((payload?: unknown) => any) | undefined; + onLiveStreamStop?: ((payload?: unknown) => any) | undefined; + onOnM3u8Retry?: ((payload?: unknown) => any) | undefined; + onHideBar?: ((payload?: unknown) => any) | undefined; + onShowBar?: ((payload?: unknown) => any) | undefined; + onSnapshoted?: ((payload?: unknown) => any) | undefined; + onRequestFullScreen?: ((payload?: unknown) => any) | undefined; + onCancelFullScreen?: ((payload?: unknown) => any) | undefined; + onStartSeek?: ((payload?: unknown) => any) | undefined; + onCompleteSeek?: ((payload?: unknown) => any) | undefined; + "onSdk-error"?: ((error: Error) => any) | undefined; +}>, { + source: string | null; + autoFormat: boolean; + forbidFastForward: boolean; + license: import("./types").AliplayerLicense | null; + lowLatency: boolean; + normalizeSourceUrl: boolean; + options: AliplayerOptions | null; + sdkVersion: string; + cssLink: string; + scriptSrc: string; + componentScripts: string[]; + disableTracking: boolean; + trackingUrlPatterns: Array; +}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; +declare const _default: typeof __VLS_export; +export default _default; +//# sourceMappingURL=index.vue.d.ts.map \ No newline at end of file diff --git a/lib/types/AliplayerV2/sdkLoader.d.ts b/lib/types/AliplayerV2/sdkLoader.d.ts new file mode 100644 index 0000000..e3698f0 --- /dev/null +++ b/lib/types/AliplayerV2/sdkLoader.d.ts @@ -0,0 +1,12 @@ +export declare const DEFAULT_SDK_VERSION = "2.37.0"; +export declare const DEFAULT_CSS_LINK = "https://g.alicdn.com/apsara-media-box/imp-web-player/2.37.0/skins/default/aliplayer-min.css"; +export declare const DEFAULT_SCRIPT_SRC = "https://g.alicdn.com/apsara-media-box/imp-web-player/2.37.0/aliplayer-min.js"; +export declare function getCssLinkByVersion(version: string): string; +export declare function getScriptSrcByVersion(version: string): string; +/** + * Shared SDK loader. It prevents duplicate CSS/JS tags when several player + * instances mount at the same time or are recreated by route changes. + */ +export declare function loadAliplayerSdk(cssLink: string, scriptSrc: string): Promise; +export declare function loadExtraScripts(scriptUrls?: string[]): Promise; +//# sourceMappingURL=sdkLoader.d.ts.map \ No newline at end of file diff --git a/lib/types/AliplayerV2/source.d.ts b/lib/types/AliplayerV2/source.d.ts new file mode 100644 index 0000000..b5014f3 --- /dev/null +++ b/lib/types/AliplayerV2/source.d.ts @@ -0,0 +1,4 @@ +export type SourceFormat = 'mp4' | 'm3u8' | 'flv' | 'rtmp' | 'mp3' | null; +export declare function inferSourceFormat(source?: string | null): SourceFormat; +export declare function normalizeSource(source?: string | null): string | null; +//# sourceMappingURL=source.d.ts.map \ No newline at end of file diff --git a/lib/types/AliplayerV2/tracking.d.ts b/lib/types/AliplayerV2/tracking.d.ts new file mode 100644 index 0000000..d9bd5a8 --- /dev/null +++ b/lib/types/AliplayerV2/tracking.d.ts @@ -0,0 +1,7 @@ +export declare function installTrackingBlocker(patterns?: Array): void; +declare global { + interface XMLHttpRequest { + __vueAliplayerV2Blocked?: boolean; + } +} +//# sourceMappingURL=tracking.d.ts.map \ No newline at end of file diff --git a/lib/types/AliplayerV2/types.d.ts b/lib/types/AliplayerV2/types.d.ts new file mode 100644 index 0000000..9f53bfb --- /dev/null +++ b/lib/types/AliplayerV2/types.d.ts @@ -0,0 +1,128 @@ +import type { Plugin } from 'vue'; +export interface VueAliplayerV2Options { + sdkVersion?: string; + cssLink?: string; + scriptSrc?: string; + componentScripts?: string[]; + disableTracking?: boolean; + trackingUrlPatterns?: Array; +} +export interface AliplayerV2Props extends VueAliplayerV2Options { + autoFormat?: boolean; + forbidFastForward?: boolean; + license?: AliplayerLicense | null; + lowLatency?: boolean; + normalizeSourceUrl?: boolean; + options?: AliplayerOptions | null; + source?: string | null; +} +export interface AliplayerLicense { + domain: string; + key: string; +} +export type AliplayerEventName = 'ready' | 'play' | 'pause' | 'canplay' | 'playing' | 'ended' | 'liveStreamStop' | 'onM3u8Retry' | 'hideBar' | 'showBar' | 'waiting' | 'timeupdate' | 'snapshoted' | 'requestFullScreen' | 'cancelFullScreen' | 'error' | 'startSeek' | 'completeSeek'; +export interface AliplayerOptions { + id?: string; + source?: string; + width?: string; + autoplay?: boolean; + isLive?: boolean; + format?: string; + license?: AliplayerLicense; + vid?: string; + playauth?: string; + accessKeyId?: string; + securityToken?: string; + accessKeySecret?: string; + region?: string; + authTimeout?: number; + components?: unknown[]; + enableStashBufferForFlv?: boolean; + stashInitialSizeForFlv?: number; + rtsVersion?: string; + [key: string]: unknown; +} +export interface AliplayerFullscreenService { + requestFullScreen: () => void; + cancelFullScreen: () => void; + getIsFullScreen: () => boolean; +} +export interface AliplayerLiveShiftService { + setLiveTimeRange: (beginTime: string, endTime: string) => void; +} +export interface AliplayerInstance { + on: (eventName: string, handler: (event?: unknown) => void) => void; + off?: (eventName: string, handler: (event?: unknown) => void) => void; + play: () => void; + pause: () => void; + replay: () => void; + seek: (time: number) => void; + getCurrentTime: () => number; + getDuration: () => number; + getVolume: () => number; + setVolume: (volume: number) => void; + loadByUrl: (url: string, time?: number) => void; + replayByVidAndPlayAuth: (vid: string, playauth: string) => void; + replayByVidAndAuthInfo: (vid: string, accId: string, accSecret: string, stsToken: string, authInfo: string, domainRegion: string) => void; + setPlayerSize: (width: string, height: string) => void; + setSpeed: (speed: number) => void; + setSanpshotProperties: (width: number, height: number, rate: number) => void; + fullscreenService?: AliplayerFullscreenService; + getStatus: () => string; + liveShiftSerivce?: AliplayerLiveShiftService; + setRotate: (rotate: number) => void; + getRotate: () => number; + setImage: (image: string) => void; + dispose: () => void; + setCover: (cover: string) => void; + setProgressMarkers: (markers: unknown[]) => void; + setPreviewTime: (time: number) => void; + getPreviewTime: () => number; + isPreview: () => boolean; +} +export interface VueAliplayerV2Expose { + getPlayer: () => AliplayerInstance | null; + init: () => Promise; + initPlayer: () => void; + reload: (nextSource?: string) => Promise; + retry: (nextSource?: string) => Promise; + play: () => void; + pause: () => void; + replay: () => void; + seek: (time: number) => void; + getCurrentTime: () => number | undefined; + getDuration: () => number | undefined; + getVolume: () => number | undefined; + setVolume: (volume: number) => void; + loadByUrl: (url: string, time?: number) => void; + replayByVidAndPlayAuth: (vid: string, playauth: string) => void; + replayByVidAndAuthInfo: (vid: string, accId: string, accSecret: string, stsToken: string, authInfo: string, domainRegion: string) => void; + setPlayerSize: (width: string, height: string) => void; + setSpeed: (speed: number) => void; + setSanpshotProperties: (width: number, height: number, rate: number) => void; + requestFullScreen: () => void; + cancelFullScreen: () => void; + getIsFullScreen: () => boolean | undefined; + getStatus: () => string | undefined; + setLiveTimeRange: (beginTime: string, endTime: string) => void; + setRotate: (rotate: number) => void; + getRotate: () => number | undefined; + setImage: (image: string) => void; + dispose: () => void; + setCover: (cover: string) => void; + setProgressMarkers: (markers: unknown[]) => void; + setPreviewTime: (time: number) => void; + getPreviewTime: () => number | undefined; + isPreview: () => boolean | undefined; + off: (eventName: string, handler: (event?: unknown) => void) => void; +} +export type VueAliplayerV2Plugin = Plugin & { + Player?: unknown; +}; +declare global { + interface Window { + Aliplayer?: (options: AliplayerOptions) => AliplayerInstance; + [key: string]: unknown; + } +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts new file mode 100644 index 0000000..8b441c0 --- /dev/null +++ b/lib/types/index.d.ts @@ -0,0 +1,32 @@ +import type { App } from 'vue'; +import VueAliplayerV2 from './AliplayerV2/index.vue'; +import type { VueAliplayerV2Options } from './AliplayerV2/types'; +export type { AliplayerEventName, AliplayerInstance, AliplayerLicense, AliplayerOptions, AliplayerV2Props, VueAliplayerV2Expose, VueAliplayerV2Options } from './AliplayerV2/types'; +type InstallableVueAliplayerV2 = typeof VueAliplayerV2 & { + install: (app: App, options?: VueAliplayerV2Options) => void; + Player: typeof VueAliplayerV2; + props: { + sdkVersion: { + default: string | (() => string); + }; + cssLink: { + default: string | (() => string); + }; + scriptSrc: { + default: string | (() => string); + }; + componentScripts: { + default: string[] | (() => string[]); + }; + disableTracking: { + default: boolean | (() => boolean); + }; + trackingUrlPatterns: { + default: Array | (() => Array); + }; + }; +}; +declare const installable: InstallableVueAliplayerV2; +export { installable as VueAliplayerV2 }; +export default installable; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/lib/vue-aliplayer-v2.common.js b/lib/vue-aliplayer-v2.common.js deleted file mode 100644 index 5e7d9b5..0000000 --- a/lib/vue-aliplayer-v2.common.js +++ /dev/null @@ -1,1262 +0,0 @@ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "112a"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "0614": -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), - -/***/ "0cc1": -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), - -/***/ "112a": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/setPublicPath.js -// This file is imported into lib/wc client bundles. - -if (typeof window !== 'undefined') { - if (true) { - __webpack_require__("e67d") - } - - var i - if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { - __webpack_require__.p = i[1] // eslint-disable-line - } -} - -// Indicate to webpack that this file can be concatenated -/* harmony default export */ var setPublicPath = (null); - -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js -var es6_function_name = __webpack_require__("7cfd"); - -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478& -var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})} -var staticRenderFns = [] - - -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478& - -// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js -function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } - -function _typeof(obj) { - if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { - _typeof = function _typeof(obj) { - return _typeof2(obj); - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); - }; - } - - return _typeof(obj); -} -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js -var es6_regexp_to_string = __webpack_require__("cc1d"); - -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - - -// -// -// -/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({ - name: 'VueAliplayerV2', - props: { - forbidFastForward: { - //禁止拖拽快进 - required: false, - type: [Boolean], - default: false - }, - options: { - //配置项 - required: false, - type: [Object], - default: function _default() { - return null; - } - }, - source: { - //播放源(此属性存在则优先于options.source) 动态切换,目前只支持同种格式(mp4/flv/m3u8)之间切换。暂不支持直播rtmp流切换。 - required: false, - type: [String], - default: null - }, - cssLink: { - //css版本源 - required: false, - type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css" - }, - scriptSrc: { - //js版本源 - required: false, - type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js" - } - }, - data: function data() { - return { - player: null, - //播放器实例 - playerId: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()), - config: { - id: null, - //播放器的ID - width: '100%', - autoplay: true // isLive: true, - //支持播放地址播放,此播放优先级最高 - // source: 'rtmp://182.145.195.238:1935/hls/1194076936807170050', - - }, - events: [ - /** - * 播放器视频初始化按钮渲染完毕。 - * 播放器UI初始设置需要此事件后触发,避免UI被初始化所覆盖。 - * 播放器提供的方法需要在此事件发生后才可以调用。 - */ - 'ready', - /** - * 视频由暂停恢复为播放时触发。 - */ - 'play', - /** - * 视频暂停时触发。 - */ - 'pause', - /** - * 能够开始播放音频/视频时发生,会多次触发,仅H5播放器。 - */ - 'canplay', - /** - * 播放中,会触发多次。 - */ - 'playing', - /** - * 当前视频播放完毕时触发。 - */ - 'ended', - /** - * 直播流中断时触发。 - * m3u8/flv/rtmp在重试5次未成功后触发。 - * 提示上层流中断或需要重新加载视频。 - * PS:m3u8一直自动重试,不需要上层添加重试。 - */ - 'liveStreamStop', - /** - * m3u8直播流中断后重试事件,每次断流只触发一次。 - */ - 'onM3u8Retry', - /** - * 控制栏自动隐藏事件。 - */ - 'hideBar', - /** - * 控制栏自动显示事件。 - */ - 'showBar', - /** - * 数据缓冲事件。 - */ - 'waiting', - /** - * 播放位置发生改变时触发,仅H5播放器。 - * 可通过getCurrentTime方法,得到当前播放时间。 - */ - 'timeupdate', - /** - * 截图完成。 - */ - 'snapshoted', - /** - * 全屏事件,仅H5支持。 - */ - 'requestFullScreen', - /** - * 取消全屏事件,iOS下不会触发,仅H5支持。 - */ - 'cancelFullScreen', - /** - * 错误事件。 - */ - 'error', - /** - * 开始拖拽,参数返回拖拽点的时间。 - */ - 'startSeek', - /** - * 完成拖拽,参数返回拖拽点的时间。 - */ - 'completeSeek'] - }; - }, - watch: { - source: function source() { - //监听播放源变化 - this.init(); - }, - forbidFastForward: function forbidFastForward() { - this.init(); - }, - options: { - //配置项是对象,只能深度监听 - handler: function handler() { - this.init(); - }, - deep: true - } - }, - mounted: function mounted() { - var _this = this; - - this.$nextTick(function () { - _this.init(); - }); - }, - updated: function updated() { - var _this2 = this; - - //重载播放器 - this.$nextTick(function () { - _this2.init(); - }); - }, - methods: { - handlerFastForward: function handlerFastForward() {}, - - /** - * 创建script和css - * 加载Alipayer的SDK - */ - init: function init() { - var _this3 = this; - - var linkID = 'app__aliplayer-min-css'; - var scriptID = 'app__aliplayer-min-js'; - var head = document.getElementsByTagName('head'); - var html = document.getElementsByTagName('html'); - var scriptTag = document.getElementById(scriptID); - var linkIDTag = document.getElementById(linkID); - - if (!linkIDTag) { - // console.log('linkIDTag'); - var link = document.createElement('link'); - link.type = 'text/css'; - link.rel = 'stylesheet'; - link.href = this.cssLink; - link.id = linkID; // link.className = linkID; - - head[0].appendChild(link); - } - - if (!scriptTag) { - // console.log('scriptTag'); - scriptTag = document.createElement('script'); - scriptTag.type = "text/javascript"; - scriptTag.id = scriptID; // scriptTag.className = scriptID; - - scriptTag.src = this.scriptSrc; - html[0].appendChild(scriptTag); - } else { - this.initPlayer(); //这样是为了兼容页面上有多个播放器 - } //兼容单页加载和硬加载 - - - scriptTag.addEventListener("load", function () { - _this3.initPlayer(); - }); - }, - - /** - * 创建播放器 - * @description SDK文档地址:https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1084.131d1c4cJT7o5Z - */ - initPlayer: function initPlayer() { - var _this4 = this; - - if (typeof window.Aliplayer != 'undefined') { - var options = this.deepCloneObject(this.options); - - if (options) { - for (var key in options) { - this.config[key] = options[key]; - } - } - - if (this.source) this.config.source = this.source; //播放源 - - this.config.id = this.playerId; //赋值播放器容器id - - this.player && this.player.dispose(); //防止实例的重复 - - this.player = Aliplayer(this.config); - - var _loop = function _loop(ev) { - _this4.player && _this4.player.on(_this4.events[ev], function (e) { - // console.log(`object ${this.events[ev]}`,e); - _this4.$emit(_this4.events[ev], e); - }); - }; - - for (var ev in this.events) { - _loop(ev); - } //开启禁止拖拽快进 - - - if (this.forbidFastForward) { - var last = 0, - max_time = 0; - this.player.on('timeupdate', function () { - var current = this.getCurrentTime(); - - if (current - last > 2) { - this.seek(last); - } else { - last = current; - - if (last >= max_time) { - max_time = last; - } - } - }); - } //通过播放器实例的off方法取消订阅 - //player.off('ready',handleReady); - - } - }, - - /** - * @return player 实例 - */ - getPlayer: function getPlayer() { - return this.player; - }, - - /** - * 播放视频。 - */ - play: function play() { - // console.log(`播放视频。`); - this.player && this.player.play(); - }, - - /** - * 暂停视频 - */ - pause: function pause() { - // console.log(`暂停视频`); - this.player && this.player.pause(); - }, - - /** - * 重播视频 - */ - replay: function replay() { - // console.log(`重播视频`); - this.player && this.player.replay(); - }, - - /** - * 跳转到某个时刻进行播放,time的单位为秒。 - * @param time - * @return player - */ - seek: function seek(time) { - // console.log(`跳转到某个时刻进行播放,time为${time}秒。`); - this.player && this.player.seek(time); - }, - - /** - * 获取当前的播放时刻,返回的单位为秒。 - * @return player - */ - getCurrentTime: function getCurrentTime() { - // console.log(`获取当前的播放时刻,返回的单位为${this.player && this.player.getCurrentTime()}秒。`); - return this.player && this.player.getCurrentTime(); - }, - - /** - * 获取视频总时长,返回的单位为秒,这个需要在视频加载完成以后才可以获取到,可以在play事件后获取。 - * @return player - */ - getDuration: function getDuration() { - // console.log(`获取视频总时长,返回的单位为${this.player && this.player.getDuration()}秒。`); - return this.player && this.player.getDuration(); - }, - - /** - * 获取当前的音量,返回值为0-1的实数。ios和部分android会失效。 - * @return player - */ - getVolume: function getVolume() { - // console.log(`获取当前的音量${this.player && this.player.getVolume()}。`); - return this.player && this.player.getVolume(); - }, - - /** - * 设置音量,vol为0-1的实数,ios和部分android会失效。 - * @return player - */ - setVolume: function setVolume(v) { - // console.log(`设置音量,vol为${v}。`); - this.player && this.player.setVolume(v); - }, - - /** - * 直接播放视频url,time为可选值(单位秒)。目前只支持同种格式(mp4/flv/m3u8)之间切换。 - * 暂不支持直播rtmp流切换。 - * @return player - */ - loadByUrl: function loadByUrl(url, time) { - // console.log(`直接播放视频url${url},time为${time}。`); - this.player && this.player.loadByUrl(url, time); - }, - - /** - * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。 - * @param vid 视频id - * @param 播放凭证 - */ - replayByVidAndPlayAuth: function replayByVidAndPlayAuth(vid, playauth) { - // console.log(`replayByVidAndPlayAuth vid${vid},playauth为${playauth}。`); - this.player && this.player.replayByVidAndPlayAuth(vid, playauth); - }, - - /** - * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。 - * @param vid 视频id - * @param 播放凭证 - * @description 仅MPS用户时使用 仅MPS用户时使用 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion - */ - replayByVidAndAuthInfo: function replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion) { - // console.log(`replayByVidAndAuthInfo 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion); - this.player && this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion); - }, - - /** - * 设置播放器大小w,h可分别为400px像素或60%百分比。 - * @param w 宽度 - * @param h 宽度 - * @description chrome浏览器下flash播放器分别不能小于397x297。 - */ - setPlayerSize: function setPlayerSize(w, h) { - // console.log(`设置播放器大小 宽度:${w},高度:${h}`); - this.player && this.player.setPlayerSize(w, h); - }, - - /** - * 手动设置播放的倍速,倍速播放仅H5支持。移动端可能会失效,比如android微信。 - * 倍速播放UI默认是开启的。 - * 如果自定义过skinLaout属性,需要添加speedButton项到数组里: - * @param h 宽度 - * @description {name:“speedButton”,align:“tr”,x:10,y:23} - */ - setSpeed: function setSpeed(speed) { - // console.log(`手动设置播放的倍速:${speed}`); - this.player && this.player.setSpeed(speed); - }, - - /** - * 设置截图参数 - * @param width 宽度 - * @param height 高度 - * @param rate 截图质量 - */ - setSanpshotProperties: function setSanpshotProperties(width, height, rate) { - // console.log(`设置截图参数:`,width, height, rate); - this.player && this.player.setSanpshotProperties(width, height, rate); - }, - - /** - * 播放器全屏,仅H5支持。 - */ - requestFullScreen: function requestFullScreen() { - // console.log(`播放器全屏,仅H5支持`); - this.player && this.player.fullscreenService && this.player.fullscreenService.requestFullScreen(); - }, - - /** - * 播放器退出全屏,iOS调用无效,仅H5支持。 - */ - cancelFullScreen: function cancelFullScreen() { - // console.log(`播放器全屏,仅H5支持`); - this.player && this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen(); - }, - - /** - * 获取播放器全屏状态,仅H5支持。 - */ - getIsFullScreen: function getIsFullScreen() { - // console.log(`获取播放器全屏状态,仅H5支持。`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getIsFullScreen()); - return this.player && this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen(); - }, - - /** - * 获取播放器状态,包含的值, - * @returns init ready loading play pause playing waiting error ended - */ - getStatus: function getStatus() { - // console.log(`获取播放器状态,包含的值`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus()); - return this.player && this.player.getStatus(); - }, - - /** - * 设置直播的开始结束时间,开启直播时移功能时使用。 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @description 例子:player.liveShiftSerivce.setLiveTimeRange(“”,‘2018/01/04 20:00:00’) - */ - setLiveTimeRange: function setLiveTimeRange(beginTime, endTime) { - // console.log(`设置直播的开始时间:${beginTime},结束时间:${endTime},开启直播时移功能时使用。`); - this.player && this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime); - }, - - /** - * 参数为旋转角度, 正数为正时针旋转, 负数为逆时针旋转。 - * @param rotate 旋转角度 - * @description 例如: setRotate(90)。详情参见旋转和镜像。 - */ - setRotate: function setRotate(rotate) { - // console.log(`参数为旋转角度:${rotate}。`); - this.player && this.player.setRotate(rotate); - }, - - /** - * 获取旋转角度。详情参见旋转和镜像。 - * @return rotate 旋转角度 - */ - getRotate: function getRotate() { - // console.log(`获取旋转角度:${this.player && this.player.getRotate()}`); - return this.player && this.player.getRotate(); - }, - - /** - * 设置镜像 - * @param image 镜像类型 可选值为:horizon,vertical - * @description 例如: setImage(‘horizon’)。详情参见旋转和镜像。 - */ - setImage: function setImage(image) { - // console.log(`设置镜像:${image}。`); - this.player && this.player.setImage(image); - }, - - /** - * 播放器销毁 - */ - dispose: function dispose() { - // console.log(`播放器销毁。`); - this.player && this.player.dispose(); - }, - - /** - * 设置封面 - * @param cover 封面地址 - */ - setCover: function setCover(cover) { - // console.log(`设置封面:${cover}`); - this.player && this.player.setCover(cover); - }, - - /** - * 设置封面 - * @param markers 设置打点数据 - */ - setProgressMarkers: function setProgressMarkers(markers) { - // console.log(`markers打点数据集合:${markers}`); - this.player && this.player.setProgressMarkers(markers); - }, - - /** - * 设置试看时间,单位为秒,详情参见 - * @param time 试看时间 - */ - setPreviewTime: function setPreviewTime(time) { - // console.log(`设置试看时间,单位为:${time}秒`); - this.player && this.player.setPreviewTime(time); - }, - - /** - * 获取试看时间 - * @return rotate 旋转角度 - */ - getPreviewTime: function getPreviewTime() { - // console.log(`获取试看时间:${this.player && this.player.getPreviewTime()}`); - return this.player && this.player.getPreviewTime(); - }, - - /** - * 是否试看 - */ - isPreview: function isPreview() { - // console.log(`是否试看`); - this.player && this.player.isPreview(); - }, - - /** - * @param ev 事件名 - * @param handle 回调方法 - */ - off: function off(ev, handle) { - this.player && this.player.off(ev, handle); - }, - - /** - * 深度拷贝 - * @param {*} obj - */ - deepCloneObject: function deepCloneObject(obj) { - var objClone = Array.isArray(obj) ? [] : {}; - - if (obj && _typeof(obj) === 'object') { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - //判断ojb子元素是否为对象,如果是,递归复制 - if (obj[key] && _typeof(obj[key]) === 'object') { - objClone[key] = this.deepCloneObject(obj[key]); - } else { - //如果不是,简单复制 - objClone[key] = obj[key]; - } - } - } - } - - return objClone; - } - }, - beforeDestroy: function beforeDestroy() { - //防止重复创建 - this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug) - // const head = document.querySelector('head'); - // const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`); - // (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{ - // if(index != 0) head.removeChild(item); - // }); - // const html = document.querySelector('html'); - // const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`); - // (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{ - // if(index != 0) html.removeChild(item); - // }); - } -}); -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - /* harmony default export */ var packages_AliplayerV2vue_type_script_lang_js_ = (AliplayerV2vue_type_script_lang_js_); -// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -function normalizeComponent ( - scriptExports, - render, - staticRenderFns, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier, /* server only */ - shadowMode /* vue-cli only */ -) { - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (render) { - options.render = render - options.staticRenderFns = staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 'data-v-' + scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = shadowMode - ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } - : injectStyles - } - - if (hook) { - if (options.functional) { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functioal component in vue file - var originalRender = options.render - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return originalRender(h, context) - } - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } - } - - return { - exports: scriptExports, - options: options - } -} - -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue - - - - - -/* normalize component */ - -var component = normalizeComponent( - packages_AliplayerV2vue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) - -/* harmony default export */ var AliplayerV2 = (component.exports); -// CONCATENATED MODULE: ./packages/index.js - -// packages / index.js -// 导入单个组件 - // 定义 install 方法 - -AliplayerV2.install = function (Vue, options) { - if (options && options.cssLink) AliplayerV2.props.cssLink.default = options.cssLink; - if (options && options.scriptSrc) AliplayerV2.props.scriptSrc.default = options.scriptSrc; - Vue.component(AliplayerV2.name, AliplayerV2); -}; - -AliplayerV2.Player = AliplayerV2; -/* harmony default export */ var packages_0 = (AliplayerV2); -// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/entry-lib.js - - -/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0); - - - -/***/ }), - -/***/ "25ae": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__("f9a5") && !__webpack_require__("0cc1")(function () { - return Object.defineProperty(__webpack_require__("6618")('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ "2ab1": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__("da0b"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ "3f8b": -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "4d2c": -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), - -/***/ "549d": -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ "6618": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("da0b"); -var document = __webpack_require__("3f8b").document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ "6cc2": -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), - -/***/ "6fe0": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString); - - -/***/ }), - -/***/ "7cfd": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8").f; -var FProto = Function.prototype; -var nameRE = /^\s*function ([^ (]*)/; -var NAME = 'name'; - -// 19.2.4.2 name -NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, { - configurable: true, - get: function () { - try { - return ('' + this).match(nameRE)[1]; - } catch (e) { - return ''; - } - } -}); - - -/***/ }), - -/***/ "8cac": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("da0b"); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), - -/***/ "9f7e": -/***/ (function(module, exports, __webpack_require__) { - -// 21.2.5.3 get RegExp.prototype.flags() -if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8").f(RegExp.prototype, 'flags', { - configurable: true, - get: __webpack_require__("e7a1") -}); - - -/***/ }), - -/***/ "a6d5": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("3f8b"); -var hide = __webpack_require__("b8ea"); -var has = __webpack_require__("549d"); -var SRC = __webpack_require__("4d2c")('src'); -var $toString = __webpack_require__("6fe0"); -var TO_STRING = 'toString'; -var TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__("da27").inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - - -/***/ }), - -/***/ "b8ea": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8"); -var createDesc = __webpack_require__("0614"); -module.exports = __webpack_require__("f9a5") ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ "cc1d": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -__webpack_require__("9f7e"); -var anObject = __webpack_require__("8cac"); -var $flags = __webpack_require__("e7a1"); -var DESCRIPTORS = __webpack_require__("f9a5"); -var TO_STRING = 'toString'; -var $toString = /./[TO_STRING]; - -var define = function (fn) { - __webpack_require__("a6d5")(RegExp.prototype, TO_STRING, fn, true); -}; - -// 21.2.5.14 RegExp.prototype.toString() -if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { - define(function toString() { - var R = anObject(this); - return '/'.concat(R.source, '/', - 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); - }); -// FF44- RegExp#toString has a wrong name -} else if ($toString.name != TO_STRING) { - define(function toString() { - return $toString.call(this); - }); -} - - -/***/ }), - -/***/ "d3d8": -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__("8cac"); -var IE8_DOM_DEFINE = __webpack_require__("25ae"); -var toPrimitive = __webpack_require__("2ab1"); -var dP = Object.defineProperty; - -exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), - -/***/ "da0b": -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), - -/***/ "da27": -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.6.10' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "e67d": -/***/ (function(module, exports) { - -// document.currentScript polyfill by Adam Miller - -// MIT license - -(function(document){ - var currentScript = "currentScript", - scripts = document.getElementsByTagName('script'); // Live NodeList collection - - // If browser needs currentScript polyfill, add get currentScript() to the document object - if (!(currentScript in document)) { - Object.defineProperty(document, currentScript, { - get: function(){ - - // IE 6-10 supports script readyState - // IE 10+ support stack trace - try { throw new Error(); } - catch (err) { - - // Find the second match for the "at" string to get file src url from stack. - // Specifically works with the format of stack traces in IE. - var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1]; - - // For all scripts on the page, if src matches or if ready state is interactive, return the script tag - for(i in scripts){ - if(scripts[i].src == res || scripts[i].readyState == "interactive"){ - return scripts[i]; - } - } - - // If no match, return null - return null; - } - } - }); - } -})(document); - - -/***/ }), - -/***/ "e7a1": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 21.2.5.3 get RegExp.prototype.flags -var anObject = __webpack_require__("8cac"); -module.exports = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; -}; - - -/***/ }), - -/***/ "f341": -/***/ (function(module, exports, __webpack_require__) { - -var core = __webpack_require__("da27"); -var global = __webpack_require__("3f8b"); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__("6cc2") ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), - -/***/ "f9a5": -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__("0cc1")(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }) - -/******/ }); -//# sourceMappingURL=vue-aliplayer-v2.common.js.map \ No newline at end of file diff --git a/lib/vue-aliplayer-v2.css b/lib/vue-aliplayer-v2.css new file mode 100644 index 0000000..66f72b0 --- /dev/null +++ b/lib/vue-aliplayer-v2.css @@ -0,0 +1,2 @@ +.vue-aliplayer-v2[data-v-cf852d0d]{width:100%} +/*$vite$:1*/ \ No newline at end of file diff --git a/lib/vue-aliplayer-v2.js b/lib/vue-aliplayer-v2.js new file mode 100644 index 0000000..22441bf --- /dev/null +++ b/lib/vue-aliplayer-v2.js @@ -0,0 +1,395 @@ +import { computed as e, createElementBlock as t, defineComponent as n, nextTick as r, onBeforeUnmount as i, onMounted as a, openBlock as o, ref as s, watch as c } from "vue"; +//#region packages/AliplayerV2/sdkLoader.ts +var l = "2.37.0", u = `https://g.alicdn.com/apsara-media-box/imp-web-player/${l}/skins/default/aliplayer-min.css`, d = `https://g.alicdn.com/apsara-media-box/imp-web-player/${l}/aliplayer-min.js`, f = /* @__PURE__ */ new Map(); +function p(e) { + return `https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/skins/default/aliplayer-min.css`; +} +function m(e) { + return `https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/aliplayer-min.js`; +} +function h(e) { + if (!e || document.querySelector(`link[data-vue-aliplayer-v2-css="${e}"]`)) return; + let t = document.createElement("link"); + t.type = "text/css", t.rel = "stylesheet", t.href = e, t.dataset.vueAliplayerV2Css = e, document.head.appendChild(t); +} +function g(e, t) { + if (!e || t && window[t]) return Promise.resolve(); + if (f.has(e)) return f.get(e); + let n = document.querySelector(`script[data-vue-aliplayer-v2-js="${e}"]`); + if (n) { + let t = new Promise((t, r) => { + if (n.dataset.vueAliplayerV2Loaded === "true") { + t(); + return; + } + n.addEventListener("load", () => { + n.dataset.vueAliplayerV2Loaded = "true", t(); + }, { once: !0 }), n.addEventListener("error", () => r(/* @__PURE__ */ Error(`Failed to load Aliplayer SDK: ${e}`)), { once: !0 }); + }); + return f.set(e, t), t; + } + let r = new Promise((t, n) => { + let r = document.createElement("script"); + r.type = "text/javascript", r.src = e, r.dataset.vueAliplayerV2Js = e, r.addEventListener("load", () => { + r.dataset.vueAliplayerV2Loaded = "true", t(); + }, { once: !0 }), r.addEventListener("error", () => n(/* @__PURE__ */ Error(`Failed to load Aliplayer SDK: ${e}`)), { once: !0 }), document.documentElement.appendChild(r); + }); + return f.set(e, r), r; +} +async function _(e, t) { + h(e), await g(t, "Aliplayer"); +} +async function v(e = []) { + for (let t of e) await g(t); +} +//#endregion +//#region packages/AliplayerV2/source.ts +var y = [ + "m3u8", + "flv", + "mp4", + "rtmp", + "mp3" +]; +function b(e) { + if (!e) return null; + if (/^rtmps?:\/\//i.test(e)) return "rtmp"; + let t = e.split("?")[0].split("#")[0].toLowerCase(); + return y.find((e) => e && t.endsWith(`.${e}`)) || null; +} +function x(e) { + if (!e) return e || null; + if (/^(data|blob):/i.test(e)) return e; + try { + return encodeURI(e); + } catch { + return e; + } +} +//#endregion +//#region packages/AliplayerV2/tracking.ts +var S = ["videocloud.cn-hangzhou.log.aliyuncs.com/logstores/newplayer/track"], C = !1; +function w(e, t) { + return t.some((t) => typeof t == "string" ? e.includes(t) : t.test(e)); +} +function T(e = S) { + if (C) return; + C = !0; + let t = window.fetch?.bind(window); + t && (window.fetch = ((n, r) => w(typeof n == "string" || n instanceof URL ? String(n) : n.url, e) ? Promise.resolve(new Response(null, { + status: 204, + statusText: "No Content" + })) : t(n, r))); + let n = XMLHttpRequest.prototype.open, r = XMLHttpRequest.prototype.send; + XMLHttpRequest.prototype.open = function(t, r, i, a, o) { + this.__vueAliplayerV2Blocked = w(String(r), e), n.call(this, t, r, i ?? !0, a ?? void 0, o ?? void 0); + }, XMLHttpRequest.prototype.send = function(e) { + this.__vueAliplayerV2Blocked || r.call(this, e); + }; +} +//#endregion +//#region packages/AliplayerV2/index.vue +var E = /* @__PURE__ */ ((e, t) => { + let n = e.__vccOpts || e; + for (let [e, r] of t) n[e] = r; + return n; +})(/* @__PURE__ */ n({ + name: "VueAliplayerV2", + __name: "index", + props: { + autoFormat: { + type: Boolean, + default: !0 + }, + forbidFastForward: { + type: Boolean, + default: !1 + }, + license: { default: null }, + lowLatency: { + type: Boolean, + default: !1 + }, + normalizeSourceUrl: { + type: Boolean, + default: !0 + }, + options: { default: null }, + source: { default: null }, + sdkVersion: { default: l }, + cssLink: { default: "" }, + scriptSrc: { default: "" }, + componentScripts: { default: () => [] }, + disableTracking: { + type: Boolean, + default: !1 + }, + trackingUrlPatterns: { default: () => [] } + }, + emits: [ + "ready", + "play", + "pause", + "canplay", + "playing", + "ended", + "liveStreamStop", + "onM3u8Retry", + "hideBar", + "showBar", + "waiting", + "timeupdate", + "snapshoted", + "requestFullScreen", + "cancelFullScreen", + "error", + "startSeek", + "completeSeek", + "sdk-error" + ], + setup(n, { expose: l, emit: f }) { + let h = n, g = f, y = s(null), S = s(null), C = s(!1), w = s(null), E = 0, D = `player-${Math.random().toString(36).slice(2).toUpperCase()}`, O = [ + "ready", + "play", + "pause", + "canplay", + "playing", + "ended", + "liveStreamStop", + "onM3u8Retry", + "hideBar", + "showBar", + "waiting", + "timeupdate", + "snapshoted", + "requestFullScreen", + "cancelFullScreen", + "error", + "startSeek", + "completeSeek" + ], k = e(() => h.cssLink || (h.sdkVersion ? p(h.sdkVersion) : u)), A = e(() => h.scriptSrc || (h.sdkVersion ? m(h.sdkVersion) : d)), j = e(() => h.normalizeSourceUrl ? x(h.source) : h.source), M = e(() => b(j.value)), N = e(() => { + let e = { + width: "100%", + autoplay: !0, + ...h.options || {}, + ...h.license ? { license: h.license } : {}, + ...j.value ? { source: j.value } : {}, + id: D + }; + return h.autoFormat && M.value && !e.format && (e.format = M.value), h.lowLatency && e.isLive && M.value === "flv" && (e.enableStashBufferForFlv = e.enableStashBufferForFlv ?? !1, e.stashInitialSizeForFlv = e.stashInitialSizeForFlv ?? 128), e; + }); + function P() { + return y.value; + } + function F() { + y.value && (y.value.dispose(), y.value = null, w.value = null); + } + function I(e) { + O.forEach((t) => { + e.on(t, (e) => { + g(t, e); + }); + }); + } + function L(e) { + if (!h.forbidFastForward) return; + let t = 0, n = 0; + e.on("timeupdate", () => { + let r = e.getCurrentTime(); + if (r - t > 2) { + e.seek(t); + return; + } + t = r, t >= n && (n = t); + }); + } + function R() { + if (C.value || !window.Aliplayer || !S.value) return; + F(); + let e = window.Aliplayer({ ...N.value }); + y.value = e, w.value = M.value, I(e), L(e); + } + async function z() { + let e = ++E; + try { + if (h.disableTracking && T(h.trackingUrlPatterns), await _(k.value, A.value), await v(h.componentScripts), await r(), C.value || e !== E) return; + R(); + } catch (e) { + g("sdk-error", e instanceof Error ? e : Error(String(e))); + } + } + async function B(e) { + if (e && y.value) { + y.value.loadByUrl(h.normalizeSourceUrl && x(e) || e); + return; + } + await z(); + } + async function V(e) { + await B(e); + } + function H() { + y.value?.play(); + } + function U() { + y.value?.pause(); + } + function W() { + y.value?.replay(); + } + function G(e) { + y.value?.seek(e); + } + function K() { + return y.value?.getCurrentTime(); + } + function ee() { + return y.value?.getDuration(); + } + function q() { + return y.value?.getVolume(); + } + function J(e) { + y.value?.setVolume(e); + } + function Y(e, t) { + y.value?.loadByUrl(e, t); + } + function X(e, t) { + y.value?.replayByVidAndPlayAuth(e, t); + } + function Z(e, t, n, r, i, a) { + y.value?.replayByVidAndAuthInfo(e, t, n, r, i, a); + } + function Q(e, t) { + y.value?.setPlayerSize(e, t); + } + function $(e) { + y.value?.setSpeed(e); + } + function te(e, t, n) { + y.value?.setSanpshotProperties(e, t, n); + } + function ne() { + y.value?.fullscreenService?.requestFullScreen(); + } + function re() { + y.value?.fullscreenService?.cancelFullScreen(); + } + function ie() { + return y.value?.fullscreenService?.getIsFullScreen(); + } + function ae() { + return y.value?.getStatus(); + } + function oe(e, t) { + y.value?.liveShiftSerivce?.setLiveTimeRange(e, t); + } + function se(e) { + y.value?.setRotate(e); + } + function ce() { + return y.value?.getRotate(); + } + function le(e) { + y.value?.setImage(e); + } + function ue(e) { + y.value?.setCover(e); + } + function de(e) { + y.value?.setProgressMarkers(e); + } + function fe(e) { + y.value?.setPreviewTime(e); + } + function pe() { + return y.value?.getPreviewTime(); + } + function me() { + return y.value?.isPreview(); + } + function he(e, t) { + y.value?.off?.(e, t); + } + return a(() => { + z(); + }), c(() => j.value, (e) => { + if (!e) return; + let t = b(e); + if (y.value && t && t === w.value) { + y.value.loadByUrl(e); + return; + } + z(); + }), c(() => [ + h.options, + h.forbidFastForward, + h.license, + h.lowLatency, + h.autoFormat, + h.sdkVersion, + h.cssLink, + h.scriptSrc, + h.componentScripts, + h.disableTracking, + h.trackingUrlPatterns + ], () => { + z(); + }, { deep: !0 }), i(() => { + C.value = !0, E += 1, F(); + }), l({ + getPlayer: P, + init: z, + initPlayer: R, + reload: B, + retry: V, + play: H, + pause: U, + replay: W, + seek: G, + getCurrentTime: K, + getDuration: ee, + getVolume: q, + setVolume: J, + loadByUrl: Y, + replayByVidAndPlayAuth: X, + replayByVidAndAuthInfo: Z, + setPlayerSize: Q, + setSpeed: $, + setSanpshotProperties: te, + requestFullScreen: ne, + cancelFullScreen: re, + getIsFullScreen: ie, + getStatus: ae, + setLiveTimeRange: oe, + setRotate: se, + getRotate: ce, + setImage: le, + dispose: F, + setCover: ue, + setProgressMarkers: de, + setPreviewTime: fe, + getPreviewTime: pe, + isPreview: me, + off: he + }), (e, n) => (o(), t("div", { + id: D, + ref_key: "containerRef", + ref: S, + class: "vue-aliplayer-v2" + }, null, 512)); + } +}), [["__scopeId", "data-v-cf852d0d"]]), D = { + sdkVersion: l, + cssLink: u, + scriptSrc: d, + componentScripts: [], + disableTracking: !1, + trackingUrlPatterns: [] +}, O = E; +O.install = (e, t) => { + Object.assign(D, t || {}), e.component("VueAliplayerV2", O); +}, O.props.cssLink.default = () => D.cssLink, O.props.scriptSrc.default = () => D.scriptSrc, O.props.sdkVersion.default = () => D.sdkVersion, O.props.componentScripts.default = () => D.componentScripts, O.props.disableTracking.default = () => D.disableTracking, O.props.trackingUrlPatterns.default = () => D.trackingUrlPatterns, O.Player = O; +//#endregion +export { O as VueAliplayerV2, O as default }; diff --git a/lib/vue-aliplayer-v2.umd.cjs b/lib/vue-aliplayer-v2.umd.cjs new file mode 100644 index 0000000..1a10f42 --- /dev/null +++ b/lib/vue-aliplayer-v2.umd.cjs @@ -0,0 +1 @@ +(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VueAliplayerV2={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=`2.37.0`,r=`https://g.alicdn.com/apsara-media-box/imp-web-player/${n}/skins/default/aliplayer-min.css`,i=`https://g.alicdn.com/apsara-media-box/imp-web-player/${n}/aliplayer-min.js`,a=new Map;function o(e){return`https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/skins/default/aliplayer-min.css`}function s(e){return`https://g.alicdn.com/apsara-media-box/imp-web-player/${e}/aliplayer-min.js`}function c(e){if(!e||document.querySelector(`link[data-vue-aliplayer-v2-css="${e}"]`))return;let t=document.createElement(`link`);t.type=`text/css`,t.rel=`stylesheet`,t.href=e,t.dataset.vueAliplayerV2Css=e,document.head.appendChild(t)}function l(e,t){if(!e||t&&window[t])return Promise.resolve();if(a.has(e))return a.get(e);let n=document.querySelector(`script[data-vue-aliplayer-v2-js="${e}"]`);if(n){let t=new Promise((t,r)=>{if(n.dataset.vueAliplayerV2Loaded===`true`){t();return}n.addEventListener(`load`,()=>{n.dataset.vueAliplayerV2Loaded=`true`,t()},{once:!0}),n.addEventListener(`error`,()=>r(Error(`Failed to load Aliplayer SDK: ${e}`)),{once:!0})});return a.set(e,t),t}let r=new Promise((t,n)=>{let r=document.createElement(`script`);r.type=`text/javascript`,r.src=e,r.dataset.vueAliplayerV2Js=e,r.addEventListener(`load`,()=>{r.dataset.vueAliplayerV2Loaded=`true`,t()},{once:!0}),r.addEventListener(`error`,()=>n(Error(`Failed to load Aliplayer SDK: ${e}`)),{once:!0}),document.documentElement.appendChild(r)});return a.set(e,r),r}async function u(e,t){c(e),await l(t,`Aliplayer`)}async function d(e=[]){for(let t of e)await l(t)}var f=[`m3u8`,`flv`,`mp4`,`rtmp`,`mp3`];function p(e){if(!e)return null;if(/^rtmps?:\/\//i.test(e))return`rtmp`;let t=e.split(`?`)[0].split(`#`)[0].toLowerCase();return f.find(e=>e&&t.endsWith(`.${e}`))||null}function m(e){if(!e)return e||null;if(/^(data|blob):/i.test(e))return e;try{return encodeURI(e)}catch{return e}}var h=[`videocloud.cn-hangzhou.log.aliyuncs.com/logstores/newplayer/track`],g=!1;function _(e,t){return t.some(t=>typeof t==`string`?e.includes(t):t.test(e))}function v(e=h){if(g)return;g=!0;let t=window.fetch?.bind(window);t&&(window.fetch=((n,r)=>_(typeof n==`string`||n instanceof URL?String(n):n.url,e)?Promise.resolve(new Response(null,{status:204,statusText:`No Content`})):t(n,r)));let n=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(t,r,i,a,o){this.__vueAliplayerV2Blocked=_(String(r),e),n.call(this,t,r,i??!0,a??void 0,o??void 0)},XMLHttpRequest.prototype.send=function(e){this.__vueAliplayerV2Blocked||r.call(this,e)}}var y=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({name:`VueAliplayerV2`,__name:`index`,props:{autoFormat:{type:Boolean,default:!0},forbidFastForward:{type:Boolean,default:!1},license:{default:null},lowLatency:{type:Boolean,default:!1},normalizeSourceUrl:{type:Boolean,default:!0},options:{default:null},source:{default:null},sdkVersion:{default:n},cssLink:{default:``},scriptSrc:{default:``},componentScripts:{default:()=>[]},disableTracking:{type:Boolean,default:!1},trackingUrlPatterns:{default:()=>[]}},emits:[`ready`,`play`,`pause`,`canplay`,`playing`,`ended`,`liveStreamStop`,`onM3u8Retry`,`hideBar`,`showBar`,`waiting`,`timeupdate`,`snapshoted`,`requestFullScreen`,`cancelFullScreen`,`error`,`startSeek`,`completeSeek`,`sdk-error`],setup(e,{expose:n,emit:a}){let c=e,l=a,f=(0,t.ref)(null),h=(0,t.ref)(null),g=(0,t.ref)(!1),_=(0,t.ref)(null),y=0,b=`player-${Math.random().toString(36).slice(2).toUpperCase()}`,x=[`ready`,`play`,`pause`,`canplay`,`playing`,`ended`,`liveStreamStop`,`onM3u8Retry`,`hideBar`,`showBar`,`waiting`,`timeupdate`,`snapshoted`,`requestFullScreen`,`cancelFullScreen`,`error`,`startSeek`,`completeSeek`],S=(0,t.computed)(()=>c.cssLink||(c.sdkVersion?o(c.sdkVersion):r)),C=(0,t.computed)(()=>c.scriptSrc||(c.sdkVersion?s(c.sdkVersion):i)),w=(0,t.computed)(()=>c.normalizeSourceUrl?m(c.source):c.source),T=(0,t.computed)(()=>p(w.value)),E=(0,t.computed)(()=>{let e={width:`100%`,autoplay:!0,...c.options||{},...c.license?{license:c.license}:{},...w.value?{source:w.value}:{},id:b};return c.autoFormat&&T.value&&!e.format&&(e.format=T.value),c.lowLatency&&e.isLive&&T.value===`flv`&&(e.enableStashBufferForFlv=e.enableStashBufferForFlv??!1,e.stashInitialSizeForFlv=e.stashInitialSizeForFlv??128),e});function D(){return f.value}function O(){f.value&&(f.value.dispose(),f.value=null,_.value=null)}function k(e){x.forEach(t=>{e.on(t,e=>{l(t,e)})})}function A(e){if(!c.forbidFastForward)return;let t=0,n=0;e.on(`timeupdate`,()=>{let r=e.getCurrentTime();if(r-t>2){e.seek(t);return}t=r,t>=n&&(n=t)})}function j(){if(g.value||!window.Aliplayer||!h.value)return;O();let e=window.Aliplayer({...E.value});f.value=e,_.value=T.value,k(e),A(e)}async function M(){let e=++y;try{if(c.disableTracking&&v(c.trackingUrlPatterns),await u(S.value,C.value),await d(c.componentScripts),await(0,t.nextTick)(),g.value||e!==y)return;j()}catch(e){l(`sdk-error`,e instanceof Error?e:Error(String(e)))}}async function N(e){if(e&&f.value){f.value.loadByUrl(c.normalizeSourceUrl&&m(e)||e);return}await M()}async function P(e){await N(e)}function F(){f.value?.play()}function I(){f.value?.pause()}function L(){f.value?.replay()}function R(e){f.value?.seek(e)}function z(){return f.value?.getCurrentTime()}function B(){return f.value?.getDuration()}function ee(){return f.value?.getVolume()}function V(e){f.value?.setVolume(e)}function H(e,t){f.value?.loadByUrl(e,t)}function U(e,t){f.value?.replayByVidAndPlayAuth(e,t)}function W(e,t,n,r,i,a){f.value?.replayByVidAndAuthInfo(e,t,n,r,i,a)}function G(e,t){f.value?.setPlayerSize(e,t)}function K(e){f.value?.setSpeed(e)}function q(e,t,n){f.value?.setSanpshotProperties(e,t,n)}function J(){f.value?.fullscreenService?.requestFullScreen()}function Y(){f.value?.fullscreenService?.cancelFullScreen()}function X(){return f.value?.fullscreenService?.getIsFullScreen()}function Z(){return f.value?.getStatus()}function Q(e,t){f.value?.liveShiftSerivce?.setLiveTimeRange(e,t)}function $(e){f.value?.setRotate(e)}function te(){return f.value?.getRotate()}function ne(e){f.value?.setImage(e)}function re(e){f.value?.setCover(e)}function ie(e){f.value?.setProgressMarkers(e)}function ae(e){f.value?.setPreviewTime(e)}function oe(){return f.value?.getPreviewTime()}function se(){return f.value?.isPreview()}function ce(e,t){f.value?.off?.(e,t)}return(0,t.onMounted)(()=>{M()}),(0,t.watch)(()=>w.value,e=>{if(!e)return;let t=p(e);if(f.value&&t&&t===_.value){f.value.loadByUrl(e);return}M()}),(0,t.watch)(()=>[c.options,c.forbidFastForward,c.license,c.lowLatency,c.autoFormat,c.sdkVersion,c.cssLink,c.scriptSrc,c.componentScripts,c.disableTracking,c.trackingUrlPatterns],()=>{M()},{deep:!0}),(0,t.onBeforeUnmount)(()=>{g.value=!0,y+=1,O()}),n({getPlayer:D,init:M,initPlayer:j,reload:N,retry:P,play:F,pause:I,replay:L,seek:R,getCurrentTime:z,getDuration:B,getVolume:ee,setVolume:V,loadByUrl:H,replayByVidAndPlayAuth:U,replayByVidAndAuthInfo:W,setPlayerSize:G,setSpeed:K,setSanpshotProperties:q,requestFullScreen:J,cancelFullScreen:Y,getIsFullScreen:X,getStatus:Z,setLiveTimeRange:Q,setRotate:$,getRotate:te,setImage:ne,dispose:O,setCover:re,setProgressMarkers:ie,setPreviewTime:ae,getPreviewTime:oe,isPreview:se,off:ce}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:b,ref_key:`containerRef`,ref:h,class:`vue-aliplayer-v2`},null,512))}}),[[`__scopeId`,`data-v-cf852d0d`]]),b={sdkVersion:n,cssLink:r,scriptSrc:i,componentScripts:[],disableTracking:!1,trackingUrlPatterns:[]},x=y;x.install=(e,t)=>{Object.assign(b,t||{}),e.component(`VueAliplayerV2`,x)},x.props.cssLink.default=()=>b.cssLink,x.props.scriptSrc.default=()=>b.scriptSrc,x.props.sdkVersion.default=()=>b.sdkVersion,x.props.componentScripts.default=()=>b.componentScripts,x.props.disableTracking.default=()=>b.disableTracking,x.props.trackingUrlPatterns.default=()=>b.trackingUrlPatterns,x.Player=x,e.VueAliplayerV2=x,e.default=x}); \ No newline at end of file diff --git a/lib/vue-aliplayer-v2.umd.js b/lib/vue-aliplayer-v2.umd.js deleted file mode 100644 index 971a4a9..0000000 --- a/lib/vue-aliplayer-v2.umd.js +++ /dev/null @@ -1,1272 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["vue-aliplayer-v2"] = factory(); - else - root["vue-aliplayer-v2"] = factory(); -})((typeof self !== 'undefined' ? self : this), function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "112a"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "0614": -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), - -/***/ "0cc1": -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), - -/***/ "112a": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/setPublicPath.js -// This file is imported into lib/wc client bundles. - -if (typeof window !== 'undefined') { - if (true) { - __webpack_require__("e67d") - } - - var i - if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) { - __webpack_require__.p = i[1] // eslint-disable-line - } -} - -// Indicate to webpack that this file can be concatenated -/* harmony default export */ var setPublicPath = (null); - -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js -var es6_function_name = __webpack_require__("7cfd"); - -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478& -var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})} -var staticRenderFns = [] - - -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478& - -// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js -function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } - -function _typeof(obj) { - if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { - _typeof = function _typeof(obj) { - return _typeof2(obj); - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); - }; - } - - return _typeof(obj); -} -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js -var es6_regexp_to_string = __webpack_require__("cc1d"); - -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - - -// -// -// -/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({ - name: 'VueAliplayerV2', - props: { - forbidFastForward: { - //禁止拖拽快进 - required: false, - type: [Boolean], - default: false - }, - options: { - //配置项 - required: false, - type: [Object], - default: function _default() { - return null; - } - }, - source: { - //播放源(此属性存在则优先于options.source) 动态切换,目前只支持同种格式(mp4/flv/m3u8)之间切换。暂不支持直播rtmp流切换。 - required: false, - type: [String], - default: null - }, - cssLink: { - //css版本源 - required: false, - type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css" - }, - scriptSrc: { - //js版本源 - required: false, - type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js" - } - }, - data: function data() { - return { - player: null, - //播放器实例 - playerId: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()), - config: { - id: null, - //播放器的ID - width: '100%', - autoplay: true // isLive: true, - //支持播放地址播放,此播放优先级最高 - // source: 'rtmp://182.145.195.238:1935/hls/1194076936807170050', - - }, - events: [ - /** - * 播放器视频初始化按钮渲染完毕。 - * 播放器UI初始设置需要此事件后触发,避免UI被初始化所覆盖。 - * 播放器提供的方法需要在此事件发生后才可以调用。 - */ - 'ready', - /** - * 视频由暂停恢复为播放时触发。 - */ - 'play', - /** - * 视频暂停时触发。 - */ - 'pause', - /** - * 能够开始播放音频/视频时发生,会多次触发,仅H5播放器。 - */ - 'canplay', - /** - * 播放中,会触发多次。 - */ - 'playing', - /** - * 当前视频播放完毕时触发。 - */ - 'ended', - /** - * 直播流中断时触发。 - * m3u8/flv/rtmp在重试5次未成功后触发。 - * 提示上层流中断或需要重新加载视频。 - * PS:m3u8一直自动重试,不需要上层添加重试。 - */ - 'liveStreamStop', - /** - * m3u8直播流中断后重试事件,每次断流只触发一次。 - */ - 'onM3u8Retry', - /** - * 控制栏自动隐藏事件。 - */ - 'hideBar', - /** - * 控制栏自动显示事件。 - */ - 'showBar', - /** - * 数据缓冲事件。 - */ - 'waiting', - /** - * 播放位置发生改变时触发,仅H5播放器。 - * 可通过getCurrentTime方法,得到当前播放时间。 - */ - 'timeupdate', - /** - * 截图完成。 - */ - 'snapshoted', - /** - * 全屏事件,仅H5支持。 - */ - 'requestFullScreen', - /** - * 取消全屏事件,iOS下不会触发,仅H5支持。 - */ - 'cancelFullScreen', - /** - * 错误事件。 - */ - 'error', - /** - * 开始拖拽,参数返回拖拽点的时间。 - */ - 'startSeek', - /** - * 完成拖拽,参数返回拖拽点的时间。 - */ - 'completeSeek'] - }; - }, - watch: { - source: function source() { - //监听播放源变化 - this.init(); - }, - forbidFastForward: function forbidFastForward() { - this.init(); - }, - options: { - //配置项是对象,只能深度监听 - handler: function handler() { - this.init(); - }, - deep: true - } - }, - mounted: function mounted() { - var _this = this; - - this.$nextTick(function () { - _this.init(); - }); - }, - updated: function updated() { - var _this2 = this; - - //重载播放器 - this.$nextTick(function () { - _this2.init(); - }); - }, - methods: { - handlerFastForward: function handlerFastForward() {}, - - /** - * 创建script和css - * 加载Alipayer的SDK - */ - init: function init() { - var _this3 = this; - - var linkID = 'app__aliplayer-min-css'; - var scriptID = 'app__aliplayer-min-js'; - var head = document.getElementsByTagName('head'); - var html = document.getElementsByTagName('html'); - var scriptTag = document.getElementById(scriptID); - var linkIDTag = document.getElementById(linkID); - - if (!linkIDTag) { - // console.log('linkIDTag'); - var link = document.createElement('link'); - link.type = 'text/css'; - link.rel = 'stylesheet'; - link.href = this.cssLink; - link.id = linkID; // link.className = linkID; - - head[0].appendChild(link); - } - - if (!scriptTag) { - // console.log('scriptTag'); - scriptTag = document.createElement('script'); - scriptTag.type = "text/javascript"; - scriptTag.id = scriptID; // scriptTag.className = scriptID; - - scriptTag.src = this.scriptSrc; - html[0].appendChild(scriptTag); - } else { - this.initPlayer(); //这样是为了兼容页面上有多个播放器 - } //兼容单页加载和硬加载 - - - scriptTag.addEventListener("load", function () { - _this3.initPlayer(); - }); - }, - - /** - * 创建播放器 - * @description SDK文档地址:https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1084.131d1c4cJT7o5Z - */ - initPlayer: function initPlayer() { - var _this4 = this; - - if (typeof window.Aliplayer != 'undefined') { - var options = this.deepCloneObject(this.options); - - if (options) { - for (var key in options) { - this.config[key] = options[key]; - } - } - - if (this.source) this.config.source = this.source; //播放源 - - this.config.id = this.playerId; //赋值播放器容器id - - this.player && this.player.dispose(); //防止实例的重复 - - this.player = Aliplayer(this.config); - - var _loop = function _loop(ev) { - _this4.player && _this4.player.on(_this4.events[ev], function (e) { - // console.log(`object ${this.events[ev]}`,e); - _this4.$emit(_this4.events[ev], e); - }); - }; - - for (var ev in this.events) { - _loop(ev); - } //开启禁止拖拽快进 - - - if (this.forbidFastForward) { - var last = 0, - max_time = 0; - this.player.on('timeupdate', function () { - var current = this.getCurrentTime(); - - if (current - last > 2) { - this.seek(last); - } else { - last = current; - - if (last >= max_time) { - max_time = last; - } - } - }); - } //通过播放器实例的off方法取消订阅 - //player.off('ready',handleReady); - - } - }, - - /** - * @return player 实例 - */ - getPlayer: function getPlayer() { - return this.player; - }, - - /** - * 播放视频。 - */ - play: function play() { - // console.log(`播放视频。`); - this.player && this.player.play(); - }, - - /** - * 暂停视频 - */ - pause: function pause() { - // console.log(`暂停视频`); - this.player && this.player.pause(); - }, - - /** - * 重播视频 - */ - replay: function replay() { - // console.log(`重播视频`); - this.player && this.player.replay(); - }, - - /** - * 跳转到某个时刻进行播放,time的单位为秒。 - * @param time - * @return player - */ - seek: function seek(time) { - // console.log(`跳转到某个时刻进行播放,time为${time}秒。`); - this.player && this.player.seek(time); - }, - - /** - * 获取当前的播放时刻,返回的单位为秒。 - * @return player - */ - getCurrentTime: function getCurrentTime() { - // console.log(`获取当前的播放时刻,返回的单位为${this.player && this.player.getCurrentTime()}秒。`); - return this.player && this.player.getCurrentTime(); - }, - - /** - * 获取视频总时长,返回的单位为秒,这个需要在视频加载完成以后才可以获取到,可以在play事件后获取。 - * @return player - */ - getDuration: function getDuration() { - // console.log(`获取视频总时长,返回的单位为${this.player && this.player.getDuration()}秒。`); - return this.player && this.player.getDuration(); - }, - - /** - * 获取当前的音量,返回值为0-1的实数。ios和部分android会失效。 - * @return player - */ - getVolume: function getVolume() { - // console.log(`获取当前的音量${this.player && this.player.getVolume()}。`); - return this.player && this.player.getVolume(); - }, - - /** - * 设置音量,vol为0-1的实数,ios和部分android会失效。 - * @return player - */ - setVolume: function setVolume(v) { - // console.log(`设置音量,vol为${v}。`); - this.player && this.player.setVolume(v); - }, - - /** - * 直接播放视频url,time为可选值(单位秒)。目前只支持同种格式(mp4/flv/m3u8)之间切换。 - * 暂不支持直播rtmp流切换。 - * @return player - */ - loadByUrl: function loadByUrl(url, time) { - // console.log(`直接播放视频url${url},time为${time}。`); - this.player && this.player.loadByUrl(url, time); - }, - - /** - * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。 - * @param vid 视频id - * @param 播放凭证 - */ - replayByVidAndPlayAuth: function replayByVidAndPlayAuth(vid, playauth) { - // console.log(`replayByVidAndPlayAuth vid${vid},playauth为${playauth}。`); - this.player && this.player.replayByVidAndPlayAuth(vid, playauth); - }, - - /** - * 目前只支持H5播放器。暂不支持不同格式视频间的之间切换。暂不支持直播rtmp流切换。 - * @param vid 视频id - * @param 播放凭证 - * @description 仅MPS用户时使用 仅MPS用户时使用 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion - */ - replayByVidAndAuthInfo: function replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion) { - // console.log(`replayByVidAndAuthInfo 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion); - this.player && this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion); - }, - - /** - * 设置播放器大小w,h可分别为400px像素或60%百分比。 - * @param w 宽度 - * @param h 宽度 - * @description chrome浏览器下flash播放器分别不能小于397x297。 - */ - setPlayerSize: function setPlayerSize(w, h) { - // console.log(`设置播放器大小 宽度:${w},高度:${h}`); - this.player && this.player.setPlayerSize(w, h); - }, - - /** - * 手动设置播放的倍速,倍速播放仅H5支持。移动端可能会失效,比如android微信。 - * 倍速播放UI默认是开启的。 - * 如果自定义过skinLaout属性,需要添加speedButton项到数组里: - * @param h 宽度 - * @description {name:“speedButton”,align:“tr”,x:10,y:23} - */ - setSpeed: function setSpeed(speed) { - // console.log(`手动设置播放的倍速:${speed}`); - this.player && this.player.setSpeed(speed); - }, - - /** - * 设置截图参数 - * @param width 宽度 - * @param height 高度 - * @param rate 截图质量 - */ - setSanpshotProperties: function setSanpshotProperties(width, height, rate) { - // console.log(`设置截图参数:`,width, height, rate); - this.player && this.player.setSanpshotProperties(width, height, rate); - }, - - /** - * 播放器全屏,仅H5支持。 - */ - requestFullScreen: function requestFullScreen() { - // console.log(`播放器全屏,仅H5支持`); - this.player && this.player.fullscreenService && this.player.fullscreenService.requestFullScreen(); - }, - - /** - * 播放器退出全屏,iOS调用无效,仅H5支持。 - */ - cancelFullScreen: function cancelFullScreen() { - // console.log(`播放器全屏,仅H5支持`); - this.player && this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen(); - }, - - /** - * 获取播放器全屏状态,仅H5支持。 - */ - getIsFullScreen: function getIsFullScreen() { - // console.log(`获取播放器全屏状态,仅H5支持。`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getIsFullScreen()); - return this.player && this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen(); - }, - - /** - * 获取播放器状态,包含的值, - * @returns init ready loading play pause playing waiting error ended - */ - getStatus: function getStatus() { - // console.log(`获取播放器状态,包含的值`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus()); - return this.player && this.player.getStatus(); - }, - - /** - * 设置直播的开始结束时间,开启直播时移功能时使用。 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @description 例子:player.liveShiftSerivce.setLiveTimeRange(“”,‘2018/01/04 20:00:00’) - */ - setLiveTimeRange: function setLiveTimeRange(beginTime, endTime) { - // console.log(`设置直播的开始时间:${beginTime},结束时间:${endTime},开启直播时移功能时使用。`); - this.player && this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime); - }, - - /** - * 参数为旋转角度, 正数为正时针旋转, 负数为逆时针旋转。 - * @param rotate 旋转角度 - * @description 例如: setRotate(90)。详情参见旋转和镜像。 - */ - setRotate: function setRotate(rotate) { - // console.log(`参数为旋转角度:${rotate}。`); - this.player && this.player.setRotate(rotate); - }, - - /** - * 获取旋转角度。详情参见旋转和镜像。 - * @return rotate 旋转角度 - */ - getRotate: function getRotate() { - // console.log(`获取旋转角度:${this.player && this.player.getRotate()}`); - return this.player && this.player.getRotate(); - }, - - /** - * 设置镜像 - * @param image 镜像类型 可选值为:horizon,vertical - * @description 例如: setImage(‘horizon’)。详情参见旋转和镜像。 - */ - setImage: function setImage(image) { - // console.log(`设置镜像:${image}。`); - this.player && this.player.setImage(image); - }, - - /** - * 播放器销毁 - */ - dispose: function dispose() { - // console.log(`播放器销毁。`); - this.player && this.player.dispose(); - }, - - /** - * 设置封面 - * @param cover 封面地址 - */ - setCover: function setCover(cover) { - // console.log(`设置封面:${cover}`); - this.player && this.player.setCover(cover); - }, - - /** - * 设置封面 - * @param markers 设置打点数据 - */ - setProgressMarkers: function setProgressMarkers(markers) { - // console.log(`markers打点数据集合:${markers}`); - this.player && this.player.setProgressMarkers(markers); - }, - - /** - * 设置试看时间,单位为秒,详情参见 - * @param time 试看时间 - */ - setPreviewTime: function setPreviewTime(time) { - // console.log(`设置试看时间,单位为:${time}秒`); - this.player && this.player.setPreviewTime(time); - }, - - /** - * 获取试看时间 - * @return rotate 旋转角度 - */ - getPreviewTime: function getPreviewTime() { - // console.log(`获取试看时间:${this.player && this.player.getPreviewTime()}`); - return this.player && this.player.getPreviewTime(); - }, - - /** - * 是否试看 - */ - isPreview: function isPreview() { - // console.log(`是否试看`); - this.player && this.player.isPreview(); - }, - - /** - * @param ev 事件名 - * @param handle 回调方法 - */ - off: function off(ev, handle) { - this.player && this.player.off(ev, handle); - }, - - /** - * 深度拷贝 - * @param {*} obj - */ - deepCloneObject: function deepCloneObject(obj) { - var objClone = Array.isArray(obj) ? [] : {}; - - if (obj && _typeof(obj) === 'object') { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - //判断ojb子元素是否为对象,如果是,递归复制 - if (obj[key] && _typeof(obj[key]) === 'object') { - objClone[key] = this.deepCloneObject(obj[key]); - } else { - //如果不是,简单复制 - objClone[key] = obj[key]; - } - } - } - } - - return objClone; - } - }, - beforeDestroy: function beforeDestroy() { - //防止重复创建 - this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug) - // const head = document.querySelector('head'); - // const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`); - // (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{ - // if(index != 0) head.removeChild(item); - // }); - // const html = document.querySelector('html'); - // const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`); - // (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{ - // if(index != 0) html.removeChild(item); - // }); - } -}); -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - /* harmony default export */ var packages_AliplayerV2vue_type_script_lang_js_ = (AliplayerV2vue_type_script_lang_js_); -// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -function normalizeComponent ( - scriptExports, - render, - staticRenderFns, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier, /* server only */ - shadowMode /* vue-cli only */ -) { - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (render) { - options.render = render - options.staticRenderFns = staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 'data-v-' + scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = shadowMode - ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } - : injectStyles - } - - if (hook) { - if (options.functional) { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functioal component in vue file - var originalRender = options.render - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return originalRender(h, context) - } - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } - } - - return { - exports: scriptExports, - options: options - } -} - -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue - - - - - -/* normalize component */ - -var component = normalizeComponent( - packages_AliplayerV2vue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) - -/* harmony default export */ var AliplayerV2 = (component.exports); -// CONCATENATED MODULE: ./packages/index.js - -// packages / index.js -// 导入单个组件 - // 定义 install 方法 - -AliplayerV2.install = function (Vue, options) { - if (options && options.cssLink) AliplayerV2.props.cssLink.default = options.cssLink; - if (options && options.scriptSrc) AliplayerV2.props.scriptSrc.default = options.scriptSrc; - Vue.component(AliplayerV2.name, AliplayerV2); -}; - -AliplayerV2.Player = AliplayerV2; -/* harmony default export */ var packages_0 = (AliplayerV2); -// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/entry-lib.js - - -/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0); - - - -/***/ }), - -/***/ "25ae": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__("f9a5") && !__webpack_require__("0cc1")(function () { - return Object.defineProperty(__webpack_require__("6618")('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ "2ab1": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__("da0b"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ "3f8b": -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "4d2c": -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), - -/***/ "549d": -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ "6618": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("da0b"); -var document = __webpack_require__("3f8b").document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ "6cc2": -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), - -/***/ "6fe0": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString); - - -/***/ }), - -/***/ "7cfd": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8").f; -var FProto = Function.prototype; -var nameRE = /^\s*function ([^ (]*)/; -var NAME = 'name'; - -// 19.2.4.2 name -NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, { - configurable: true, - get: function () { - try { - return ('' + this).match(nameRE)[1]; - } catch (e) { - return ''; - } - } -}); - - -/***/ }), - -/***/ "8cac": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("da0b"); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), - -/***/ "9f7e": -/***/ (function(module, exports, __webpack_require__) { - -// 21.2.5.3 get RegExp.prototype.flags() -if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8").f(RegExp.prototype, 'flags', { - configurable: true, - get: __webpack_require__("e7a1") -}); - - -/***/ }), - -/***/ "a6d5": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("3f8b"); -var hide = __webpack_require__("b8ea"); -var has = __webpack_require__("549d"); -var SRC = __webpack_require__("4d2c")('src'); -var $toString = __webpack_require__("6fe0"); -var TO_STRING = 'toString'; -var TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__("da27").inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - - -/***/ }), - -/***/ "b8ea": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8"); -var createDesc = __webpack_require__("0614"); -module.exports = __webpack_require__("f9a5") ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ "cc1d": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -__webpack_require__("9f7e"); -var anObject = __webpack_require__("8cac"); -var $flags = __webpack_require__("e7a1"); -var DESCRIPTORS = __webpack_require__("f9a5"); -var TO_STRING = 'toString'; -var $toString = /./[TO_STRING]; - -var define = function (fn) { - __webpack_require__("a6d5")(RegExp.prototype, TO_STRING, fn, true); -}; - -// 21.2.5.14 RegExp.prototype.toString() -if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { - define(function toString() { - var R = anObject(this); - return '/'.concat(R.source, '/', - 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); - }); -// FF44- RegExp#toString has a wrong name -} else if ($toString.name != TO_STRING) { - define(function toString() { - return $toString.call(this); - }); -} - - -/***/ }), - -/***/ "d3d8": -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__("8cac"); -var IE8_DOM_DEFINE = __webpack_require__("25ae"); -var toPrimitive = __webpack_require__("2ab1"); -var dP = Object.defineProperty; - -exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), - -/***/ "da0b": -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), - -/***/ "da27": -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.6.10' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), - -/***/ "e67d": -/***/ (function(module, exports) { - -// document.currentScript polyfill by Adam Miller - -// MIT license - -(function(document){ - var currentScript = "currentScript", - scripts = document.getElementsByTagName('script'); // Live NodeList collection - - // If browser needs currentScript polyfill, add get currentScript() to the document object - if (!(currentScript in document)) { - Object.defineProperty(document, currentScript, { - get: function(){ - - // IE 6-10 supports script readyState - // IE 10+ support stack trace - try { throw new Error(); } - catch (err) { - - // Find the second match for the "at" string to get file src url from stack. - // Specifically works with the format of stack traces in IE. - var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1]; - - // For all scripts on the page, if src matches or if ready state is interactive, return the script tag - for(i in scripts){ - if(scripts[i].src == res || scripts[i].readyState == "interactive"){ - return scripts[i]; - } - } - - // If no match, return null - return null; - } - } - }); - } -})(document); - - -/***/ }), - -/***/ "e7a1": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 21.2.5.3 get RegExp.prototype.flags -var anObject = __webpack_require__("8cac"); -module.exports = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; -}; - - -/***/ }), - -/***/ "f341": -/***/ (function(module, exports, __webpack_require__) { - -var core = __webpack_require__("da27"); -var global = __webpack_require__("3f8b"); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __webpack_require__("6cc2") ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), - -/***/ "f9a5": -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__("0cc1")(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }) - -/******/ }); -}); -//# sourceMappingURL=vue-aliplayer-v2.umd.js.map \ No newline at end of file diff --git a/lib/vue-aliplayer-v2.umd.min.js b/lib/vue-aliplayer-v2.umd.min.js deleted file mode 100644 index 37866d2..0000000 --- a/lib/vue-aliplayer-v2.umd.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-aliplayer-v2"]=t():e["vue-aliplayer-v2"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="112a")}({"0614":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"0cc1":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"112a":function(e,t,n){"use strict";var r;(n.r(t),"undefined"!==typeof window)&&(n("e67d"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7cfd");var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.playerId}})},o=[];function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e){return c="function"===typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},c(e)}n("cc1d");var s={name:"VueAliplayerV2",props:{forbidFastForward:{required:!1,type:[Boolean],default:!1},options:{required:!1,type:[Object],default:function(){return null}},source:{required:!1,type:[String],default:null},cssLink:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"},scriptSrc:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"}},data:function(){return{player:null,playerId:"player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()),config:{id:null,width:"100%",autoplay:!0},events:["ready","play","pause","canplay","playing","ended","liveStreamStop","onM3u8Retry","hideBar","showBar","waiting","timeupdate","snapshoted","requestFullScreen","cancelFullScreen","error","startSeek","completeSeek"]}},watch:{source:function(){this.init()},forbidFastForward:function(){this.init()},options:{handler:function(){this.init()},deep:!0}},mounted:function(){var e=this;this.$nextTick((function(){e.init()}))},updated:function(){var e=this;this.$nextTick((function(){e.init()}))},methods:{handlerFastForward:function(){},init:function(){var e=this,t="app__aliplayer-min-css",n="app__aliplayer-min-js",r=document.getElementsByTagName("head"),i=document.getElementsByTagName("html"),o=document.getElementById(n),a=document.getElementById(t);if(!a){var c=document.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=this.cssLink,c.id=t,r[0].appendChild(c)}o?this.initPlayer():(o=document.createElement("script"),o.type="text/javascript",o.id=n,o.src=this.scriptSrc,i[0].appendChild(o)),o.addEventListener("load",(function(){e.initPlayer()}))},initPlayer:function(){var e=this;if("undefined"!=typeof window.Aliplayer){var t=this.deepCloneObject(this.options);if(t)for(var n in t)this.config[n]=t[n];this.source&&(this.config.source=this.source),this.config.id=this.playerId,this.player&&this.player.dispose(),this.player=Aliplayer(this.config);var r=function(t){e.player&&e.player.on(e.events[t],(function(n){e.$emit(e.events[t],n)}))};for(var i in this.events)r(i);if(this.forbidFastForward){var o=0,a=0;this.player.on("timeupdate",(function(){var e=this.getCurrentTime();e-o>2?this.seek(o):(o=e,o>=a&&(a=o))}))}}},getPlayer:function(){return this.player},play:function(){this.player&&this.player.play()},pause:function(){this.player&&this.player.pause()},replay:function(){this.player&&this.player.replay()},seek:function(e){this.player&&this.player.seek(e)},getCurrentTime:function(){return this.player&&this.player.getCurrentTime()},getDuration:function(){return this.player&&this.player.getDuration()},getVolume:function(){return this.player&&this.player.getVolume()},setVolume:function(e){this.player&&this.player.setVolume(e)},loadByUrl:function(e,t){this.player&&this.player.loadByUrl(e,t)},replayByVidAndPlayAuth:function(e,t){this.player&&this.player.replayByVidAndPlayAuth(e,t)},replayByVidAndAuthInfo:function(e,t,n,r,i,o){this.player&&this.player.replayByVidAndAuthInfo(e,t,n,r,i,o)},setPlayerSize:function(e,t){this.player&&this.player.setPlayerSize(e,t)},setSpeed:function(e){this.player&&this.player.setSpeed(e)},setSanpshotProperties:function(e,t,n){this.player&&this.player.setSanpshotProperties(e,t,n)},requestFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.requestFullScreen()},cancelFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.cancelFullScreen()},getIsFullScreen:function(){return this.player&&this.player.fullscreenService&&this.player.fullscreenService.getIsFullScreen()},getStatus:function(){return this.player&&this.player.getStatus()},setLiveTimeRange:function(e,t){this.player&&this.player.liveShiftSerivce&&this.player.liveShiftSerivce.setLiveTimeRange(e,t)},setRotate:function(e){this.player&&this.player.setRotate(e)},getRotate:function(){return this.player&&this.player.getRotate()},setImage:function(e){this.player&&this.player.setImage(e)},dispose:function(){this.player&&this.player.dispose()},setCover:function(e){this.player&&this.player.setCover(e)},setProgressMarkers:function(e){this.player&&this.player.setProgressMarkers(e)},setPreviewTime:function(e){this.player&&this.player.setPreviewTime(e)},getPreviewTime:function(){return this.player&&this.player.getPreviewTime()},isPreview:function(){this.player&&this.player.isPreview()},off:function(e,t){this.player&&this.player.off(e,t)},deepCloneObject:function(e){var t=Array.isArray(e)?[]:{};if(e&&"object"===c(e))for(var n in e)e.hasOwnProperty(n)&&(e[n]&&"object"===c(e[n])?t[n]=this.deepCloneObject(e[n]):t[n]=e[n]);return t}},beforeDestroy:function(){this.dispose()}},u=s;function l(e,t,n,r,i,o,a,c){var s,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=s):i&&(s=c?function(){i.call(this,this.$root.$options.shadowRoot)}:i),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(e,t){return s.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:e,options:u}}var f=l(u,i,o,!1,null,null,null),p=f.exports;p.install=function(e,t){t&&t.cssLink&&(p.props.cssLink.default=t.cssLink),t&&t.scriptSrc&&(p.props.scriptSrc.default=t.scriptSrc),e.component(p.name,p)},p.Player=p;var y=p;t["default"]=y},"25ae":function(e,t,n){e.exports=!n("f9a5")&&!n("0cc1")((function(){return 7!=Object.defineProperty(n("6618")("div"),"a",{get:function(){return 7}}).a}))},"2ab1":function(e,t,n){var r=n("da0b");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"3f8b":function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"4d2c":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"549d":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},6618:function(e,t,n){var r=n("da0b"),i=n("3f8b").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"6cc2":function(e,t){e.exports=!1},"6fe0":function(e,t,n){e.exports=n("f341")("native-function-to-string",Function.toString)},"7cfd":function(e,t,n){var r=n("d3d8").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n("f9a5")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},"8cac":function(e,t,n){var r=n("da0b");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},"9f7e":function(e,t,n){n("f9a5")&&"g"!=/./g.flags&&n("d3d8").f(RegExp.prototype,"flags",{configurable:!0,get:n("e7a1")})},a6d5:function(e,t,n){var r=n("3f8b"),i=n("b8ea"),o=n("549d"),a=n("4d2c")("src"),c=n("6fe0"),s="toString",u=(""+c).split(s);n("da27").inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,c){var s="function"==typeof n;s&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(s&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:c?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||c.call(this)}))},b8ea:function(e,t,n){var r=n("d3d8"),i=n("0614");e.exports=n("f9a5")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},cc1d:function(e,t,n){"use strict";n("9f7e");var r=n("8cac"),i=n("e7a1"),o=n("f9a5"),a="toString",c=/./[a],s=function(e){n("a6d5")(RegExp.prototype,a,e,!0)};n("0cc1")((function(){return"/a/b"!=c.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):c.name!=a&&s((function(){return c.call(this)}))},d3d8:function(e,t,n){var r=n("8cac"),i=n("25ae"),o=n("2ab1"),a=Object.defineProperty;t.f=n("f9a5")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},da0b:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},da27:function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},e67d:function(e,t){(function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})})(document)},e7a1:function(e,t,n){"use strict";var r=n("8cac");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},f341:function(e,t,n){var r=n("da27"),i=n("3f8b"),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("6cc2")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},f9a5:function(e,t,n){e.exports=!n("0cc1")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}})})); -//# sourceMappingURL=vue-aliplayer-v2.umd.min.js.map \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..5e82f89 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1250 @@ +{ + "name": "vue-aliplayer-v2", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vue-aliplayer-v2", + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "vue": "^3.5.34" + }, + "devDependencies": { + "@types/node": "^24.10.0", + "@vitejs/plugin-vue": "^6.0.7", + "typescript": "^5.9.3", + "vite": "^8.0.14", + "vue-tsc": "^3.3.1" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", + "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.132.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.132.0.tgz", + "integrity": "sha512-FESMOxil5Se014ui/Eq8fT5uHJo6nIRwH0PfJrZJXs6Gek3ZVFOrpUv3YIZT20m+extU98Hg1Ym72U58rlsxUQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.2.tgz", + "integrity": "sha512-ZS4D1JPGn/MYQN/SYDWftIE/nVsM8j/AFOYEzAoOE2O3NktQOZru+/vYXGbR/qtdLdIfGCP0lcoJiYVzsEz+iQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.2.tgz", + "integrity": "sha512-vdFA9+C/rekyGce7WqHs/xoT0ioZEWaOFyZLIV1mEeNFaFDUQrPIo8Vs2GvJ6eetb3rzDUtUBgzto3ExpXJB3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.2.tgz", + "integrity": "sha512-BewSOwTHazv77DTYiAZXSqqKZ4KP/KonFisDMVU7PImxoWfB2aepnPhd2E4SWz3zDzYgDNbs6jBmTdgNnF02GA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.2.tgz", + "integrity": "sha512-m41o7M0YWtUdqk61Tb+jnKb2rN++iRdIASlExkUoKfIAH30DOHCB8fVLzSUpbWHHU8esmEioY62PxzexE8MBuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.2.tgz", + "integrity": "sha512-jcojB9H7W/jS29pMKWAK1N+fU99vXodHDTatS3b3y/XSOCiHo0kkA74pL3jJmkoQtYpOCxDvaKs1fo2Ij/1X5w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.2.tgz", + "integrity": "sha512-1jn6qDU5iiOgFgygDzKUuKP0maTi0/f1+sBLgvij/76C77Nm3ts6ufz9Bjg5q5dduxiUIxtq86JIoBvo1xQ4Ig==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.2.tgz", + "integrity": "sha512-QVLO/czFMdoMFSqlX3bcswcJNm/23r+qoa/jgtmFc/qEp6/jXmIkDjF/XIo8dPfGaiwy1xfQn8o77L79GeXFgw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.2.tgz", + "integrity": "sha512-hgO5Abm0w5UL6FEa2iFnZqo2KlK7TQ5QhV5x09hujBf7t5KzHQ1VmfPuTpqRy/rNlSxua3eWH374xxiVrP+lcA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.2.tgz", + "integrity": "sha512-fy8rXxuYEu602abC8MUNaPjYLIFzReOaEIEMKMUa0rFEUxNpVXhs15KSSQ4qlqSaM7B6rcj9rDZgADh/IGDzLQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.2.tgz", + "integrity": "sha512-0+bOkiQ779+r1WpoHOWHqncvyySci0vKph+myNDYb+im6meJAzHQXay6oEgnkHuUGouM1LKTZwqKpBow6Kj7CQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.2.tgz", + "integrity": "sha512-mjSkrzZK5Qsl0a9d1JgILOiuZOSDTVdKENcSXBoqbzSrspLR/4/IRVDo5wd2GgZjNss/viBFJdeq+j7qH2nypw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.2.tgz", + "integrity": "sha512-1v5vHasdfQAZoEHakBV72LIFAC9JjnymsiKxp+GEr/ma3+NJCPSaYK+qavInOovJkgwFrs7GccX2d6IgDA3Z5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.2.tgz", + "integrity": "sha512-mb1VobWn6NheziTk5/WEaR6AKVbrwT5sOi6C7zk3gy/pD1qtJfU1j4PgTo2NJnOtbL9Dl3Aeei8w9jJ7qC2jZQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.2.tgz", + "integrity": "sha512-SqKonF56vA/L2yHwHYcEp2P34URpOZ7d1fS635cTkpDnUtEGdUbhI6NzsPdqeSWvAAeGDrxjWjNmibDIdFf9/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.2.tgz", + "integrity": "sha512-v7qRI7gXLRINcOGXt+7YmAZ6iFuyZVMIoXAxhd8oP+DR9dLfL9GfNIx7PLMxmhZdvq8waUJBQiWN9EKNy+TRBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", + "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/node": { + "version": "24.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz", + "integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.7.tgz", + "integrity": "sha512-km+p+XdSz9Sxm5rqUbqcSfZYaAniKxWBj1KURl+Jr7UaPvvX7BmaWMdP69I5rrFDeQGyxAG7NXdc57vz+snhWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@volar/language-core": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.28.tgz", + "integrity": "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "2.4.28" + } + }, + "node_modules/@volar/source-map": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.28.tgz", + "integrity": "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.28.tgz", + "integrity": "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.34.tgz", + "integrity": "sha512-s9cLyK5mLcvZ4Agva5QgRsQyLKvts9WbU9DB6NqiZkkGEdwmcEiylj5Jbwkp680drF/NNCV8OlAJSe+yMLxaJw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@vue/shared": "3.5.34", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.34.tgz", + "integrity": "sha512-EbF/T++k0e2MMZlJsBhzK8Sgwt0HcIPOhzn1CTB/lv6sQcyk+OWf8YeiLxZp3ro7MbbLcAfAJ6sEvjFWuNgUCw==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.34.tgz", + "integrity": "sha512-D/ihr6uZeIt6r+pVZf46RWT1fAsLFMbUP7k8G1VkiiWexriED9GrX3echHd4Abbt17zjlfiFJ8z7a3BxZOPNjg==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@vue/compiler-core": "3.5.34", + "@vue/compiler-dom": "3.5.34", + "@vue/compiler-ssr": "3.5.34", + "@vue/shared": "3.5.34", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.14", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.34.tgz", + "integrity": "sha512-cDtTHKibkThKGHH1SP+WdccquNRYQDFH6rRjQCqT9G2ltFAfoR5pUftpab/z+aM5mW9HLLVQW7hfKKQe/1GBeQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/language-core": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.3.1.tgz", + "integrity": "sha512-NP8g6V7x81NVOXbLupUvYY6i6LqUkjkVowe2epRedmpgaFCOdjgWHE/rQBvEJ4r7koAYODIjGeBWEdt6n7jYXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "@vue/compiler-dom": "^3.5.0", + "@vue/shared": "^3.5.0", + "alien-signals": "^3.2.0", + "muggle-string": "^0.4.1", + "path-browserify": "^1.0.1", + "picomatch": "^4.0.4" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.34.tgz", + "integrity": "sha512-y9XDjCEuBp+98k+UL5dbYkh57AHU4o6cxZedOPXw3bmrZZYLQsVHguGurq7hVrPCSrQtrnz1f9dssyFr+dMXfQ==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.34.tgz", + "integrity": "sha512-mKeBYvu8tcMSLhypAHBmriUFfWXKTCF/23Z4jiCoYK3UtWepkliViNLuR90V9XOyD62mUxs9p1jsrpK3CCGIzw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.34.tgz", + "integrity": "sha512-e8kZzERmCwUnBRVsgSQlAfrfU2rGoy0FFKPBXSlfEjc/O3KfA7QP0t1/2ZylrbchjmIKB4dPTd07A6WPr0eOrg==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.34", + "@vue/runtime-core": "3.5.34", + "@vue/shared": "3.5.34", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.34.tgz", + "integrity": "sha512-nHxmJoTrKsmrkbILRhkC9gY1G3moZbJTqCzDd7DOOzG5KH9oeJ0Unqrff5f9v0pW//jES05ZkJcNtfE8JjOIew==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.34", + "@vue/shared": "3.5.34" + }, + "peerDependencies": { + "vue": "3.5.34" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.34.tgz", + "integrity": "sha512-24uqU4OIiX29ryC3MeWid/Xf2fa2EFRUVLb77nRhk+UrTVrh/XiGtFAFmJBAtBRbjwNdsPRP+jj/OL27Eg1NDA==", + "license": "MIT" + }, + "node_modules/alien-signals": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.2.1.tgz", + "integrity": "sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/muggle-string": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rolldown": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.2.tgz", + "integrity": "sha512-oZx5zVDtVB44AW3eaifgDml1gWRDZGvjcfdxonE4swNPG98PrrXjaO/KrnUjzlMnztCCRVlUueA1kCXhARGk6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.132.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.2", + "@rolldown/binding-darwin-arm64": "1.0.2", + "@rolldown/binding-darwin-x64": "1.0.2", + "@rolldown/binding-freebsd-x64": "1.0.2", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.2", + "@rolldown/binding-linux-arm64-gnu": "1.0.2", + "@rolldown/binding-linux-arm64-musl": "1.0.2", + "@rolldown/binding-linux-ppc64-gnu": "1.0.2", + "@rolldown/binding-linux-s390x-gnu": "1.0.2", + "@rolldown/binding-linux-x64-gnu": "1.0.2", + "@rolldown/binding-linux-x64-musl": "1.0.2", + "@rolldown/binding-openharmony-arm64": "1.0.2", + "@rolldown/binding-wasm32-wasi": "1.0.2", + "@rolldown/binding-win32-arm64-msvc": "1.0.2", + "@rolldown/binding-win32-x64-msvc": "1.0.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.0.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.14.tgz", + "integrity": "sha512-s4BJJ+5y1pYL6Otw51FHhVJQhPnuRinKig64g/1+EUNaJsd3gCKdD31IPFvswUgW9/60QT9oFHbZHbQK5imcxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.15", + "rolldown": "1.0.2", + "tinyglobby": "^0.2.16" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.18", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vscode-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vue": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.34.tgz", + "integrity": "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.34", + "@vue/compiler-sfc": "3.5.34", + "@vue/runtime-dom": "3.5.34", + "@vue/server-renderer": "3.5.34", + "@vue/shared": "3.5.34" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-tsc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.3.1.tgz", + "integrity": "sha512-webBP3jhlxzhELZ2g+11KJ6pg5OVY1xWhWrj7N/yQMi1CrtxJnW+tUACyRVeDK0cQNLP2Va5HNYK8pe+7c+msw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/typescript": "2.4.28", + "@vue/language-core": "3.3.1" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } + } + } +} diff --git a/package.json b/package.json index e397c66..418db37 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,44 @@ { "name": "vue-aliplayer-v2", - "version": "1.3.1", + "version": "2.0.0", + "type": "module", "author": "yxs", - "description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景", - "main": "lib/vue-aliplayer-v2.umd.min.js", + "description": "Vue 3 wrapper for Aliyun Aliplayer. Supports mp4, m3u8, flv, live streams, encrypted playback, quality switching, and live time shift through the official Aliplayer SDK.", + "main": "lib/vue-aliplayer-v2.umd.cjs", + "module": "lib/vue-aliplayer-v2.js", + "types": "lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "import": "./lib/vue-aliplayer-v2.js", + "require": "./lib/vue-aliplayer-v2.umd.cjs" + } + }, + "files": [ + "lib", + "README.md" + ], "private": false, "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint", - "lib": "vue-cli-service build --target lib --name vue-aliplayer-v2 --dest lib packages/index.js" + "dev": "vite --host 0.0.0.0", + "build": "vite build --mode demo", + "type-check": "vue-tsc --noEmit", + "lib": "vue-tsc -p tsconfig.build.json --declaration --emitDeclarationOnly --outDir lib/types && vite build --mode lib", + "lint": "vue-tsc --noEmit" }, "dependencies": { - "core-js": "^2.6.5", - "vue": "^2.6.10" + "vue": "^3.5.34" }, "devDependencies": { - "@vue/cli-plugin-babel": "^3.8.0", - "@vue/cli-plugin-eslint": "^3.8.0", - "@vue/cli-service": "^3.8.0", - "babel-eslint": "^10.0.1", - "eslint": "^5.16.0", - "eslint-plugin-vue": "^5.0.0", - "less": "^3.9.0", - "less-loader": "^5.0.0", - "vue-template-compiler": "^2.6.10" + "@types/node": "^24.10.0", + "@vitejs/plugin-vue": "^6.0.7", + "typescript": "^5.9.3", + "vite": "^8.0.14", + "vue-tsc": "^3.3.1" }, "repository": { "type": "git", "url": "git@github.com:langyuxiansheng/vue-aliplayer-v2.git" } -} \ No newline at end of file +} diff --git a/packages/AliplayerV2/index.vue b/packages/AliplayerV2/index.vue index 4561025..dd58555 100644 --- a/packages/AliplayerV2/index.vue +++ b/packages/AliplayerV2/index.vue @@ -1,555 +1,386 @@ - + + diff --git a/packages/AliplayerV2/sdkLoader.ts b/packages/AliplayerV2/sdkLoader.ts new file mode 100644 index 0000000..fc49bb7 --- /dev/null +++ b/packages/AliplayerV2/sdkLoader.ts @@ -0,0 +1,81 @@ +export const DEFAULT_SDK_VERSION = '2.37.0'; +export const DEFAULT_CSS_LINK = `https://g.alicdn.com/apsara-media-box/imp-web-player/${DEFAULT_SDK_VERSION}/skins/default/aliplayer-min.css`; +export const DEFAULT_SCRIPT_SRC = `https://g.alicdn.com/apsara-media-box/imp-web-player/${DEFAULT_SDK_VERSION}/aliplayer-min.js`; + +const scriptLoadPromises = new Map>(); + +export function getCssLinkByVersion(version: string): string { + return `https://g.alicdn.com/apsara-media-box/imp-web-player/${version}/skins/default/aliplayer-min.css`; +} + +export function getScriptSrcByVersion(version: string): string { + return `https://g.alicdn.com/apsara-media-box/imp-web-player/${version}/aliplayer-min.js`; +} + +function ensureStylesheet(cssLink: string): void { + if (!cssLink) return; + + const existed = document.querySelector(`link[data-vue-aliplayer-v2-css="${cssLink}"]`); + if (existed) return; + + const link = document.createElement('link'); + link.type = 'text/css'; + link.rel = 'stylesheet'; + link.href = cssLink; + link.dataset.vueAliplayerV2Css = cssLink; + document.head.appendChild(link); +} + +function ensureScript(scriptSrc: string, globalName?: string): Promise { + if (!scriptSrc) return Promise.resolve(); + if (globalName && window[globalName]) return Promise.resolve(); + if (scriptLoadPromises.has(scriptSrc)) return scriptLoadPromises.get(scriptSrc) as Promise; + + const existed = document.querySelector(`script[data-vue-aliplayer-v2-js="${scriptSrc}"]`); + if (existed) { + const loadPromise = new Promise((resolve, reject) => { + if (existed.dataset.vueAliplayerV2Loaded === 'true') { + resolve(); + return; + } + existed.addEventListener('load', () => { + existed.dataset.vueAliplayerV2Loaded = 'true'; + resolve(); + }, { once: true }); + existed.addEventListener('error', () => reject(new Error(`Failed to load Aliplayer SDK: ${scriptSrc}`)), { once: true }); + }); + scriptLoadPromises.set(scriptSrc, loadPromise); + return loadPromise; + } + + const loadPromise = new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = scriptSrc; + script.dataset.vueAliplayerV2Js = scriptSrc; + script.addEventListener('load', () => { + script.dataset.vueAliplayerV2Loaded = 'true'; + resolve(); + }, { once: true }); + script.addEventListener('error', () => reject(new Error(`Failed to load Aliplayer SDK: ${scriptSrc}`)), { once: true }); + document.documentElement.appendChild(script); + }); + + scriptLoadPromises.set(scriptSrc, loadPromise); + return loadPromise; +} + +/** + * Shared SDK loader. It prevents duplicate CSS/JS tags when several player + * instances mount at the same time or are recreated by route changes. + */ +export async function loadAliplayerSdk(cssLink: string, scriptSrc: string): Promise { + ensureStylesheet(cssLink); + await ensureScript(scriptSrc, 'Aliplayer'); +} + +export async function loadExtraScripts(scriptUrls: string[] = []): Promise { + for (const scriptUrl of scriptUrls) { + await ensureScript(scriptUrl); + } +} diff --git a/packages/AliplayerV2/source.ts b/packages/AliplayerV2/source.ts new file mode 100644 index 0000000..6d826a6 --- /dev/null +++ b/packages/AliplayerV2/source.ts @@ -0,0 +1,25 @@ +export type SourceFormat = 'mp4' | 'm3u8' | 'flv' | 'rtmp' | 'mp3' | null; + +const KNOWN_FORMATS: SourceFormat[] = ['m3u8', 'flv', 'mp4', 'rtmp', 'mp3']; + +export function inferSourceFormat(source?: string | null): SourceFormat { + if (!source) return null; + + if (/^rtmps?:\/\//i.test(source)) return 'rtmp'; + + const cleanSource = source.split('?')[0].split('#')[0].toLowerCase(); + const matched = KNOWN_FORMATS.find((format) => format && cleanSource.endsWith(`.${format}`)); + return matched || null; +} + +export function normalizeSource(source?: string | null): string | null { + if (!source) return source || null; + if (/^(data|blob):/i.test(source)) return source; + + try { + return encodeURI(source); + } catch { + return source; + } +} + diff --git a/packages/AliplayerV2/tracking.ts b/packages/AliplayerV2/tracking.ts new file mode 100644 index 0000000..07ae890 --- /dev/null +++ b/packages/AliplayerV2/tracking.ts @@ -0,0 +1,49 @@ +const DEFAULT_TRACKING_PATTERNS: Array = [ + 'videocloud.cn-hangzhou.log.aliyuncs.com/logstores/newplayer/track' +]; + +let trackingBlockerInstalled = false; + +function matchesTrackingUrl(url: string, patterns: Array): boolean { + return patterns.some((pattern) => { + if (typeof pattern === 'string') return url.includes(pattern); + return pattern.test(url); + }); +} + +export function installTrackingBlocker(patterns: Array = DEFAULT_TRACKING_PATTERNS): void { + if (trackingBlockerInstalled) return; + trackingBlockerInstalled = true; + + const originalFetch = window.fetch?.bind(window); + if (originalFetch) { + window.fetch = ((input: RequestInfo | URL, init?: RequestInit) => { + const url = typeof input === 'string' || input instanceof URL ? String(input) : input.url; + if (matchesTrackingUrl(url, patterns)) { + return Promise.resolve(new Response(null, { status: 204, statusText: 'No Content' })); + } + return originalFetch(input, init); + }) as typeof window.fetch; + } + + const originalOpen = XMLHttpRequest.prototype.open; + const originalSend = XMLHttpRequest.prototype.send; + + XMLHttpRequest.prototype.open = function open(method: string, url: string | URL, async?: boolean, username?: string | null, password?: string | null): void { + this.__vueAliplayerV2Blocked = matchesTrackingUrl(String(url), patterns); + originalOpen.call(this, method, url, async ?? true, username ?? undefined, password ?? undefined); + }; + + XMLHttpRequest.prototype.send = function send(body?: Document | XMLHttpRequestBodyInit | null): void { + if (this.__vueAliplayerV2Blocked) { + return; + } + originalSend.call(this, body); + }; +} + +declare global { + interface XMLHttpRequest { + __vueAliplayerV2Blocked?: boolean; + } +} diff --git a/packages/AliplayerV2/types.ts b/packages/AliplayerV2/types.ts new file mode 100644 index 0000000..f62a574 --- /dev/null +++ b/packages/AliplayerV2/types.ts @@ -0,0 +1,170 @@ +import type { Plugin } from 'vue'; + +export interface VueAliplayerV2Options { + sdkVersion?: string; + cssLink?: string; + scriptSrc?: string; + componentScripts?: string[]; + disableTracking?: boolean; + trackingUrlPatterns?: Array; +} + +export interface AliplayerV2Props extends VueAliplayerV2Options { + autoFormat?: boolean; + forbidFastForward?: boolean; + license?: AliplayerLicense | null; + lowLatency?: boolean; + normalizeSourceUrl?: boolean; + options?: AliplayerOptions | null; + source?: string | null; +} + +export interface AliplayerLicense { + domain: string; + key: string; +} + +export type AliplayerEventName = + | 'ready' + | 'play' + | 'pause' + | 'canplay' + | 'playing' + | 'ended' + | 'liveStreamStop' + | 'onM3u8Retry' + | 'hideBar' + | 'showBar' + | 'waiting' + | 'timeupdate' + | 'snapshoted' + | 'requestFullScreen' + | 'cancelFullScreen' + | 'error' + | 'startSeek' + | 'completeSeek'; + +export interface AliplayerOptions { + id?: string; + source?: string; + width?: string; + autoplay?: boolean; + isLive?: boolean; + format?: string; + license?: AliplayerLicense; + vid?: string; + playauth?: string; + accessKeyId?: string; + securityToken?: string; + accessKeySecret?: string; + region?: string; + authTimeout?: number; + components?: unknown[]; + enableStashBufferForFlv?: boolean; + stashInitialSizeForFlv?: number; + rtsVersion?: string; + [key: string]: unknown; +} + +export interface AliplayerFullscreenService { + requestFullScreen: () => void; + cancelFullScreen: () => void; + getIsFullScreen: () => boolean; +} + +export interface AliplayerLiveShiftService { + setLiveTimeRange: (beginTime: string, endTime: string) => void; +} + +export interface AliplayerInstance { + on: (eventName: string, handler: (event?: unknown) => void) => void; + off?: (eventName: string, handler: (event?: unknown) => void) => void; + play: () => void; + pause: () => void; + replay: () => void; + seek: (time: number) => void; + getCurrentTime: () => number; + getDuration: () => number; + getVolume: () => number; + setVolume: (volume: number) => void; + loadByUrl: (url: string, time?: number) => void; + replayByVidAndPlayAuth: (vid: string, playauth: string) => void; + replayByVidAndAuthInfo: ( + vid: string, + accId: string, + accSecret: string, + stsToken: string, + authInfo: string, + domainRegion: string + ) => void; + setPlayerSize: (width: string, height: string) => void; + setSpeed: (speed: number) => void; + setSanpshotProperties: (width: number, height: number, rate: number) => void; + fullscreenService?: AliplayerFullscreenService; + getStatus: () => string; + liveShiftSerivce?: AliplayerLiveShiftService; + setRotate: (rotate: number) => void; + getRotate: () => number; + setImage: (image: string) => void; + dispose: () => void; + setCover: (cover: string) => void; + setProgressMarkers: (markers: unknown[]) => void; + setPreviewTime: (time: number) => void; + getPreviewTime: () => number; + isPreview: () => boolean; +} + +export interface VueAliplayerV2Expose { + getPlayer: () => AliplayerInstance | null; + init: () => Promise; + initPlayer: () => void; + reload: (nextSource?: string) => Promise; + retry: (nextSource?: string) => Promise; + play: () => void; + pause: () => void; + replay: () => void; + seek: (time: number) => void; + getCurrentTime: () => number | undefined; + getDuration: () => number | undefined; + getVolume: () => number | undefined; + setVolume: (volume: number) => void; + loadByUrl: (url: string, time?: number) => void; + replayByVidAndPlayAuth: (vid: string, playauth: string) => void; + replayByVidAndAuthInfo: ( + vid: string, + accId: string, + accSecret: string, + stsToken: string, + authInfo: string, + domainRegion: string + ) => void; + setPlayerSize: (width: string, height: string) => void; + setSpeed: (speed: number) => void; + setSanpshotProperties: (width: number, height: number, rate: number) => void; + requestFullScreen: () => void; + cancelFullScreen: () => void; + getIsFullScreen: () => boolean | undefined; + getStatus: () => string | undefined; + setLiveTimeRange: (beginTime: string, endTime: string) => void; + setRotate: (rotate: number) => void; + getRotate: () => number | undefined; + setImage: (image: string) => void; + dispose: () => void; + setCover: (cover: string) => void; + setProgressMarkers: (markers: unknown[]) => void; + setPreviewTime: (time: number) => void; + getPreviewTime: () => number | undefined; + isPreview: () => boolean | undefined; + off: (eventName: string, handler: (event?: unknown) => void) => void; +} + +export type VueAliplayerV2Plugin = Plugin & { + Player?: unknown; +}; + +declare global { + interface Window { + Aliplayer?: (options: AliplayerOptions) => AliplayerInstance; + [key: string]: unknown; + } +} diff --git a/packages/index.js b/packages/index.js deleted file mode 100644 index ef91c76..0000000 --- a/packages/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// packages / index.js -// 导入单个组件 -import VueAliplayerV2 from './AliplayerV2'; -// 定义 install 方法 -VueAliplayerV2.install = (Vue, options) =>{ - if(options && options.cssLink) VueAliplayerV2.props.cssLink.default = options.cssLink; - if(options && options.scriptSrc) VueAliplayerV2.props.scriptSrc.default = options.scriptSrc; - Vue.component(VueAliplayerV2.name, VueAliplayerV2); -}; -VueAliplayerV2.Player = VueAliplayerV2; -export default VueAliplayerV2; diff --git a/packages/index.ts b/packages/index.ts new file mode 100644 index 0000000..d29e1ab --- /dev/null +++ b/packages/index.ts @@ -0,0 +1,54 @@ +import type { App } from 'vue'; +import VueAliplayerV2 from './AliplayerV2/index.vue'; +import { DEFAULT_CSS_LINK, DEFAULT_SCRIPT_SRC, DEFAULT_SDK_VERSION } from './AliplayerV2/sdkLoader'; +import type { VueAliplayerV2Options } from './AliplayerV2/types'; + +export type { + AliplayerEventName, + AliplayerInstance, + AliplayerLicense, + AliplayerOptions, + AliplayerV2Props, + VueAliplayerV2Expose, + VueAliplayerV2Options +} from './AliplayerV2/types'; + +type InstallableVueAliplayerV2 = typeof VueAliplayerV2 & { + install: (app: App, options?: VueAliplayerV2Options) => void; + Player: typeof VueAliplayerV2; + props: { + sdkVersion: { default: string | (() => string) }; + cssLink: { default: string | (() => string) }; + scriptSrc: { default: string | (() => string) }; + componentScripts: { default: string[] | (() => string[]) }; + disableTracking: { default: boolean | (() => boolean) }; + trackingUrlPatterns: { default: Array | (() => Array) }; + }; +}; + +const globalOptions: Required = { + sdkVersion: DEFAULT_SDK_VERSION, + cssLink: DEFAULT_CSS_LINK, + scriptSrc: DEFAULT_SCRIPT_SRC, + componentScripts: [], + disableTracking: false, + trackingUrlPatterns: [] +}; + +const installable = VueAliplayerV2 as unknown as InstallableVueAliplayerV2; + +installable.install = (app: App, options?: VueAliplayerV2Options): void => { + Object.assign(globalOptions, options || {}); + app.component('VueAliplayerV2', installable); +}; + +installable.props.cssLink.default = (): string => globalOptions.cssLink; +installable.props.scriptSrc.default = (): string => globalOptions.scriptSrc; +installable.props.sdkVersion.default = (): string => globalOptions.sdkVersion; +installable.props.componentScripts.default = (): string[] => globalOptions.componentScripts; +installable.props.disableTracking.default = (): boolean => globalOptions.disableTracking; +installable.props.trackingUrlPatterns.default = (): Array => globalOptions.trackingUrlPatterns; +installable.Player = installable; + +export { installable as VueAliplayerV2 }; +export default installable; diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 961986e..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: { - autoprefixer: {} - } -} diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 4c20b53..0000000 --- a/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - vue-aliplayer-v2 - - - -
- - - diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..1fced3e --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.json", + "include": ["packages/**/*.ts", "packages/**/*.vue", "env.d.ts"], + "exclude": ["examples/**", "dist/**", "lib/**", "node_modules/**"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..03399b2 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "jsx": "preserve", + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "types": ["node"] + }, + "include": [ + "env.d.ts", + "examples/**/*.ts", + "examples/**/*.vue", + "packages/**/*.ts", + "packages/**/*.vue", + "vite.config.ts" + ] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..b0378e5 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,36 @@ +import { resolve } from 'node:path'; +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; + +export default defineConfig(({ mode }) => { + const isDemoBuild = mode === 'demo'; + + return { + base: isDemoBuild ? '/vue-aliplayer-v2/' : '/', + plugins: [vue()], + publicDir: isDemoBuild ? 'public' : false, + build: isDemoBuild + ? { + outDir: 'dist', + emptyOutDir: true + } + : { + outDir: 'lib', + emptyOutDir: false, + lib: { + entry: resolve(__dirname, 'packages/index.ts'), + name: 'VueAliplayerV2', + fileName: 'vue-aliplayer-v2' + }, + rollupOptions: { + external: ['vue'], + output: { + exports: 'named', + globals: { + vue: 'Vue' + } + } + } + } + }; +}); diff --git a/vue.config.js b/vue.config.js deleted file mode 100644 index 3bdde58..0000000 --- a/vue.config.js +++ /dev/null @@ -1,15 +0,0 @@ -// vue.config.js -module.exports = { - // 将 examples 目录添加为新的页面 - pages: { - index: { - // page 的入口 - entry: 'examples/main.js', - // 模板来源 - template: 'public/index.html', - // 输出文件名 - filename: 'index.html' - } - }, - publicPath: process.env.NODE_ENV === "production" ? "/vue-aliplayer-v2" : "/" -}